OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 8:40 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Porting GlibC
PostPosted: Wed Aug 21, 2013 3:42 am 
Offline
User avatar

Joined: Fri Jun 28, 2013 3:52 am
Posts: 4
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? :roll:


Top
 Profile  
 
 Post subject: Re: Porting GlibC
PostPosted: Wed Aug 21, 2013 4:21 am 
Offline
Member
Member
User avatar

Joined: Thu Jul 12, 2012 7:29 am
Posts: 723
Location: Tallinn, Estonia
1. Why do you want to port glibc in particular?

_________________
Learn to read.


Top
 Profile  
 
 Post subject: Re: Porting GlibC
PostPosted: Wed Aug 21, 2013 4:45 am 
Offline
Member
Member
User avatar

Joined: Wed Mar 21, 2012 3:01 pm
Posts: 930
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.


Top
 Profile  
 
 Post subject: Re: Porting GlibC
PostPosted: Wed Aug 21, 2013 6:09 am 
Offline
Member
Member
User avatar

Joined: Sun Oct 22, 2006 7:01 am
Posts: 2646
Location: Devon, UK
Hi,

First Google Hit for "porting glibc".

Cheers,
Adam


Top
 Profile  
 
 Post subject: Re: Porting GlibC
PostPosted: Wed Aug 21, 2013 1:25 pm 
Offline
Member
Member

Joined: Wed Oct 01, 2008 1:55 pm
Posts: 3191
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.


Top
 Profile  
 
 Post subject: Re: Porting GlibC
PostPosted: Wed Aug 21, 2013 2:03 pm 
Offline
Member
Member

Joined: Mon Jul 05, 2010 4:15 pm
Posts: 595
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?


Top
 Profile  
 
 Post subject: Re: Porting GlibC
PostPosted: Wed Aug 21, 2013 3:42 pm 
Offline
Member
Member
User avatar

Joined: Wed Mar 21, 2012 3:01 pm
Posts: 930
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.


Top
 Profile  
 
 Post subject: Re: Porting GlibC
PostPosted: Wed Aug 21, 2013 8:15 pm 
Offline
Member
Member

Joined: Wed Aug 21, 2013 7:08 am
Posts: 240
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

_________________
https://gitlab.com/h0bby1/micro-kernel


Top
 Profile  
 
 Post subject: Re: Porting GlibC
PostPosted: Sat Aug 24, 2013 12:27 pm 
Offline
User avatar

Joined: Fri Jun 28, 2013 3:52 am
Posts: 4
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 :oops:

I am already been to
http://www.gnu.org/software/libc/manual/html_node/Porting.html
http://www.gnu.org/software/libc/manual/html_node/Porting-to-Unix.html#Porting-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


Top
 Profile  
 
 Post subject: Re: Porting GlibC
PostPosted: Sat Aug 24, 2013 2:21 pm 
Offline
Member
Member
User avatar

Joined: Wed Mar 21, 2012 3:01 pm
Posts: 930
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], SemrushBot [Bot] and 64 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group