Subject: Re: kernel compiles using objdir?
To: Simon J. Gerraty <>
From: Simon Burge <>
List: tech-toolchain
Date: 04/29/2000 15:09:31
"Simon J. Gerraty" wrote:

> > 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
> > ...
> > Stop.
> > 55820.86s real 30588.39s user 7360.67s system 
> This turns out to be a problem with crunchgen needing to grok
> MAKEOBJDIRPREFIX (just as it already groks obj.${MACHINE} and obj).
> The patch below, gets us past that issue, and a make in miniroot then
> gets as far as:

Can something smart be done with the equivalent of "make print-objdir"
or similar?  crunchgen shouldn't have to know too much about the build
environment itself, I would think...

> SPECIAL sync; ${DESTDIR}/usr/mdec/binstall -m${DESTDIR}/usr/mdec -v ffs ${TARGDIR}
> This script has to be run when the kernel is in 'insecure' mode.
> The best way is to run this script in single-user mode.
> *** Error code 1
> Now I can't believe that we are all supposed to run "make release" on
> machines in 'insecure' mode or in single-user, so I'll assume this is
> a bug?

It depends on how a particular port installs its bootblocks.  I've never
had "options INSECURE" on a pmax and never had a problem building a
release on that platform.  File a bug under port-sparc :-)