Subject: bin/17103: usr.sbin/amd embeds incorrect architecture info into binary
To: None <gnats-bugs@gnats.netbsd.org>
From: None <itojun@itojun.org>
List: netbsd-bugs
Date: 05/30/2002 22:57:18
>Number:         17103
>Category:       bin
>Synopsis:       usr.sbin/amd embeds incorrect architecture info into binary
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 30 06:58:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Jun-ichiro itojun Hagino
>Release:        NetBSD 1.6A
>Organization:
	itojun.org
>Environment:
System: NetBSD starfruit.itojun.org 1.6A NetBSD 1.6A (STARFRUIT) #22: Thu May 30 13:58:16 JST 2002 itojun@starfruit.itojun.org:/usr/home/itojun/NetBSD/src/sys/arch/i386/compile/STARFRUIT i386
Architecture: i386
Machine: i386
>Description:
	usr.sbin/amd build uses usr.sbin/amd/include/config.h.  the file
	contains declarataions like below:

	/* Define name of host machine's cpu (eg. sparc) */
	#define HOST_CPU "i386"
	/* Define name of host machine's architecture (eg. sun4) */
	#define HOST_ARCH "i386"
	/* Define name and version of host machine (eg. solaris2.5.1) */
	#define HOST_OS "netbsdelf1.5V"
	/* Define only name of host machine OS (eg. solaris2) */
	#define HOST_OS_NAME "netbsdelf1"
	/* Define only version of host machine (eg. 2.5.1) */
	#define HOST_OS_VERSION "1.5V"
	/* Define the header version of (linux) hosts (eg. 2.2.10) */
	#define HOST_HEADER_VERSION "1.5V"
	/* Define name of host */
	#define HOST_NAME "arresum"
	/* Define user name */
	#define USER_NAME "veego"
	/* Define configuration date */
	#define CONFIG_DATE "Sun May 13 16:00:07 CEST 2001"
	
	the declaration is not correct for builds on other archs, or other
	users.

>How-To-Repeat:
>Fix:
	remove these declarations from usr.sbin/amd/include/config.h.
	declare these in appropriate Makefile, referencing target architecture.
>Release-Note:
>Audit-Trail:
>Unformatted: