Subject: pkg/19789: MACHINE_ARCH is i686, but Makefiles check for i386
To: None <gnats-bugs@gnats.netbsd.org>
From: None <reed@reedmedia.net>
List: netbsd-bugs
Date: 01/11/2003 08:33:03
>Number:         19789
>Category:       pkg
>Synopsis:       MACHINE_ARCH is i686, but Makefiles check for i386
>Confidential:   yes
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 11 08:34:01 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        NetBSD 1.6
>Organization:
http://bsd.reedmedia.net/
>Environment:
	
	
System: NetBSD rainier.reedmedia.net 1.6 NetBSD 1.6 (JCR-20020927) #3: Sat Sep 28 13:40:20 PDT 2002 reed@rainier.reedmedia.net:/usr/src/sys/arch/i386/compile/JCR-20020927 i386
Architecture: i386
Machine: i386
>Description:
Building packages under Linux with glibc, I notice that some packages,
like www/navigator, graphics/ns-flash, and others have checks like:

if (${MACHINE_ARCH} == "i386")

But I have:

$ bmake show-var VARNAME=OPSYS     
Linux

$ bmake show-var VARNAME=MACHINE_ARCH
i686

$ bmake show-var VARNAME=LOWER_ARCH
i386

$ uname -p
unknown

$ uname -m
i686

>How-To-Repeat:
>Fix:
I just don't know where the LOWER_ARCH and MACHINE_ARCH are set.

I think the fix is to use

sed -e 's/[456]86/386/'

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