aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-07-03 18:57:51 +0000
committerMike Frysinger <vapier@gentoo.org>2006-07-03 18:57:51 +0000
commit212658bb6ce45d65b7d5ac7aa021c7112237cf70 (patch)
tree32bcc44da712234deaf7ecf123b66d77d7faf6a2 /gcc-config
parenttry even harder to find CHOST when python is broken (diff)
downloadgcc-config-212658bb6ce45d65b7d5ac7aa021c7112237cf70.tar.gz
gcc-config-212658bb6ce45d65b7d5ac7aa021c7112237cf70.tar.bz2
gcc-config-212658bb6ce45d65b7d5ac7aa021c7112237cf70.zip
Push out accumulated fixes.
Diffstat (limited to 'gcc-config')
-rwxr-xr-xgcc-config22
1 files changed, 11 insertions, 11 deletions
diff --git a/gcc-config b/gcc-config
index 1502c69..14f4ac7 100755
--- a/gcc-config
+++ b/gcc-config
@@ -1,7 +1,7 @@
#!/bin/bash
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: gentoo-x86/sys-devel/gcc-config/files/gcc-config-1.3.13,v 1.8 2006/06/19 20:10:12 vapier Exp $
+# $Header: gentoo-x86/sys-devel/gcc-config/files/gcc-config-1.3.13,v 1.9 2006/07/03 18:57:51 vapier Exp $
trap ":" INT QUIT TSTP
@@ -45,7 +45,7 @@ USAGE_END
find_path() {
[[ -z $1 ]] && return 0
- local fullpath="$(type -P $1)"
+ local fullpath=$(type -P $1)
if [[ -x ${fullpath} ]] ; then
echo "${fullpath}"
@@ -94,7 +94,7 @@ try_real_hard_to_find_CHOST() {
# newer portage supports spaces between the var and =
# CHOST = "this-is-retarded"
ret=$(eval $(
- ${SED} -n \
+ ${SED:-sed} -n \
-e 's:[[:space:]]::g' \
-e '/^CHOST=/p' \
"${conf}"
@@ -111,7 +111,7 @@ try_real_hard_to_find_CHOST() {
# Then we try /etc/env.d/gcc/config
#
if [[ -s ${ROOT}/etc/env.d/gcc/config ]] ; then
- ret=$(split_gcc_ver $(<"${ROOT}"/etc/env.d/gcc/config))
+ ret=$(split_gcc_ver $(eval $(<"${ROOT}"/etc/env.d/gcc/config) ; echo ${CURRENT}))
echo ${ret% *}
fi
}
@@ -174,7 +174,7 @@ switch_profile() {
# compilers for default CHOST will be used to compile stuff,
# and thus we want all their lib paths in /etc/ld.so.conf ...
get_real_chost
- GCC_PROFILES="$(${FIND} "${GCC_ENV_D}" -maxdepth 1 -name "${REAL_CHOST}-*" -a ! -name "${CC_COMP}")"
+ GCC_PROFILES=$(${FIND} "${GCC_ENV_D}" -maxdepth 1 -name "${REAL_CHOST}-*" -a ! -name "${CC_COMP}")
GCC_PROFILES="${GCC_ENV_D}/${CC_COMP} ${GCC_PROFILES}"
# Extract all LDPATH's for our CHOST
@@ -184,7 +184,7 @@ switch_profile() {
source "${x}"
# Handle LDPATH's that have multiple directories
- local old_IFS="${IFS}"
+ local old_IFS=${IFS}
export IFS=":"
local sub_ldpath=
for sub_ldpath in ${LDPATH} ; do
@@ -194,7 +194,7 @@ switch_profile() {
fi
fi
done
- export IFS="${old_IFS}"
+ export IFS=${old_IFS}
fi
done
MY_LDPATH="${MY_LDPATH:1}" # trim leading :
@@ -204,7 +204,7 @@ switch_profile() {
unset GCC_SPECS LDPATH
source "${GCC_ENV_D}/${CC_COMP}"
OLD_CC_COMP=$(get_current_profile)
- CTARGET="${CTARGET:-${REAL_CHOST}}"
+ CTARGET=${CTARGET:-${REAL_CHOST}}
# What kind of env.d entry are we going to generate ?
if is_cross_compiler ; then
@@ -242,7 +242,7 @@ switch_profile() {
fi
# Save PATH
- GCC_BIN_PATH="${PATH}"
+ GCC_BIN_PATH=${PATH}
# Fix environment
source /etc/profile
umask 022
@@ -418,7 +418,7 @@ list_profiles() {
}
print_environ() {
- local OLDPATH="${PATH}"
+ local OLDPATH=${PATH}
local ENV_CMD=
local SET_ELEMENT=
@@ -549,7 +549,7 @@ for x in "$@" ; do
# Only use specified compiler if one is not already selected.
-O|--use-old)
if get_current_profile &>/dev/null ; then
- CC_COMP="$(get_current_profile)"
+ CC_COMP=$(get_current_profile)
else
eerror "No profile selected, unable to utilize --use-old"
exit 1