]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
arm: ignore inapplicable .arch=no...
authorJan Beulich <jbeulich@suse.com>
Wed, 11 Jun 2025 12:32:13 +0000 (14:32 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 11 Jun 2025 12:32:13 +0000 (14:32 +0200)
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

index 6bf7eb1d8cec2bfe70157dd8fad5797a07eb1d44..13afe8d3e4817e6bb2ae04a5430cc7a154cf0202 100644 (file)
@@ -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;
          }