jsonnet: fix build on non-x86/arm architectures
This commit is contained in:
parent
848f6625fd
commit
140c00e44c
|
@ -0,0 +1,27 @@
|
|||
commit 9d1ebbeb750a790e0df045bf24ea2181a6ba3cf7
|
||||
Author: q66 <daniel@octaforge.org>
|
||||
Date: Thu Jan 6 17:06:34 2022 +0100
|
||||
|
||||
error: 'trap_instruction' was not declared in this scope
|
||||
|
||||
diff --git a/third_party/rapidyaml/rapidyaml/ext/c4core/src/c4/ext/debugbreak/debugbreak.h b/third_party/rapidyaml/rapidyaml/ext/c4core/src/c4/ext/debugbreak/debugbreak.h
|
||||
index f570bf8..9c5fc2c 100644
|
||||
--- a/third_party/rapidyaml/rapidyaml/ext/c4core/src/c4/ext/debugbreak/debugbreak.h
|
||||
+++ b/third_party/rapidyaml/rapidyaml/ext/c4core/src/c4/ext/debugbreak/debugbreak.h
|
||||
@@ -102,13 +102,16 @@ __inline__ static void trap_instruction(void)
|
||||
}
|
||||
#else
|
||||
enum { HAVE_TRAP_INSTRUCTION = 0, };
|
||||
+#define NO_TRAP_INSTRUCTION 1
|
||||
#endif
|
||||
|
||||
__attribute__((gnu_inline, always_inline))
|
||||
__inline__ static void debug_break(void)
|
||||
{
|
||||
if (HAVE_TRAP_INSTRUCTION) {
|
||||
+#ifndef NO_TRAP_INSTRUCTION
|
||||
trap_instruction();
|
||||
+#endif
|
||||
} else if (DEBUG_BREAK_PREFER_BUILTIN_TRAP_TO_SIGTRAP) {
|
||||
/* raises SIGILL on Linux x86{,-64}, to continue in gdb:
|
||||
* (gdb) handle SIGILL stop nopass
|
|
@ -0,0 +1,22 @@
|
|||
--- a/third_party/rapidyaml/rapidyaml/ext/c4core/src/c4/ext/fast_float/include/fast_float/float_common.h
|
||||
+++ b/third_party/rapidyaml/rapidyaml/ext/c4core/src/c4/ext/fast_float/include/fast_float/float_common.h
|
||||
@@ -9,10 +9,12 @@
|
||||
|| defined(__amd64) || defined(__aarch64__) || defined(_M_ARM64) \
|
||||
|| defined(__MINGW64__) \
|
||||
|| defined(__s390x__) \
|
||||
+ || defined(__powerpc64__) \
|
||||
|| (defined(__ppc64__) || defined(__PPC64__) || defined(__ppc64le__) || defined(__PPC64LE__)))
|
||||
#define FASTFLOAT_64BIT
|
||||
#elif (defined(__i386) || defined(__i386__) || defined(_M_IX86) \
|
||||
|| defined(__arm__) \
|
||||
+ || defined(__powerpc__) \
|
||||
|| defined(__MINGW32__))
|
||||
#define FASTFLOAT_32BIT
|
||||
#else
|
||||
@@ -337,4 +339,4 @@ inline OStream& operator<<(OStream &out, const fast_float::decimal &d) {
|
||||
return out;
|
||||
}
|
||||
|
||||
-#endif
|
||||
\ No newline at end of file
|
||||
+#endif
|
Loading…
Reference in New Issue