Subject: port-arm/28585: arm treats MACHINE differently than all other combined arch's
To: None <port-arm-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: James Chacon <jmc@netbsd.org>
List: netbsd-bugs
Date: 12/08/2004 06:06:00
>Number: 28585
>Category: port-arm
>Synopsis: arm treats MACHINE differently than all other combined arch's
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: port-arm-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Dec 08 06:06:00 +0000 2004
>Originator: James Chacon
>Release: NetBSD 2.0G
>Organization:
>Environment:
System: NetBSD quix 2.0G NetBSD 2.0G (QUIX) #3: Tue Aug 17 23:48:17 CDT 2004 root@quix:/local0/src/sys/arch/i386/compile/QUIX i386
Architecture: i386
Machine: i386
>Description:
The param.h in sys/arch/arm/include/param.h uncontionally sets
MACHINE to "arm" regardless of the actual machine in use.
This is completely different than any other combined arch does
(m68k, powerpc, etc) and should be cleaned up to have the same
behavior.
Most likely MACHINE/MACHINE_ARCH should be expunged completely from
user space visibility as code should be using uname(3) to extract
this data.
>How-To-Repeat:
cat > foo.c <<"EOF"
#include <sys/param.h>
char *foo = MACHINE;
EOF
gcc -dM -E foo.c |egrep MACHINE
(on an arm platform, or use a cross setup)
>Fix:
Make this line up with other archs or expunge MACHINE/MACHINE_ARCH
from userspace finally.