From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2A39A15A7D9 for ; Tue, 21 Mar 2023 22:27:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4F99EE08C8; Tue, 21 Mar 2023 22:27:03 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 332DEE08C8 for ; Tue, 21 Mar 2023 22:27:03 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 54D1333BF08 for ; Tue, 21 Mar 2023 22:27:02 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C09D28DA for ; Tue, 21 Mar 2023 22:27:00 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1679437614.02646f0fae039a2badd932f8fb607557c29def18.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/toolchain.eclass X-VCS-Directories: eclass/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 02646f0fae039a2badd932f8fb607557c29def18 X-VCS-Branch: master Date: Tue, 21 Mar 2023 22:27:00 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: f89d78cb-c759-4644-94c1-4dd9b44cde27 X-Archives-Hash: 1ddfa2fd053f67e64eac3fb71d1d3bce commit: 02646f0fae039a2badd932f8fb607557c29def18 Author: Sam James gentoo org> AuthorDate: Tue Mar 21 22:26:24 2023 +0000 Commit: Sam James gentoo org> CommitDate: Tue Mar 21 22:26:54 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=02646f0f toolchain.eclass: swap LTO order to allow override Otherwise we can't disable it for some targets. Followup to 970f09a488afafe27152255d4343ff59acc94415. Signed-off-by: Sam James gentoo.org> eclass/toolchain.eclass | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index a973e7fd7811..8ffdd9e26f1e 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -1090,6 +1090,14 @@ toolchain_src_configure() { confgcc+=( --enable-libstdcxx-time ) fi + # This only controls whether the compiler *supports* LTO, not whether + # it's *built using* LTO. Hence we do it without a USE flag. + if tc_version_is_at_least 4.6 ; then + confgcc+=( --enable-lto ) + elif tc_version_is_at_least 4.5 ; then + confgcc+=( --disable-lto ) + fi + # Build compiler itself using LTO if tc_version_is_at_least 9.1 && _tc_use_if_iuse lto ; then build_config_targets+=( bootstrap-lto ) @@ -1489,14 +1497,6 @@ toolchain_src_configure() { confgcc+=( $(use_with zstd) ) fi - # This only controls whether the compiler *supports* LTO, not whether - # it's *built using* LTO. Hence we do it without a USE flag. - if tc_version_is_at_least 4.6 ; then - confgcc+=( --enable-lto ) - elif tc_version_is_at_least 4.5 ; then - confgcc+=( --disable-lto ) - fi - # graphite was added in 4.4 but we only support it in 6.5+ due to external # library issues. bug #448024, bug #701270 if tc_version_is_at_least 6.5 && in_iuse graphite ; then