Subject: Re: kernel compiles using objdir?
To: None <>
From: Simon J. Gerraty <>
List: tech-toolchain
Date: 04/27/2000 22:37:17
"Simon J. Gerraty" <> writes:
> I'm doing a "make release" on a sparc - mainly to test that my latest
> frobbing of make to add some features from ODE make havn't broken
> anything.

Well after 15 hours, my make release died:
`test.o' is up to date.
(cd /u3/NetBSD/current/src/distrib/miniroot/../../bin/pwd; make pwd.o)
`pwd.o' is up to date.
cc -O2 -Werror   -nostdinc -idirafter /NetBSD/install/usr/include -c instbin.c
echo "int _crunched_sysinst_stub(int argc, char **argv, char **envp){return main(argc,argv,envp);}" >sysinst_stub.c
cc -O2 -Werror   -nostdinc -idirafter /NetBSD/install/usr/include -c sysinst_stub.c
make: don't know how to make /u3/NetBSD/current/src/distrib/miniroot/../../distrib/utils/sysinst/arch/sparc/menu_defs.o. Stop
*** Error code 2
55820.86s real 30588.39s user 7360.67s system 

I'll investigate that shortly.

> I'm using MAKEOBJDIRPREFIX to force all the object files to be built
> on local disk (src is NFS mounted).  All cool except that the kernel
> is being compiled in $BSDSRCDIR/sys/arch/sparc/compile/GENERIC
> instead of $MAKEOBJDIRPREFIX$BSDSRCDIR/sys/arch/sparc/compile/GENERIC

etc/Makefile already uses the -b and -s args to config(8).  The
following patch makes the right things happen when MAKEOBJDIRPREFIX is
defined.  Anyone see a problem?  Perhaps the mkdir -p ${KERNOBJDIR}
could be done regardless.


Index: Makefile
RCS file: /cvsroot/basesrc/etc/Makefile,v
retrieving revision 1.142
diff -u -p -r1.142 Makefile
--- Makefile	2000/04/08 23:02:53	1.142
+++ Makefile	2000/04/27 12:18:17
@@ -261,7 +261,7 @@ snap_pre:
 # the regular expression does a basename(1) on .CURDIR so that we don't
 # have to keep looking up .. at compile time.
 KERNSRCDIR?=	${.CURDIR:C/[^\/]+$//}sys
 # This target builds the GENERIC kernel (which must exist for all
@@ -279,6 +279,9 @@ GETKERNELAWK=	awk '/^config/ {print $$2;
 .if !target(snap_kern)
+	mkdir -p ${KERNOBJDIR}
 	cd ${KERNCONFDIR} && ${CONFIG} \
 		-b ${KERNOBJDIR}/${configfile} -s ${KERNSRCDIR} ${configfile}