From 7bbb548b4c5e695fe5cfc439f64c75d07169bd1c Mon Sep 17 00:00:00 2001 From: "Andreas K. Hüttel" Date: Sat, 16 Dec 2017 00:32:54 +0100 Subject: Version 1.2 https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-devel/binutils-config/files/binutils-config-1.2?revision=1.1 --- binutils-config | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/binutils-config b/binutils-config index e0a31f7..e9ab57b 100644 --- a/binutils-config +++ b/binutils-config @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/Attic/binutils-config-1.1,v 1.1 2004/12/09 02:23:22 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/Attic/binutils-config-1.2,v 1.1 2004/12/15 17:00:30 vapier Exp $ # Format of /etc/env.d/binutils/: # config-TARGET: CURRENT=version for TARGET @@ -57,7 +57,12 @@ switch_profile() { LIBPATH="/usr/lib/binutils/${TARGET}/${VER}" cd "${ROOT}/${LIBPATH}" || exit 1 mkdir -p "${ROOT}"/usr/${TARGET}/lib - rm -f "${ROOT}"/usr/${TARGET}/lib/ldscripts + if [[ -d ${ROOT}/usr/${TARGET}/lib/ldscripts ]] ; then + # When upgrading, we need to clean up ldscripts + rm -r "${ROOT}"/usr/${TARGET}/lib/ldscripts + else + rm -f "${ROOT}"/usr/${TARGET}/lib/ldscripts + fi ln -sf "${LIBPATH}/ldscripts" "${ROOT}"/usr/${TARGET}/lib/ldscripts if [[ ${TARGET} = ${HOST} ]] ; then dstlib="${ROOT}"/usr/${HOST}/lib -- cgit v1.2.3-65-gdbad