summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-12-27 02:45:48 +0000
committerMike Frysinger <vapier@gentoo.org>2005-12-27 02:45:48 +0000
commitbc2218f35e9c19393fafcb4accdfd8385f065c54 (patch)
treec97331224641314f30a1f1b83489480f973970c4
parentfix the trailing / check for ROOT and silence grep if config doesnt exist (diff)
downloadgcc-config-1.3.12.tar.gz
gcc-config-1.3.12.tar.bz2
gcc-config-1.3.12.zip
Use get_libdir #114633 by Patrick McLean.v1.3.12
-rwxr-xr-xgcc-config16
1 files changed, 10 insertions, 6 deletions
diff --git a/gcc-config b/gcc-config
index 7306953..55a85b9 100755
--- a/gcc-config
+++ b/gcc-config
@@ -1,7 +1,7 @@
#!/bin/bash
# Copyright 1999-2005 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.12,v 1.11 2005/12/21 01:53:54 vapier Exp $
+# $Header: gentoo-x86/sys-devel/gcc-config/files/gcc-config-1.3.12,v 1.12 2005/12/27 02:45:48 vapier Exp $
trap ":" INT QUIT TSTP
@@ -223,6 +223,12 @@ switch_profile() {
# Fix environment
source /etc/profile
umask 022
+ # Find the bin wrapper
+ local wrapper
+ for wrapper in GENTOO_LIBDIR lib lib64 lib32 lib ; do
+ wrapper="${ROOT}usr/${wrapper}/misc/gcc-config"
+ [[ -e ${wrapper} ]] && break
+ done
# Update the wrappers for this profile
local native="gcc cpp cc c++ g++ f77 g77 gcj"
@@ -242,16 +248,14 @@ switch_profile() {
[[ ${x} == "cc" ]] && ref=${ROOT}/${GCC_BIN_PATH}/gcc
[[ ${x} == "f77" ]] && ref=${ROOT}/${GCC_BIN_PATH}/g77
if [[ -x ${ref} ]] ; then
- ${CP} -f "${ROOT}/usr/lib/misc/gcc-config" \
- "${ROOT}/usr/bin/${x}"
+ ${CP} -f "${wrapper}" "${ROOT}/usr/bin/${x}"
${TOUCH} -r "${ref}" "${ROOT}/usr/bin/${x}"
# Install 32bit and 64bit wrappers if need be
# This should probably get folded back into the wrapper ...
if [[ ${x:${#x}-3} == "gcc" ]] || [[ ${x:${#x}-3} == "g++" ]] ; then
for bits in ${GCCBITS} ; do
- ${CP} -f "${ROOT}/usr/lib/misc/gcc-config" \
- "${ROOT}/usr/bin/${x}${bits}"
+ ${CP} -f "${wrapper}" "${ROOT}/usr/bin/${x}${bits}"
done
fi
fi
@@ -259,7 +263,7 @@ switch_profile() {
# Only install cpp if switching to a native one
if ! is_cross_compiler && [[ ${CTARGET} != *-solaris* ]] ; then
${RM} -f "${ROOT}/lib/cpp"
- ${CP} -f "${ROOT}/usr/lib/misc/gcc-config" "${ROOT}/lib/cpp"
+ ${CP} -f "${wrapper}" "${ROOT}/lib/cpp"
fi
# We need to make sure that libgcc_s.so / libunwind.so make it into /lib.