I ported newlib and GCC myself too. And i remember i didn't have to do much stuff to make newlib work (porting GCC, gas and libbfd was most of the work).
Just had to tweak some files about floating point numbers, turn off some POSIX/SomeOtherStandard flags that made it not use some more sophisticated functions and write support code for longjmp
/ setjmp
that load and store register state into the jump buffers. But you certainly have to tell it the target using --target
so it uses the right machine sub-directory and whatnot. I remember i had to add small code to configure.sub
to make it know about my target and print out the complete configuration trible (cpu-manufacturer-os or similar). Just found i had to edit a file called configure.host
too, which sets some options for your target (for example, whether an operation systems handles signals risen by raise
, or whether newlib itself should simulate handling).
I used this blog of Anthony Green as a guideline, where he describes porting of GCC, newlib and binutils. I think it's a great source when you have to do it yourself. A fun read anyway. It took a total of 2 months to compile and run some fun C programs that only need free-standing C (with dummy read/write functions that wrote into the simulator's terminal).
So i think the amount of work is certainly manageable. The one that made me nearly crazy was libgloss
's build scripts. I certainly was lost in those autoconf magics :) Anyway, i wish you good luck! :)