From 24849da5a8990bd5a3019ba62f7286274c2a8359 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Wed, 11 Jun 2025 14:32:13 +0200 Subject: [PATCH] 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. --- 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; } -- 2.47.2