diff options
Diffstat (limited to 'sys-devel/gcc-config/files/gcc-config-1.4.0')
-rwxr-xr-x | sys-devel/gcc-config/files/gcc-config-1.4.0 | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sys-devel/gcc-config/files/gcc-config-1.4.0 b/sys-devel/gcc-config/files/gcc-config-1.4.0 index 71357ae8b88d..c55c7a9ab0b4 100755 --- a/sys-devel/gcc-config/files/gcc-config-1.4.0 +++ b/sys-devel/gcc-config/files/gcc-config-1.4.0 @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/files/gcc-config-1.4.0,v 1.15 2007/05/03 05:20:39 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/files/gcc-config-1.4.0,v 1.16 2007/05/15 00:47:17 vapier Exp $ trap ":" INT QUIT TSTP @@ -192,10 +192,17 @@ switch_profile() { # Translate old PATH/ROOTPATH to GCC_PATH 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 's:^PATH=:GCC_PATH=:' \ + -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 @@ -207,7 +214,8 @@ switch_profile() { # What kind of env.d entry are we going to generate ? if is_cross_compiler ; then - grep '^GCC_PATH=' "${GCC_ENV_D}/${CC_COMP}" > "${ENV_D}/05gcc-${CTARGET}" + echo "PATH=\"${GCC_PATH}\"" > "${ENV_D}/05gcc-${CTARGET}" + echo "ROOTPATH=\"${GCC_PATH}\"" >> "${ENV_D}/05gcc-${CTARGET}" echo "CURRENT=${CC_COMP}" > "${GCC_ENV_D}/config-${CTARGET}" else # Pass all by default |