guix/distro/packages/patches/binutils-ld-new-dtags.patch
Ludovic Courtès bfb3c3d03a build: Move distro/patches' to distro/packages/patches'.
* distro/patches: Move directory to...
* distro/packages/patches: ... here.
* Makefile.am (dist_patch_DATA): Adjust accordingly.
* pre-inst-env.in (DISTRO_PATCH_DIRECTORY): Likewise.
2012-10-27 15:32:40 +02:00

17 lines
573 B
Diff

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;