summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-08-29 00:15:39 +0200
committerLudovic Courtès <ludo@gnu.org>2012-08-29 00:15:39 +0200
commitc79dae607652c45fadb683b26d7a260dc55261ea (patch)
treecaaee3f570f22ec480a883d7d4a2db88e3049e88
parent7cdeac023d40a69a62b2d96fdb0cda4c4746b33f (diff)
downloadguix-patches-c79dae607652c45fadb683b26d7a260dc55261ea.tar
guix-patches-c79dae607652c45fadb683b26d7a260dc55261ea.tar.gz
distro: Add missing Binutils patch.
* distro/patches/binutils-ld-new-dtags.patch: New file. * Makefile.am (dist_patch_DATA): Add it.
-rw-r--r--Makefile.am1
-rw-r--r--distro/patches/binutils-ld-new-dtags.patch16
2 files changed, 17 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 6616b80f7c..fb22bef2a7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -39,6 +39,7 @@ nobase_dist_guilemodule_DATA = $(MODULES)
patchdir = $(pkgdatadir)/patches
dist_patch_DATA = \
+ distro/patches/binutils-ld-new-dtags.patch \
distro/patches/guile-1.8-cpp-4.5.patch \
distro/patches/m4-readlink-EINVAL.patch \
distro/patches/m4-s_isdir.patch \
diff --git a/distro/patches/binutils-ld-new-dtags.patch b/distro/patches/binutils-ld-new-dtags.patch
new file mode 100644
index 0000000000..5f7a03fc38
--- /dev/null
+++ b/distro/patches/binutils-ld-new-dtags.patch
@@ -0,0 +1,16 @@
+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.
+
+Patch from Nixpkgs by Eelco Dolstra <eelco.dolstra@logicblox.com>.
+
+--- 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;