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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 89723138334 for ; Sat, 7 Sep 2019 09:01:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3FC9DE0AB1; Sat, 7 Sep 2019 09:01:16 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 19991E0AB1 for ; Sat, 7 Sep 2019 09:01:15 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9671534ADE2 for ; Sat, 7 Sep 2019 09:01:14 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0FD1B4D3 for ; Sat, 7 Sep 2019 09:01:12 +0000 (UTC) From: "Sergei Trofimovich" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sergei Trofimovich" Message-ID: <1567846778.afe41adc6db361e43a32ea12966246eae6c68f18.slyfox@gentoo> Subject: [gentoo-commits] proj/gcc-config:master commit in: / X-VCS-Repository: proj/gcc-config X-VCS-Files: README gcc-config X-VCS-Directories: / X-VCS-Committer: slyfox X-VCS-Committer-Name: Sergei Trofimovich X-VCS-Revision: afe41adc6db361e43a32ea12966246eae6c68f18 X-VCS-Branch: master Date: Sat, 7 Sep 2019 09:01:12 +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: b8969762-fd90-4599-8169-6a787295a740 X-Archives-Hash: c0a7c86bf297b5e7cafce9237020ec0f commit: afe41adc6db361e43a32ea12966246eae6c68f18 Author: Sergei Trofimovich gentoo org> AuthorDate: Sat Sep 7 08:59:38 2019 +0000 Commit: Sergei Trofimovich gentoo org> CommitDate: Sat Sep 7 08:59:38 2019 +0000 URL: https://gitweb.gentoo.org/proj/gcc-config.git/commit/?id=afe41adc gcc-config: drop empty /etc/env.d/05gcc-${CTARGET} files Thesse files are generated for cross-gcc only. Were empty since Aug 2018. Signed-off-by: Sergei Trofimovich gentoo.org> README | 7 ------- gcc-config | 15 ++++++++++----- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/README b/README index 48183b2..bba2517 100644 --- a/README +++ b/README @@ -49,13 +49,6 @@ Files, variables, things. Used by env-update to populate PATH and more (TODO: remove PATH population). - /etc/env.d/05gcc-${CTARGET} (cross) - - Empty. - - Before Aug 2018 used to contain paths for cross-compilers. - To be removed eventually. - TODOs ----- diff --git a/gcc-config b/gcc-config index 92e9014..01e2b90 100755 --- a/gcc-config +++ b/gcc-config @@ -615,9 +615,8 @@ switch_profile() { echo "CURRENT=${CC_COMP}" > "${GCC_ENV_D}/config-${CTARGET}" - # Give the native gcc a higher precedence so its PATH gets - # searched first. After all, we tend to run the native - # compiler a *lot* more than the cross-compilers. + # Give native configs slight distinction from cross-compilers + # by giving it higher priority. local envd envd_num envd_changed=0 is_cross_compiler && envd_num="05" || envd_num="04" envd="${ENV_D}/${envd_num}gcc-${CTARGET}" @@ -686,9 +685,15 @@ switch_profile() { prefix_copy_gcc_libs handle_split_usr : $(( envd_changed += $? )) + + mv_if_diff "${envd}.tmp" "${envd}" + : $(( envd_changed += $? )) + else + # cross-case + # env.d file is empty since Aug 2018 and is cleaned up by + # gcc-config since Sept 2019. Should be safe to remove in 2021. + rm -f "${envd}.tmp" "${envd}" fi - mv_if_diff "${envd}.tmp" "${envd}" - : $(( envd_changed += $? )) update_wrappers ${CTARGET}