aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-config')
-rwxr-xr-xgcc-config15
1 files changed, 10 insertions, 5 deletions
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}