aarch64: march and mcpu conflict

Christer Solskogen christer.solskogen@gmail.com
Sat Aug 29 14:46:09 GMT 2026


After 0188974b4ceaa1f8f3600fec82fdabf7c0ada843 (gcc-16 branch) I get this:

gcc -march=native -mcpu=native -E -v - < /dev/null 2>&1 | grep cc1
  /usr/lib/gcc/aarch64-unknown-linux-gnu/16/cc1 -E -quiet -v - 
-mno-fix-cortex-a53-835769 -mno-fix-cortex-a53-843419 -mlittle-endian 
-mabi=lp64 
-march=armv9.2-a+crc+sve2-aes+sve2-bitperm+sve2-sha3+sve2-sm4+nossbs 
-mcpu=generic-armv8-a+flagm2+lse+dotprod+rdma+crc+fp16fml+jscvt+rcpc2+frintts+i8mm+bf16+sve2-aes+sve2-bitperm+sve2-sha3+sve2-sm4+sb+pauth+wfxt 
-dumpbase -
cc1: warning: switch 
‘-mcpu=generic-armv8-a+flagm2+lse+dotprod+rdma+crc+fp16fml+jscvt+rcpc2+frintts+i8mm+bf16+sve2-aes+sve2-bitperm+sve2-sha3+sve2-sm4+sb+pauth+wfxt’ 
conflicts with 
‘-march=armv9.2-a+crc+sve2-aes+sve2-bitperm+sve2-sha3+sve2-sm4+nossbs’ 
switch and resulted in options ‘+crc+predres+xs’ being added


Is this really to be expected or is this a bug?

lscpu:

Architecture:                aarch64
   CPU op-mode(s):            64-bit
   Byte Order:                Little Endian
CPU(s):                      12
   On-line CPU(s) list:       0-11
Vendor ID:                   ARM
   Model name:                Cortex-A520
     Model:                   1
     Thread(s) per core:      1
     Core(s) per socket:      4
     Socket(s):               1
     Stepping:                r0p1
     Frequency boost:         disabled
     CPU(s) scaling MHz:      79%
     CPU max MHz:             1800.0000
     CPU min MHz:             800.0000
     BogoMIPS:                2000.00
     Flags:                   fp asimd evtstrm aes pmull sha1 sha2 crc32 
atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 
asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpo
                              dp sve2 sveaes svepmull svebitperm svesha3 
svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh bti mte ecv afp mte3 wfxt
   Model name:                Cortex-A720
     Model:                   1
     Thread(s) per core:      1
     Core(s) per socket:      8
     Socket(s):               1
     Stepping:                r0p1
     CPU(s) scaling MHz:      52%
     CPU max MHz:             2600.0000
     CPU min MHz:             800.0000
     BogoMIPS:                2000.00
     Flags:                   fp asimd evtstrm aes pmull sha1 sha2 crc32 
atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 
asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpo
                              dp sve2 sveaes svepmull svebitperm svesha3 
svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh bti mte ecv afp mte3 wfxt

-- 
chs
























More information about the Gcc-help mailing list