Fix about the order of -rpath and -L in the ld-wrapper
svn path=/nixpkgs/branches/stdenv-updates/; revision=25128
This commit is contained in:
parent
a8a01a54ab
commit
e930a7385b
@ -122,11 +122,13 @@ if test "$NIX_DONT_SET_RPATH" != "1"; then
|
|||||||
# Second, for each directory in the library search path (-L...),
|
# Second, for each directory in the library search path (-L...),
|
||||||
# see if it contains a dynamic library used by a -l... flag. If
|
# see if it contains a dynamic library used by a -l... flag. If
|
||||||
# so, add the directory to the rpath.
|
# so, add the directory to the rpath.
|
||||||
|
# It's important to add the rpath in the order of -L..., so
|
||||||
|
# the link time chosen objects will be those of runtime linking.
|
||||||
|
|
||||||
for i in $libs; do
|
for i in $libPath; do
|
||||||
for j in $libPath; do
|
for j in $libs; do
|
||||||
if test -f "$j/lib$i.so"; then
|
if test -f "$i/lib$j.so"; then
|
||||||
addToRPath $j
|
addToRPath $i
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user