mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 00:43:20 +00:00
bintools-wrapper: dont wrap ld if it doesn't exist
not all linkers have a ld binary in bin also note the '${ld:-}' which allows users to set the ld path with a env var > '${foo:-val}' $foo, or val if unset (or null)
This commit is contained in:
parent
3697ddeabe
commit
b5abc3d090
@ -184,7 +184,9 @@ stdenv.mkDerivation {
|
||||
done
|
||||
|
||||
'' + (if !useMacosReexportHack then ''
|
||||
wrap ${targetPrefix}ld ${./ld-wrapper.sh} ''${ld:-$ldPath/${targetPrefix}ld}
|
||||
if [ -e ''${ld:-$ldPath/${targetPrefix}ld} ]; then
|
||||
wrap ${targetPrefix}ld ${./ld-wrapper.sh} ''${ld:-$ldPath/${targetPrefix}ld}
|
||||
fi
|
||||
'' else ''
|
||||
ldInner="${targetPrefix}ld-reexport-delegate"
|
||||
wrap "$ldInner" ${./macos-sierra-reexport-hack.bash} ''${ld:-$ldPath/${targetPrefix}ld}
|
||||
|
Loading…
Reference in New Issue
Block a user