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,428件の閲覧回数
传策薛
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,937件の閲覧回数
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,937件の閲覧回数
传策薛
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,937件の閲覧回数
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 件の賞賛
返信