arm: pass architecture extensions to assembler if supported
authorRichard Earnshaw <rearnsha@arm.com>
Tue, 21 Sep 2021 10:14:46 +0000 (11:14 +0100)
committerRichard Earnshaw <rearnsha@arm.com>
Tue, 21 Sep 2021 10:20:37 +0000 (11:20 +0100)
commit4e7a92c0ff3871d955ca8fb133f869b216d7224d
treeac7903abe5b4ca3934ecbd4f8c9059ca990afb6b
parent55b989de7679a486ad674fb154408de26ac96467
arm: pass architecture extensions to assembler if supported

When I originally added the new extended architecture features support
to GCC, the assembler was unable to parse the new feature lists on the
command-line and would throw an error.  This has now been fixed in GAS
and the behaviour is the same as GCC.

So this patch adds a configure-time test for the assembler in use to
detect that it is recent enough to support this behaviour and then
enables passing the architecture extensions to the assembler when this
is the case.

Although the assembly output generated by GCC does not rely on this,
this should ease some issues when using GCC as a driver for compiling
source written directly in assembly language when the programmer was
expecting the appropriate options to be passed on the command line.

gcc/ChangeLog:

* configure.ac: Detect when the assembler supports new-style
architecture extensions.
* common/config/arm/arm-common.c (arm_rewrite_mcpu): Return
the full CPU string if the assembler can grok it.
(arm_rewrite_march): Likewise but for the architecture.
* config.in: Regenerate.
* configure: Regenerate.
gcc/common/config/arm/arm-common.c
gcc/config.in
gcc/configure
gcc/configure.ac