From e09527a6e4cb77ba0c307a40052e25af8385aa5b Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Fri, 19 Jul 2024 15:45:33 +1100 Subject: [PATCH] set __FLT_EVAL_METHOD__=0 on osx --- recipe/build.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/recipe/build.sh b/recipe/build.sh index 9535d484..068415d0 100755 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -140,6 +140,13 @@ if [[ "$host_platform" == osx* ]]; then export CFLAGS="$CFLAGS -isysroot $CONDA_BUILD_SYSROOT $NO_WARN_CFLAGS" export CXXFLAGS="$CXXFLAGS -isysroot $CONDA_BUILD_SYSROOT $NO_WARN_CFLAGS" export CPPFLAGS="$CPPFLAGS -isysroot $CONDA_BUILD_SYSROOT $NO_WARN_CFLAGS" + + # GCC doesn't seem to set this anymore, but the macOS SDK expects a value, see + # https://github.com/alexey-lysiuk/macos-sdk/blob/main/MacOSX13.3.sdk/usr/include/math.h#L39-L54 + # Not obvious how -fpermitted-flt-eval-methods would fix this + # https://github.com/gcc-mirror/gcc/blob/releases/gcc-12.3.0/gcc/c-family/c-cppbuiltin.cc#L1209-L1224 + # https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#index-fpermitted-flt-eval-methods + export __FLT_EVAL_METHOD__=0 fi if [[ "$build_platform" == "$host_platform" ]]; then