aboutsummaryrefslogtreecommitdiffstats
path: root/make/stub_includes
diff options
context:
space:
mode:
Diffstat (limited to 'make/stub_includes')
-rw-r--r--make/stub_includes/platform/glibc-compat-symbols.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/make/stub_includes/platform/glibc-compat-symbols.h b/make/stub_includes/platform/glibc-compat-symbols.h
index 5dc1a18..e07641e 100644
--- a/make/stub_includes/platform/glibc-compat-symbols.h
+++ b/make/stub_includes/platform/glibc-compat-symbols.h
@@ -15,16 +15,21 @@
*
* Check build-in macro definitions via 'gcc -dM -E - < /dev/null'
*/
-#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");
+#if defined(__linux__) /* Actually we like to test whether we link against GLIBC .. */
+ #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.0");
+ #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 on GNU/Linux
+ #define GLIBC_COMPAT_SYMBOL(FFF)
+ #endif
#else
- #warning GLIBC_COMPAT_SYMBOL not supported with current compiler
+ #warning GLIBC_COMPAT_SYMBOL not supported with target OS
#define GLIBC_COMPAT_SYMBOL(FFF)
#endif