Why does config.guess come up with such wacky stuff?
Robert Lipe
robertlipe@usa.net
Wed Dec 1 09:22:00 GMT 1999
> > The code around line 3560 of configure.in handles this. So now if
> > you're on a 386 and type 'configure && make', GCC will presumably
> > emit opcodes that your computer won't understand and generated
> > binaries will crash. If you're on a P-II or P-III and do the same,
> > you're leaving clock cycles on the table becuase GCC is now "dumbed
> > down" for a P5. Neither of these are good.
>
> I see.
It wasn't that long ago (perhaps 2 years) that GCC ignored this anyway
and none of the config.guesses knew how to grope the OS info. So I
suspect there are a number of people with cereberally cached copies of
this.
This "problem" is compounded by GCC now actually caring about which of
the IA32 brothers it's targeting. Again, it wasn't that long ago that
the target flags did little more than tinker with some alignment and
padding and changed no actual opcode generation.
> This very situation comes up on Solaris/x86: config.guess always
> prints i386-pc-solaris*, even though I'm running on a P-II. It would
> be nice to get this fixed too.
If you can figure out how to get the OS to tell you what processor you
have, adding the bits to config.guess is easy. There isn't a standard
way of doing this, so it's quite OS-dependent. There may be options to
uname or sysinfo to tell you such things.
Unfortunately, it isn't a win without costs. Your Solaris case
is a lovely example of the problem. Experience has shown that
people tend to trust config.guess and not override the result. So
right now, most of your installed GNU packages, libraries, and
so on are probably in /usr/local/i386-mumble. So if you have,
say, a binary Perl distribution it's probably installed someplace
/usr/local/lib/perl5/site_perl/*/i386-solarismumble. If you change
config.guess to be smarter for GCC's sake, you've now made the
installation directory for other packages flail around. So the perl
libraries mention above move.
If binary distributors had the discipline to force a consistent triplet
for X86 where the value of 'X' doesn't really matter (I can't imagine
Perl, for instance, caring) this would work out. But that doesn't
happen.
It's quite a mess, I fear...
> > Without fretting over the details right now, would you support
> > something like this in the master copy of config.guess so that GCC
> > can use the master copy?
>
> I'd certainly like it, but I'm not the one to decide. Ben Elliston is
Sorry. "You" in that question really meant Mike Hopkirk. He was the one
that reworked the master copy in the autoconf tree and I suspect this
decision is his and mine to work out with Ben. (I know that Ben is as
tired of this wiggling around as we are. :-)
> the official maintainer of these files.
>
> > *Pentium$) UNAME_MACHINE=i586;;
> ^ does this really work?
Errr, no. :-)
RJL
More information about the Gcc
mailing list