* Turn on ld's --enable-new-dtags option by default to get RUNPATHs
instead of RPATHs. Borrowed from Gentoo. svn path=/nixpkgs/branches/stdenv-updates/; revision=11930
This commit is contained in:
parent
e1410edbc9
commit
25245042c2
@ -1,12 +0,0 @@
|
|||||||
source $stdenv/setup
|
|
||||||
|
|
||||||
patchConfigure() {
|
|
||||||
# Clear the default library search path.
|
|
||||||
if test "$noSysDirs" = "1"; then
|
|
||||||
echo 'NATIVE_LIB_DIRS=' >> ld/configure.tgt
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
preConfigure=patchConfigure
|
|
||||||
|
|
||||||
genericBuild
|
|
@ -2,12 +2,28 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "binutils-2.18";
|
name = "binutils-2.18";
|
||||||
builder = ./builder.sh;
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = mirror://gnu/binutils/binutils-2.18.tar.bz2;
|
url = mirror://gnu/binutils/binutils-2.18.tar.bz2;
|
||||||
sha256 = "16zfc7llbjdn69bbdy7kqgg2xa67ypgj7z5qicgwzvghaaj36yj8";
|
sha256 = "16zfc7llbjdn69bbdy7kqgg2xa67ypgj7z5qicgwzvghaaj36yj8";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# Turn on --enable-new-dtags by default to make the linker set
|
||||||
|
# RUNPATH instead of RPATH on binaries. This is important because
|
||||||
|
# RUNPATH can be overriden using LD_LIBRARY_PATH at runtime.
|
||||||
|
./new-dtags.patch
|
||||||
|
];
|
||||||
|
|
||||||
inherit noSysDirs;
|
inherit noSysDirs;
|
||||||
|
|
||||||
|
preConfigure = ''
|
||||||
|
# Clear the default library search path.
|
||||||
|
if test "$noSysDirs" = "1"; then
|
||||||
|
echo 'NATIVE_LIB_DIRS=' >> ld/configure.tgt
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
configureFlags = "--disable-werror"; # needed for dietlibc build
|
configureFlags = "--disable-werror"; # needed for dietlibc build
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
10
pkgs/development/tools/misc/binutils/new-dtags.patch
Normal file
10
pkgs/development/tools/misc/binutils/new-dtags.patch
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
--- binutils/ld/ldmain.c
|
||||||
|
+++ binutils/ld/ldmain.c
|
||||||
|
@@ -296,6 +296,7 @@ main (int argc, char **argv)
|
||||||
|
|
||||||
|
link_info.allow_undefined_version = TRUE;
|
||||||
|
link_info.keep_memory = TRUE;
|
||||||
|
+ link_info.new_dtags = TRUE;
|
||||||
|
link_info.combreloc = TRUE;
|
||||||
|
link_info.strip_discarded = TRUE;
|
||||||
|
link_info.callbacks = &link_callbacks;
|
Loading…
x
Reference in New Issue
Block a user