【发布时间】:2018-02-01 13:07:55
【问题描述】:
我已经创建了一个 c++ 应用程序,并希望为 cubietruck 板(ARM® Cortex™-A7 双核)的 debian jessie 8.0 armbian 目标编译它。
- cat /proc/cpuinfo 给出:
Processor : ARMv7 Processor rev 4 (v7l)
processor : 0
BogoMIPS : 956.30
processor : 1
BogoMIPS : 959.75
Features : swp half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 4
Hardware : sun7i
Revision : 0000
Serial : 1651668805c0e142
Chipid : 16516688-80515475-52574848-05c0e142
还有- dpkg --print-architecture
armhf
我得出的结论是我需要的交叉编译的相关arm gcc选项是:
--with-abi=aapcs-linux (-mabi)
--with-cpu=cortex-a7 (-mcpu)
--with-tune=cortex-a7 (-mtune)
--with-mode=arm/thumb (-marm -mthumb)
--with-fpu=neon-vfpv4 (-mfpu)
--with-float=hard
如果我想直接在船上构建相同的源代码,-march=native(如果支持)选项是否足够,或者我是否还需要上述任何标志?
【问题讨论】:
标签: c++ arm g++ cross-compiling