This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
PATCH: Fix NetBSD handling in config.guess
- From: Jason R Thorpe <thorpej at wasabisystems dot com>
- To: config-patches at gnu dot org
- Cc: binutils at sources dot redhat dot com
- Date: Mon, 10 Dec 2001 20:43:21 -0800
- Subject: PATCH: Fix NetBSD handling in config.guess
- Organization: Wasabi Systems, Inc.
- Reply-to: thorpej at wasabisystems dot com
The following patch simplifies and corrects the handling of NetBSD
and the machine target in config.guess.
2001-12-10 Jason Thorpe <thorpej@wasabisystems.com>
* config.guess: Simplify assignment of machine for
NetBSD targets, and make it match the convention
that NetBSD uses. List all NetBSD architectures
that require "elf" at the end of the OS name.
--
-- Jason R. Thorpe <thorpej@wasabisystems.com>
Index: config.guess
===================================================================
RCS file: /cvs/src/src/config.guess,v
retrieving revision 1.14
diff -c -r1.14 config.guess
*** config.guess 2001/09/28 21:04:51 1.14
--- config.guess 2001/12/11 04:32:29
***************
*** 134,156 ****
# object file format. This provides both forward
# compatibility and a consistent mechanism for selecting the
# object file format.
! # Determine the machine/vendor (is the vendor relevant).
! case "${UNAME_MACHINE}" in
! amiga) machine=m68k-unknown ;;
! arm32) machine=arm-unknown ;;
! atari*) machine=m68k-atari ;;
! sun3*) machine=m68k-sun ;;
! mac68k) machine=m68k-apple ;;
! macppc) machine=powerpc-apple ;;
! hp3[0-9][05]) machine=m68k-hp ;;
! ibmrt|romp-ibm) machine=romp-ibm ;;
! sparc*) machine=`uname -p`-unknown ;;
! *) machine=${UNAME_MACHINE}-unknown ;;
esac
# The Operating System including object format, if it has switched
# to ELF recently, or will in the future.
! case "${UNAME_MACHINE}" in
! i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep __ELF__ >/dev/null
--- 134,154 ----
# object file format. This provides both forward
# compatibility and a consistent mechanism for selecting the
# object file format.
! #
! # Note: NetBSD doesn't particularly care about the vendor
! # portion of the name. We always set it to "unknown".
! UNAME_MACHINE_ARCH=`(uname -p) 2>/dev/null` || \
! UNAME_MACHINE_ARCH=unknown
! case "${UNAME_MACHINE_ARCH}" in
! arm*) machine=arm-unknown ;;
! sh3el) machine=shl-unknown ;;
! sh3eb) machine=sh-unknown ;;
! *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
# to ELF recently, or will in the future.
! case "${UNAME_MACHINE_ARCH}" in
! arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep __ELF__ >/dev/null