summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-01-05 03:05:42 +0000
committerMike Frysinger <vapier@gentoo.org>2006-01-05 03:05:42 +0000
commita7d611b959433dec74978e51cd769275607835e3 (patch)
tree4cffa123403cf1fe3c53571dc4316ae9784b5590 /sys-devel/gcc-config/files/gcc-config-1.3.12
parentfix timezone-data DEPEND for cross builds (diff)
downloadhistorical-a7d611b959433dec74978e51cd769275607835e3.tar.gz
historical-a7d611b959433dec74978e51cd769275607835e3.tar.bz2
historical-a7d611b959433dec74978e51cd769275607835e3.zip
Fix changing of profiles when using ROOT and a different CHOST.
Package-Manager: portage-2.1_pre3-r1
Diffstat (limited to 'sys-devel/gcc-config/files/gcc-config-1.3.12')
-rwxr-xr-xsys-devel/gcc-config/files/gcc-config-1.3.128
1 files changed, 7 insertions, 1 deletions
diff --git a/sys-devel/gcc-config/files/gcc-config-1.3.12 b/sys-devel/gcc-config/files/gcc-config-1.3.12
index c0de03df30c2..8366a2678f7c 100755
--- a/sys-devel/gcc-config/files/gcc-config-1.3.12
+++ b/sys-devel/gcc-config/files/gcc-config-1.3.12
@@ -1,7 +1,7 @@
#!/bin/bash
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/files/gcc-config-1.3.12,v 1.12 2005/12/27 02:45:48 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/files/gcc-config-1.3.12,v 1.13 2006/01/05 03:05:42 vapier Exp $
trap ":" INT QUIT TSTP
@@ -102,6 +102,12 @@ cheap_portageq_envvar() {
get_real_chost() {
[[ -n ${REAL_CHOST} ]] && return 0
+ # shortcut for switching compilers in a cross chroot
+ if [[ -n ${CHOST} && ${ROOT} != "/" ]] ; then
+ REAL_CHOST=${CHOST}
+ return 0
+ fi
+
# make sure portage isnt broken
if ${PYTHON} -V &>/dev/null ; then
export REAL_CHOST=$(${ENV} -i ${PORTAGEQ} envvar CHOST 2>/dev/null)