Pull switch-specific bits of newlib into libtransistor
roblabla opened this issue · 2 comments
Looking at libnx
for inspiration, it seems that their newlib
is actually a clean newlib from upstream (well, from devkitPro), and all they do is populate a global structure of function pointers (for the syscalls). This is called early in their crt0.
By doing this, it is possible to keep newlib clean, making it easier to update, and creates a clear separation of concerns between the libc and the "OS support". Furthermore, it would avoid the "submodule dance" whenever we want to add a feature to the libc, where we have to update the newlib and libtransistor in order to propagate changes.
This is looking more appealing to me every time I have to touch newlib. Such an initiaitive has my blessing.
Especially since I have to run an old version of autotools under Vagrant whenever I need to change any of that.