From b00016d9d92187f9fb39d4890e44be3f1f2a21f0 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Sat, 7 May 2022 06:13:58 -0400 Subject: [PATCH] bintools-wrapper: Remove LDEMULATION setting. As far as I can tell, this has never actually done anything, as LDEMULATION is not exported. I tried exporting it and builds broke, and as it doesn't seem to have caused any problems as a noop all these years it didn't seem worth investigating further. --- .../bintools-wrapper/default.nix | 33 ------------------- .../bintools-wrapper/ld-wrapper.sh | 5 --- 2 files changed, 38 deletions(-) diff --git a/pkgs/build-support/bintools-wrapper/default.nix b/pkgs/build-support/bintools-wrapper/default.nix index c2d67169c9c..4c2a13da015 100644 --- a/pkgs/build-support/bintools-wrapper/default.nix +++ b/pkgs/build-support/bintools-wrapper/default.nix @@ -184,39 +184,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; diff --git a/pkgs/build-support/bintools-wrapper/ld-wrapper.sh b/pkgs/build-support/bintools-wrapper/ld-wrapper.sh index fb01c5096d5..f8bddabbc68 100644 --- a/pkgs/build-support/bintools-wrapper/ld-wrapper.sh +++ b/pkgs/build-support/bintools-wrapper/ld-wrapper.sh @@ -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