From af8b50a9271b35836609a0b8ee708d07943d45f8 Mon Sep 17 00:00:00 2001 From: Miles Granger Date: Mon, 9 Sep 2024 10:31:09 +0200 Subject: [PATCH] Avoid rip-relative addressing for OSX x86_64 --- blosc/CMakeLists.txt | 1 + blosc/shuffle.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/blosc/CMakeLists.txt b/blosc/CMakeLists.txt index 323281f5..e22561bc 100644 --- a/blosc/CMakeLists.txt +++ b/blosc/CMakeLists.txt @@ -37,6 +37,7 @@ if(BUILD_SHARED) $) endif() if(BUILD_STATIC) + add_compile_definitions(BUILD_STATIC) add_library(blosc2_static STATIC) # ALIAS for superbuilds that use Blosc2 as sub-project # must be the same as the NAMESPACE in Blosc2Targets diff --git a/blosc/shuffle.c b/blosc/shuffle.c index 62587639..ca9e3747 100644 --- a/blosc/shuffle.c +++ b/blosc/shuffle.c @@ -52,7 +52,7 @@ // __builtin_cpu_supports() fixed in GCC 8: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85100 // Also, clang added support for it in clang 10 at very least (and possibly since 3.8) -#if (defined(__clang__) && (__clang_major__ >= 10)) || \ +#if (defined(__clang__) && (__clang_major__ >= 10)) && !(defined(__APPLE__) && defined(__x86_64__) && defined(BUILD_STATIC)) || \ (defined(__GNUC__) && defined(__GNUC_MINOR__) && __GNUC__ >= 8) #define HAVE_CPU_FEAT_INTRIN #endif