Subject: build fails with BUILDID
To: None <port-arm@netbsd.org>
From: Hiroyuki Bessho <Bessho@genetec.co.jp>
List: port-arm
Date: 03/18/2005 14:13:35
Hi,

  I found build for evbarm fails like following at
sys/arch/evbarm/stand/gzboot when you have BUILDID defined (through
build.sh -B BUILDID):

  This is because OBJDIR is created as obj.evbarm.BUILDID (when you
have OBJMACHINE), but make doesn't take this rule while compiling under
gzboot. 

  Attached simple patch seems to fix the problem.  Is it ok to commit?

log of failure:
----------------------------------------------------------------
cd /u01/work/bsh/netbsd/current/src/sys/arch/evbarm/stand/gzboot/ADI_BRH_flash_0x00140000/
OBJMACHINE=1 /u0/work/bsh/nb/current/nbmake-evbarmeb 
rm -f arm machine
ln -s /u01/work/bsh/netbsd/current/src/sys/arch/evbarm/stand/gzboot/ADI_BRH_flash_0x00140000/../../../../../arch/evbarm/include machine
ln -s /u01/work/bsh/netbsd/current/src/sys/arch/evbarm/stand/gzboot/ADI_BRH_flash_0x00140000/../../../../../arch/arm/include arm
#   compile  ADI_BRH_flash_0x00140000/srtbegin.o
/usr/local/nbtools/current/host_i386/bin/armeb--netbsdelf-gcc    -DBECC_SUPPORT_V7 -DCONSPEED=57600 -DCONADDR=0x03000000UL -DNS16550_FREQ=33300000 -nostdinc -I. -I/u01/work/bsh/netbsd/current/src/sys/arch/evbarm/stand/gzboot/ADI_BRH_flash_0x00140000/../../../../../arch/evbarm/stand/gzboot -I/u01/work/bsh/netbsd/current/src/sys/arch/evbarm/stand/gzboot/ADI_BRH_flash_0x00140000/../../../../../arch/evbarm/stand/board -I/u01/work/bsh/netbsd/current/src/sys/arch/evbarm/stand/gzboot/ADI_BRH_flash_0x00140000/../../../../.. -I/u01/work/bsh/netbsd/current/src/sys/arch/evbarm/stand/gzboot/ADI_BRH_flash_0x00140000/../../../../../arch -I/u01/work/bsh/netbsd/current/src/sys/arch/evbarm/stand/gzboot/ADI_BRH_flash_0x00140000/../../../../../lib/libsa -D_STANDALONE -DHEAP_SIZE=1048576 -DHEAP_VARIABLE -DRELOC=0x00140000 -DMAXIMAGESIZE=0 -DLOADADDR=0xc0200000  -nostdinc -isystem /u00/work/bsh/nb/current/destdir.evbarmeb/usr/include  -c -traditional-cpp    /u01/work/bsh/netbsd/current/src/sys/a!
 rch/evbarm/stand/gzboot/ADI_BRH_flash_0x00140000/../../../../../arch/evbarm/stand/gzboot/srtbegin.S

<snip>

/usr/local/nbtools/current/host_i386/bin/armeb--netbsdelf-gcc -Os -g -pipe "-march=armv4"  -pipe -ffreestanding  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare -Wno-traditional -Wno-uninitialized -Wno-main -Werror   -DBECC_SUPPORT_V7 -DCONSPEED=57600 -DCONADDR=0x03000000UL -DNS16550_FREQ=33300000 -nostdinc -I. -I/u01/work/bsh/netbsd/current/src/sys/arch/evbarm/stand/gzboot/ADI_BRH_flash_0x00140000/../../../../../arch/evbarm/stand/gzboot -I/u01/work/bsh/netbsd/current/src/sys/arch/evbarm/stand/gzboot/ADI_BRH_flash_0x00140000/../../../../../arch/evbarm/stand/board -I/u01/work/bsh/netbsd/current/src/sys/arch/evbarm/stand/gzboot/ADI_BRH_flash_0x00140000/../../../../.. -I/u01/work/bsh/netbsd/current/src/sys/arch/evbarm/stand/gzboot/ADI_BRH_flash_0x00140000/../../../../../arch -I/u01/work/bsh/netbsd/current/src/sys/arch/evbarm/stand/gzboot/ADI_BRH_flash_0x00140000/../../../../../lib/libsa -D_STANDALONE -DHEAP_SIZE=1048576 -DHEAP_VARIABLE -DRELOC=0!
 x00140000 -DMAXIMAGESIZE=0 -DLOADADDR=0xc0200000  -nostdinc -isystem /u00/work/bsh/nb/current/destdir.evbarmeb/usr/include  -c    vers.c
nbmake: don't know how to make /u01/work/bsh/netbsd/current/src/sys/arch/evbarm/stand/gzboot/ADI_BRH_flash_0x00140000/obj.evbarm.eb/lib/sa/libsa.a. Stop

nbmake: stopped in /u01/work/bsh/netbsd/current/src/sys/arch/evbarm/stand/gzboot/ADI_BRH_flash_0x00140000

Compilation exited abnormally with code 2 at Fri Mar 18 13:39:06
----------------------------------------------------------------

Pathc for Makefile.gzboot:

Index: Makefile.gzboot
===================================================================
RCS file: /cvsroot/src/sys/arch/evbarm/stand/gzboot/Makefile.gzboot,v
retrieving revision 1.10
diff -u -u -r1.10 Makefile.gzboot
--- Makefile.gzboot	21 Jun 2004 18:20:08 -0000	1.10
+++ Makefile.gzboot	18 Mar 2005 04:58:50 -0000
@@ -2,6 +2,7 @@
 
 NOMAN=  # defined
 
+.include <bsd.obj.mk>              # Pull in OBJDIR name rule.
 .include <bsd.own.mk>
 
 EVBARM_STAND=	${S}/arch/evbarm/stand