[Bug target/87612] New: Bad diagnostic for conflicting mcpu and march options on aarch64

ktkachov at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Oct 15 12:31:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87612

            Bug ID: 87612
           Summary: Bad diagnostic for conflicting mcpu and march options
                    on aarch64
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ktkachov at gcc dot gnu.org
  Target Milestone: ---
            Target: aarch64

Giving conflicting -mcpu and -march options on aarch64 results in a useful
warning. However, it can be misleading:

aarch64-none-elf-gcc -S -O3 -march=armv8-a+sve  -mcpu=cortex-a76 foo.c

cc1: warning: switch -mcpu=armv8.2-a conflicts with -march=armv8-a switch

1. The -mcpu part wrongly reports the architecture of the CPU rather than the
CPU name itself.

2. The -march part does not print the extensions added, like +sve

This should be simple enough to fix in aarch64_override_options in
config/aarch64/aarch64.c


More information about the Gcc-bugs mailing list