Merge branch 'no-ldemulation' into staging

main
Shea Levy 2 years ago
commit 89ad105c2e
No known key found for this signature in database
GPG Key ID: 5C0BD6957D86FE27
  1. 33
      pkgs/build-support/bintools-wrapper/default.nix
  2. 5
      pkgs/build-support/bintools-wrapper/ld-wrapper.sh

@ -193,39 +193,6 @@ stdenv.mkDerivation {
done
'';
emulation = let
fmt =
/**/ if targetPlatform.isDarwin then "mach-o"
else if targetPlatform.isWindows then "pe"
else "elf" + toString targetPlatform.parsed.cpu.bits;
endianPrefix = if targetPlatform.isBigEndian then "big" else "little";
sep = optionalString (!targetPlatform.isMips && !targetPlatform.isPower && !targetPlatform.isRiscV) "-";
arch =
/**/ if targetPlatform.isAarch64 then endianPrefix + "aarch64"
else if targetPlatform.isAarch32 then endianPrefix + "arm"
else if targetPlatform.isx86_64 then "x86-64"
else if targetPlatform.isx86_32 then "i386"
else if targetPlatform.isMips then {
mips = "btsmipn32"; # n32 variant
mipsel = "ltsmipn32"; # n32 variant
mips64 = "btsmip";
mips64el = "ltsmip";
}.${targetPlatform.parsed.cpu.name}
else if targetPlatform.isMmix then "mmix"
else if targetPlatform.isPower then if targetPlatform.isBigEndian then "ppc" else "lppc"
else if targetPlatform.isSparc then "sparc"
else if targetPlatform.isMsp430 then "msp430"
else if targetPlatform.isAvr then "avr"
else if targetPlatform.isAlpha then "alpha"
else if targetPlatform.isVc4 then "vc4"
else if targetPlatform.isOr1k then "or1k"
else if targetPlatform.isM68k then "m68k"
else if targetPlatform.isS390 then "s390"
else if targetPlatform.isRiscV then "lriscv"
else throw "unknown emulation for platform: ${targetPlatform.config}";
in if targetPlatform.useLLVM or false then ""
else targetPlatform.bfdEmulation or (fmt + sep + arch);
strictDeps = true;
depsTargetTargetPropagated = extraPackages;

@ -93,11 +93,6 @@ if [ -e @out@/nix-support/add-local-ldflags-before.sh ]; then
fi
# Specify the target emulation if nothing is passed in ("-m" overrides this
# environment variable). Ensures we never blindly fallback on targeting the host
# platform.
: ${LDEMULATION:=@emulation@}
# Three tasks:
#
# 1. Find all -L... switches for rpath

Loading…
Cancel
Save