summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorBenda Xu <heroxbd@gentoo.org>2017-01-08 14:08:23 +0900
committerBenda Xu <heroxbd@gentoo.org>2017-01-09 23:00:27 +0900
commit6526608cbdb8202bc69aaaedd19f773ef651862c (patch)
tree7d3afee4c0122304df1f4bcea5b5f595e3b7e834 /eclass
parenttoolchain.eclass: Call fix_libtool_files.sh by name (diff)
downloadgentoo-6526608cbdb8202bc69aaaedd19f773ef651862c.tar.gz
gentoo-6526608cbdb8202bc69aaaedd19f773ef651862c.tar.bz2
gentoo-6526608cbdb8202bc69aaaedd19f773ef651862c.zip
toolchain.eclass: drop env -i from gcc-config calls.
In Prefix, PATH should also be preserved, resulting in a mouthful of `env -i PATH=${PATH} ROOT=${ROOT}`. The origin commit introducing env -i was for "cleanup". Dropping env -i is cleaner. Reference: https://gitweb.gentoo.org/repo/gentoo/historical.git/commit/?id=a8a64d1886cc5c9f975353b97237f2900a3ee88c Reference: https://gitweb.gentoo.org/repo/gentoo/historical.git/commit/?id=7d9f89700a2ee50674c0d871ec6d21b468ac6206 Bug: 531610
Diffstat (limited to 'eclass')
-rw-r--r--eclass/toolchain.eclass8
1 files changed, 4 insertions, 4 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index ef932d2557f2..8e04864ee477 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -2119,13 +2119,13 @@ toolchain_pkg_postrm() {
do_gcc_config() {
if ! should_we_gcc_config ; then
- env -i ROOT="${ROOT}" gcc-config --use-old --force
+ gcc-config --use-old --force
return 0
fi
local current_gcc_config target
- current_gcc_config=$(env -i ROOT="${ROOT}" gcc-config -c ${CTARGET} 2>/dev/null)
+ current_gcc_config=$(gcc-config -c ${CTARGET} 2>/dev/null)
if [[ -n ${current_gcc_config} ]] ; then
local current_specs use_specs
# figure out which specs-specific config is active
@@ -2159,12 +2159,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 ROOT="${ROOT}" gcc-config -c ${CTARGET} 2>&1) || return 0
+ curr_config=$(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 ROOT="${ROOT}" gcc-config -S ${curr_config} | awk '{print $2}')
+ local curr_config_ver=$(gcc-config -S ${curr_config} | awk '{print $2}')
local curr_branch_ver=$(get_version_component_range 1-2 ${curr_config_ver})