diff options
author | Fabian Groffen <grobian@gentoo.org> | 2009-09-02 09:00:08 +0000 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2009-09-02 09:00:08 +0000 |
commit | 9e6c1dc788959733a7f82b11c64f1150acd9cc8e (patch) | |
tree | 13d1b54a7477e889ce68f526a2f53dd9971af29e /eclass | |
parent | Stabilize as this version works with gcc-4.3. (diff) | |
download | historical-9e6c1dc788959733a7f82b11c64f1150acd9cc8e.tar.gz historical-9e6c1dc788959733a7f82b11c64f1150acd9cc8e.tar.bz2 historical-9e6c1dc788959733a7f82b11c64f1150acd9cc8e.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')
-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 |