s12x-build contains a script to build binutils, GCC and newlib for 68HC11, 68HC12, S12, S12X and XGATE microcontrollers.
export PATH="`pwd`/dist/bin:$PATH"
make
The patches for GCC and newlib are from Megasquirt. A big thank you for their awesome work!