lib, binutils: Move Risc-V bfdEmulation to be by the others

This commit is contained in:
John Ericson 2020-11-28 21:57:00 +00:00
parent 40e7be11c8
commit 04f6973200
2 changed files with 2 additions and 2 deletions

View File

@ -459,7 +459,6 @@ rec {
riscv-multiplatform = bits: {
name = "riscv-multiplatform";
kernelArch = "riscv";
bfdEmulation = "elf${bits}lriscv";
kernelTarget = "vmlinux";
kernelAutoModules = true;
kernelBaseConfig = "defconfig";

View File

@ -167,7 +167,7 @@ stdenv.mkDerivation {
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) "-";
sep = optionalString (!targetPlatform.isMips && !targetPlatform.isPower && !targetPlatform.isRiscV) "-";
arch =
/**/ if targetPlatform.isAarch64 then endianPrefix + "aarch64"
else if targetPlatform.isAarch32 then endianPrefix + "arm"
@ -187,6 +187,7 @@ stdenv.mkDerivation {
else if targetPlatform.isAlpha then "alpha"
else if targetPlatform.isVc4 then "vc4"
else if targetPlatform.isOr1k then "or1k"
else if targetPlatform.isRiscV then "lriscv"
else throw "unknown emulation for platform: ${targetPlatform.config}";
in if targetPlatform.useLLVM or false then ""
else targetPlatform.platform.bfdEmulation or (fmt + sep + arch);