[LLVMdev] Building clang on Raspberry Pi2
Richard Pennington
rich at pennware.com
Thu Feb 12 14:28:16 PST 2015
On 02/12/2015 10:06 AM, Ben Pope wrote:
> The raspberry Pi2 is an armv7a chip (Cortex-A7), the first stage
> builds fine with the native g++ (if not a little slowly at 10+ hours),
> but it crashes at some point with this command line:
>
> Program arguments:
> /home/ben/development/llvm/3.6.0/rc2/Phase2/Release/llvmCore-3.6.0-rc2.install/bin/clang
> -cc1 -triple armv7-unknown-linux-gnueabihf -emit-obj -disable-free
> -disable-llvm-verifier -main-file-name APFloat.cpp -mrelocation-model
> pic -pic-level 2 -mthread-model posix -fmath-errno -masm-verbose
> -mconstructor-aliases -fuse-init-array -target-cpu cortex-a8
> -target-abi aapcs-linux -mfloat-abi hard -target-linker-version
> 2.24.90.20141023 -dwarf-column-info -ffunction-sections
> -fdata-sections -coverage-file
>
> But it's a Cortex-A7, not A8, how do I convince the test-release.sh or
> build scripts to make Phase1 clang target Cortex A7 for Phase2? (with
> vfpv4-d16)
>
> Whilst we're at it, I'm not convinced that the Pi2 would make a great
> cross-compilation machine, so is it possible to reduce the enabled
> targets? "X86 Sparc PowerPC ARM AArch64 Mips XCore MSP430 CppBackend
> NVPTX Hexagon SystemZ R600"
Hi Ben,
What sort of error are you getting? Isn't APFloat.cpp the first source
file that's being compiled by the newly built clang?
Trimming targets is easy. I had to do it when I built clang for ARM in
the early days beucase the statis bild got too big. You can limit set
code generators used in the configure line with -"-enable-targets=arm".
A 10 hour build. Why not just cross build it?
-Rich
More information about the llvm-dev
mailing list