diff --git a/elf/cmdline.cc b/elf/cmdline.cc index e053f090..fa631850 100644 --- a/elf/cmdline.cc +++ b/elf/cmdline.cc @@ -554,8 +554,7 @@ std::vector parse_nonpositional_args(Context &ctx) { // // - Static PIE binaries crash on startup in some RISC-V environment if // we write addends to relocated places. - if constexpr (is_sparc || is_riscv) - ctx.arg.apply_dynamic_relocs = false; + ctx.arg.apply_dynamic_relocs = !is_sparc && !is_riscv; auto read_arg = [&](std::string name) { for (const std::string &opt : add_dashes(name)) {