diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2019-09-07 09:59:38 +0100 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2019-09-07 09:59:38 +0100 |
commit | afe41adc6db361e43a32ea12966246eae6c68f18 (patch) | |
tree | de85029e5eafafbf88e8edfff8268e63c2fe1a15 | |
parent | gcc-config: don't recreate unused '.NATIVE' symlink. (diff) | |
download | gcc-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-- | README | 7 | ||||
-rwxr-xr-x | gcc-config | 15 |
2 files changed, 10 insertions, 12 deletions
@@ -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 ----- @@ -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} |