summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen L Arnold <nerdboy@gentoo.org>2017-11-22 10:24:12 -0800
committerStephen L Arnold <nerdboy@gentoo.org>2017-11-22 10:25:06 -0800
commit1b129b82462191f6adf022a2327d5b3a72dcb893 (patch)
treeb8c88c49ea9550457915af6d217e834c5984ef7c /sys-devel/binutils-config
parentsys-libs/libomp: Restore libomptarget options for -9999 (diff)
downloadgentoo-1b129b82462191f6adf022a2327d5b3a72dcb893.tar.gz
gentoo-1b129b82462191f6adf022a2327d5b3a72dcb893.tar.bz2
gentoo-1b129b82462191f6adf022a2327d5b3a72dcb893.zip
sys-devel/binutils-config: add avr/msp symlink handling
* fixes bug #147155 for all the happy arduino people Package-Manager: Portage-2.3.13, Repoman-2.3.4
Diffstat (limited to 'sys-devel/binutils-config')
-rwxr-xr-xsys-devel/binutils-config/files/binutils-config-58
1 files changed, 6 insertions, 2 deletions
diff --git a/sys-devel/binutils-config/files/binutils-config-5 b/sys-devel/binutils-config/files/binutils-config-5
index acb72b7e343..e6c5fac0026 100755
--- a/sys-devel/binutils-config/files/binutils-config-5
+++ b/sys-devel/binutils-config/files/binutils-config-5
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# Format of /etc/env.d/binutils/:
@@ -145,13 +145,17 @@ switch_profile() {
cd "${ROOT}/${LIBPATH}" || exit 1
if [[ ${TARGET} == ${HOST} ]] ; then
dstlib=${EROOT}/usr/${HOST}/lib
+ elif [[ -d ${EROOT}/usr/${TARGET}/lib ]] ; then
+ # true for at least avr and msp targets
+ dstlib=${EROOT}/usr/${TARGET}/lib
else
dstlib=${EROOT}/usr/${HOST}/${TARGET}/lib
fi
# When upgrading, we need to clean up ldscripts and libs.
# Don't symlink back in the libs -- the binutils-lib package handles
# these now.
- # TODO: Stop requiring even the ldscripts symlink.
+ # TODO: Stop requiring even the ldscripts symlink, except
+ # we can't for bare-metal toolchains, so... bug #147155
mkdir -p "${dstlib}"
rm -rf "${ROOT}/${BINPATH_LINKS}"/ldscripts
atomic_ln "${LIBPATH}/ldscripts" "${dstlib}" "ldscripts"