I am trying to setup the arm GCC toolchain for bare hardware to target some M0, M0+, and M4 microcontrollers. I got it setup on my x86 PC by installing the arm-none-eabi-{gcc,binutils,newlib} packages and it works well. Now I'm trying to set it up on my raspberry pi 2, but the packages dont exist. So I downloaded the Pkgbuild and tried to make it myself, but ran into a curious problem. It appears the arm-none-eabi-gcc and the arm-none-eabi-newlib rely on each other to be built. So building these packages seems to be a paradox.
Now I think the newlib package needs to be built first, but it must be built with the GCC that arm-none-eabi-gcc provides...so exactly how to I get around this and build them?