- Add new CONFIGOPTS make variable - Use CONFIGOPTS where TOOL_CONFIG is used - Put CONFIGOPTS args first so that other args win - Revert mkernel/mkernels
Index: build.sh =================================================================== RCS file: /cvsroot/src/build.sh,v retrieving revision 1.304 diff -p -u -r1.304 build.sh --- build.sh 16 Nov 2014 06:08:13 -0000 1.304 +++ build.sh 25 Nov 2014 08:18:00 -0000 @@ -1029,8 +1029,6 @@ Usage: ${progname} [-EhnorUuxy] [-a arch file \`conf' releasekernel=conf Install kernel built by kernel=conf to RELEASEDIR. kernels Build all kernels - mkernels Build all kernels in modular build - mkernel=conf Build kernel with config file \`conf' in modular build installmodules=idir Run "make installmodules" to \`idir' to install all kernel modules. modules Build kernel modules. @@ -1321,7 +1319,7 @@ parseoptions() exit $? ;; - kernel=*|releasekernel=*|kernel.gdb=*|mkernel=*) + kernel=*|releasekernel=*|kernel.gdb=*) arg=${op#*=} op=${op%%=*} [ -n "${arg}" ] || @@ -1350,7 +1348,6 @@ parseoptions() iso-image-source|\ iso-image|\ kernels|\ - mkernels|\ live-image|\ makewrapper|\ modules|\ @@ -1987,8 +1984,10 @@ buildkernel() fi [ -x "${TOOLDIR}/bin/${toolprefix}config" ] \ || bomb "${TOOLDIR}/bin/${toolprefix}config does not exist. You need to \"$0 tools\" first." - ${runcmd} "${TOOLDIR}/bin/${toolprefix}config" -b "${kernelbuildpath}" \ - ${configopts} -s "${TOP}/sys" "${kernelconfpath}" || + CONFIGOPTS=$(getmakevar CONFIGOPTS) + ${runcmd} "${TOOLDIR}/bin/${toolprefix}config" ${CONFIGOPTS} \ + -b "${kernelbuildpath}" -s "${TOP}/sys" ${configopts} \ + "${kernelconfpath}" || bomb "${toolprefix}config failed for ${kernelconf}" make_in_dir "${kernelbuildpath}" depend make_in_dir "${kernelbuildpath}" all @@ -2250,11 +2249,6 @@ main() configopts="-D DEBUG=-g" buildkernel "${arg}" ;; - mkernel=*) - arg=${op#*=} - configopts="-M" - buildkernel "${arg}" - ;; releasekernel=*) arg=${op#*=} releasekernel "${arg}" @@ -2264,11 +2258,6 @@ main() buildkernels ;; - mkernels) - configopts="-M" - buildkernels - ;; - disk-image=*) arg=${op#*=} diskimage "${arg}" Index: doc/BUILDING.mdoc =================================================================== RCS file: /cvsroot/src/doc/BUILDING.mdoc,v retrieving revision 1.109 diff -p -u -r1.109 BUILDING.mdoc --- doc/BUILDING.mdoc 16 Nov 2014 06:10:31 -0000 1.109 +++ doc/BUILDING.mdoc 25 Nov 2014 08:18:05 -0000 @@ -1526,12 +1526,6 @@ file alongside of the kernel which contains a full symbol table and can be used for debugging (for example with a cross-gdb built by .Sy MKCROSSGDB ) . -.It Sy mkernel Ns = Ns Ar kconf -Build a new kernel in modular build. -Similar to the above -.Sy kernel Ns = Ns Ar kconf -operation, but creates intermediate per-module relocatable objects and link -them to the final kernel. .It Sy kernels This command will build all kernels defined in port specific release build procedure. @@ -1539,10 +1533,6 @@ procedure. This command internally calls the .Sy kernel Ns = Ns Ar kconf operation for each found kernel configuration file. -.It Sy mkernels -Similar to the above -.Sy kernels -operation, but builds kernels in modular build. .It Sy modules This command will build kernel modules and install them into .Sy DESTDIR . Index: etc/Makefile =================================================================== RCS file: /cvsroot/src/etc/Makefile,v retrieving revision 1.421 diff -p -u -r1.421 Makefile --- etc/Makefile 10 Aug 2014 05:56:36 -0000 1.421 +++ etc/Makefile 25 Nov 2014 08:18:05 -0000 @@ -578,7 +578,7 @@ build_kernels: .PHONY .for configfile in ${ALL_KERNELS} # { build_kernels: kern-${configfile} kern-${configfile}: .PHONY .MAKE - cd ${KERNCONFDIR} && ${TOOL_CONFIG} -s ${KERNSRCDIR} \ + cd ${KERNCONFDIR} && ${TOOL_CONFIG} ${CONFIGOPTS} -s ${KERNSRCDIR} \ -U DEBUG -b ${KERNOBJDIR}/${configfile:C/.*\///} ${configfile} .if ${MKUPDATE} == "no" cd ${KERNOBJDIR}/${configfile:C/.*\///} && ${MAKE} distclean Index: share/mk/bsd.README =================================================================== RCS file: /cvsroot/src/share/mk/bsd.README,v retrieving revision 1.336 diff -p -u -r1.336 bsd.README --- share/mk/bsd.README 6 Sep 2014 12:12:32 -0000 1.336 +++ share/mk/bsd.README 25 Nov 2014 08:18:19 -0000 @@ -1436,6 +1436,8 @@ CLEANDIRFILES Additional files to remove CLEANFILES Additional files to remove for the clean and cleandir targets. +CONFIGOPTS Additional flags to config(1) when building kernels. + COPTS Additional flags to the compiler when creating C objects. COPTS.<fn> Additional flags to the compiler when creating the Index: share/mk/bsd.ioconf.mk =================================================================== RCS file: /cvsroot/src/share/mk/bsd.ioconf.mk,v retrieving revision 1.4 diff -p -u -r1.4 bsd.ioconf.mk --- share/mk/bsd.ioconf.mk 20 Sep 2013 16:39:14 -0000 1.4 +++ share/mk/bsd.ioconf.mk 25 Nov 2014 08:18:19 -0000 @@ -18,7 +18,8 @@ CONFIGDEP=${TOOL_CONFIG} .endif ioconf.c: ${IOCONF} ${CONFIGDEP} - ${TOOL_CONFIG} -b ${.OBJDIR} -s ${S} ${IOCONFDIR:U${.CURDIR}}/${IOCONF} + ${TOOL_CONFIG} ${CONFIGOPTS} -b ${.OBJDIR} -s ${S} \ + ${IOCONFDIR:U${.CURDIR}}/${IOCONF} # config doesn't change the files if they're unchanged. however, # here we want to satisfy our make dependency, so force a # timestamp update