[cygnus.egcs.bugs] Re: config.guess fails on HP-UX
Ben Elliston
bje@cygnus.com
Thu Sep 30 19:57:00 GMT 1999
> > 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
More information about the Gcc-bugs
mailing list