aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2019-09-07 09:59:38 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2019-09-07 09:59:38 +0100
commitafe41adc6db361e43a32ea12966246eae6c68f18 (patch)
treede85029e5eafafbf88e8edfff8268e63c2fe1a15
parentgcc-config: don't recreate unused '.NATIVE' symlink. (diff)
downloadgcc-config-afe41adc6db361e43a32ea12966246eae6c68f18.tar.gz
gcc-config-afe41adc6db361e43a32ea12966246eae6c68f18.tar.bz2
gcc-config-afe41adc6db361e43a32ea12966246eae6c68f18.zip
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@gentoo.org>
-rw-r--r--README7
-rwxr-xr-xgcc-config15
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}