我正在试图找出我正在设置的工具链的gcc选项,用于开发板:Sabre-lite,它基于飞思卡尔的iMX6q四核处理器.
现在我知道iMX6基本上是一个cortex-a9处理器,它有协处理器vfpv3和霓虹灯,还有矢量图形,2D甚至3D引擎.
但是,发行说明和使用指南文档对于如何启用可在gcc中启用的任何选项并不太清楚.
事实上,我可以"玩"的选项如下.
-march= armv7-a - ok this one is pretty obvious.
-mfpu= vfpv3/neon - i can use only the vfpv3 co-processor, or both (respectively, depends on option)
-mfloat-abi=softfp/soft/hard - I guess I can choose hard here, as there is hardware for fp operations
-mcpu=cortex-a9 - is it option even necessary? it is not clear if it just an alias for -march or something else.
Run Code Online (Sandbox Code Playgroud)
我应该启用其他选项吗?为什么工具链具有构建linux内核/ uboot/packages的默认选项:
-march= armv7-a -mfpu= vfpv3 -mfloat-abi=softfp
Run Code Online (Sandbox Code Playgroud)
谢谢您的帮助
使用-mthumb -O3 -march=armv7-a -mcpu=cortex-a9 -mtune=cortex-a9 -mfpu=neon -mvectorize-with-neon-quad -mfloat-abi=softfp.请注意,默认情况下,编译器不会使用NEON对浮点运算进行向量化,因为NEON不支持非正规数.如果你没有精确度,你可以通过添加-ffast-math开关使gcc使用NEON进行浮点运算.
| 归档时间: |
|
| 查看次数: |
7971 次 |
| 最近记录: |