abhiTronix / raspberry-pi-cross-compilers

Latest GCC Cross Compiler & Native (ARM & ARM64) CI generated precompiled standalone toolchains for all Raspberry Pis. 🍇
https://sourceforge.net/projects/raspberry-pi-cross-compilers
GNU General Public License v3.0
594 stars 104 forks source link

error: ‘armv8-a’ does not support feature ‘fp’ #25

Closed dschnabel closed 5 years ago

dschnabel commented 5 years ago

When I build with the 9.1.0 cross-compiler toolchain and use the flag -march=armv8-a+fp+simd as mentioned in the README, I'm getting this error message:

make all 
Building file: ../src/hello.cpp
Invoking: Cross G++ Compiler
arm-linux-gnueabihf-g++ -O0 -march=armv8-a+fp+simd -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/hello.d" -MT"src/hello.o" -o "src/hello.o" "../src/hello.cpp"
arm-linux-gnueabihf-g++: error: ‘armv8-a’ does not support feature ‘fp’
arm-linux-gnueabihf-g++: note: valid feature names are: crc simd crypto nocrypto nofp sb predres; did you mean ‘nofp’?
make: *** [src/hello.o] Error 1

Looks like fp is the default, so I can omit that and just use -march=armv8-a+simd? It builds fine without it.

abhiTronix commented 5 years ago

@dschnabel Kindly make sure that flag -march=armv8-a+fp+simd is only available with 64-bit toolchains. If you are using 32-bit-toolchains kindly use -march=armv8-a -mfloat-abi=hard -mfpu=neon-fp-armv8 combination instead. For more information see here.