Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Jan 2001 10:13:15 +0200
From:      Neil Blakey-Milner <nbm@mithrandr.moria.org>
To:        FreeBSD Current Users <hackers@FreeBSD.org>, FreeBSD Hackers <hackers@FreeBSD.org>
Cc:        Marcel Moolenaar <marcel@FreeBSD.org>
Subject:   Patch to fix "make buildkernel requires full obj directory" mistake
Message-ID:  <20010118101315.A10537@rapier.smartspace.co.za>

next in thread | raw e-mail | index | archive | help

--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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010118101315.A10537>