diff options
author | Mike Frysinger <vapier@gentoo.org> | 2007-07-25 14:03:56 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2007-07-25 14:03:56 +0000 |
commit | e24c17fae009522587c91041a25aa0791b8920fe (patch) | |
tree | 7a8aececf2d126a0b58fbd5a9700b08fb5f65add /sys-devel/gcc-config | |
parent | alpha/ia64 stable wrt security #185442 (diff) | |
download | gentoo-2-e24c17fae009522587c91041a25aa0791b8920fe.tar.gz gentoo-2-e24c17fae009522587c91041a25aa0791b8920fe.tar.bz2 gentoo-2-e24c17fae009522587c91041a25aa0791b8920fe.zip |
move to binutils-config behavior where all env.d files have a -${CTARGET} postfix
(Portage version: 2.1.3_rc9)
Diffstat (limited to 'sys-devel/gcc-config')
-rwxr-xr-x | sys-devel/gcc-config/files/gcc-config-1.4.0 | 30 |
1 files changed, 16 insertions, 14 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 c55c7a9ab0b4..73bd4bc62e43 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.16 2007/05/15 00:47:17 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/files/gcc-config-1.4.0,v 1.17 2007/07/25 14:03:56 vapier Exp $ trap ":" INT QUIT TSTP @@ -220,13 +220,13 @@ switch_profile() { else # Pass all by default awk '!/^(STDCXX_INCDIR|LDPATH|CC|CXX|CTARGET|GCCBITS|GCC_SPECS|GCC_PATH)=/ {print $0}' \ - "${GCC_ENV_D}/${CC_COMP}" > "${ENV_D}/05gcc" - echo "LDPATH=\"${MY_LDPATH}\"" >> "${ENV_D}/05gcc" - echo "PATH=\"${GCC_PATH}\"" >> "${ENV_D}/05gcc" - echo "ROOTPATH=\"${GCC_PATH}\"" >> "${ENV_D}/05gcc" + "${GCC_ENV_D}/${CC_COMP}" > "${ENV_D}/05gcc-${CTARGET}" + echo "LDPATH=\"${MY_LDPATH}\"" >> "${ENV_D}/05gcc-${CTARGET}" + echo "PATH=\"${GCC_PATH}\"" >> "${ENV_D}/05gcc-${CTARGET}" + echo "ROOTPATH=\"${GCC_PATH}\"" >> "${ENV_D}/05gcc-${CTARGET}" if [[ -n ${GCC_SPECS} ]] ; then if files_exist ${MY_LDPATH} ${GCC_SPECS} ; then - echo "GCC_SPECS=\"${GCC_SPECS}\"" >> "${ENV_D}/05gcc" + echo "GCC_SPECS=\"${GCC_SPECS}\"" >> "${ENV_D}/05gcc-${CTARGET}" else echo ewarn "Your GCC spec configurations are broken." @@ -237,7 +237,7 @@ switch_profile() { # People need to rebuild their gcc or setting GCC_SPECS to # "" will cause issues again :( if [[ ${ROOT} != "/" ]] ; then - echo "GCC_SPECS=\"\"" >> "${ENV_D}/05gcc" + echo "GCC_SPECS=\"\"" >> "${ENV_D}/05gcc-${CTARGET}" else if ! GCC_SPECS="" /usr/bin/gcc -v &>/dev/null ; then echo @@ -246,12 +246,16 @@ switch_profile() { ewarn "http://bugs.gentoo.org/68395" echo else - echo "GCC_SPECS=\"\"" >> "${ENV_D}/05gcc" + echo "GCC_SPECS=\"\"" >> "${ENV_D}/05gcc-${CTARGET}" fi fi fi - echo "CURRENT=${CC_COMP}" > "${GCC_ENV_D}/config" + echo "CURRENT=${CC_COMP}" > "${GCC_ENV_D}/config-${CTARGET}" + + # Punt old files + rm -f "${ENV_D}/05gcc" + rm -f "${GCC_ENV_D}/config" fi # Find the bin wrapper @@ -347,7 +351,7 @@ switch_profile() { ewarn "env-update failed to work properly; making sure ld.so.conf paths" ewarn "are setup properly. Please rerun gcc-config with the -f option." echo "" - grep -h ^LDPATH= "${ROOT}"/etc/env.d/05gcc \ + grep -h ^LDPATH= "${ROOT}"/etc/env.d/05gcc-${CTARGET} \ | sed -e 's:^LDPATH=::' -e 's:"::g' -e 's|:|\n|g' \ >> /etc/ld.so.conf ldconfig @@ -369,10 +373,8 @@ switch_profile() { } get_current_profile() { - local conf="${GCC_ENV_D}/config" - if [[ -n ${CTARGET} ]] ; then - conf="${conf}-${CTARGET}" - elif [[ -n ${CC_COMP} ]] && is_cross_compiler ; then + local conf="${GCC_ENV_D}/config-${CTARGET}" + if [[ -n ${CC_COMP} ]] && is_cross_compiler ; then conf="${conf}-${CC_COMP}" fi |