summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-05-03 04:51:07 +0000
committerMike Frysinger <vapier@gentoo.org>2007-05-03 04:51:07 +0000
commit469081bd86929ce16b69390a584a10e12eb40796 (patch)
tree9394ced7dedeb040ea64131e17e37386b731517e /eclass/toolchain.eclass
parentunleash app-admin/syslog-ng-2 for testing. (diff)
downloadgentoo-2-469081bd86929ce16b69390a584a10e12eb40796.tar.gz
gentoo-2-469081bd86929ce16b69390a584a10e12eb40796.tar.bz2
gentoo-2-469081bd86929ce16b69390a584a10e12eb40796.zip
start moving to GCC_PATH for env.d #174422 and cleanup gcc-config logic so that it doesnt matter what the ROOT value is
Diffstat (limited to 'eclass/toolchain.eclass')
-rw-r--r--eclass/toolchain.eclass18
1 files changed, 7 insertions, 11 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index ec5ca7334a6f..d060cf5606a1 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.332 2007/03/24 06:46:33 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.333 2007/05/03 04:51:07 vapier Exp $
#
# Maintainer: Toolchain Ninjas <toolchain@gentoo.org>
@@ -632,8 +632,10 @@ create_gcc_env_entry() {
gcc_specs_file="${LIBPATH}/$1.specs"
fi
+ # phase PATH/ROOTPATH out ...
echo "PATH=\"${BINPATH}\"" > ${gcc_envd_file}
echo "ROOTPATH=\"${BINPATH}\"" >> ${gcc_envd_file}
+ echo "GCC_PATH=\"${BINPATH}\"" >> ${gcc_envd_file}
if use multilib && ! has_multilib_profile; then
LDPATH="${LIBPATH}"
@@ -2088,9 +2090,6 @@ do_gcc_PIE_patches() {
}
should_we_gcc_config() {
- # we only want to switch compilers if installing to / or /tmp/stage1root
- [[ ${ROOT} == "/" || ${ROOT} == "/tmp/stage1root" ]] || return 1
-
# we always want to run gcc-config if we're bootstrapping, otherwise
# we might get stuck with the c-only stage1 compiler
use bootstrap && return 0
@@ -2099,12 +2098,12 @@ should_we_gcc_config() {
# if the current config is invalid, we definitely want a new one
# Note: due to bash quirkiness, the following must not be 1 line
local curr_config
- curr_config=$(env -i gcc-config -c ${CTARGET} 2>&1) || return 0
+ curr_config=$(env -i ROOT="${ROOT}" gcc-config -c ${CTARGET} 2>&1) || return 0
# if the previously selected config has the same major.minor (branch) as
# the version we are installing, then it will probably be uninstalled
# for being in the same SLOT, make sure we run gcc-config.
- local curr_config_ver=$(env -i gcc-config -S ${curr_config} | awk '{print $2}')
+ local curr_config_ver=$(env -i ROOT="${ROOT}" gcc-config -S ${curr_config} | awk '{print $2}')
local curr_branch_ver=$(get_version_component_range 1-2 ${curr_config_ver})
@@ -2136,14 +2135,14 @@ should_we_gcc_config() {
do_gcc_config() {
if ! should_we_gcc_config ; then
- env -i gcc-config --use-old --force
+ env -i ROOT="${ROOT}" gcc-config --use-old --force
return 0
fi
local current_gcc_config="" current_specs="" use_specs=""
# We grep out any possible errors
- current_gcc_config=$(env -i gcc-config -c ${CTARGET} | grep -v '^ ')
+ current_gcc_config=$(env -i ROOT="${ROOT}" gcc-config -c ${CTARGET} | grep -v '^ ')
if [[ -n ${current_gcc_config} ]] ; then
# figure out which specs-specific config is active
current_specs=$(gcc-config -S ${current_gcc_config} | awk '{print $3}')
@@ -2166,9 +2165,6 @@ do_gcc_config() {
}
should_we_eselect_compiler() {
- # we only want to switch compilers if installing to / or /tmp/stage1root
- [[ ${ROOT} == "/" || ${ROOT} == "/tmp/stage1root" ]] || return 1
-
# we always want to run gcc-config if we're bootstrapping, otherwise
# we might get stuck with the c-only stage1 compiler
use bootstrap && return 0