Skip to content

Commit

Permalink
sys-devel/binutils-config: add avr/msp symlink handling
Browse files Browse the repository at this point in the history
* fixes bug #147155 for all the happy arduino people

Package-Manager: Portage-2.3.13, Repoman-2.3.4
  • Loading branch information
sarnold committed Nov 22, 2017
1 parent 893749d commit 1b129b8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sys-devel/binutils-config/files/binutils-config-5
Original file line number Diff line number Diff line change
@@ -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/:
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 1b129b8

Please sign in to comment.