Date: Thu, 10 Feb 2011 16:22:44 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: John Baldwin <jhb@freebsd.org> Cc: Alexander Kabaev <kan@freebsd.org>, FreeBSD current mailing list <current@freebsd.org> Subject: Re: [PATCH] Add a 'make toolchains' target Message-ID: <20110210162026.C80258@maildrop.int.zabbadoz.net> In-Reply-To: <201102100907.06680.jhb@freebsd.org> References: <201102100813.13803.jhb@freebsd.org> <20110210131731.P80258@maildrop.int.zabbadoz.net> <201102100907.06680.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 10 Feb 2011, John Baldwin wrote: > On Thursday, February 10, 2011 8:22:00 am Bjoern A. Zeeb wrote: >> On Thu, 10 Feb 2011, John Baldwin wrote: >> >>> This patch adds a 'make toolchains' target that invokes 'make toolchain' for >>> each target. The use case I want it for is a cheaper way to just test kernels >>> via make tinderbox so I can do: >>> >>> make toolchains >>> make MAKE_JUST_KERNELS=yes tinderbox >>> >>> It is implemented by adding a new frob to tweak the target that make universe >>> builds for the world stage of universe (UNIVERSE_TARGET). If that frob is >>> set, then the kernel build step for a universe is skipped. With this, the >>> toolchains target is a simple wrapper for: >>> >>> make UNIVERSE_TARGET=toolchains universe >>> >>> Index: Makefile >>> =================================================================== >>> --- Makefile (revision 218481) >>> +++ Makefile (working copy) >>> @@ -30,6 +30,7 @@ >>> # delete-old-libs - Delete obsolete libraries. >>> # targets - Print a list of supported TARGET/TARGET_ARCH pairs >>> # for world and kernel targets. >>> +# toolchains - Build a toolchain for all world and kernel targets. >> >> Should also go to build(7). > > Ok. > >>> # This makefile is simple by design. The FreeBSD make automatically reads >>> # the /usr/share/mk/sys.mk unless the -m argument is specified on the >>> @@ -307,9 +308,11 @@ make: .PHONY >>> ${MMAKE} install DESTDIR=${MAKEPATH} BINDIR= >>> >>> tinderbox: >>> - @cd ${.CURDIR} && \ >>> - DOING_TINDERBOX=YES ${MAKE} JFLAG=${JFLAG} universe >>> + @cd ${.CURDIR} && ${MAKE} DOING_TINDERBOX=YES universe >> >> You lost th JFLAG again that you had lately added. On purpose? > > It was redundant. The JFLAG was already being passed via MAKEOPTIONS. > >>> +toolchains: >>> + @cd ${.CURDIR} && ${MAKE} UNIVERSE_TARGET=toolchain universe >>> + >>> # >>> # universe >>> # >>> @@ -328,6 +331,12 @@ TARGET_ARCHES_sun4v?= sparc64 >>> TARGET_ARCHES_${target}?= ${target} >>> .endfor >>> >>> +.if defined(UNIVERSE_TARGET) >>> +MAKE_JUST_WORLDS= YES >> >> Not sure that's ideal but ok for a start; Eventually someone could think >> that UNIVERSE_TARGET=kernels could replace the MAKE_JUST_KERNELS=yes. >> With the current logic that however is almost impossible to do. >> Call it UNIVERSE_WORLD_TARGET? > > Actually, I would love to have a 'kernels' target and use > 'make UNIVERSE_TARGET=kernels universe' to replace MAKE_JUST_KERNELS, or rather ="toolchains kernels" universe? > but the kernel build stuff is quite convoluted. One could though > do something like 'make UNIVERSE_TARGET=buildkernel' assuming that > 'make buildkernel' always chose a suitable KERNCONF (I'm betting it doesn't > on powerpc64), so it's not strictly speaking just for world targets. > > I think the main idea is that if UNIVERSE_TARGET is set, only that step is > done for all targets. Otherwise the default action is to build world + > kernels for all targets. In that case having it be UNIVERSE_TARGET makes > sense I think. I'd say go for it. I haven't tested things but I cannot see any problems either. /bz -- Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110210162026.C80258>