From b8f55bd1b4c93870371097e72dee3879b16deb24 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 9 Jan 2022 07:38:57 +0000 Subject: [PATCH] Fix libsndfile build on macOS --- .github/workflows/bootstrap.yml | 2 +- bootstrap-common.sh | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/bootstrap.yml b/.github/workflows/bootstrap.yml index e63ca33..dc80a69 100644 --- a/.github/workflows/bootstrap.yml +++ b/.github/workflows/bootstrap.yml @@ -8,7 +8,7 @@ on: branches: - '*' env: - CACHE_VERSION: 1 + CACHE_VERSION: 2 DEBIAN_FRONTEND: noninteractive HOMEBREW_NO_AUTO_UPDATE: 1 diff --git a/bootstrap-common.sh b/bootstrap-common.sh index 62432da..eb65784 100755 --- a/bootstrap-common.sh +++ b/bootstrap-common.sh @@ -183,14 +183,17 @@ fi LIBSNDFILE_EXTRAFLAGS="--disable-alsa --disable-full-suite --disable-sqlite" +# force intrinsic optimizations on macos-universal target +if [ "${MACOS_UNIVERSAL}" -eq 1 ]; then + LIBSNDFILE_EXTRAFLAGS+=" ac_cv_header_immintrin_h=yes" +fi + # otherwise tests fail -export EXTRA_CFLAGS="-fno-associative-math -frounding-math" +export EXTRA_CFLAGS="-fno-associative-math -fno-reciprocal-math -frounding-math" -if [ "${MACOS}" -eq 1 ]; then - export EXTRA_CFLAGS+=" -fsignaling-math" -else - export EXTRA_CFLAGS+=" -fsignaling-nans" -fi +# if [ "${MACOS}" -eq 0 ]; then +# export EXTRA_CFLAGS+=" -fsignaling-nans" +# fi download libsndfile "${LIBSNDFILE_VERSION}" "${LIBSNDFILE_URL}" "tar.bz2"