From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id ABDBA138CCE for ; Wed, 6 May 2015 01:15:05 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 246F9E086B; Wed, 6 May 2015 01:15:00 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AD108E086B for ; Wed, 6 May 2015 01:14:59 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 48E6A340BEB for ; Wed, 6 May 2015 01:14:58 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 873A49D3 for ; Wed, 6 May 2015 01:14:54 +0000 (UTC) From: "Davide Pesavento" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Davide Pesavento" Message-ID: <1430873350.5e16bcd72951e73dbb89fdaa9b0dee793acdc4e8.pesa@gentoo> Subject: [gentoo-commits] proj/qt:master commit in: eclass/ X-VCS-Repository: proj/qt X-VCS-Files: eclass/qt4-build-multilib.eclass X-VCS-Directories: eclass/ X-VCS-Committer: pesa X-VCS-Committer-Name: Davide Pesavento X-VCS-Revision: 5e16bcd72951e73dbb89fdaa9b0dee793acdc4e8 X-VCS-Branch: master Date: Wed, 6 May 2015 01:14:54 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 005813c5-413a-40a2-aea0-188742355576 X-Archives-Hash: dbd492eb96aeb819a6fe02fed234d475 commit: 5e16bcd72951e73dbb89fdaa9b0dee793acdc4e8 Author: Davide Pesavento gentoo org> AuthorDate: Wed May 6 00:49:10 2015 +0000 Commit: Davide Pesavento gentoo org> CommitDate: Wed May 6 00:49:10 2015 +0000 URL: https://gitweb.gentoo.org/proj/qt.git/commit/?id=5e16bcd7 [qt4-build-multilib] Rewrite handling of toolchain and *FLAGS during configure Previously we would directly patch the config.tests code in ${S}, but this meant that the native ABI flags were being used for all ABIs, so for example we were compiling 64-bit tests during the 32-bit build... Switch to using the .qmake.cache file, that the configure already creates inside the (ABI-specific) build dir. Fixes bug #545106 and probably many more that haven't been discovered yet. eclass/qt4-build-multilib.eclass | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/eclass/qt4-build-multilib.eclass b/eclass/qt4-build-multilib.eclass index 2c4de88..8a0d45c 100644 --- a/eclass/qt4-build-multilib.eclass +++ b/eclass/qt4-build-multilib.eclass @@ -198,7 +198,7 @@ qt4-build-multilib_src_prepare() { configure || die "sed SYSTEM_VARIABLES failed" # Reset QMAKE_*FLAGS_{RELEASE,DEBUG} variables, - # or they will override user's flags (.qmake.cache) + # or they will override the user's flags (via .qmake.cache) sed -i -e '/^SYSTEM_VARIABLES=/ i \ QMakeVar set QMAKE_CFLAGS_RELEASE\ QMakeVar set QMAKE_CFLAGS_DEBUG\ @@ -208,12 +208,16 @@ qt4-build-multilib_src_prepare() { QMakeVar set QMAKE_LFLAGS_DEBUG\n' \ configure || die "sed QMAKE_*FLAGS_{RELEASE,DEBUG} failed" - # Respect CC, CXX, LINK and *FLAGS in config.tests + # Drop -nocache from qmake invocation in all configure tests, to ensure that the + # correct toolchain and build flags are picked up from config.tests/.qmake.cache find config.tests/unix -name '*.test' -type f -print0 | xargs -0 \ - sed -i -e "/bin\/qmake/ s: \"\$SRCDIR/: \ - 'QMAKE_CC=$(tc-getCC)' 'QMAKE_CXX=$(tc-getCXX)' 'QMAKE_LINK=$(tc-getCXX)' \ - 'QMAKE_CFLAGS+=${CFLAGS}' 'QMAKE_CXXFLAGS+=${CXXFLAGS}' 'QMAKE_LFLAGS+=${LDFLAGS}'&:" \ - || die "sed config.tests failed" + sed -i -e '/bin\/qmake/s/ -nocache//' || die "sed -nocache failed" + + # compile.test needs additional patching so that it doesn't create another cache file + # inside the test subdir, which would incorrectly override config.tests/.qmake.cache + sed -i -e '/echo.*QT_BUILD_TREE.*\.qmake\.cache/d' \ + -e '/bin\/qmake/s/ "$SRCDIR/ "QT_BUILD_TREE=$OUTDIR"&/' \ + config.tests/unix/compile.test || die "sed compile.test failed" # Delete references to the obsolete /usr/X11R6 directory # On prefix, this also prevents looking at non-prefix stuff