
Turns out that libgcc is needed, for some reason building the kernel with -O0 does not end up referencing libgcc but -O2 does. A separate build of it is done with -mno-red-zone, same reason as for libsupc++. Ended up being easy to rebuild with different CFLAGS: previously I'd tried doing `CFLAGS="-mno-red-zone" make` in the libgcc dir which didn't override, the correct way is `make CFLAGS="-mno-red-zone"`