commit: afe41adc6db361e43a32ea12966246eae6c68f18
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 7 08:59:38 2019 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> 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 <slyfox <AT> 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}