Dne 2.8.2011 14:50, Caolán McNamara napsal(a):
On Tue, 2011-08-02 at 13:18 +0200, Tomas Chvatal wrote:
Libreoffice bridge code won't compile on new CPUs which add -mavx to cxxflags
with --march=native.
As first idea for the fix is actual ban for the -mavx cxxflag by adding -nomavx.
Isn't that a x86 (and x86_64 ?) only option, i.e. no need for it except
in the _intel and _x86_64 bridges ?
C.
Yeah you are right, it is only for 64b or intel. I just threw it in with
sed :)
Attaching the updated patch that adds it only where it should really be
needed.
Tom
>From 38f3459c8b9f24f0e41ae9eff79e5fff85115e35 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= <tomas.chva...@gmail.com>
Date: Mon, 1 Aug 2011 17:41:29 +0200
Subject: [PATCH] Fix segmentation fault when linking -mavx on new CPUs is enabled by explicitly adding -mno-avx to CXXFLAGS.
---
.../source/cpp_uno/gcc3_linux_intel/makefile.mk | 2 +-
.../source/cpp_uno/gcc3_linux_x86-64/makefile.mk | 2 +-
bridges/source/cpp_uno/mingw_intel/makefile.mk | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_intel/makefile.mk
index beedf9d..eae6df4 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/makefile.mk
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/makefile.mk
@@ -50,7 +50,7 @@ CFLAGS += -DLEAK_STATIC_DATA
# In case someone enabled the non-standard -fomit-frame-pointer which does not
# work with the .cxx sources in this directory:
-CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing
+CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing -mno-avx
CFLAGSNOOPT=-O0
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 dd35432..ad5de1a 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/makefile.mk
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/makefile.mk
@@ -50,7 +50,7 @@ CFLAGS += -DLEAK_STATIC_DATA
# In case someone enabled the non-standard -fomit-frame-pointer which does not
# work with the .cxx sources in this directory:
-CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing
+CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing -mno-avx
SLOFILES= \
$(SLO)$/abi.obj \
diff --git a/bridges/source/cpp_uno/mingw_intel/makefile.mk b/bridges/source/cpp_uno/mingw_intel/makefile.mk
index 2c7a8da..a3c2b2a 100644
--- a/bridges/source/cpp_uno/mingw_intel/makefile.mk
+++ b/bridges/source/cpp_uno/mingw_intel/makefile.mk
@@ -49,7 +49,7 @@ CFLAGS += -DBROKEN_ALLOCA
# In case someone enabled the non-standard -fomit-frame-pointer which does not
# work with the .cxx sources in this directory:
-CFLAGSCXX += -fno-omit-frame-pointer
+CFLAGSCXX += -fno-omit-frame-pointer -mno-avx
NOOPTFILES= \
$(SLO)$/uno2cpp.obj
--
1.7.3.4
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice