[Bug driver/83193] New: Help for invalid -march= options from cc1 omits -march=native on x86-64, arm. aarch64, output also inconsistent
andrewm.roberts at sky dot com
gcc-bugzilla@gcc.gnu.org
Tue Nov 28 04:11:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83193
Bug ID: 83193
Summary: Help for invalid -march= options from cc1 omits
-march=native on x86-64, arm. aarch64, output also
inconsistent
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: driver
Assignee: unassigned at gcc dot gnu.org
Reporter: andrewm.roberts at sky dot com
Target Milestone: ---
-march=native no longer documented in cc1 help message and the help output is
buggy and inconsistent (missing on aarch64, given twice on arm)
ON X86-64
---------
The cc1 help message when invalid -march= values are passed omits "native" as
an option on x86-64. This is happening on at least 8.0 snapshots and 7.2
branch.
/usr/local/gcc/bin/gcc -march=fdsfks -E - < /dev/null
# 1 "<stdin>"
cc1: error: bad value (‘fdsfks’) for ‘-march=’ switch
cc1: note: valid arguments to ‘-march=’ switch are: nocona core2 nehalem corei7
westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2
broadwell skylake skylake-avx512 cannonlake bonnell atom silvermont slm knl knm
x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8
k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10
barcelona bdver1 bdver2 bdver3 bdver4 znver1 btver1 btver2
/usr/local/gcc/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/usr/local/gcc/bin/gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc-8.0.0/libexec/gcc/x86_64-unknown-linux-gnu/8.0.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-8.0.0/configure --prefix=/usr/local/gcc-8.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-initfini-array --enable-gnu-indirect-function --with-isl
--enable-languages=c,c++,fortran,lto --disable-libgcj --enable-lto
--enable-multilib --with-tune=generic --with-arch_32=i686
--host=x86_64-unknown-linux-gnu --build=x86_64-unknown-linux-gnu
--disable-bootstrap
Thread model: posix
gcc version 8.0.0 20171126 (experimental) (GCC)
ON ARM
------
On arm native it was included in the list as of 7.x, now it is also missing,
AND THE INFO IS DISPLAYED TWICE:
/usr/local/gcc/bin/gcc -march=fdsfks -E - < /dev/null
gcc: error: unrecognized -march target: fdsfks
gcc: note: valid arguments are: armv2 armv2a armv3 armv3m armv4 armv4t armv5
armv5t armv5e armv5te armv5tej armv6 armv6j armv6k armv6z armv6kz armv6zk
armv6t2 armv6-m armv6s-m armv7 armv7-a armv7ve armv7-r armv7-m armv7e-m armv8-a
armv8.1-a armv8.2-a armv8.3-a armv8-m.base armv8-m.main armv8-r iwmmxt iwmmxt2
gcc: error: unrecognized -march target: fdsfks
gcc: note: valid arguments are: armv2 armv2a armv3 armv3m armv4 armv4t armv5
armv5t armv5e armv5te armv5tej armv6 armv6j armv6k armv6z armv6kz armv6zk
armv6t2 armv6-m armv6s-m armv7 armv7-a armv7ve armv7-r armv7-m armv7e-m armv8-a
armv8.1-a armv8.2-a armv8.3-a armv8-m.base armv8-m.main armv8-r iwmmxt iwmmxt2
gcc: error: missing argument to ‘-march=’
/usr/local/gcc/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/usr/local/gcc/bin/gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc-8.0.0/libexec/gcc/armv7l-unknown-linux-gnueabihf/8.0.0/lto-wrapper
Target: armv7l-unknown-linux-gnueabihf
Configured with: ../gcc-8.0.0/configure --prefix=/usr/local/gcc-8.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
--disable-libssp --enable-default-pie --enable-default-ssp
--host=armv7l-unknown-linux-gnueabihf --build=armv7l-unknown-linux-gnueabihf
--with-arch=armv7-a --with-float=hard --with-fpu=vfpv3-d16 --disable-bootstrap
Thread model: posix
gcc version 8.0.0 20171126 (experimental) (GCC)
ON AARCH64
----------
On aarch64 no help is given:
/usr/local/gcc/bin/gcc -march=fdsfks -E - < /dev/null
# 1 "<stdin>"
cc1: error: unknown value ‘fdsfks’ for -march
/usr/local/gcc/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/usr/local/gcc/bin/gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc-8.0.0/libexec/gcc/aarch64-unknown-linux-gnu/8.0.0/lto-wrapper
Target: aarch64-unknown-linux-gnu
Configured with: ../gcc-8.0.0/configure --prefix=/usr/local/gcc-8.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 8.0.0 20171126 (experimental) (GCC)
More information about the Gcc-bugs
mailing list