diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-03-21 13:49:02 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-03-21 13:49:02 +0000 |
commit | 48e48dd148eaa8ece668d0d3bb86420a99bec053 (patch) | |
tree | 128d734f23c650cd2bd57cbe270daa3c788633ea | |
parent | Stop auto appending CFLAGS_<abi> from the env. (diff) | |
download | gcc-config-48e48dd148eaa8ece668d0d3bb86420a99bec053.tar.gz gcc-config-48e48dd148eaa8ece668d0d3bb86420a99bec053.tar.bz2 gcc-config-48e48dd148eaa8ece668d0d3bb86420a99bec053.zip |
Default to /etc/portage/make.conf #338032 by Dennis Schridde.
-rwxr-xr-x | gcc-config | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: gentoo-x86/sys-devel/gcc-config/files/gcc-config-1.5,v 1.4 2011/03/07 12:48:15 vapier Exp $ +# $Header: gentoo-x86/sys-devel/gcc-config/files/gcc-config-1.5,v 1.5 2011/03/21 13:49:02 vapier Exp $ # Format of /etc/env.d/gcc/: # config-TARGET: CURRENT=version for TARGET @@ -47,7 +47,7 @@ Options: -O, --use-old Use the old profile if one was selected. -f, --force Make sure all config files are regenerated. -P, --use-portage-chost Only set to given profile if its CHOST is the - same as that set for portage in /etc/make.conf + same as that set in /etc/portage/make.conf (or one of other portage config files...). -c, --get-current-profile Print current used gcc profile. -l, --list-profiles Print a list of available profiles. @@ -84,7 +84,10 @@ try_real_hard_to_find_CHOST() { # local varname=${1:-CHOST} - local conf=${ROOT}/etc/make.conf + local conf=${ROOT}/etc/portage/make.conf + if [[ ! -e ${conf} && -e ${ROOT}/etc/make.conf ]] ; then + conf=${ROOT}/etc/make.conf + fi local ret=$(source "${conf}" 2>/dev/null ; echo ${!varname}) if [[ -z ${ret} ]] ; then # newer portage supports spaces between the var and = @@ -132,7 +135,7 @@ get_real_chost() { if [[ -z ${REAL_CHOST} ]] ; then eerror "${argv0}: Could not get portage CHOST!" eerror "${argv0}: You should verify that CHOST is set in one of these places:" - eerror "${argv0}: - ${ROOT}/etc/make.conf" + eerror "${argv0}: - ${ROOT}/etc/portage/make.conf" eerror "${argv0}: - active environment" exit 1 fi @@ -618,9 +621,9 @@ for x in "$@" ; do rcsfile="$RCSfile: gcc-config-1.5,v $" rcsfile=${rcsfile#: } rcsfile=${rcsfile%,v*} - cvsrev="$Revision: 1.4 $" + cvsrev="$Revision: 1.5 $" cvsrev=${cvsrev#: } - cvsdate="$Date: 2011/03/07 12:48:15 $" + cvsdate="$Date: 2011/03/21 13:49:02 $" cvsdate=${cvsdate#: } echo "${rcsfile} (r${cvsrev% *} @ ${cvsdate% *})" exit 0 |