|
|
|
@ -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; |
|
|
|
|
|
|
|
|
|