What should the kfreebsd-i386 triplet be?

Robert Millan rmh at aybabtu.com
Fri Nov 11 11:23:27 UTC 2005


On Fri, Nov 11, 2005 at 01:56:38AM +0000, Brian M. Carlson wrote:
> I was just running config.guess, and I found that it outputs the following:
> 
> bmc at stonewall:~$ /usr/share/misc/config.guess
> i686-unknown-kfreebsd5.4-gnu

First off, note that this part of the triplet is basicaly useless.  Distributors
often abuse it to add things like "i386-suse-linux" or "i386-redhat-linux".
OTOH, when hardware is really significant (e.g. "i686-pc" vs. "i686-xbox"),
runtime detection is always used instead of build time checks.

> Shouldn't it say: i686-pc-kfreebsd5.4-gnu?  If so, I'll be happy to write up 
> at least an explanation and send it to the FSF.

This happens because the detection used in config.guess for GNU/kFreeBSD, unlike
that of GNU/Linux, is cpu-independant.  For each new port of GNU/Linux to a new
cpu, they have to add it to config.guess and wait for its propagation.  When we
have a new port we don't have to do that (and believe me, waiting for
propagation is a real PITA ;).

> Interestingly enough:
> 
> bmc at stonewall:~$ /usr/share/misc/config.sub i686-kfreebsd5.4-gnu
> i686-pc-kfreebsd5.4-gnu

rmh at aragorn:~$ /usr/share/misc/config.sub powerpc-kfreebsd5.4-gnu
powerpc-unknown-kfreebsd5.4-gnu

config.sub has to normalise triplets to have 3 (or 4 if -gnu is used) components
so in i*86 it assumes "pc".  It could also use always "unknown" with no harm,
though.

> So either way we need to fix it.  BTW, this is current autotools-dev.

If it really bothers you, I'd suggest fixing config.sub to treat *-*-* the same
way as *-unknown-* when normalising triplets.  Then `config.sub
i686-unknown-kfreebsd-gnu` would return i686-pc-kfreebsd-gnu.

I've never found a package where this would be useful, though.

-- 
Robert Millan



More information about the Glibc-bsd-devel mailing list