This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: [cygnus.egcs.bugs] Re: config.guess fails on HP-UX
- To: Jeffrey A Law <law at cygnus dot com>
- Subject: Re: [cygnus.egcs.bugs] Re: config.guess fails on HP-UX
- From: Ben Elliston <bje at cygnus dot com>
- Date: Wed, 22 Sep 1999 20:50:41 +1000 (EST)
- cc: "Dietmar P. Schindler" <schd at mra dot man dot de>, gcc-bugs at gcc dot gnu dot org
> > This change looks safe enough to make, so I've applied it to the official
> > version of config.guess. Thanks for the report,
> This is just to determine if the compiler works, right? I just want to make
> sure we're not losing important flags which could change the behavior of
> certain tests.
config.guess contains a heredoc which is used solely on HP-UX to determine
the CPU type and kernel revision being used:
sed 's/^ //' << EOF >$dummy.c
#include <stdlib.h>
#include <unistd.h>
int main ()
{
#if defined(_SC_KERNEL_BITS)
long bits = sysconf(_SC_KERNEL_BITS);
#endif
long cpu = sysconf (_SC_CPU_VERSION);
switch (cpu)
{
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
case CPU_PA_RISC2_0:
#if defined(_SC_KERNEL_BITS)
switch (bits)
{
case 64: puts ("hppa2.0w"); break;
case 32: puts ("hppa2.0n"); break;
default: puts ("hppa2.0"); break;
} break;
#else /* !defined(_SC_KERNEL_BITS) */
puts ("hppa2.0"); break;
#endif
default: puts ("hppa1.0"); break;
}
exit (0);
}
EOF
It does not affect how other test fragments (like, say, AC_C_CONST) are
compiled.
Ben