aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>1998-12-03 17:36:49 -0700
committerJeff Law <law@gcc.gnu.org>1998-12-03 17:36:49 -0700
commitd1a095901939525e5774f0341a2f8bed9f05f71d (patch)
tree688397e46bafbe0a79f064b45fd88c22de185763
parent18cae839b4229bc919ed1e0955d391c4a45ba17c (diff)
downloadgcc-d1a095901939525e5774f0341a2f8bed9f05f71d.zip
gcc-d1a095901939525e5774f0341a2f8bed9f05f71d.tar.gz
gcc-d1a095901939525e5774f0341a2f8bed9f05f71d.tar.bz2
[multiple changes]
Fri Dec 4 01:34:02 1998 Jeffrey A Law (law@cygnus.com) * config.guess: Improve detection of hppa2.0 processors. Fri Dec 4 01:33:05 1998 Niall Smart <nialls@euristix.ie> * config.guess: Recognize FreeBSD using ELF automatically. From-SVN: r24081
-rw-r--r--ChangeLog8
-rwxr-xr-xconfig.guess49
2 files changed, 48 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 1f1cdb2..294c4c9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Fri Dec 4 01:34:02 1998 Jeffrey A Law (law@cygnus.com)
+
+ * config.guess: Improve detection of hppa2.0 processors.
+
+Fri Dec 4 01:33:05 1998 Niall Smart <nialls@euristix.ie>
+
+ * config.guess: Recognize FreeBSD using ELF automatically.
+
1998-11-26 Manfred Hollstein <manfred@s-direktnet.de>
* configure (skip-this-dir): Add handling for new shell script, which
diff --git a/config.guess b/config.guess
index 7e263e0..6fed734 100755
--- a/config.guess
+++ b/config.guess
@@ -363,17 +363,44 @@ EOF
*9??*:MPE/iX:*:*)
echo hppa1.0-hp-mpeix
exit 0 ;;
- 9000/[3478]??:HP-UX:*:*)
+ 9000/[34678]??:HP-UX:*:*)
case "${UNAME_MACHINE}" in
9000/31? ) HP_ARCH=m68000 ;;
9000/[34]?? ) HP_ARCH=m68k ;;
- 9000/6?? ) HP_ARCH=hppa1.0 ;;
- 9000/78? ) HP_ARCH=hppa1.1 ;; # FIXME: really hppa2.0
- 9000/7?? ) HP_ARCH=hppa1.1 ;;
- 9000/8[67]1 | 9000/80[24] | 9000/8[78]9 | 9000/893 )
- HP_ARCH=hppa1.1 ;; # FIXME: really hppa2.0
- 9000/8?[13679] ) HP_ARCH=hppa1.1 ;;
- 9000/8?? ) HP_ARCH=hppa1.0 ;;
+ 9000/6?? | 9000/7?? | 9000/80[24] | 9000/8?[13679] | 9000/892 )
+ 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
+ (${CC-cc} dummy.c -o dummy 2>/dev/null ) && HP_ARCH=`./dummy`
+ rm -f dummy.c dummy
esac
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
@@ -483,7 +510,11 @@ EOF
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit 0 ;;
*:FreeBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ if test -x /usr/bin/objformat -a "elf" = "`/usr/bin/objformat`"; then
+ echo ${UNAME_MACHINE}-unknown-freebsdelf
+ else
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
+ fi
exit 0 ;;
*:NetBSD:*:*)
echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`