From a5ffcb73c15e4400b4404886f9341f00b837d05b Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Fri, 17 Jan 2020 13:09:44 +0100 Subject: [PATCH] Build with '-fno-stack-check' on MacOS if USE_NATIVE_ACH=ON XCode 11.3 introduced a bug with stack alignment if AVX is activated: https://forums.developer.apple.com/thread/121887 According to the link, '-fno-stack-check' circumvents this problem --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a4344075..009660aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -447,6 +447,10 @@ if(USE_NATIVE_ARCH) else() target_compile_options(ngcore PUBLIC "-march=native") endif(WIN32) + if(APPLE) + # work-around for bug in Xcode 11.3: https://forums.developer.apple.com/thread/121887 + target_compile_options(ngcore PUBLIC "-fno-stack-check") + endif(APPLE) endif(USE_NATIVE_ARCH)