summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2011-08-04 16:18:37 +0000
committerTomas Chvatal <scarabeus@gentoo.org>2011-08-04 16:18:37 +0000
commit79b8ac3fb9d5fe714c84c1a4cc2e9558bb46de60 (patch)
tree9c14877e98a6e7387da9a8b73657e5e8d8e06fa3
parentRemove unnecessary sys-fs/sysfsutils depend wrt #347215 by Rafał Mużyło. (diff)
downloadgentoo-2-79b8ac3fb9d5fe714c84c1a4cc2e9558bb46de60.tar.gz
gentoo-2-79b8ac3fb9d5fe714c84c1a4cc2e9558bb46de60.tar.bz2
gentoo-2-79b8ac3fb9d5fe714c84c1a4cc2e9558bb46de60.zip
Update avx patchset and fix the linguas detection.
(Portage version: 2.2.0_alpha50/cvs/Linux x86_64)
-rw-r--r--app-office/libreoffice/ChangeLog7
-rw-r--r--app-office/libreoffice/files/libreoffice-append-no-avx.patch218
-rw-r--r--app-office/libreoffice/files/libreoffice-check-for-avx.patch53
-rw-r--r--app-office/libreoffice/libreoffice-3.4.2.3.ebuild17
4 files changed, 112 insertions, 183 deletions
diff --git a/app-office/libreoffice/ChangeLog b/app-office/libreoffice/ChangeLog
index 94bec8b0c09d..c00ca64796fa 100644
--- a/app-office/libreoffice/ChangeLog
+++ b/app-office/libreoffice/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for app-office/libreoffice
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice/ChangeLog,v 1.82 2011/08/03 20:21:09 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice/ChangeLog,v 1.83 2011/08/04 16:18:37 scarabeus Exp $
+
+ 04 Aug 2011; Tomáš Chvátal <scarabeus@gentoo.org>
+ libreoffice-3.4.2.3.ebuild, +files/libreoffice-check-for-avx.patch,
+ files/libreoffice-append-no-avx.patch:
+ Update avx patchset and fix the linguas detection.
03 Aug 2011; Tomáš Chvátal <scarabeus@gentoo.org>
files/libreoffice-32b-qt4-libdir.patch:
diff --git a/app-office/libreoffice/files/libreoffice-append-no-avx.patch b/app-office/libreoffice/files/libreoffice-append-no-avx.patch
index 693d49a632b9..76e3c3941db3 100644
--- a/app-office/libreoffice/files/libreoffice-append-no-avx.patch
+++ b/app-office/libreoffice/files/libreoffice-append-no-avx.patch
@@ -1,207 +1,65 @@
-From 7424b4357b24736ddad75e2449839bf0ecc8e09b Mon Sep 17 00:00:00 2001
+From 16d4258863c936538ef3b7ff13a95f7567a62044 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= <tomas.chvatal@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_alpha/makefile.mk | 2 +-
- bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk | 2 +-
- bridges/source/cpp_uno/gcc3_linux_hppa/makefile.mk | 2 +-
- bridges/source/cpp_uno/gcc3_linux_ia64/makefile.mk | 2 +-
- .../source/cpp_uno/gcc3_linux_intel/makefile.mk | 2 +-
- bridges/source/cpp_uno/gcc3_linux_m68k/makefile.mk | 2 +-
- bridges/source/cpp_uno/gcc3_linux_mips/makefile.mk | 2 +-
- .../source/cpp_uno/gcc3_linux_powerpc/makefile.mk | 2 +-
- .../cpp_uno/gcc3_linux_powerpc64/makefile.mk | 2 +-
- bridges/source/cpp_uno/gcc3_linux_s390/makefile.mk | 2 +-
- .../source/cpp_uno/gcc3_linux_s390x/makefile.mk | 2 +-
- .../source/cpp_uno/gcc3_linux_sparc/makefile.mk | 2 +-
- .../source/cpp_uno/gcc3_linux_x86-64/makefile.mk | 2 +-
- bridges/source/cpp_uno/mingw_intel/makefile.mk | 2 +-
- 14 files changed, 14 insertions(+), 14 deletions(-)
+ .../source/cpp_uno/gcc3_linux_intel/makefile.mk | 6 ++++++
+ .../source/cpp_uno/gcc3_linux_x86-64/makefile.mk | 6 ++++++
+ bridges/source/cpp_uno/mingw_intel/makefile.mk | 6 ++++++
+ 3 files changed, 18 insertions(+), 0 deletions(-)
-diff --git a/bridges/source/cpp_uno/gcc3_linux_alpha/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_alpha/makefile.mk
-index 5376b39..dabd2dc 100644
---- a/bridges/source/cpp_uno/gcc3_linux_alpha/makefile.mk
-+++ b/bridges/source/cpp_uno/gcc3_linux_alpha/makefile.mk
-@@ -46,7 +46,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_arm/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk
-index 2c42dec..92cad3a 100644
---- a/bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk
-+++ b/bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk
-@@ -45,7 +45,7 @@ NO_BSYMBOLIC=TRUE
- CFLAGS += -DLEAK_STATIC_DATA
- .ENDIF
-
--CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing
-+CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing -mno-avx
-
- NOOPTFILES= \
- $(SLO)$/cpp2uno.obj \
-diff --git a/bridges/source/cpp_uno/gcc3_linux_hppa/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_hppa/makefile.mk
-index 6fab7a4..a7c2824 100644
---- a/bridges/source/cpp_uno/gcc3_linux_hppa/makefile.mk
-+++ b/bridges/source/cpp_uno/gcc3_linux_hppa/makefile.mk
-@@ -45,7 +45,7 @@ NO_BSYMBOLIC=TRUE
- CFLAGS += -DLEAK_STATIC_DATA
- .ENDIF
-
--CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing
-+CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing -mno-avx
-
- NOOPTFILES= \
- $(SLO)$/cpp2uno.obj \
-diff --git a/bridges/source/cpp_uno/gcc3_linux_ia64/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_ia64/makefile.mk
-index 1e82cfa..667ffd6 100644
---- a/bridges/source/cpp_uno/gcc3_linux_ia64/makefile.mk
-+++ b/bridges/source/cpp_uno/gcc3_linux_ia64/makefile.mk
-@@ -46,7 +46,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
-
- NOOPTFILES= \
- $(SLO)$/uno2cpp.obj \
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
+index beedf9d..609e09a 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_m68k/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_m68k/makefile.mk
-index 3978bda..bf04770 100644
---- a/bridges/source/cpp_uno/gcc3_linux_m68k/makefile.mk
-+++ b/bridges/source/cpp_uno/gcc3_linux_m68k/makefile.mk
-@@ -45,7 +45,7 @@ NO_BSYMBOLIC=TRUE
- CFLAGS += -DLEAK_STATIC_DATA
- .ENDIF
-
--CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing
-+CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing -mno-avx
-
- NOOPTFILES= \
- $(SLO)$/cpp2uno.obj \
-diff --git a/bridges/source/cpp_uno/gcc3_linux_mips/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_mips/makefile.mk
-index f71750e..c7ca5f9 100644
---- a/bridges/source/cpp_uno/gcc3_linux_mips/makefile.mk
-+++ b/bridges/source/cpp_uno/gcc3_linux_mips/makefile.mk
-@@ -46,7 +46,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_powerpc/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_powerpc/makefile.mk
-index 9a75200..3b86ee7 100644
---- a/bridges/source/cpp_uno/gcc3_linux_powerpc/makefile.mk
-+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc/makefile.mk
-@@ -45,7 +45,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
-
- NOOPTFILES= \
- $(SLO)$/uno2cpp.obj
-diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_powerpc64/makefile.mk
-index 77763d7..b21194c 100644
---- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/makefile.mk
-+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/makefile.mk
-@@ -46,7 +46,7 @@ CFLAGS += -DLEAK_STATIC_DATA
-
- # In case someone enabled the non-standard -fomit-frame-pointer which does not
+@@ -52,6 +52,12 @@ CFLAGS += -DLEAK_STATIC_DATA
# 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
-
- NOOPTFILES= \
- $(SLO)$/uno2cpp.obj \
-diff --git a/bridges/source/cpp_uno/gcc3_linux_s390/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_s390/makefile.mk
-index bda85f3..0f40c1c 100644
---- a/bridges/source/cpp_uno/gcc3_linux_s390/makefile.mk
-+++ b/bridges/source/cpp_uno/gcc3_linux_s390/makefile.mk
-@@ -46,7 +46,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_s390x/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_s390x/makefile.mk
-index 9539dd6..aa47f6b 100644
---- a/bridges/source/cpp_uno/gcc3_linux_s390x/makefile.mk
-+++ b/bridges/source/cpp_uno/gcc3_linux_s390x/makefile.mk
-@@ -46,7 +46,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_sparc/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_sparc/makefile.mk
-index 3940038..2ee35bb 100644
---- a/bridges/source/cpp_uno/gcc3_linux_sparc/makefile.mk
-+++ b/bridges/source/cpp_uno/gcc3_linux_sparc/makefile.mk
-@@ -45,7 +45,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
-
+ 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 dd35432..ad5de1a 100644
+index dd35432..e519105 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
+@@ -52,6 +52,12 @@ CFLAGS += -DLEAK_STATIC_DATA
# 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
-
+ 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 2c7a8da..a3c2b2a 100644
+index 2c7a8da..d2b0809 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
+@@ -51,6 +51,12 @@ CFLAGS += -DBROKEN_ALLOCA
# work with the .cxx sources in this directory:
--CFLAGSCXX += -fno-omit-frame-pointer
-+CFLAGSCXX += -fno-omit-frame-pointer -mno-avx
-
+ 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
+
--
1.7.3.4
diff --git a/app-office/libreoffice/files/libreoffice-check-for-avx.patch b/app-office/libreoffice/files/libreoffice-check-for-avx.patch
new file mode 100644
index 000000000000..fd487d913605
--- /dev/null
+++ b/app-office/libreoffice/files/libreoffice-check-for-avx.patch
@@ -0,0 +1,53 @@
+diff --git a/configure.in b/configure.in
+index 65813cb..5f5085e 100755
+--- a/configure.in
++++ b/configure.in
+@@ -1984,6 +1984,36 @@ if test "$GCC" = "yes"; then
+ fi
+ AC_SUBST(HAVE_LD_BSYMBOLIC_FUNCTIONS)
+
++dnl Check for AVX
++dnl ===================================================================
++AS_IF([test "x$AVX_CFLAGS" = "x"], [
++ AS_IF([test "x$SUNCC" = "xyes" && test "x$AMD64_ABI" = "xno"], [
++ AVX_CFLAGS="-xarch=avx"
++ ])
++], [
++ AVX_CFLAGS="-mavx -Winline"
++])
++
++have_avx_intrinsics=no
++AC_MSG_CHECKING(whether to use AVX intrinsics)
++avx_save_CFLAGS=$CFLAGS
++CFLAGS="$AVX_CFLAGS $CFLAGS"
++AC_COMPILE_IFELSE([
++#if defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5))
++# if !defined(__amd64__) && !defined(__x86_64__)
++# error "Need GCC >= 4.5 for AVX intrinsics on x86"
++# endif
++#endif
++#include <immintrin.h>
++int main () {
++ __m256i a = _mm256_set1_epi32 (0), b = _mm256_set1_epi32 (0), c;
++ c = _mm256_permute2f128_si256 (a, b, 0);
++ return 0;
++}], have_avx_intrinsics=yes)
++CFLAGS=$avx_save_CFLAGS
++AC_MSG_RESULT([$have_avx_intrinsics])
++AM_CONDITIONAL(HAVE_GCC_AVX, [test "x$have_avx_intrinsics" = "xyes"])
++
+ dnl ===================================================================
+ dnl Set the ENABLE_PCH variable. (Activate --enable-pch)
+ dnl ===================================================================
+diff --git a/set_soenv.in b/set_soenv.in
+index 4c047b6..a2b1b43 100755
+--- a/set_soenv.in
++++ b/set_soenv.in
+@@ -1841,6 +1841,7 @@ ToFile( "JAVAHOME", $JAVAHOME, "e" );
+ ToFile( "CC", $CC, "e" );
+ ToFile( "HAVE_GCC_VISIBILITY_FEATURE",
+ "@HAVE_GCC_VISIBILITY_FEATURE@", "e" );
++ToFile( "HAVE_GCC_AVX", "@HAVE_GCC_AVX@", "e" );
+ ToFile( "HAVE_GCC_VISIBILITY_BROKEN",
+ "@HAVE_GCC_VISIBILITY_BROKEN@", "e" );
+ ToFile( "HAVE_LD_HASH_STYLE","@HAVE_LD_HASH_STYLE@","e" );
diff --git a/app-office/libreoffice/libreoffice-3.4.2.3.ebuild b/app-office/libreoffice/libreoffice-3.4.2.3.ebuild
index 87b48341f4f1..089fb3509315 100644
--- a/app-office/libreoffice/libreoffice-3.4.2.3.ebuild
+++ b/app-office/libreoffice/libreoffice-3.4.2.3.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice/libreoffice-3.4.2.3.ebuild,v 1.16 2011/08/03 17:23:04 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice/libreoffice-3.4.2.3.ebuild,v 1.17 2011/08/04 16:18:37 scarabeus Exp $
EAPI=3
@@ -236,6 +236,7 @@ PATCHES=(
"${FILESDIR}/${PN}-translate-toolkit-parallel-solenv.patch"
"${FILESDIR}/${PN}-gbuild-use-cxxflags.patch"
"${FILESDIR}/${PN}-installed-files-permissions.patch"
+ "${FILESDIR}/${PN}-check-for-avx.patch"
"${FILESDIR}/${PN}-append-no-avx.patch"
"${FILESDIR}/${PN}-32b-qt4-libdir.patch"
)
@@ -351,7 +352,19 @@ src_unpack() {
src_prepare() {
strip-linguas ${LANGUAGES}
- LINGUAS_OOO=$(echo ${LINGUAS} | sed -e 's/\ben\b/en_US/;s/_/-/g')
+
+ # HACK: linguas needs special parsing until fixed upstream
+ if [[ -z ${LINGUAS} || ${LINGUAS} == en ]]; then
+ # if empty or just english we want empty
+ LO_LANGUAGES=
+ elif [[ ${LINGUAS} =~ en( |$) ]]; then
+ # otherwise if more then one language and english we
+ # replace en to en-US
+ LO_LANGUAGES="$(sed -e 's/\ben\b/en_US/;s/_/-/g' <<< ${LINGUAS})"
+ else
+ # and finally if no en is set we add en-US
+ LO_LANGUAGES="en-US ${LINGUAS//_/-}"
+ fi
# Now for our optimization flags ...
export ARCH_FLAGS="${CXXFLAGS}"