diff options
Diffstat (limited to 'cmake/glibc-compat-symbols.h')
-rw-r--r-- | cmake/glibc-compat-symbols.h | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/cmake/glibc-compat-symbols.h b/cmake/glibc-compat-symbols.h index 4c9c933c..d8d0d172 100644 --- a/cmake/glibc-compat-symbols.h +++ b/cmake/glibc-compat-symbols.h @@ -17,16 +17,30 @@ */ #if defined(__linux__) /* Actually we like to test whether we link against GLIBC .. */ #if defined(__GNUC__) - #if defined(__arm__) + #if defined(__aarch64__) + /* glibc 2.17 is the first glibc version that support aarch64 + however memcpy is not versioned for aarch64 */ + #define GLIBC_COMPAT_SYMBOL(FFF) + #elif defined(__arm__) + /** On recent toolchain memcpy is no more versioned for arm #define GLIBC_COMPAT_SYMBOL(FFF) __asm__(".symver " #FFF "," #FFF "@GLIBC_2.4"); + */ + #define GLIBC_COMPAT_SYMBOL(FFF) #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"); + #if defined(__aarch64__) + /* glibc 2.17 is the first glibc version that support aarch64 + however memcpy is not versioned for aarch64 */ + #define GLIBC_COMPAT_SYMBOL(FFF) + #elif defined(__arm__) + /** On recent toolchain memcpy is no more versioned for arm + #define GLIBC_COMPAT_SYMBOL(FFF) __asm__(".symver " #FFF "," #FFF "@GLIBC_2.4"); + */ + #define GLIBC_COMPAT_SYMBOL(FFF) #elif defined(__amd64__) #define GLIBC_COMPAT_SYMBOL(FFF) asm(".symver " #FFF "," #FFF "@GLIBC_2.2.5"); #else @@ -37,7 +51,7 @@ #define GLIBC_COMPAT_SYMBOL(FFF) #endif #else - // #warning GLIBC_COMPAT_SYMBOL not supported with target OS + #warning GLIBC_COMPAT_SYMBOL not supported with target OS #define GLIBC_COMPAT_SYMBOL(FFF) #endif |