Steve Crosby sneeble at paradise.net.nz
Thu Nov 28 04:19:59 PST 2002

do3 at mail.inf.tu-dresden.de (Dan Osterrath) wrote in
news:3DE601EB.9050006 at mail.inf.tu-dresden.de: 

>> Okay.... Where does glibc and gcc's configure script get this info?
>> From proc?  From the currently running glibc?  From the static gcc?
>> From the currently running kernel?  Reason I'm asking...
> I think it gets the information from uname. That's why the uname hack.
> And it's working - at least for me...

I was interested enough to go look....

GNU configure runs the config.guess script if no host/target/build flags 
are specified, which does the following;

uname -m
uname -r
uname -s
uname -v

It then examines a large case statement for matches with the above 

for ix86 linux, it then checks the output of ld --help for the supported 
kernel binary file type (i.e. elf, a.out, coff).  If that succeeds, you 
get output. (i.e. for i686 elf, you get i686-pc-linux-gnu)

If the ld --help fails (old version or no ld file in path), it creates, 
complies and runs a small c program to check the version of glibc on the 
system, and outputs the result depending on the version found.

So as long as your build system glibc is >= 2.x, or ld --help returns elf 
in the list of supported system, then modifying uname as specified in the 
crosscompiling hint should indeed work fine...of course, you then have to 
remember to fix/restore uname when you are compiling things for your 
local system....

- --
Steve Crosby
sneeble at paradise.net.nz
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-support' in the subject header of the message

More information about the lfs-support mailing list