diff options
author | John Ericson <Ericson2314@yahoo.com> | 2017-12-29 17:42:38 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-29 17:42:38 -0500 |
commit | eb27be0731aa9a6566eabec13dd24391eac45882 (patch) | |
tree | 9e43a9fc746d8d43f02e5223e344794770eb71ea /pkgs/development | |
parent | b1dcc6c2012ef2190caf30043af457c15253abcd (diff) | |
parent | cc44e04472bf8d0774e09a6cc4bd47175e531b8e (diff) | |
download | nixlib-eb27be0731aa9a6566eabec13dd24391eac45882.tar nixlib-eb27be0731aa9a6566eabec13dd24391eac45882.tar.gz nixlib-eb27be0731aa9a6566eabec13dd24391eac45882.tar.bz2 nixlib-eb27be0731aa9a6566eabec13dd24391eac45882.tar.lz nixlib-eb27be0731aa9a6566eabec13dd24391eac45882.tar.xz nixlib-eb27be0731aa9a6566eabec13dd24391eac45882.tar.zst nixlib-eb27be0731aa9a6566eabec13dd24391eac45882.zip |
Merge pull request #33186 from obsidiansystems/cross-binutils
binutils: Fix cross, again
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" ]; |