[binutils-gdb] arm: ignore inapplicable .arch=no...
Jan Beulich
jbeulich@sourceware.org
Wed Jun 11 12:32:36 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=24849da5a8990bd5a3019ba62f7286274c2a8359
commit 24849da5a8990bd5a3019ba62f7286274c2a8359
Author: Jan Beulich <jbeulich@suse.com>
Date: Wed Jun 11 14:32:13 2025 +0200
arm: ignore inapplicable .arch=no...
Unlike for command line options, where a base architecture needs to be
provided explicitly, the .arch directive doesn't have such a
requirement. Therefore it is odd that disabling of an inapplicable
extension isn't silently ignored; claiming "not allowed for the current
base architecture" is at best misleading. Alter the error path to emit a
more "soft" diagnostic in that case instead.
Diff:
---
gas/config/tc-arm.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 6bf7eb1d8ce..13afe8d3e48 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -32744,8 +32744,12 @@ s_arm_arch_extension (int ignored ATTRIBUTE_UNUSED)
if (i == nb_allowed_archs)
{
- as_bad (_("architectural extension `%s' is not allowed for the "
- "current base architecture"), name);
+ if (adding_value)
+ as_bad (_("architectural extension `%s' is not allowed for the "
+ "current base architecture"), name);
+ else
+ as_tsktsk (_("disabling feature `%s' has no effect on the "
+ "current base architecture"), name);
break;
}
More information about the Binutils-cvs
mailing list