diff --git a/pkgs/build-support/bintools-wrapper/default.nix b/pkgs/build-support/bintools-wrapper/default.nix index 45ae3eba9b44..05b5a3732580 100644 --- a/pkgs/build-support/bintools-wrapper/default.nix +++ b/pkgs/build-support/bintools-wrapper/default.nix @@ -192,10 +192,9 @@ stdenv.mkDerivation { unset ldInner '') + '' - for variant in ld.gold ld.bfd ld.lld; do - local underlying=$ldPath/${targetPrefix}$variant - [[ -e "$underlying" ]] || continue - wrap ${targetPrefix}$variant ${./ld-wrapper.sh} $underlying + for variant in $ldPath/${targetPrefix}ld.*; do + basename=$(basename "$variant") + wrap $basename ${./ld-wrapper.sh} $variant done '';