Subject: bin/17315: Reliance on sys/elf_machdep.h
To: None <gnats-bugs@gnats.netbsd.org>
From: Ian Dall <Ian.Dall@dsto.defence.gov.au>
List: netbsd-bugs
Date: 06/19/2002 17:39:44
>Number:         17315
>Category:       bin
>Synopsis:       Reliance on sys/elf_machdep.h
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 19 01:15:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Ian Dall
>Release:        NetBSD 1.5ZC
>Organization:
private
>Environment:
	
	
System: NetBSD gateway.beware.dropbear.id.au 1.5ZC NetBSD 1.5ZC (SIBYL) #2: Sat Jun 15 00:22:45 CST 2002 ian@sibyl.beware.dropbear.id.au:/usr1/local/src/netbsd/src/sys/arch/pc532/compile/SIBYL pc532
Architecture: ns32k
Machine: pc532
>Description:
	

"installboot" and "mopd" depend on machine/elf_machdep.h, which does not
exist for the pc532 port.

>How-To-Repeat:
	
>Fix:
	
It should be possible for installboot and mopd to not require machine/elf_machdep.h on ports which do not use elf. However, the following patch simply disables the building of these programs when the object format is not elf.

Index: netbsd/src/usr.sbin/Makefile
diff -c netbsd/src/usr.sbin/Makefile:1.1.1.5 netbsd/src/usr.sbin/Makefile:1.2
*** netbsd/src/usr.sbin/Makefile:1.1.1.5	Wed Jun 12 11:57:12 2002
--- netbsd/src/usr.sbin/Makefile	Mon Jun 17 22:06:08 2002
***************
*** 7,16 ****
  	chown chroot chrtbl cnwctl config cron dev_mkdb \
  	dhcp diskpart dumpfs dumplfs edquota eeprom \
  	envstat eshconfig etcupdate greconfig grfconfig \
! 	grfinfo gspa hilinfo ifwatchd inetd installboot \
  	iopctl iostat ipf irdaattach isdn iteconfig \
  	kgmon kvm_mkdb lastlogin link lpr mailwrapper makefs map-mbone \
! 	mdconfig memswitch mlxctl mopd mountd moused mrinfo mrouted mscdlabel \
  	mtrace mtree ndbootd netgroup_mkdb nfsd ntp pcictl pkg_install pppd \
  	pstat pwd_mkdb quot quotacheck quotaon rarpd rbootd rdate \
  	repquota rmt rpc.bootparamd rpc.lockd rpc.pcnfsd \
--- 7,16 ----
  	chown chroot chrtbl cnwctl config cron dev_mkdb \
  	dhcp diskpart dumpfs dumplfs edquota eeprom \
  	envstat eshconfig etcupdate greconfig grfconfig \
! 	grfinfo gspa hilinfo ifwatchd inetd \
  	iopctl iostat ipf irdaattach isdn iteconfig \
  	kgmon kvm_mkdb lastlogin link lpr mailwrapper makefs map-mbone \
! 	mdconfig memswitch mlxctl mountd moused mrinfo mrouted mscdlabel \
  	mtrace mtree ndbootd netgroup_mkdb nfsd ntp pcictl pkg_install pppd \
  	pstat pwd_mkdb quot quotacheck quotaon rarpd rbootd rdate \
  	repquota rmt rpc.bootparamd rpc.lockd rpc.pcnfsd \
***************
*** 19,24 ****
--- 19,28 ----
  	tcpdmatch tcpdump timed traceroute trpt trsp unlink \
  	usbdevs user videomode vipw vnconfig wiconfig wsconscfg \
  	wsfontload wsmuxctl zdump zic
+ 
+ .if (${OBJECT_FMT} == "ELF")
+ SUBDIR+=installboot mopd
+ .endif
  
  .if (${MKKERBEROS} != "no")
  SUBDIR+= hprop kadmin kdc kstash ktutil

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