[binutils-gdb] PR23877, bad value (n32r5900) for default CPU
Alan Modra
amodra@sourceware.org
Wed Feb 28 22:28:55 GMT 2024
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=62143ef92c28e64f3e4438b6dd4e8bb04a0fed12
commit 62143ef92c28e64f3e4438b6dd4e8bb04a0fed12
Author: Alan Modra <amodra@gmail.com>
Date: Thu Feb 29 08:45:18 2024 +1030
PR23877, bad value (n32r5900) for default CPU
Catching this at configure time would be nicer, but we'd need to exactly
match mips_parse_cpu in configure.ac and keep it all in sync.
PR 23877
* config/tc-mips.c (mips_after_parse_args): Don't assert that
mips_parse_cpu returns non-NULL, call as_fatal with an informative
message instead.
Diff:
---
gas/config/tc-mips.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index 43c12de2c8a..8f54cb8937a 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -15287,7 +15287,9 @@ mips_after_parse_args (void)
if (arch_info == 0)
{
arch_info = mips_parse_cpu ("default CPU", MIPS_CPU_STRING_DEFAULT);
- gas_assert (arch_info);
+ if (!arch_info)
+ as_fatal (_("gas doesn't understand your configure target %s"),
+ TARGET_ALIAS);
}
if (ABI_NEEDS_64BIT_REGS (mips_abi) && !ISA_HAS_64BIT_REGS (arch_info->isa))
More information about the Binutils-cvs
mailing list