Hello,
NexOS is ready for an OS specific toolchain. However being non Unix-like, how would I port Newlib? My API is going to different then POSIX. Could I just stub the functions required for libgcc?
Thanks,
nexos
OS toolchain for non Unix like OS
Re: OS toolchain for non Unix like OS
I think it's one of the disadvantages of making a unique API (but don't get me wrong, I don't say this is bad practice - I also plan on making my own API) - One way to address this problem is by providing a bridge between your API and POSIX. That way, you can then provide the headers required & link the program against your bridge (which would be a separate library on it's own). The other solution would be to literally develop your tools (which can be fun to do BUT time consuming ALTHOUGH this would be a good thing anyways since that way you would test your API as you develop it; see this article on the OSDev Wiki that talks about on how to create a compiler from scratch: https://wiki.osdev.org/Making_a_Compiler)
Note: I may be wrong in what I'm saying here, correct me if I'm wrong - I'll be happy to hear a correct answer to this question
Note: I may be wrong in what I'm saying here, correct me if I'm wrong - I'll be happy to hear a correct answer to this question
Re: OS toolchain for non Unix like OS
Are you getting confused between libgcc (provided by gcc) and libc (provided by newlib)?
If you are going to use your own api then you could always just write your own libc to fit your api. Having your own api and then trying to shoehorn it into a library that is Posix-based seems a bit pointless to me.
If you are going to use your own api then you could always just write your own libc to fit your api. Having your own api and then trying to shoehorn it into a library that is Posix-based seems a bit pointless to me.
Re: OS toolchain for non Unix like OS
Oh well, fair enough - I also though that this was not the best solution to choose from although I couldn't find much better when I wrote my answeriansjack wrote:If you are going to use your own api then you could always just write your own libc to fit your api. Having your own api and then trying to shoehorn it into a library that is Posix-based seems a bit pointless to me.
Re: OS toolchain for non Unix like OS
Porting newlib... Just write your own. Go big or go home. POSIX sucks anyways, why would you want to have a custom api with newlib, ewww.
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
Re: OS toolchain for non Unix like OS
I just read the wiki article Hosted GCC Cross-Compiler, and that answered my question.