binutils: gold is not available for riscv target

This commit is contained in:
Nick Cao 2022-12-25 19:50:28 +08:00 committed by Bjørn Forsman
parent f7c85bd720
commit f12a7d932d

View File

@ -1,5 +1,5 @@
let
execFormatIsELF = platform: platform.parsed.kernel.execFormat.name == "elf";
withGold = platform: platform.parsed.kernel.execFormat.name == "elf" && !platform.isRiscV;
in
{ stdenv
@ -18,7 +18,7 @@ in
, texinfo
, zlib
, enableGold ? execFormatIsELF stdenv.targetPlatform
, enableGold ? withGold stdenv.targetPlatform
, enableShared ? !stdenv.hostPlatform.isStatic
# WARN: Enabling all targets increases output size to a multiple.
, withAllTargets ? false
@ -26,7 +26,7 @@ in
# WARN: configure silently disables ld.gold if it's unsupported, so we need to
# make sure that intent matches result ourselves.
assert enableGold -> execFormatIsELF stdenv.targetPlatform;
assert enableGold -> withGold stdenv.targetPlatform;
let