From c79dae607652c45fadb683b26d7a260dc55261ea Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 29 Aug 2012 00:15:39 +0200 Subject: distro: Add missing Binutils patch. * distro/patches/binutils-ld-new-dtags.patch: New file. * Makefile.am (dist_patch_DATA): Add it. --- distro/patches/binutils-ld-new-dtags.patch | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 distro/patches/binutils-ld-new-dtags.patch (limited to 'distro') 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 . + +--- 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; -- cgit v1.2.3