$NetBSD: patch.netbsd-aa,v 1.1 2000/05/10 12:28:42 veego Exp $ --- config.orig Mon Aug 9 05:16:51 1999 +++ config Wed Oct 20 17:12:32 1999 @@ -155,8 +155,12 @@ echo "${MACH}-${ARCH}-freebsd${VERS}"; exit 0 ;; - NetBSD:*:*:*386*) - echo "`sysctl -n hw.model | sed 's,.*\(.\)86-class.*,i\186,'`-whateve\r-netbsd"; exit 0 + NetBSD:*:*:i386) + if echo __ELF__ | cc -E - | grep -q __ELF__; then + echo "i386-whatever-netbsd"; exit 0 + else + echo "i386elf-whatever-netbsd"; exit 0 + fi ;; NetBSD:*) @@ -404,9 +408,9 @@ alpha*-*-freebsd*) OUT="FreeBSD-alpha" ;; *-freebsd[3-9]*) OUT="FreeBSD-elf" ;; *-freebsd[1-2]*) OUT="FreeBSD" ;; - *86*-*-netbsd) OUT="NetBSD-x86" ;; - sun3*-*-netbsd) OUT="NetBSD-m68" ;; - *-*-netbsd) OUT="NetBSD-sparc" ;; + *86elf*-*-netbsd) OUT="NetBSD-i386elf" ;; + *86-*-netbsd) OUT="NetBSD-i386" ;; + *-netbsd) OUT="NetBSD-`sysctl -n hw.machine_arch`" ;; *86*-*-openbsd) OUT="OpenBSD-x86" ;; alpha*-*-openbsd) OUT="OpenBSD-alpha" ;; pmax*-*-openbsd) OUT="OpenBSD-mips" ;;