diff options
author | Ben Gamari <ben@smart-cactus.org> | 2017-10-26 16:00:37 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2017-12-29 17:32:28 -0500 |
commit | c15c44923661245b5ca0b5fd74622d5c95beacac (patch) | |
tree | 0e37893e17df3870061d5994658d04e272583673 /pkgs/development | |
parent | 5dea877368227d818cccab3a1380322a2ba83aa0 (diff) | |
download | nixlib-c15c44923661245b5ca0b5fd74622d5c95beacac.tar nixlib-c15c44923661245b5ca0b5fd74622d5c95beacac.tar.gz nixlib-c15c44923661245b5ca0b5fd74622d5c95beacac.tar.bz2 nixlib-c15c44923661245b5ca0b5fd74622d5c95beacac.tar.lz nixlib-c15c44923661245b5ca0b5fd74622d5c95beacac.tar.xz nixlib-c15c44923661245b5ca0b5fd74622d5c95beacac.tar.zst nixlib-c15c44923661245b5ca0b5fd74622d5c95beacac.zip |
binutils: Always search DT_RPATH
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/tools/misc/binutils/always-search-rpath.patch | 14 | ||||
-rw-r--r-- | pkgs/development/tools/misc/binutils/default.nix | 8 |
2 files changed, 22 insertions, 0 deletions
diff --git a/pkgs/development/tools/misc/binutils/always-search-rpath.patch b/pkgs/development/tools/misc/binutils/always-search-rpath.patch new file mode 100644 index 000000000000..2e9956e6b6e4 --- /dev/null +++ b/pkgs/development/tools/misc/binutils/always-search-rpath.patch @@ -0,0 +1,14 @@ +diff --git a/ld/genscripts.sh b/ld/genscripts.sh +index b6940d376d..0feb1adfd0 100755 +--- a/ld/genscripts.sh ++++ b/ld/genscripts.sh +@@ -125,6 +125,9 @@ if test "x$NATIVE" = "xyes" ; then + USE_LIBPATH=yes + fi + ++# TODO: why is this needed? ++USE_LIBPATH=yes ++ + # Set the library search path, for libraries named by -lfoo. + # If LIB_PATH is defined (e.g., by Makefile) and non-empty, it is used. + # Otherwise, the default is set here. diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix index 7628e37ae1cd..1b0166526996 100644 --- a/pkgs/development/tools/misc/binutils/default.nix +++ b/pkgs/development/tools/misc/binutils/default.nix @@ -53,6 +53,14 @@ stdenv.mkDerivation rec { # elf32-littlearm-vxworks in favor of the first. # https://github.com/NixOS/nixpkgs/pull/30484#issuecomment-345472766 ./disambiguate-arm-targets.patch + + # For some reason bfd ld doesn't search DT_RPATH when cross-compiling. It's + # not clear why this behavior was decided upon but it has the unfortunate + # consequence that the linker will fail to find transitive dependencies of + # shared objects when cross-compiling. Consequently, we are forced to + # override this behavior, forcing ld to search DT_RPATH even when + # cross-compiling. + ./always-search-rpath.patch ]; outputs = [ "out" "info" "man" ]; |