I'm seeking clarification of what the best build options are for LLVM 3.2 on Raspbian
I've fetched the LLVM source of 3.2, and my config is:
cd llvm-3.2.src
./configure --build=armv6-unknown-linux-gnueabi \
--host=armv6-unknown-linux-gnueabi \
--target=armv6-unknown-linux-gnueabi --with-cpu=arm1176jzf-s \
--with-float=hard --with-abi=aapcs-vfp --with-fpu=neon \
--enable-targets=arm --enable-optimized --enable-assertions
make REQUIRES_RTTI=1
sudo make install
I've heard it takes quite a number of hours to build. It's been running a few hours now, happy to just let it run though.
It's a long term build project so I have no qualms about redoing the build if needed :)
I'd recommend cross-compiling LLVM for Raspbian. Building it on Pi itself takes ages.
First, get a working root fs using
debootstrap
(alternatively, just clone your existing Raspbian installation or unpack a downloaded image). You may need to replace some absolute symlinks with relative, watch out for build errors.Make sure you have a working and recent enough installation of clang (don't forget to build it with ARM target support).
Then, cross-compile LLVM with the following CMake toolchain definition (you should not chroot into your root fs at this stage!):
(use
cmake -DCMAKE_TOOLCHAIN_FILE=/path/to/the/file/above.txt
)Please note that target should be
armv6-linux-gnueabihf
, notarmv6-linux-gnueabi
.