Subject: port-i386/14946: [rkb] BIOSCALL trampoline doesn't build with Dec 9th userland
To: None <gnats-bugs@gnats.netbsd.org>
From: None <rafal@netbsd.org>
List: netbsd-bugs
Date: 12/14/2001 01:49:17
>Number:         14946
>Category:       port-i386
>Synopsis:       arch/i386/bioscall/Makefile broken: can't rebuild biostramp.inc
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    port-i386-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 13 22:55:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Rafal Boni
>Release:        NetBSD 1.5Z
>Organization:
Ha!
>Environment:
System: NetBSD groo-the-wanderer 1.5Z NetBSD 1.5Z (STINKPAD) #10: Fri Dec 7 22:40:47 EST 2001 rafal@groo-the-wanderer:/usr/rafal/netbsd-src/sys/arch/i386/compile/STINKPAD i386
Architecture: i386
Machine: i386

>Description:
	arch/i386/bioscall/Makefile doesn't seem to build biostramp.inc any
	more for several reasons:
		(1) genassym wants to include 'machine/...' includes, but the
 		    machine -> arch/${MACHINE_ARCH}/include symlink is not 
		    set up by the Makefile
		(2) The include paths don't add the current directory to get
 		    to the `machine' symlink.

	A side note is that the build assumes things build in the source dir.
	That's an issue for another PR.

>How-To-Repeat:
	Run a make in sys/arch/i386/bioscall

>Fix:

Index: Makefile
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/i386/bioscall/Makefile,v
retrieving revision 1.11
diff -b -u -r1.11 Makefile
--- Makefile	2001/09/22 03:34:19	1.11
+++ Makefile	2001/12/14 06:52:28
@@ -4,7 +4,7 @@
 KSRC=${.CURDIR}/../../..
 ARCHSRC=${.CURDIR}/../..
 I386=${KSRC}/arch/i386
-CFLAGS+= -I${ARCHSRC} -I${KSRC} -D_LKM
+CFLAGS+= -I${ARCHSRC} -I${KSRC} -D_LKM -I${.CURDIR}
 
 SRCS=	biostramp.S
 OBJS=	biostramp.o
@@ -17,6 +17,9 @@
 	-mv -f biostramp.inc biostramp.inc.bak
 	sh ${.CURDIR}/bin2asm.sh biostramp.bin > biostramp.inc
 
+machine:
+	@rm -f machine && ln -s ${I386}/include machine
+
 .include <bsd.own.mk>
 
 .if ${OBJECT_FMT} == "ELF"
@@ -37,7 +40,7 @@
 biostramp.obj: ${OBJS} ${DEPS}
 	${LD} -Bstatic -N -Ttext 0 -o $@ $(OBJS)
 
-assym.h: ${KSRC}/kern/genassym.sh genassym.cf
+assym.h: machine ${KSRC}/kern/genassym.sh genassym.cf
 	sh ${KSRC}/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
 	    < genassym.cf > assym.h.tmp && \
 	mv -f assym.h.tmp assym.h
>Release-Note:
>Audit-Trail:
>Unformatted:
 		Kernel CVS updated and rebuilt Dec 07, 2001
 		Userland CVS updated and rebuilt Dec 09, 2001