forked from mirrors/nixpkgs
Merge pull request #124228 from thefloweringash/bootstrap-rpath
darwin/make-bootstrap-tools: move "lib" from install name to rpath
This commit is contained in:
commit
0115297f24
|
@ -136,9 +136,7 @@ in rec {
|
|||
local libs=$(${stdenv.cc.targetPrefix}otool -L "$1" | tail -n +2 | grep -o "$NIX_STORE.*-\S*") || true
|
||||
local newlib
|
||||
for lib in $libs; do
|
||||
newlib=''${lib:${toString (storePrefixLen + 1)}}
|
||||
newlib=''${newlib#*/}
|
||||
${stdenv.cc.targetPrefix}install_name_tool -change $lib "@rpath/$newlib" "$1"
|
||||
${stdenv.cc.targetPrefix}install_name_tool -change $lib "@rpath/$(basename "$lib")" "$1"
|
||||
done
|
||||
}
|
||||
|
||||
|
@ -160,7 +158,7 @@ in rec {
|
|||
for i in $out/bin/*; do
|
||||
if test -x "$i" -a ! -L "$i" -a "$(basename $i)" != codesign; then
|
||||
echo "Adding @executable_path to rpath in $i"
|
||||
${stdenv.cc.targetPrefix}install_name_tool -add_rpath '@executable_path/..' $i
|
||||
${stdenv.cc.targetPrefix}install_name_tool -add_rpath '@executable_path/../lib' $i
|
||||
fi
|
||||
done
|
||||
|
||||
|
|
Loading…
Reference in a new issue