diff options
author | 2009-09-02 09:00:08 +0000 | |
---|---|---|
committer | 2009-09-02 09:00:08 +0000 | |
commit | 5582c3a21e278dbcf644df812aba63f160690948 (patch) | |
tree | 686b56cefb5e0e713a9f9810c35db7ae5cafbd53 /eclass/toolchain-funcs.eclass | |
parent | Stabilize as this version works with gcc-4.3. (diff) | |
download | gentoo-2-5582c3a21e278dbcf644df812aba63f160690948.tar.gz gentoo-2-5582c3a21e278dbcf644df812aba63f160690948.tar.bz2 gentoo-2-5582c3a21e278dbcf644df812aba63f160690948.zip |
Make the lib we're going to update using install_name_tool writable if
it isn't. Restore write permissions afterwards, fixes bug #283424
Diffstat (limited to 'eclass/toolchain-funcs.eclass')
-rw-r--r-- | eclass/toolchain-funcs.eclass | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass index 72472e30cfbf..ef8251cccf65 100644 --- a/eclass/toolchain-funcs.eclass +++ b/eclass/toolchain-funcs.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.93 2009/08/15 15:12:56 grobian Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.94 2009/09/02 09:00:08 grobian Exp $ # @ECLASS: toolchain-funcs.eclass # @MAINTAINER: @@ -471,9 +471,14 @@ gen_usr_ldscript() { # libdir=/lib because that messes up libtool files. # Make sure we don't lose the specific version, so just modify the # existing install_name + if [[ ! -w "${ED}/${libdir}/${tlib}" ]] ; then + fperms u+w "${libdir}/${tlib}" # needed to write to it + local nowrite=yes + fi install_name_tool \ -id "${EPREFIX}"/${libdir}/${tlib} \ - "${ED}"/${libdir}/${tlib} + "${ED}"/${libdir}/${tlib} || die "install_name_tool failed" + [[ -n ${nowrite} ]] && fperms u-w "${libdir}/${tlib}" # Now as we don't use GNU binutils and our linker doesn't # understand linker scripts, just create a symlink. pushd "${ED}/usr/${libdir}" > /dev/null |