diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-11-28 21:57:00 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-11-29 00:03:51 +0000 |
commit | 04f6973200954f9ecd0f2fbc1d6ae029cd7ed857 (patch) | |
tree | 256f853fa3fa812b67fbd639bd9120bf06a683a3 | |
parent | 40e7be11c8098d11217786d106462e958e1d8718 (diff) |
lib, binutils: Move Risc-V bfdEmulation to be by the others
-rw-r--r-- | lib/systems/platforms.nix | 1 | ||||
-rw-r--r-- | pkgs/build-support/bintools-wrapper/default.nix | 3 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/systems/platforms.nix b/lib/systems/platforms.nix index a01f167a02b6..b3a4f9fc13cb 100644 --- a/lib/systems/platforms.nix +++ b/lib/systems/platforms.nix @@ -459,7 +459,6 @@ rec { riscv-multiplatform = bits: { name = "riscv-multiplatform"; kernelArch = "riscv"; - bfdEmulation = "elf${bits}lriscv"; kernelTarget = "vmlinux"; kernelAutoModules = true; kernelBaseConfig = "defconfig"; diff --git a/pkgs/build-support/bintools-wrapper/default.nix b/pkgs/build-support/bintools-wrapper/default.nix index 3b1b8ff570a8..6da0e58436d0 100644 --- a/pkgs/build-support/bintools-wrapper/default.nix +++ b/pkgs/build-support/bintools-wrapper/default.nix @@ -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); |