vlc | branch: master | Marvin Scholz <[email protected]> | Thu Nov 14 14:34:24 2019 +0100| [856ddd8d1af955712c7effb1876ca9544b688cab] | committer: Marvin Scholz
macosx: Add -fno-stack-check to workaround Xcode 11 issue Compiling with Xcode 11 automatically enables the -fstack-check feature which causes stack checking error due to unaligned stack which seem to not be true. Lots of projects are affected by this currently so hopefully this will be fixed in an Xcode update. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=856ddd8d1af955712c7effb1876ca9544b688cab --- configure.ac | 4 ++++ contrib/src/main.mak | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/configure.ac b/configure.ac index 1201826d2f..886b499566 100644 --- a/configure.ac +++ b/configure.ac @@ -139,6 +139,10 @@ case "${host_os}" in SYS=dragonfly ;; darwin*) + dnl Workaround possible Xcode 11 bug + CFLAGS="${CFLAGS} -fno-stack-check" + CXXFLAGS="${CXXFLAGS} -fno-stack-check" + OBJCFLAGS="${OBJCFLAGS} -fno-stack-check" dnl Force gcc "-arch" flag ARCH_flag="" diff --git a/contrib/src/main.mak b/contrib/src/main.mak index f56a97e916..fcc5411743 100644 --- a/contrib/src/main.mak +++ b/contrib/src/main.mak @@ -126,6 +126,13 @@ CXX := clang++ endif endif +# -fno-stack-check is a workaround for a possible +# bug in Xcode 11 or macOS 10.15+ +ifdef HAVE_DARWIN_OS +EXTRA_CFLAGS += -fno-stack-check +XCODE_FLAGS += OTHER_CFLAGS=-fno-stack-check +endif + ifdef HAVE_MACOSX EXTRA_CXXFLAGS += -stdlib=libc++ ifeq ($(ARCH),x86_64) _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
