diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix index c1c7da574444..3d53c5122f00 100644 --- a/pkgs/development/tools/misc/binutils/default.nix +++ b/pkgs/development/tools/misc/binutils/default.nix @@ -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