diff options
author | Mike Gilbert <floppym@gentoo.org> | 2019-03-01 23:43:36 -0500 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2019-03-01 23:43:36 -0500 |
commit | 1488107891b5800d923f2cd45a3ceea693104052 (patch) | |
tree | 48c14f8add7c36d8a75a8aeb7d13126021329942 /dev-qt | |
parent | net-analyzer/nagios-core: remove a now-unused patch. (diff) | |
download | gentoo-1488107891b5800d923f2cd45a3ceea693104052.tar.gz gentoo-1488107891b5800d923f2cd45a3ceea693104052.tar.bz2 gentoo-1488107891b5800d923f2cd45a3ceea693104052.zip |
dev-qt/qtgui: fix build with CXXFLAGS="-march=native"
Bug: https://bugs.gentoo.org/672946
Package-Manager: Portage-2.3.59_p2, Repoman-2.3.12_p67
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'dev-qt')
-rw-r--r-- | dev-qt/qtgui/files/qt-5.12-gcc-avx2.patch | 29 | ||||
-rw-r--r-- | dev-qt/qtgui/qtgui-5.12.1.ebuild | 4 |
2 files changed, 33 insertions, 0 deletions
diff --git a/dev-qt/qtgui/files/qt-5.12-gcc-avx2.patch b/dev-qt/qtgui/files/qt-5.12-gcc-avx2.patch new file mode 100644 index 000000000000..41814c061a46 --- /dev/null +++ b/dev-qt/qtgui/files/qt-5.12-gcc-avx2.patch @@ -0,0 +1,29 @@ +From 3f302cb16ebfefade17b3ea90c5ed258c9150f3a Mon Sep 17 00:00:00 2001 +From: Mike Gilbert <floppym@gentoo.org> +Date: Fri, 1 Mar 2019 21:37:52 -0500 +Subject: [PATCH] gcc: pass -mavx2 instead of -march=core-avx2 + +Resolves a build failure when QMAKE_CXXFLAGS contains -march=native +and the compiler is running on a CPU which does not support AVX2. + +Bug: https://bugs.gentoo.org/672946 +--- + mkspecs/common/gcc-base.conf | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/mkspecs/common/gcc-base.conf b/mkspecs/common/gcc-base.conf +index c2669e4833..44aa96af38 100644 +--- a/mkspecs/common/gcc-base.conf ++++ b/mkspecs/common/gcc-base.conf +@@ -109,7 +109,7 @@ QMAKE_CFLAGS_MIPS_DSP += -mdsp + QMAKE_CFLAGS_MIPS_DSPR2 += -mdspr2 + + # -march=haswell is supported as of GCC 4.9 and Clang 3.6 +-QMAKE_CFLAGS_ARCH_HASWELL = -march=core-avx2 ++QMAKE_CFLAGS_ARCH_HASWELL = -mavx2 + + # Wrapper tools that understand .o/.a files with GIMPLE instead of machine code + QMAKE_AR_LTCG = gcc-ar cqs +-- +2.21.0.rc1 + diff --git a/dev-qt/qtgui/qtgui-5.12.1.ebuild b/dev-qt/qtgui/qtgui-5.12.1.ebuild index d0432526ea6a..99baac703ae4 100644 --- a/dev-qt/qtgui/qtgui-5.12.1.ebuild +++ b/dev-qt/qtgui/qtgui-5.12.1.ebuild @@ -122,6 +122,10 @@ QT5_GENTOO_PRIVATE_CONFIG=( :gui ) +PATCHES=( + "${FILESDIR}/qt-5.12-gcc-avx2.patch" # 672946 +) + src_prepare() { # don't add -O3 to CXXFLAGS, bug 549140 sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/gui/gui.pro || die |