ARM的抄袭交叉编译? [英] Clang Cross Compiling for ARM?
问题描述
是否可以设置Clang用于ARM处理器的交叉编译?主机可能在x86(AMD64 - 可能是Ubuntu 12.04),目标是ARM(Raspberry Pi以及Pandaboard - 将为每个单独的编译),我可能在某一点也希望交叉编译为PowerPC架构?程序源在C。
要交叉编译Raspberry Pi运行软浮点Linux发行版添加标志 -ccc-host-triple arm-eabi -marm -mfpu = vfp -mcpu = arm1176jzf-s -mtune = arm1176jzf-s -mfloat-abi = softfp
要交叉编译Raspberry Pi运行hard-float Linux发行版,使用flags -ccc-host-triple arm-eabi -marm -mfpu = vfp -mcpu = arm1176jzf- s -mtune = arm1176jzf-s -mfloat-abi = hard
要交叉编译Pandaboard使用标志 ccc-host-triple arm-eabiv7 -mthumb -mfpu = neon-fp16 -mcpu = cortex-a9 -mtune = cortex-a9 -mfloat-abi = hard
(假设你的Pandaboard运行Ubuntu) / p>
注意:更新 clang
版本使用 -target
选项而不是 -ccc-host-triple
Is it possible to set up Clang for cross compiling for the ARM processor? The host will likely be on x86 ( AMD64 - Probably Ubuntu 12.04 ) and the target would be ARM ( Raspberry Pi as well as Pandaboard - will do separate compilations for each ), I may at some point also wish to cross compile for the PowerPC architecture? The program source is in C.
To cross-compile for Raspberry Pi running soft-float Linux distros add flags -ccc-host-triple arm-eabi -marm -mfpu=vfp -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfloat-abi=softfp
To cross-compile for Raspberry Pi running hard-float Linux distros use the flags -ccc-host-triple arm-eabi -marm -mfpu=vfp -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfloat-abi=hard
To cross-compile for Pandaboard use flags -ccc-host-triple arm-eabiv7 -mthumb -mfpu=neon-fp16 -mcpu=cortex-a9 -mtune=cortex-a9 -mfloat-abi=hard
(assuming that your Pandaboard runs Ubuntu)
Note: more recent clang
version use -target
option instead of -ccc-host-triple
这篇关于ARM的抄袭交叉编译?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!