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

            Bug ID: 96883
           Summary: -march=native on AWS aarch64 doesn't work (unknown
                    extensions)
           Product: gcc
           Version: 10.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: matthew.thompson at nasa dot gov
  Target Milestone: ---

All,

I've recently been experimenting on the Graviton2 processors on AWS and
encountered a possible bug. Namely, -march=native doesn't seem to work:

$ gcc -march=native -O3 test.c
Assembler messages:
Error: unknown architectural extension `sb+ssbs'
Error: unrecognized option -march=armv8.2-a+crypto+fp16+rcpc+dotprod+sb+ssbs

This sort of looks like a duplicate(-ish) of Bugs 88530 and 89508, but those
are closed, so perhaps not.

Of course, my dumb test file isn't needed as the usual help=target shows this
as well:

$ gcc -march=native -Q --help=target
The following options are target specific:
  -mabi=                                lp64
  -march=                              
armv8.2-a+crypto+fp16+rcpc+dotprod+sb+ssbs
  -mbig-endian                          [disabled]
  -mbionic                              [disabled]
  -mbranch-protection=
  -mcmodel=                             small
  -mcpu=
  -mfix-cortex-a53-835769               [enabled]
  -mfix-cortex-a53-843419               [enabled]
  -mgeneral-regs-only                   [disabled]
  -mglibc                               [enabled]
  -mlittle-endian                       [enabled]
  -mlow-precision-div                   [disabled]
  -mlow-precision-recip-sqrt            [disabled]
  -mlow-precision-sqrt                  [disabled]
  -mmusl                                [disabled]
  -momit-leaf-frame-pointer             [enabled]
  -moutline-atomics                     [enabled]
  -moverride=<string>
  -mpc-relative-literal-loads           [enabled]
  -msign-return-address=                none
  -mstack-protector-guard-offset=
  -mstack-protector-guard-reg=
  -mstack-protector-guard=              global
  -mstrict-align                        [disabled]
  -msve-vector-bits=<number>            scalable
  -mtls-dialect=                        desc
  -mtls-size=                           [default]
  -mtrack-speculation                   [disabled]
  -mtune=
  -muclibc                              [disabled]
  -mverbose-cost-dump                   [disabled]

  Known AArch64 ABIs (for use with the -mabi= option):
    ilp32 lp64

  Supported AArch64 return address signing scope (for use with
-msign-return-address= option):
    all non-leaf none

  The code model option names for -mcmodel:
    large small tiny

  Valid arguments to -mstack-protector-guard=:
    global sysreg

  The possible SVE vector lengths:
    1024 128 2048 256 512 scalable

  The possible TLS dialects:
    desc trad

Assembler messages:
Error: unknown architectural extension `sb+ssbs'
Error: unrecognized option -march=armv8.2-a+crypto+fp16+rcpc+dotprod+sb+ssbs

While I'm not sure it matters, I was on a c6g.4xlarge instance. (Which I think
is Neoverse N1, but I'm not too sure and the mcpu/mtune above don't print it,
so maybe not.)

Also, per guidelines:

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/ubuntu/GCC/10.2.0/libexec/gcc/aarch64-unknown-linux-gnu/10.2.0/lto-wrapper
Target: aarch64-unknown-linux-gnu
Configured with: ../gcc-10.2.0/configure --prefix=/home/ubuntu/GCC/10.2.0
--disable-multilib --enable-languages=c,c++,fortran
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.2.0 (GCC)

Reply via email to