Abe-osx

clone of https://git.linaro.org/toolchain/abe.git with OSX support

View the Project on GitHub manuelnaranjo/abe-osx

Based on several instructions on the web, and ABE tools from Linaro I've been able to rebuild gcc-linaro-5.2-2015.11-2 for OSX on ElCapitan. If you don't want to go through the pain of rebuilding a package is available here

First of all in order to build you need to make sure to create a partition with enough space (I started with 20GB) that is case sensitive, this is not the default on OSX, so you will need to repartion your disk, if you have enough space this can be do on the flight with the disk utility, you will need to run all this instructions on that partition. (You may need to consider running in iTerm to make your system efficient enough, the default terminal doesn't get along with the building tools for linaro)

brew install bash
brew install autogen
brew install dejagnu
brew install coreutils
brew install gcc
brew install gawk

git clone https://github.com/manuelnaranjo/abe-osx.git abe
(cd abe && git checkout -b 2015.11-osx origin/2015.11-osx)

# temporarily mess with my system
/usr/local/bin/bash ../abe/osx-prepare.sh

# configure abe
/usr/local/bin/bash ../abe/configure --with-fileserver=148.251.136.42 --with-remote-snapshots=/snapshots-ref

# edit hosts.conf to reduce the number of cpus otherwise you may kill your system

# build and package
/usr/local/bin/bash ../abe/abe.sh \
     --target arm-linux-gnueabihf \
     --build all \
     --set libc=glibc \
     gcc=gcc-linaro-5.2-2015.11-2.tar.xz \ 
     binutils=binutils-gdb.git~linaro_binutils-2_25-branch@ef90a4718f535cbe6345b4e7168baea7b1972abf \
     gdb=binutils-gdb.git~gdb-7.10-branch@cec9b4821711367dbefd51386eb663ba30905aa6 \
     glibc=glibc.git~release/2.21/master@5abec8598b3a12686fbddff5887d41c415046d3c \
     --tarbin --parallel --set package=toolchain

# snapshots/gcc-linaro-5.2.1-<date>-x86_64-arm-linux-gnueabihf.tar.xz should be created

# revert my system
/usr/local/bin/bash ../abe/osx-cleanup.sh

This should build, take into account that gdbserver will not be bundled, so you will have to get it from somewhere else and put in your target system.