From owner-freebsd-hackers Thu Jan 18 0:13:46 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from rapier.smartspace.co.za (rapier.smartspace.co.za [66.8.25.34]) by hub.freebsd.org (Postfix) with SMTP id 7396337B402 for ; Thu, 18 Jan 2001 00:13:20 -0800 (PST) Received: (qmail 11117 invoked by uid 1001); 18 Jan 2001 08:13:15 -0000 Date: Thu, 18 Jan 2001 10:13:15 +0200 From: Neil Blakey-Milner To: FreeBSD Current Users , FreeBSD Hackers Cc: Marcel Moolenaar Subject: Patch to fix "make buildkernel requires full obj directory" mistake Message-ID: <20010118101315.A10537@rapier.smartspace.co.za> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="d6Gm4EdcadzBjdND" Content-Disposition: inline User-Agent: Mutt/1.2.5i Organization: Building Intelligence X-Operating-System: FreeBSD 4.2-RELEASE i386 X-URL: http://rucus.ru.ac.za/~nbm/ Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --d6Gm4EdcadzBjdND Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, I've kept on forgetting to apply a patch similar to this one. "make buildkernel" currently fails if a "make buildworld" has not previously been done on the machine (and still has the populated object environment) because OBJFORMAT_PATH is explicitly set to only use ${WORLDTMP}/usr/libexec. At least for the kernel build phase, this may be an error, since we already use 'gcc', 'ld', and friends from $PATH. Anyway, the attached patch fixes at least buildkernel in the way most obvious to me, but I'm sure there may be a more useful place to place the addition of OBJFORMAT_PATH, since $PATH is made to include the supplied $PATH environment variable in many other places. I'm not willing to make a judgement whether using the supplied OBJFORMAT_PATH is correct in any of those places, but I wish to fix the buildkernel target. Neil -- Neil Blakey-Milner nbm@mithrandr.moria.org --d6Gm4EdcadzBjdND Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="bk.patch" Index: Makefile.inc1 =================================================================== RCS file: /home/ncvs/src/Makefile.inc1,v retrieving revision 1.180 diff -u -r1.180 Makefile.inc1 --- Makefile.inc1 2000/12/24 14:58:34 1.180 +++ Makefile.inc1 2001/01/18 08:03:08 @@ -129,6 +129,7 @@ # /usr/games added for fortune which depend on strfile STRICTTMPPATH= ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin:${WORLDTMP}/usr/games TMPPATH= ${STRICTTMPPATH}:${PATH} +OBJFORMAT_PATH?= /usr/libexec TMPDIR?= /tmp TMPPID!= echo $$$$ @@ -200,6 +201,10 @@ PATH=${STRICTTMPPATH}:${INSTALLTMP} IMAKE= ${IMAKEENV} ${MAKE} -f Makefile.inc1 +# kernel stage +KMAKEENV= ${WMAKEENV} \ + OBJFORMAT_PATH=${WORLDTMP}/usr/libexec:${OBJFORMAT_PATH} + USRDIRS= usr/bin usr/lib/compat/aout usr/games usr/libdata/ldscripts \ usr/libexec/${OBJFORMAT} usr/sbin usr/share/misc @@ -408,10 +413,10 @@ ${MAKE} -f ${KRNLSRCDIR}/dev/aic7xxx/aicasm/Makefile .if !defined(NO_KERNELDEPEND) cd ${KRNLOBJDIR}/${_kernel}; \ - ${WMAKEENV} MACHINE=${MACHINE} ${MAKE} KERNEL=${INSTKERNNAME} depend + ${KMAKEENV} MACHINE=${MACHINE} ${MAKE} KERNEL=${INSTKERNNAME} depend .endif cd ${KRNLOBJDIR}/${_kernel}; \ - ${WMAKEENV} MACHINE=${MACHINE} ${MAKE} KERNEL=${INSTKERNNAME} all + ${KMAKEENV} MACHINE=${MACHINE} ${MAKE} KERNEL=${INSTKERNNAME} all .endfor # --d6Gm4EdcadzBjdND-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message