Porting GlibC
Porting GlibC
Please tell me how to port GlibC,
1. Is that exactly similar to porting Newlib as told in OS Specific Toolchain?
2. Is GlibC is better than Newlib?
1. Is that exactly similar to porting Newlib as told in OS Specific Toolchain?
2. Is GlibC is better than Newlib?
Re: Porting GlibC
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.
Re: Porting GlibC
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.
-
- Member
- Posts: 595
- Joined: Mon Jul 05, 2010 4:15 pm
Re: Porting GlibC
What do you consider is the easiest to port C-library for non-UNIX like operating systems?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.
Re: Porting GlibC
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.
Re: Porting GlibC
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
Re: Porting GlibC
I am really grateful to everyone for Your advises,
I know this is not a beginner's forum, but I am shamelessly asking This,
1. What kind Operating System is built in the http://wiki.osdev.org's tutorials?
Is this UNIX/POSIX or BSD or LINUX
I am already been to
http://www.gnu.org/software/libc/manual ... rting.html
http://www.gnu.org/software/libc/manual ... ng-to-Unix
http://forum.osdev.org/viewtopic.php?f=1&t=11321
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
I know this is not a beginner's forum, but I am shamelessly asking This,
1. What kind Operating System is built in the http://wiki.osdev.org's tutorials?
Is this UNIX/POSIX or BSD or LINUX
I am already been to
http://www.gnu.org/software/libc/manual ... rting.html
http://www.gnu.org/software/libc/manual ... ng-to-Unix
http://forum.osdev.org/viewtopic.php?f=1&t=11321
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
Re: Porting GlibC
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.
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.