binutils: Always search DT_RPATH
This commit is contained in:
parent
5dea877368
commit
c15c449236
|
@ -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.
|
|
@ -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" ];
|
||||
|
|
Loading…
Reference in New Issue