Skip to content

Commit

Permalink
set __FLT_EVAL_METHOD__=0 on osx
Browse files Browse the repository at this point in the history
  • Loading branch information
h-vetinari committed Jul 19, 2024
1 parent 65a4cf3 commit e09527a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e09527a

Please sign in to comment.