summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavide Pesavento <pesa@gentoo.org>2016-02-04 19:54:19 +0100
committerDavide Pesavento <pesa@gentoo.org>2016-02-04 20:02:17 +0100
commitcd0a7211f461a839bd7ad95571b25924d491138a (patch)
treeba1a4163cb311eab21d458762e12f898ab1705bb
parentMerge remote-tracking branch 'github/pr/789'. (diff)
downloadgentoo-cd0a7211f461a839bd7ad95571b25924d491138a.tar.gz
gentoo-cd0a7211f461a839bd7ad95571b25924d491138a.tar.bz2
gentoo-cd0a7211f461a839bd7ad95571b25924d491138a.zip
qt5-build.eclass: respect CXXFLAGS in config.tests/common
Hopefully fixing the referenced bug in the proper way. x86 and 5.5 or later only for now, to avoid introducing regressions. Gentoo-Bug: 552942
-rw-r--r--eclass/qt5-build.eclass14
1 files changed, 10 insertions, 4 deletions
diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass
index ac9dfc8ebb59..b494e0dccae3 100644
--- a/eclass/qt5-build.eclass
+++ b/eclass/qt5-build.eclass
@@ -190,13 +190,19 @@ qt5-build_src_prepare() {
configure || die "sed failed (QMAKE_CONF_COMPILER)"
# Respect toolchain and flags in config.tests
- find config.tests/unix -name '*.test' -type f \
- -execdir sed -i -e '/bin\/qmake/ s/-nocache //' '{}' + \
- || die "sed failed (config.tests)"
+ find config.tests/unix -name '*.test' -type f -execdir \
+ sed -i -e '/bin\/qmake/ s/-nocache //' '{}' + || die
# Don't add -O3 to CXXFLAGS (bug 549140)
sed -i -e '/CONFIG\s*+=/ s/optimize_full//' \
src/{corelib/corelib,gui/gui}.pro || die "sed failed (optimize_full)"
+
+ # Don't inject -msse/-mavx/... into CXXFLAGS when detecting
+ # compiler support for extended instruction sets (bug 552942)
+ if use x86 && [[ ${QT5_MINOR_VERSION} -ge 5 ]]; then
+ find config.tests/common -name '*.pro' -type f -execdir \
+ sed -i -e '/else:QMAKE_CXXFLAGS\s*+=/ d' '{}' + || die
+ fi
fi
if [[ ${EAPI} == 5 ]]; then
@@ -531,7 +537,7 @@ qt5_base_configure() {
# obsolete flag, does nothing
#-qml-debug
- # instruction set support
+ # extended instruction sets support
$(is-flagq -mno-sse2 && echo -no-sse2)
$(is-flagq -mno-sse3 && echo -no-sse3)
$(is-flagq -mno-ssse3 && echo -no-ssse3)