From cd0a7211f461a839bd7ad95571b25924d491138a Mon Sep 17 00:00:00 2001 From: Davide Pesavento Date: Thu, 4 Feb 2016 19:54:19 +0100 Subject: 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 --- eclass/qt5-build.eclass | 14 ++++++++++---- 1 file 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) -- cgit v1.2.3-65-gdbad