summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomáš Chvátal <tomas.chvatal@gmail.com>2011-08-01 17:41:29 +0200
committerCaolán McNamara <caolanm@redhat.com>2011-08-04 16:56:38 +0100
commitbdcaf00e3a215baf036a20394f3c31dfe168e3be (patch)
treeb0d5357dce3563ed25f7fe001f412806118ba793
parent1501f17c82e724cc1dae90afc78ec42b5084c906 (diff)
Fix segmentation fault when linking -mavx on new CPUs is enabled by explicitly adding -mno-avx to CXXFLAGS.
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_intel/makefile.mk6
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_x86-64/makefile.mk6
-rw-r--r--bridges/source/cpp_uno/mingw_intel/makefile.mk6
3 files changed, 18 insertions, 0 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_intel/makefile.mk
index beedf9daf..609e09a44 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 dd3543233..e5191057a 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 2c7a8da48..d2b08096a 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