Subject: pkg/16271: Patch for tcsh to enable building on ARM/ELF systems
To: None <gnats-bugs@gnats.netbsd.org>
From: None <rearnsha@arm.com>
List: netbsd-bugs
Date: 04/09/2002 08:44:56
>Number:         16271
>Category:       pkg
>Synopsis:       Patch for tcsh to enable building on ARM/ELF systems
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 09 08:47:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Richard Earnshaw
>Release:        -current
>Organization:
ARM
>Environment:
NetBSD shark1 1.5ZC NetBSD 1.5ZC (GENERIC) #0: Fri Apr  5 11:37:43 BST 2002     rearnsha@shark1:/work/build/kernels/GENERIC shark

>Description:
config.guess in shells/tcsh package uses 'uname -m' as the default way of 
guessing the machine type.  This is a problem on ARM based systems, since
there are many different machine names.

I believe that 'uname -p' would be a better "guess" in this case.  In 
which case the patch below will fix the problem
>How-To-Repeat:
Try to build shells/tcsh package on any NetBSD arm/ELF system.

>Fix:
Add the following patch to shells/tcsh/patches/patch-al

--- config.guess.keep	Tue Apr  9 16:10:06 2002
+++ config.guess	Tue Apr  9 16:12:06 2002
@@ -58,6 +58,7 @@
 fi
 
 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_MACH_ARCH=`(uname -p) 2>/dev/null` || UNAME_MACH_ARCH=unknown
 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
@@ -594,7 +595,7 @@
 	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
 	exit 0 ;;
     *:NetBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
+	echo ${UNAME_MACH_ARCH}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
 	exit 0 ;;
     *:OpenBSD:*:*)
 	echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`

>Release-Note:
>Audit-Trail:
>Unformatted: