aboutsummaryrefslogtreecommitdiff
path: root/Makefile.inc1
diff options
context:
space:
mode:
authorIan Lepore <ian@FreeBSD.org>2013-11-07 04:31:21 +0000
committerIan Lepore <ian@FreeBSD.org>2013-11-07 04:31:21 +0000
commitf382c38e98b42ef55119ef5b66d0e59ef129b30b (patch)
tree6f648ac326c1ee570751fb18b0b307cbc4ecd7ca /Makefile.inc1
parent5a8b65f67a41ee0c56b0f93ab9c647a1c7c7754d (diff)
downloadsrc-f382c38e98b42ef55119ef5b66d0e59ef129b30b.tar.gz
src-f382c38e98b42ef55119ef5b66d0e59ef129b30b.zip
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. This is a re-do of r257730 which was backed out in r257734, but this time it's one byte smaller... a leftover trailing backslash resulted in a .for loop with no rules, so no compiler stuff got built and later steps built with the wrong toolset.
Notes
Notes: svn path=/head/; revision=257777
Diffstat (limited to 'Makefile.inc1')
-rw-r--r--Makefile.inc132
1 files changed, 29 insertions, 3 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index cecc99c5116c..f3efeefcef4d 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
@@ -1392,8 +1419,7 @@ cross-tools: .MAKE
usr.bin/xlint/lint1 usr.bin/xlint/lint2 usr.bin/xlint/xlint \
${_btxld} \
${_crunchide} \
- ${_kgzip} \
- sys/dev/aic7xxx/aicasm
+ ${_kgzip}
${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \
cd ${.CURDIR}/${_tool} && \
${MAKE} DIRPRFX=${_tool}/ obj && \