diff --git a/pkgs/build-support/gcc-wrapper/builder.sh b/pkgs/build-support/gcc-wrapper/builder.sh index ad2b8003f090..81e698c66849 100644 --- a/pkgs/build-support/gcc-wrapper/builder.sh +++ b/pkgs/build-support/gcc-wrapper/builder.sh @@ -31,7 +31,7 @@ if test -z "$nativeLibc"; then # The dynamic linker is passed in `ldflagsBefore' to allow # explicit overrides of the dynamic linker by callers to gcc/ld # (the *last* value counts, so ours should come first). - echo "-dynamic-linker $dynamicLinker" > $out/nix-support/libc-ldflags-before + echo "-dynamic-linker" $dynamicLinker > $out/nix-support/libc-ldflags-before fi if test -n "$nativeTools"; then diff --git a/pkgs/build-support/gcc-wrapper/default.nix b/pkgs/build-support/gcc-wrapper/default.nix index 5a4ccba5eb38..c174af016757 100644 --- a/pkgs/build-support/gcc-wrapper/default.nix +++ b/pkgs/build-support/gcc-wrapper/default.nix @@ -85,7 +85,8 @@ stdenv.mkDerivation ({ if !nativeLibc then (if stdenv.system == "i686-linux" then "ld-linux.so.2" else if stdenv.system == "x86_64-linux" then "ld-linux-x86-64.so.2" else - if stdenv.isArm then "ld-linux.so.3" else + # ARM with a wildcard, which can be "" or "-armhf". + if stdenv.isArm then "ld-linux*.so.3" else if stdenv.system == "powerpc-linux" then "ld.so.1" else if stdenv.system == "mips64el-linux" then "ld.so.1" else abort "don't know the name of the dynamic linker for this platform")