aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/glibc-compat-symbols.h
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-06-10 19:15:44 +0200
committerSven Gothel <[email protected]>2014-06-10 19:15:44 +0200
commitadc3413dda197bbd6b879ff98e897b8fbc66cc39 (patch)
tree86661ed5b17b3299a8e6e8f09570690f7c1b945a /cmake/glibc-compat-symbols.h
parenta71e2ed35cc57dfc9ca6d33c3a2b8a53b3659710 (diff)
Fix glibc-compat-symbols.h: for 32bit use GLIBC 2.0 ; Distinguish clang and gcc.
Diffstat (limited to 'cmake/glibc-compat-symbols.h')
-rw-r--r--cmake/glibc-compat-symbols.h29
1 files changed, 21 insertions, 8 deletions
diff --git a/cmake/glibc-compat-symbols.h b/cmake/glibc-compat-symbols.h
index 5dc1a18b..3599b820 100644
--- a/cmake/glibc-compat-symbols.h
+++ b/cmake/glibc-compat-symbols.h
@@ -15,16 +15,29 @@
*
* 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__)
+ #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__*/
+ #elif 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