[Bug driver/83206] -mfpu=auto does not work on ARM (armv7l-unknown-linux-gnueabihf)

andrewm.roberts at sky dot com gcc-bugzilla@gcc.gnu.org
Wed Mar 7 14:03:00 GMT 2018


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

--- Comment #22 from Andrew Roberts <andrewm.roberts at sky dot com> ---
The RPI Zero bug was fixed, I'm retesting with the latest snapshot (8.0.1
20180304) just to be sure it is ok. There are still a number of inconsistencies
and things which could be improved.

On Odroid-Xu4 (Cortex A15/A7 Big/little, Aarch32)
-------------------------------------------------

/usr/local/gcc/bin/gcc -mfpu=auto -O3 -o matrix matrix.c    
cc1: error: -mfloat-abi=hard: selected processor lacks an FPU

It would be better if this error could let the user know they need to select a
CPU manually, rather than incorrectly state it lacks an FPU. This is going to
be confusing to people.

/usr/local/gcc/bin/gcc -mcpu=native -mfpu=auto -O3 -o matrix matrix.c
Is fine.

/usr/local/gcc/bin/gcc -march=native -Q --help=target | grep
"mcpu\|mfpu\|march"
  -march=                               armv7ve+vfpv3-d16
  -mcpu=
  -mfpu=                                vfpv3-d16
/usr/local/gcc/bin/gcc -march=native -mcpu=native -Q --help=target | grep
"mcpu\|mfpu\|march"
  -march=                               armv7ve+vfpv3-d16
  -mcpu=                                cortex-a7
  -mfpu=                                vfpv3-d16

This is still not detecting BIG/little CPU combinations (I had a separate PR
about this [83207]).

On ODROID-C2 (Cortex A53,AARCH64)
----------------------
/usr/local/gcc/bin/gcc -march=native -mcpu=native -Q --help=target | grep
"mcpu\|mfpu\|march"
  -march=ARCH                           armv8-a+crc
  -mcpu=CPU                             cortex-a53

The output is inconsistent with aarch32 output (=ARCH, =CPU), I had also raised
a PR about this [83193].

On RPI 3 (Cortex A53,AArch32)
-----------------------------
No issues here that I can see.

I'll update again tomorrow when the RPI Zero build has completed


More information about the Gcc-bugs mailing list