From f8069fc858058959a7a1d59684c15bd4a41fcc3a Mon Sep 17 00:00:00 2001 From: Tomáš Chvátal Date: Mon, 1 Aug 2011 17:41:29 +0200 Subject: Fix segmentation fault when linking -mavx on new CPUs is enabled by explicitly adding -mno-avx to CXXFLAGS. --- bridges/source/cpp_uno/gcc3_linux_intel/makefile.mk | 6 ++++++ bridges/source/cpp_uno/gcc3_linux_x86-64/makefile.mk | 6 ++++++ bridges/source/cpp_uno/mingw_intel/makefile.mk | 6 ++++++ 3 files changed, 18 insertions(+) (limited to 'bridges') diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_intel/makefile.mk index beedf9dafa2a..609e09a441dd 100644 --- a/bridges/source/cpp_uno/gcc3_linux_intel/makefile.mk +++ b/bridges/source/cpp_uno/gcc3_linux_intel/makefile.mk @@ -52,6 +52,12 @@ CFLAGS += -DLEAK_STATIC_DATA # work with the .cxx sources in this directory: CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing +# In case the compiler supports AVX this code segfaults so specifically turn +# it off. +.IF "$(HAVE_GCC_AVX)" == "YES" + CFLAGSCXX+= -mno-avx +.ENDIF + CFLAGSNOOPT=-O0 SLOFILES= \ diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_x86-64/makefile.mk index dd3543233827..e5191057aae7 100644 --- a/bridges/source/cpp_uno/gcc3_linux_x86-64/makefile.mk +++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/makefile.mk @@ -52,6 +52,12 @@ CFLAGS += -DLEAK_STATIC_DATA # work with the .cxx sources in this directory: CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing +# In case the compiler supports AVX this code segfaults so specifically turn +# it off. +.IF "$(HAVE_GCC_AVX)" == "YES" + CFLAGSCXX+= -mno-avx +.ENDIF + SLOFILES= \ $(SLO)$/abi.obj \ $(SLO)$/except.obj \ diff --git a/bridges/source/cpp_uno/mingw_intel/makefile.mk b/bridges/source/cpp_uno/mingw_intel/makefile.mk index 2c7a8da48527..d2b08096a3cd 100644 --- a/bridges/source/cpp_uno/mingw_intel/makefile.mk +++ b/bridges/source/cpp_uno/mingw_intel/makefile.mk @@ -51,6 +51,12 @@ CFLAGS += -DBROKEN_ALLOCA # work with the .cxx sources in this directory: CFLAGSCXX += -fno-omit-frame-pointer +# In case the compiler supports AVX this code segfaults so specifically turn +# it off. +.IF "$(HAVE_GCC_AVX)" == "YES" + CFLAGSCXX+= -mno-avx +.ENDIF + NOOPTFILES= \ $(SLO)$/uno2cpp.obj -- cgit