Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Yes, glibc is much better than newlib that is supposedly a piece of ****. Nonetheless, it's also much harder to port, but it can be ported if you put in considerable effort. Basically porting anything involves modifying it so it runs on your platform and then cross-compiling it.
Looking at the ported OSes (basically only Linux) it quickly becomes apparent that glibc is not a good target for a non-unix-based OS. You would at least want to see some radically different OSes being ported like Windows, QNX, Mac OS to even consider it.
rdos wrote:Looking at the ported OSes (basically only Linux) it quickly becomes apparent that glibc is not a good target for a non-unix-based OS. You would at least want to see some radically different OSes being ported like Windows, QNX, Mac OS to even consider it.
What do you consider is the easiest to port C-library for non-UNIX like operating systems?
You'd probably want to have a look at PDCLib which is public domain and attempts to be very standards compliant with the C standard, while avoiding Unixisms/Posixisms. It's supposed to be very portable.
there are some tools who can build reduced glibc, like tinylibc or other, it works from the source tree of glibc and then compile and link only the files that are required by a set of application, it can be helpfull to decrease the amount of work if you don't need to have all the function of the glibc, probably older versions are also simpler, depend on the level of compatibility you want it to have, and glibc is updated frequently and it would be hard to catch up with all versions and port them, maybe the easiest way would be to have the linux kernel api emulated , but even kernel api change regulary, linux can works fine because they have lot of developers and good organisation to mannage big project and distributions with dependencies but it would be hard to follow all the update and having a up to date ported glibc all the time,there are many other libc that can be mostly compatible with it, minus some crt functions specific to gcc
But could not figure out How to create the upper layer, to successfully do that.
How ever, Now I am thinking it would be practical to stick with the NewLib or uClibc.
And could this come handy building toolchains? http://kegel.com/crosstool
Hi Protan, perhaps you should make your own thread.
This community is about creating your own operating system - this is what the tutorial teach you, although many have a common Unix background as many hobby operating systems are Unix-like (more or less). The tutorials are not completed, you cannot follow them and magically get a full operating system - no, you have to do the hard work yourself and these documents are but guides and advise.
I would advise you to read the beginner materials on the osdev wiki and following the Bare Bones tutorial as the first steps on making our own operating system.