summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-06-09 23:54:06 -0400
committerMike Frysinger <vapier@gentoo.org>2012-06-09 23:54:06 -0400
commit7ba7c0b5b29c9dec3d1e0f37c78235eecad3ca25 (patch)
tree86e67622a637b574d2fda5b3f2459b5f961a33ba
parentwrapper: remove ROOT from env when looking up bin path (diff)
downloadgcc-config-7ba7c0b5b29c9dec3d1e0f37c78235eecad3ca25.tar.gz
gcc-config-7ba7c0b5b29c9dec3d1e0f37c78235eecad3ca25.tar.bz2
gcc-config-7ba7c0b5b29c9dec3d1e0f37c78235eecad3ca25.zip
gcc-config: do not export GCC_SPECS for cross-compilersv1.7.3
Don't want the cross-compiler settings getting used by the native compiler. URL: https://bugs.gentoo.org/420097 Reported-by: Amadeusz Sławiński <amade@asmblr.net> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rwxr-xr-xgcc-config8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc-config b/gcc-config
index 554ff2b..c545974 100755
--- a/gcc-config
+++ b/gcc-config
@@ -406,9 +406,15 @@ switch_profile() {
cat <<-EOF > "${envd}.tmp"
PATH="${GCC_PATH}"
ROOTPATH="${GCC_PATH}"
- GCC_SPECS="${GCC_SPECS}"
EOF
if ! is_cross_compiler ; then
+ # Only write GCC_SPECS for the native compiler. #420097
+ # Otherwise, the env.d of cross-compilers come after the
+ # native one and overrides the native setting. Further,
+ # we don't support GCC_SPECS with cross-compilers, so
+ # writing out that settings doesn't make much sense.
+ printf 'GCC_SPECS="%s"\n' "${GCC_SPECS}" >> "${envd}.tmp"
+
# Regardless of the profile selected, keep the runtime lookup
# paths stable. Otherwise, all the apps that were built with
# a new compiler will start trying to use older versions of