target names and glibc versions on linux

Mike Stump mrs@apple.com
Thu Jun 26 04:58:00 GMT 2003


On Tuesday, June 24, 2003, at 07:38 AM, Alex Hornby wrote:
> having a bit of trouble with the way that config.guess returns
> the same string (i686-pc-linux-gnu) for glibc 2.0, 2.2 and 2.3 based
> GNU/Linux systems.

Right.

> I suppose my question is whether there are any plans to add a glibc
> version number in the config.guess output in a similar manner to the
> solaris output (e.g. i686-pc-linux-gnu2.0 )

Nope.

> If this is not desirable then some explanation (or pointer to an
> explanation) of the rationale might help me get my head around 
> things...

The string (comfig triplet) is an index into a database that contains 
static features.  The index isn't comprehensive, but merely a starting 
point.  Any knowledge that is wanted that isn't described by the index, 
has to be probed for or asked of the user.

For example,

	db["i960-elf"].cpu = 960

can be found in the the gcc config fragments, however,

	db["i960-elf"].has_x11 = false

cannot be found, instead, this is probed:

	if [ -f /usr/X11 ]; then
		has_x11 = true
	else
		has_x11 = false
	fi

which can be found, say in the emacs configure fragments, and is also 
queried for by the configure script, in this case, configure has the 
option:

	--with-x11

which does:

	has_x11 = true


So, now, how does this apply to you.  If the config triplet describes 
exactly what you want, then you can make decisions directly from it, 
but, if it is too vague for you, you will need to test the environment. 
  You are permitted to do anything you need to do.  You can check the 
filesystem, you can compile and run programs, you can run commands, you 
can nm /lib/libc.so, you can read headers in /usr/include, you can...  
This is enough to solve any probblem.

Hope this helps.  Luckily the underlying concept of configure triplets 
and the feature db is clearly documented, oh, wait, never mind.



More information about the Gcc mailing list