summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-08-12 20:30:20 +0000
committerMike Frysinger <vapier@gentoo.org>2011-08-12 20:30:20 +0000
commit198b9c1665d86e231376b4544be8e954bb10cff0 (patch)
tree9c99bbe1b933ff23659325c7dcea8633bf8056ed /sys-devel/binutils-config/files
parentAdd options to switch the linker on the fly between gold and bfd, and clean u... (diff)
downloadhistorical-198b9c1665d86e231376b4544be8e954bb10cff0.tar.gz
historical-198b9c1665d86e231376b4544be8e954bb10cff0.tar.bz2
historical-198b9c1665d86e231376b4544be8e954bb10cff0.zip
Also support linker switching for current profile, and add some helpful user output so they can see what is going on.
Package-Manager: portage-2.2.0_alpha46/cvs/Linux x86_64
Diffstat (limited to 'sys-devel/binutils-config/files')
-rwxr-xr-xsys-devel/binutils-config/files/binutils-config-38
1 files changed, 5 insertions, 3 deletions
diff --git a/sys-devel/binutils-config/files/binutils-config-3 b/sys-devel/binutils-config/files/binutils-config-3
index 967492789e0b..1dee21c12a13 100755
--- a/sys-devel/binutils-config/files/binutils-config-3
+++ b/sys-devel/binutils-config/files/binutils-config-3
@@ -1,7 +1,7 @@
#!/bin/bash
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v 1.1 2011/08/12 20:26:09 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v 1.2 2011/08/12 20:30:20 vapier Exp $
# Format of /etc/env.d/binutils/:
# config-TARGET: CURRENT=version for TARGET
@@ -343,7 +343,9 @@ switch_linker() {
fi
# switch it up
+ ebegin "Setting default linker to ${ld} for ${PROFILE}"
ln -sf ld.${ld} "${BINPATH}"/ld
+ eend $?
}
switch_linker_gold() { switch_linker gold ; }
switch_linker_bfd() { switch_linker bfd ; }
@@ -387,7 +389,7 @@ while [[ $# -gt 0 ]] ; do
-h|--help) usage 0 ;;
-V|--version)
unset Header
- cvsver="$Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v 1.1 2011/08/12 20:26:09 vapier Exp $"
+ cvsver="$Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-3,v 1.2 2011/08/12 20:30:20 vapier Exp $"
cvsver=${cvsver##*binutils-config-}
bver=${cvsver%%,v *}
cvsver=${cvsver#* }
@@ -432,7 +434,7 @@ set_HOST
case ${DOIT} in
switch_profile|switch_linker_*)
# decode user's profile choice
- x=${UARG}
+ x=${UARG:-$(TARGET=${HOST} set_current_profile)}
PROFILE=""
if [[ -z $(echo ${x} | tr -d '[:digit:]') ]] ; then
# User gave us a # representing the profile