summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-11-17 13:30:46 +0100
committerSven Gothel <[email protected]>2013-11-17 13:30:46 +0100
commite90a2c65519168fd825e57b554cc0d82fffebdc4 (patch)
treef73b9602bc80c56971fabb0ece861625f3f31186
parentbcae9ec99e62f144b4c96ede2fbd37f07401f484 (diff)
glibc-compat-symbols.h: Use GLIBC_2.0 for 32bit ; Use asm(..) instead of __asm__(..) to support clang ; Branch on OS predef-macro for GLIBC detection, allow __GNUC__ and __clang__ on __linux__
-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