summaryrefslogtreecommitdiffstats
path: root/Makefile.inc1
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2013-11-06 00:32:40 +0000
committerian <ian@FreeBSD.org>2013-11-06 00:32:40 +0000
commitdfede8d111154b0e97ce283599bfeeb5a61a159f (patch)
tree9d982d800fe289f338c7d4c0bf74186bfa10e5a8 /Makefile.inc1
parent72c0bf308e322d1e54959ce3417c0abd39785a04 (diff)
downloadFreeBSD-src-dfede8d111154b0e97ce283599bfeeb5a61a159f.zip
FreeBSD-src-dfede8d111154b0e97ce283599bfeeb5a61a159f.tar.gz
Do not build aicasm with the cross-tools/kernel-toolchain, instead add a
proper kernel-tools step/target modeled after the world build-tools stuff.
Diffstat (limited to 'Makefile.inc1')
-rw-r--r--Makefile.inc130
1 files changed, 28 insertions, 2 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index cecc99c..b3cbdf6 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -439,6 +439,16 @@ IMAKE_MTREE= MTREE_CMD="nmtree ${MTREEFLAGS}"
KMAKEENV= ${WMAKEENV}
KMAKE= ${KMAKEENV} ${MAKE} ${.MAKEFLAGS} ${KERNEL_FLAGS} KERNEL=${INSTKERNNAME}
+# kernel build-tools stage
+KTMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \
+ ${WMAKEENV} ${MAKE} -f Makefile.inc1 \
+ TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
+ DESTDIR= \
+ BOOTSTRAPPING=${OSRELDATE} \
+ SSP_CFLAGS= \
+ -DNO_LINT \
+ -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF -DEARLY_BUILD
+
#
# buildworld
#
@@ -1019,7 +1029,7 @@ buildkernel:
@echo "--------------------------------------------------------------"
@echo ">>> stage 2.3: build tools"
@echo "--------------------------------------------------------------"
- @# Currently no special kernel tools to build.
+ ${_+_}cd ${.CURDIR}; ${KTMAKE} kernel-tools
.if !defined(NO_KERNELDEPEND)
@echo
@echo "--------------------------------------------------------------"
@@ -1347,6 +1357,23 @@ build-tools: .MAKE
.endfor
#
+# kernel-tools: Build kernel-building tools
+#
+kernel-tools: .MAKE
+ mkdir -p ${WORLDTMP}/usr
+ mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
+ -p ${WORLDTMP}/usr >/dev/null
+.for _tool in \
+ sys/dev/aic7xxx/aicasm
+ ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \
+ cd ${.CURDIR}/${_tool} && \
+ ${MAKE} DIRPRFX=${_tool}/ obj && \
+ ${MAKE} DIRPRFX=${_tool}/ depend && \
+ ${MAKE} DIRPRFX=${_tool}/ all && \
+ ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${WORLDTMP} install
+.endfor
+
+#
# cross-tools: Build cross-building tools
#
.if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${BOOTSTRAPPING} < 800035
@@ -1393,7 +1420,6 @@ cross-tools: .MAKE
${_btxld} \
${_crunchide} \
${_kgzip} \
- sys/dev/aic7xxx/aicasm
${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \
cd ${.CURDIR}/${_tool} && \
${MAKE} DIRPRFX=${_tool}/ obj && \
OpenPOWER on IntegriCloud