imx8mq+4.14.78+yocto:aarch64-poky-linux-gcc: error: unrecognized command line option ‘-mfpu=neon’

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

imx8mq+4.14.78+yocto:aarch64-poky-linux-gcc: error: unrecognized command line option ‘-mfpu=neon’

6,462 次查看
传策薛
Contributor V

Hi community:

 I use imx8mq+4.14.78+yocto bsp,and I "bitbake fsl-image-qt5-validation-imx -c populate_sdk", get the sdk。now I want to compile a ".c" file with options "-mfpu=neon -mfloat-abi=hard"。

but I get follow error:

aarch64-poky-linux-gcc --sysroot=/opt/fsl-imx-wayland/4.14-sumo/sysroots/aarch64-poky-linux -mfpu=neon -mfloat-abi=soft -O3 test_vfp_hard.c -o TEST_VFP_SOFT
aarch64-poky-linux-gcc: error: unrecognized command line option ‘-mfpu=neon’
aarch64-poky-linux-gcc: error: unrecognized command line option ‘-mfloat-abi=soft’
make: *** [soft] Error 1

How to fix it?

Thanks a lot.

标签 (1)
0 项奖励
回复
3 回复数

4,971 次查看
diegoadrian
NXP Employee
NXP Employee

Hello,

Apparently, you need to export some flags on your makefile:

export CFLAGS="-mcpu=cortex-a53 -mfloat-abi=hard -mfpu=neon-fp-armv8 -mneon-for-64bits"

You can find more information on the below web page:

https://gist.github.com/fm4dd/c663217935dc17f0fc73c9c81b0aa845

Hope this information can help you.

Best regards,

Diego.

0 项奖励
回复

4,971 次查看
传策薛
Contributor V

I tried follows:

pastedImage_1.png

It seems aarch64 does not support "-mfloat-abi=hard","-mfpu=neon-fp-armv8", "-mneon-for-64bits".

Using the GNU Compiler Collection (GCC): AArch64 Options 

I have found some ARM64 information. The aarch64-poky-linux-xx compiler supports hardware floating point arithmetic by default. Is it correct?

0 项奖励
回复

4,971 次查看
diegoadrian
NXP Employee
NXP Employee

Hello,

Unfortunately, we are unable to assist you with information related to the ARM processor, mostly because we do not have access to that information. I have found the below, hope it can help you. I apologize for the inconveniences this could give you.  

https://developer.arm.com/docs/100748/latest/using-common-compiler-options/selecting-floating-point-...

Best regards,

Diego.

0 项奖励
回复