Maybe. but I think at least initially I want to build the projects separately, especially so I know I build everything from scratch. Later, when I know the builds are ok, I might try experimenting with faster builds.Owen wrote:You should be able to avoid having to build gcc -> newlib -> gcc by copying the contents of the newlib archive into the GCC directory. You can likewise overlay Binutils in this manner, to just have one (very large) build to do.
It's best to use the files from the latest package; the maintainers keep them in sync between binutils/gcc/newlib/gdb/etc
I just noticed that both binutils and GCC now have synced their config.sub with the config repository so they contain the correct settings for RDOS. Seems like this works a lot better than it did 6 years ago.
I also filed a bug report for the medium memory model problem in libgcc bugzilla. I hope somebody that has access to the repository provides a patch for this. This could be a relevant fix for other OS developpers that don't want their code to be located either in top or bottom 2G.
Regarding default memory models, I made a new post on the GCC list in hope of getting better responses.
It might be that -fpie and small memory model on x86-64 will provide the correct relocations, but that still doesn't solve the issue of the map-file for the executable which would contain the wrong positions. Before I have a working remote-gdb solution (which will be one of the last stages), I will need to match RIP with offsets in map-file in order to know where in the code I am.