https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89508
Bug ID: 89508 Summary: gcc snapshot 9.0.1 20190127 generates invalid assembler options on aarch64-unknown-linux-gnu with -march=native Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: andrewm.roberts at sky dot com Target Milestone: --- The latest gcc 9 snapshot (gcc version 9.0.1 20190127 (experimental)) fails to compile files (due to assembler option errors) when used with -march=native on aarch64-unknown-linux-gnu The gcc-8.3.0 release built with the same options accepts -march=native and generates options the assembler can accept. If -march=native is no longer accepted, it should generate a warning or error as appropriate, or be silently ignored. /usr/local/gcc/bin/gcc - is the gcc 9 snapshot /usr/local/gcc-8.3.0/bin/gcc - is the gcc 8.3.0 release All testing done an a Raspberry Pi 3B (BCM2837), ARM Cortex A53, running 64 bit ArchLinux ARM: uname -a Linux alarm 4.20.11-1-ARCH #1 SMP Wed Feb 20 19:23:26 MST 2019 aarch64 GNU/Linux The system binutils is used (2.31.1) as --version GNU assembler (GNU Binutils) 2.31.1 Copyright (C) 2018 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or later. This program has absolutely no warranty. This assembler was configured for a target of `aarch64-unknown-linux-gnu'. Output of gcc-9.0.1 --help=target with -march=native: (the guessed -march line is not accepted by the assembler) /usr/local/gcc/bin/gcc -march=native -Q --help=target The following options are target specific: -mabi= lp64 -march= armv8-a+crc+profile+rng+memtag+sb+ssbs+predres -mbig-endian [disabled] -mbionic [disabled] -mbranch-protection= -mcmodel= small -mcpu= generic -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] -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= 24 -mtrack-speculation [disabled] -mtune= generic -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 `rng+memtag+sb+ssbs+predres' Error: unrecognized option -march=armv8-a+crc+profile+rng+memtag+sb+ssbs+predres gcc-9.0.1 build options: /usr/local/gcc/bin/gcc -v Using built-in specs. COLLECT_GCC=/usr/local/gcc/bin/gcc COLLECT_LTO_WRAPPER=/usr/local/gcc-9.0.0/libexec/gcc/aarch64-unknown-linux-gnu/9.0.1/lto-wrapper Target: aarch64-unknown-linux-gnu Configured with: ../gcc-9.0.0/configure --prefix=/usr/local/gcc-9.0.0 --program-suffix= --disable-werror --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-plugin --enable-gnu-indirect-function --enable-lto --with-isl --enable-languages=c,c++,fortran,lto --disable-libgcj --enable-clocale=gnu --disable-libstdcxx-pch --enable-install-libiberty --disable-multilib --enable-shared --with-arch-directory=aarch64 --enable-multiarch --disable-libssp --enable-default-pie --enable-default-ssp --host=aarch64-unknown-linux-gnu --build=aarch64-unknown-linux-gnu --with-arch=armv8-a --disable-bootstrap Thread model: posix gcc version 9.0.1 20190127 (experimental) (GCC) Output of gcc-8.3.0 --help=target with -march=native: /usr/local/gcc-8.3.0/bin/gcc -march=native -Q --help=target The following options are target specific: -mabi=ABI lp64 -march=ARCH armv8-a+crc -mbig-endian [disabled] -mbionic [disabled] -mcmodel= small -mcpu=CPU -mfix-cortex-a53-835769 [enabled] -mfix-cortex-a53-843419 [enabled] -mgeneral-regs-only [disabled] -mglibc [enabled] -mlittle-endian [enabled] -mmusl [disabled] -momit-leaf-frame-pointer [enabled] -moverride=STRING -mpc-relative-literal-loads [enabled] -msign-return-address= none -mstrict-align [disabled] -msve-vector-bits=N scalable -mtls-dialect= desc -mtls-size= 24 -mtune=CPU -muclibc [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 The possible SVE vector lengths: 1024 128 2048 256 512 scalable The possible TLS dialects: desc trad gcc-8.3.0 build options: /usr/local/gcc-8.3.0/bin/gcc -v Using built-in specs. COLLECT_GCC=/usr/local/gcc-8.3.0/bin/gcc COLLECT_LTO_WRAPPER=/usr/local/gcc-8.3.0/libexec/gcc/aarch64-unknown-linux-gnu/8.3.0/lto-wrapper Target: aarch64-unknown-linux-gnu Configured with: ../gcc-8.3.0/configure --prefix=/usr/local/gcc-8.3.0 --program-suffix= --disable-werror --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-plugin --enable-gnu-indirect-function --enable-lto --with-isl --enable-languages=c,c++,fortran,lto --disable-libgcj --enable-clocale=gnu --disable-libstdcxx-pch --enable-install-libiberty --disable-multilib --enable-shared --with-arch-directory=aarch64 --enable-multiarch --disable-libssp --enable-default-pie --enable-default-ssp --host=aarch64-unknown-linux-gnu --build=aarch64-unknown-linux-gnu --with-arch=armv8-a --disable-bootstrap Thread model: posix gcc version 8.3.0 (GCC) Sample trivial test program gcc-9.0.1 WITHOUT --march=native: echo "int main(void) { return 0; }" | /usr/local/gcc/bin/gcc -c -x c -o tmp.o - # success Sample trivial test program gcc-9.0.1 WITH --march=native: echo "int main(void) { return 0; }" | /usr/local/gcc/bin/gcc -march=native -c -x c -o tmp.o - Assembler messages: Error: unknown architectural extension `rng+memtag+sb+ssbs+predres' Error: unrecognized option -march=armv8-a+crc+profile+rng+memtag+sb+ssbs+predres Sample trivial test program gcc-8.3.0 WITH --march=native: echo "int main(void) { return 0; }" | /usr/local/gcc-8.3.0/bin/gcc -march=native -c -x c -o tmp.o - # success