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

Richard Earnshaw <rearnsha at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
(In reply to nsz from comment #0)
> i think the following inconsistency is problematic:
> 
> on a hard float toolchain (-mfloat-abi=hard):
> 
> $ arm-none-linux-gnueabihf-gcc -mfpu=auto -march=armv7-a a.c ; echo $?
> cc1: error: -mfloat-abi=hard: selected processor lacks an FPU
> 1

This is the correct response, you haven't specified the expected floating
point/simd extensions in the architecture.

> $ arm-none-linux-gnueabihf-gcc -mfpu=auto -march=armv7-a+fp a.c ; echo $?
> 0

correct response.

> $ arm-none-linux-gnueabihf-gcc -mfpu=auto -march=armv8-a a.c ; echo $?
> cc1: error: -mfloat-abi=hard: selected processor lacks an FPU
> 1

Correct response, floating point/simd extension not enabled.

> $ arm-none-linux-gnueabihf-gcc -mfpu=auto -march=armv8-a+fp a.c ; echo $?
> arm-none-linux-gnueabihf-gcc: error: 'armv8-a' does not support feature 'fp'
> arm-none-linux-gnueabihf-gcc: note: valid feature names are: crc simd crypto
> nocrypto nofp; did you mean 'nofp'?
> 1

Correct response.  Fp without SIMD is not an option in Arm v8.

> $ arm-none-linux-gnueabihf-gcc -mfpu=auto -march=armv8-a+simd a.c ; echo $?
> 0
> 
> so it seems neither armv8-a nor armv8-a+fp work with -mfpu=auto, but
> armv8-a+simd and armv7-a+fp do.

this is all as it should be.  The documentation describes which options are
available for which architecture.

Reply via email to