1 |
Bug: https://bugs.gentoo.org/603776 |
2 |
--- |
3 |
eclass/toolchain.eclass | 8 ++++---- |
4 |
1 file changed, 4 insertions(+), 4 deletions(-) |
5 |
|
6 |
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass |
7 |
index 55249b00249b..97511ee12440 100644 |
8 |
--- a/eclass/toolchain.eclass |
9 |
+++ b/eclass/toolchain.eclass |
10 |
@@ -2119,13 +2119,13 @@ |
11 |
|
12 |
do_gcc_config() { |
13 |
if ! should_we_gcc_config ; then |
14 |
- env -i ROOT="${ROOT}" gcc-config --use-old --force |
15 |
+ env -i CHOST="${CHOST}" ROOT="${ROOT}" gcc-config --use-old --force |
16 |
return 0 |
17 |
fi |
18 |
|
19 |
local current_gcc_config target |
20 |
|
21 |
- current_gcc_config=$(env -i ROOT="${ROOT}" gcc-config -c ${CTARGET} 2>/dev/null) |
22 |
+ current_gcc_config=$(env -i CHOST="${CHOST}" ROOT="${ROOT}" gcc-config -c ${CTARGET} 2>/dev/null) |
23 |
if [[ -n ${current_gcc_config} ]] ; then |
24 |
local current_specs use_specs |
25 |
# figure out which specs-specific config is active |
26 |
@@ -2159,12 +2159,12 @@ should_we_gcc_config() { |
27 |
# if the current config is invalid, we definitely want a new one |
28 |
# Note: due to bash quirkiness, the following must not be 1 line |
29 |
local curr_config |
30 |
- curr_config=$(env -i ROOT="${ROOT}" gcc-config -c ${CTARGET} 2>&1) || return 0 |
31 |
+ curr_config=$(env -i CHOST="${CHOST}" ROOT="${ROOT}" gcc-config -c ${CTARGET} 2>&1) || return 0 |
32 |
|
33 |
# if the previously selected config has the same major.minor (branch) as |
34 |
# the version we are installing, then it will probably be uninstalled |
35 |
# for being in the same SLOT, make sure we run gcc-config. |
36 |
- local curr_config_ver=$(env -i ROOT="${ROOT}" gcc-config -S ${curr_config} | awk '{print $2}') |
37 |
+ local curr_config_ver=$(env -i CHOST="${CHOST}" ROOT="${ROOT}" gcc-config -S ${curr_config} | awk '{print $2}') |
38 |
|
39 |
local curr_branch_ver=$(get_version_component_range 1-2 ${curr_config_ver}) |
40 |
|
41 |
-- |
42 |
2.11.0 |