我正在嘗試找出我正在爲開發板設置的工具鏈的gcc選項: Saber-lite基於飛思卡爾的iMX6q四核處理器。freescale iMX6q ARM處理器的gcc選項
現在我知道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.
是否有其他的選擇,我應該使? 爲什麼工具鏈具有作爲默認選項構建Linux內核/ UBOOT /包以下:
-march= armv7-a -mfpu= vfpv3 -mfloat-abi=softfp
謝謝您的幫助
你-mfloat,ABI應符合ABI爲準您的系統上使用。 softfp也使用浮點硬件,但調用約定不同。你可以檢查「readelf -A/bin/ls」(例如)。 「Tag_ABI_VFP_args:VFP寄存器」意味着很難。 – unixsmurf 2013-02-19 22:43:39
非常有用,非常感謝! – nass 2013-02-21 08:50:51
(當然,如果你本身在目標系統上使用系統自帶的GCC,無論是正確的ABI將在編譯器的默認值,可以省略。編譯) – unixsmurf 2013-02-21 11:03:57