- This toolchain requires GLIBCXX_3.4.20 which is only available in the jessie distribution. You can upgrade from wheezy to jessie following the instructions in this URL: http://raspberrypi.stackexchange.com/questions/27858/upgrade-to-raspbian-jessie
- Create an image with the name
RaspberryPiCrossCompilerwithDisk Utility:
- Click on New Image
- Save As:
RaspberryPiCrossCompiler - Set the following attributes, you should set the same name:
- Name:
RaspberryPiCrossCompiler - Size: 500MB
- Format: Mac OS Extended (Canse-sensitive, Journaled)
- Name:
- Go to /Volumes/RaspberryPiCrossCompiler and run the following magic command line:
git clone https://github.com/pretyman/raspberrypi2-mac-crosscompiler tmp
mv tmp/.git .
rm -rf tmp
git reset --hardThis cross compiler is supported by the polly toolchain collection and hunter package manager. To use it, the following environment variables must be setup:
export RASPBERRYPI_CROSS_COMPILE_TOOLCHAIN_PATH=/Volumes/RaspberryPiCrossCompiler/x-tools/arm-unknown-linux-gnueabihf/bin/
export RASPBERRYPI_CROSS_COMPILE_TOOLCHAIN_PREFIX=arm-unknown-linux-gnueabihf
export RASPBERRYPI_CROSS_COMPILE_SYSROOT=/Volumes/RaspberryPiCrossCompiler/x-tools/arm-unknown-linux-gnueabihf/arm-unknown-linux-gnueabihf/sysroot
Then build.py --toolchain raspberrypi2-cxx11 of polly can be used to build your CMake based project.