]> git.ipfire.org Git - people/ms/gcc.git/commit
arm: fix warning when -mcpu=neoverse-n1 is used with -mfpu=neon [PR100067]
authorRichard Earnshaw <rearnsha@arm.com>
Wed, 14 Apr 2021 09:56:36 +0000 (10:56 +0100)
committerRichard Earnshaw <rearnsha@arm.com>
Wed, 14 Apr 2021 09:56:36 +0000 (10:56 +0100)
commitd1e4368ddb76a92c44f824c8e4ca1a3de8149342
treeb8ed63263832ac79e5453554d6c68722746e0a31
parent287be7f7a587cb08eb88ecee39ff5556a22976d2
arm: fix warning when -mcpu=neoverse-n1 is used with -mfpu=neon [PR100067]

If the compiler is configured with --with-fpu=<!auto> (or invoked
with, say, -mfpu=neon), then specifying -mcpu=neoverse-n1 can lead to
an unexpected warning: cc1: warning: switch ‘-mcpu=neoverse-n1’
conflicts with ‘-march=armv8.2-a’ switch

The fix for this is to correctly remove all the feature bits relating
to simd/fp units when -mfpu is used, not just those bits that form
part of the -mfpu specification (which is a subset).

gcc:
PR target/100067
* config/arm/arm.c (arm_configure_build_target): Strip isa_all_fpbits
from the isa_delta when -mfpu has been used.
(arm_options_perform_arch_sanity_checks): It's the architecture that
lacks an FPU not the processor.
gcc/config/arm/arm.c