aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/glibc-compat-symbols.h
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/glibc-compat-symbols.h')
-rw-r--r--cmake/glibc-compat-symbols.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/cmake/glibc-compat-symbols.h b/cmake/glibc-compat-symbols.h
index 135a8d6d..5dc1a18b 100644
--- a/cmake/glibc-compat-symbols.h
+++ b/cmake/glibc-compat-symbols.h
@@ -3,6 +3,9 @@
/**
*
+ * Note: Patching a specific glibc symbol version is only required if *not* statically linking glibc,
+ * which should be preferred.
+ *
* Note: JogAmp's minimum GLIBC is 2.4 due to '__stack_chk_fail' (stack overflow checking)
*
* GLIBC 2.4 - March 2006 - Standard for LSB 4.0, Used in SLES 10
@@ -12,13 +15,18 @@
*
* Check build-in macro definitions via 'gcc -dM -E - < /dev/null'
*/
-#if defined(__arm__)
- #define GLIBC_COMPAT_SYMBOL(FFF) __asm__(".symver " #FFF "," #FFF "@GLIBC_2.4");
-#elif defined(__amd64__)
- #define GLIBC_COMPAT_SYMBOL(FFF) __asm__(".symver " #FFF "," #FFF "@GLIBC_2.2.5");
+#if defined(__GNUC__) && !defined(__clang__)
+ #if defined(__arm__)
+ #define GLIBC_COMPAT_SYMBOL(FFF) __asm__(".symver " #FFF "," #FFF "@GLIBC_2.4");
+ #elif defined(__amd64__)
+ #define GLIBC_COMPAT_SYMBOL(FFF) __asm__(".symver " #FFF "," #FFF "@GLIBC_2.2.5");
+ #else
+ #define GLIBC_COMPAT_SYMBOL(FFF) __asm__(".symver " #FFF "," #FFF "@GLIBC_2.2.5");
+ #endif /*__amd64__*/
#else
- #define GLIBC_COMPAT_SYMBOL(FFF) __asm__(".symver " #FFF "," #FFF "@GLIBC_2.2.5");
-#endif /*__amd64__*/
+ #warning GLIBC_COMPAT_SYMBOL not supported with current compiler
+ #define GLIBC_COMPAT_SYMBOL(FFF)
+#endif
GLIBC_COMPAT_SYMBOL(memcpy)