Build a Raspberry Pi toolchain in OSX

Create and mount case-sensitive image
hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 16g -volname crosstool-ng ~/crosstool-ng.dmg
hdiutil attach ~/crosstool-ng.dmg.sparseimage -mountpoint /Volumes/crosstool-ng
Download a toolchain configuration
mkdir /tmp/my-toolchain-config && cd /tmp/my-toolchain-config

Download the desired Raspberry Pi platform configuration. Available configurations armv6, armv7 and armv8.

wget http://cdn.exec.sh/hugo/.config-armv6 -O .config

Select the option to stop the build after extracting the sources.

sed -i '' 's/# CT_ONLY_EXTRACT is not set/CT_ONLY_EXTRACT=y/' .config

Download and extract the packages.

ct-ng build
Apply patches to GNU Binutils sources
cd /Volumes/crosstool-ng

Download the required patch files (we need to patch gold-threads.cc and tc-arm.c) into the root directory of the crosstool-ng volume.

wget http://cdn.exec.sh/hugo/gold-threads.patch && wget http://cdn.exec.sh/hugo/tc-arm.patch
patch -p1 < gold-threads.patch && patch -p1 < tc-arm.patch 
Build toolchain
cd /tmp/my-toolchain-config

Deselect the option to stop the build after extracting the sources.

sed -i '' 's/CT_ONLY_EXTRACT=y/# CT_ONLY_EXTRACT is not set/' .config
ulimit -n 1024
ct-ng build