$NetBSD: patch-aa,v 1.19 2006/06/12 22:46:51 joerg Exp $ --- config.orig 2005-04-07 20:26:10.000000000 +0000 +++ config @@ -49,6 +49,7 @@ done # First get uname entries that we use below MACHINE=`(uname -m) 2>/dev/null` || MACHINE="unknown" +MACHINE_ARCH=`(uname -p) 2>/dev/null` || MACHINE_ARCH="unknown" RELEASE=`(uname -r) 2>/dev/null` || RELEASE="unknown" SYSTEM=`(uname -s) 2>/dev/null` || SYSTEM="unknown" VERSION=`(uname -v) 2>/dev/null` || VERSION="unknown" @@ -155,6 +156,10 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${ echo "mips4-sgi-irix64"; exit 0 ;; + Interix:3.*) + echo "i386-pc-interix3"; exit 0 + ;; + Linux:[2-9].*) echo "${MACHINE}-whatever-linux2"; exit 0 ;; @@ -210,13 +215,16 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${ FreeBSD:*) echo "${MACHINE}-whatever-freebsd"; exit 0 ;; + DragonFly:*) + echo "${MACHINE}-whatever-dragonfly"; exit 0 + ;; NetBSD:*:*:*386*) echo "`(/usr/sbin/sysctl -n hw.model || /sbin/sysctl -n hw.model) | sed 's,.*\(.\)86-class.*,i\186,'`-whatever-netbsd"; exit 0 ;; NetBSD:*) - echo "${MACHINE}-whatever-netbsd"; exit 0 + echo "${MACHINE_ARCH}-whatever-netbsd"; exit 0 ;; OpenBSD:*) @@ -670,10 +678,23 @@ EOF sparc64-*-freebsd*) OUT="FreeBSD-sparc64" ;; ia64-*-freebsd*) OUT="FreeBSD-ia64" ;; *-freebsd[3-9]*) OUT="FreeBSD-elf" ;; + *-dragonfly*) OUT="FreeBSD-elf" ;; *-freebsd[1-2]*) OUT="FreeBSD" ;; - *86*-*-netbsd) OUT="NetBSD-x86" ;; - sun3*-*-netbsd) OUT="NetBSD-m68" ;; - *-*-netbsd) OUT="NetBSD-sparc" ;; + x86_64-*-netbsd) OUT="NetBSD-${MACHINE_ARCH}" ;; + *86*-*-netbsd) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + OUT="NetBSD-x86-aout" + else + OUT="NetBSD-x86-elf" + fi + ;; + alpha-*-netbsd|arm-*-netbsd|arm32-*-netbsd|m68000-*-netbsd|m68k-*-netbsd|\ + mipseb-*-netbsd|mipsel-*-netbsd|ns32k-*-netbsd|powerpc-*-netbsd|\ + sparc-*-netbsd|sparc64-*-netbsd|vax-*-netbsd) + OUT="NetBSD-${MACHINE_ARCH}" + ;; + *-*-netbsd) OUT="NetBSD" ;; + *-*-interix3) OUT="Interix3" ;; alpha*-*-openbsd) OUT="OpenBSD-alpha" ;; *86*-*-openbsd) OUT="OpenBSD-i386" ;; m68k*-*-openbsd) OUT="OpenBSD-m68k" ;;