How to properly build glibc?

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.
Post Reply
User avatar
osdever
Member
Member
Posts: 492
Joined: Fri Apr 03, 2015 9:41 am
Contact:

How to properly build glibc?

Post by osdever »

What command i should use? Will it work only with --with-sysroot=sysroot/ oprion?
Developing U365.
Source:
only testing: http://gitlab.com/bps-projs/U365/tree/testing

OSDev newbies can copy any code from my repositories, just leave a notice that this code was written by U365 development team, not by you.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: How to properly build glibc?

Post by Combuster »

Your question implies that you haven't tried it yet, and I point to your previously locked thread why that is a bad idea.

You can do that first, but my expectation is rather that in reality you're misguided and don't actually want to build glibc should you actually know what it means. Instead, you're probably not telling us some essential things.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
KemyLand
Member
Member
Posts: 213
Joined: Mon Jun 16, 2014 5:33 pm
Location: Costa Rica

Re: How to properly build glibc?

Post by KemyLand »

Let's first remember something. The GNU C Library (glibc), assumes, as its name implies, a GNU environment. Now, what does that means? I'll list some things you must achieve, and mark those who are extremely difficult to achieve in the first place.
  • Having a full-fledged GCC.
  • Having a full-fledged Binutils.
  • Having a kernel supported by the library. That means either *full* Linux or GNU Hurd compatibility.
  • Patching who-knows-what lots of stuff in the library (If done correctly, this can resolve issue #3) Have you seen GNU code? It appears a lot like K&R C.
  • Having all the network stuff that is required, e.g: TCP/IP, BSD-style sockets, gethostbyname(), etc etc...
  • Being fully-compatible with all the major Unix standards (i.e.: POSIX, the SUS, XSI, and a long etc...)
  • All the Holly Fuckin' extensions of GNU, documented or not.
  • A giant undocumented etc...
I don't know of anyone on this forum that has been so hackerish to be able to do this. If I'm wrong, the information from him could be pretty useful here :wink: .
Happy New Code!
Hello World in Brainfuck :D:

Code: Select all

++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.
[/size]
User avatar
iansjack
Member
Member
Posts: 4707
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: How to properly build glibc?

Post by iansjack »

Assuming that, for some reason, you want to build a new glibc version for your Linux operating system, just follow the instructions: http://www.gnu.org/software/libc/manual ... iling.html

But what's wrong with the version supplied with your distribution?
User avatar
KemyLand
Member
Member
Posts: 213
Joined: Mon Jun 16, 2014 5:33 pm
Location: Costa Rica

Re: How to properly build glibc?

Post by KemyLand »

iansjack wrote:Assuming that, for some reason, you want to build a new glibc version for your Linux operating system, just follow the instructions: http://www.gnu.org/software/libc/manual ... iling.html

But what's wrong with the version supplied with your distribution?
He's talking about implementing it for his O.S. :wink: .
Happy New Code!
Hello World in Brainfuck :D:

Code: Select all

++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.
[/size]
User avatar
iansjack
Member
Member
Posts: 4707
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: How to properly build glibc?

Post by iansjack »

He may be, but he doesn't say so.

I think the OP needs to learn C before attempting to implement any libc on a hobby OS.
User avatar
KemyLand
Member
Member
Posts: 213
Joined: Mon Jun 16, 2014 5:33 pm
Location: Costa Rica

Re: How to properly build glibc?

Post by KemyLand »

iansjack wrote:He may be, but he doesn't say so.

I think the OP needs to learn C before attempting to implement any libc on a hobby OS.
Just saw his username...
Happy New Code!
Hello World in Brainfuck :D:

Code: Select all

++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.
[/size]
Post Reply