From 231bc60d6fa6b8eb309ac2ca308f7c60213f81a3 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Thu, 5 Sep 2019 08:20:05 +0100 Subject: gcc-config: drop GCC_PATH reconstruction in /etc/env.d/gcc toolchain.eclass constructs correct GCC_PATH since 2007: commit 7d9f89700a2ee50674c0d871ec6d21b468ac6206 ("start moving to GCC_PATH for env.d #174422 and cleanup " "gcc-config logic so that it doesnt matter what the ROOT value is") We don't need to rewrite /etc/env.d/gcc/- files anymore (owned by gcc ebuilds). Bug: https://bugs.gentoo.org/174422 Signed-off-by: Sergei Trofimovich --- gcc-config | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/gcc-config b/gcc-config index 762695f..7f2d69f 100755 --- a/gcc-config +++ b/gcc-config @@ -145,26 +145,6 @@ is_cross_compiler() { [[ ${CC_COMP/${CHOST}} == ${CC_COMP} ]] } -convert_profile_paths() { - # Older gcc's used PATH= and ROOTPATH= in the env.d files. - # Newer one's only use GCC_PATH=. Convert old to new here. - cp -p "${GCC_ENV_D}/${CC_COMP}" "${GCC_ENV_D}/${CC_COMP}.gcc-config-ref" || return 1 - GCC_PATH=$( - unset GCC_PATH PATH ROOTPATH - source "${GCC_ENV_D}/${CC_COMP}" - echo ${GCC_PATH:-${PATH:-${ROOTPATH}}} - ) - ${SED} -i \ - -e '/^PATH=/d' \ - -e '/^ROOTPATH=/d' \ - -e '/^GCC_PATH=/d' \ - "${GCC_ENV_D}/${CC_COMP}" || return 1 - echo "GCC_PATH=\"${GCC_PATH}\"" >> "${GCC_ENV_D}/${CC_COMP}" || return 1 - touch -r "${GCC_ENV_D}/${CC_COMP}.gcc-config-ref" "${GCC_ENV_D}/${CC_COMP}" || return 1 - rm -f "${GCC_ENV_D}/${CC_COMP}.gcc-config-ref" || return 1 - return 0 -} - # Usage: atomic_ln atomic_ln() { local src=$1 dst=$2 dstfile=$3 tmp @@ -585,10 +565,6 @@ switch_profile() { ebegin "Switching native-compiler to ${CC_COMP}" fi - if egrep -q '^(PATH|ROOTPATH)=' "${GCC_ENV_D}/${CC_COMP}" ; then - convert_profile_paths "${GCC_ENV_D}/${CC_COMP}" || return 1 - fi - # Setup things properly again for this profile unset GCC_SPECS LDPATH MULTIOSDIRS source "${GCC_ENV_D}/${CC_COMP}" -- cgit v1.2.3-65-gdbad