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

--- Comment #13 from Tom Lane <tgl at sss dot pgh.pa.us> ---
After further experimentation, it seems to me that:

* There was a behavioral change between gcc 9.3.1 and the later releases I
tested.  Specifically, in 9.3.1 a -march switch does not override the
platform-selected default -mfpu, whereas in later releases the default -mfpu is
ignored if there's -march on the command line.  I don't know if this was
intentional.  I can work with it, but:

* I still maintain that it's a bug either that -march=armv8-a doesn't imply FPU
support, or that -march=armv8-a accepts the useless option +nofp and not the
useful option +fp.  That option behavior would be sensible if armv8-a implied
FPU support as it does on aarch64, but it's broken if the arch doesn't imply
that on arm32.

* The ARM Options documentation page
https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/ARM-Options.html
is at least complicit in this, since it says under armv8-a

  ‘+nofp’
    Disable the floating-point, Advanced SIMD and cryptographic instructions.

without mentioning that the FP instructions aren't enabled in the first place.

Also, for completeness' sake here's the full -v output from the Raspberry Pi OS
compiler:

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/12/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Raspbian
12.2.0-14+rpi1' --with-bugurl=file:///usr/share/doc/gcc-12/README.Bugs
--enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr
--with-gcc-major
version-only --program-suffix=-12 --program-prefix=arm-linux-gnueabihf-
--enable-shared --enable-linker-build-id --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --libdir=/usr/lib
--enable-nls --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new
--enable-gnu-unique-object --disable-libitm --disable-libquadmath
--disable-libquadmath-support --enable-plugin --with-system-zlib
--enable-libphobos-checking=release --with-target-system-zlib=auto
--enable-objc-gc=auto --enable-multiarch --disable-sjlj-exceptions
--with-arch=armv6+fp --with-float=hard --disable-werror
--enable-checking=release --build=arm-linux-gnueabihf
--host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.0 (Raspbian 12.2.0-14+rpi1)

Reply via email to