|
Lines 98-104
Link Here
|
| 98 |
} |
98 |
} |
| 99 |
|
99 |
|
| 100 |
CC_COMP="" |
100 |
CC_COMP="" |
| 101 |
REAL_CHOST="$(/usr/bin/python -c 'import portage; print portage.settings["CHOST"];')" |
101 |
|
|
|
102 |
get_real_chost() { |
| 103 |
[ -n "$REAL_CHOST" ] && return 0 |
| 104 |
|
| 105 |
REAL_CHOST="$(/usr/bin/python -c 'import portage; |
| 106 |
print portage.settings["CHOST"]' 2> /dev/null)" |
| 107 |
|
| 108 |
if [ -z "${REAL_CHOST}" ] |
| 109 |
then |
| 110 |
eerror "$0: Could not get portage CHOST!" |
| 111 |
return 1 |
| 112 |
fi |
| 113 |
} |
| 102 |
|
114 |
|
| 103 |
switch_profile() { |
115 |
switch_profile() { |
| 104 |
local MY_LDPATH="" |
116 |
local MY_LDPATH="" |
|
Lines 132-137
Link Here
|
| 132 |
# first in /etc/ld.so.conf, as the logical is that all |
144 |
# first in /etc/ld.so.conf, as the logical is that all |
| 133 |
# compilers for default CHOST will be used to compile stuff, |
145 |
# compilers for default CHOST will be used to compile stuff, |
| 134 |
# and thus we want all their lib paths in /etc/ld.so.conf ... |
146 |
# and thus we want all their lib paths in /etc/ld.so.conf ... |
|
|
147 |
get_real_chost |
| 135 |
GCC_PROFILES="$(${FIND} /etc/env.d/gcc/ -name "${REAL_CHOST}-*")" |
148 |
GCC_PROFILES="$(${FIND} /etc/env.d/gcc/ -name "${REAL_CHOST}-*")" |
| 136 |
GCC_PROFILES="${GCC_PROFILES/\/etc\/env.d\/gcc\/${CC_COMP}}" |
149 |
GCC_PROFILES="${GCC_PROFILES/\/etc\/env.d\/gcc\/${CC_COMP}}" |
| 137 |
GCC_PROFILES="/etc/env.d/gcc/${CC_COMP} ${GCC_PROFILES}" |
150 |
GCC_PROFILES="/etc/env.d/gcc/${CC_COMP} ${GCC_PROFILES}" |
|
Lines 381-391
Link Here
|
| 381 |
exit 1 |
394 |
exit 1 |
| 382 |
fi |
395 |
fi |
| 383 |
|
396 |
|
| 384 |
# Chosen CHOST are not the same as the real CHOST according to make.conf, |
397 |
if [ "${CHECK_CHOST}" = "yes" ] |
| 385 |
# and --use-portage-chost option was given, so do nothing ... |
|
|
| 386 |
if [ "${CHECK_CHOST}" = "yes" -a "${CC_COMP%-*}" != "${REAL_CHOST}" ] |
| 387 |
then |
398 |
then |
| 388 |
exit 0 |
399 |
# Chosen CHOST are not the same as the real CHOST according to |
|
|
400 |
# make.conf, and --use-portage-chost option was given, so do nothing |
| 401 |
get_real_chost |
| 402 |
[ "${CC_COMP%-*}" != "${REAL_CHOST}" ] && exit 0 |
| 389 |
fi |
403 |
fi |
| 390 |
|
404 |
|
| 391 |
eval ${DOIT} |
405 |
eval ${DOIT} |