From owner-freebsd-current@freebsd.org Mon Oct 26 18:23:54 2015 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABB9C8B8B for ; Mon, 26 Oct 2015 18:23:54 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 266381474 for ; Mon, 26 Oct 2015 18:23:53 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id t9QINmqU091281 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 26 Oct 2015 20:23:48 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua t9QINmqU091281 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id t9QINmhm091280; Mon, 26 Oct 2015 20:23:48 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 26 Oct 2015 20:23:48 +0200 From: Konstantin Belousov To: Hans Petter Selasky Cc: freebsd-current@freebsd.org Subject: Re: Quick test building a module cross all targets and architectures Message-ID: <20151026182348.GT2257@kib.kiev.ua> References: <562DEE4F.5010203@selasky.org> <5888922.UHSgpdyTWY@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5888922.UHSgpdyTWY@ralph.baldwin.cx> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2015 18:23:54 -0000 On Mon, Oct 26, 2015 at 11:03:07AM -0700, John Baldwin wrote: > On Monday, October 26, 2015 10:11:43 AM Hans Petter Selasky wrote: > > Hi, > > > > We have NO_MODULES for building kernel without modules, but no NO_KERNEL > > to only build the modules. > > > > What do you think about the following patch: > > > > > diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk > > > index ddf828e..f0920df 100644 > > > --- a/sys/conf/kern.post.mk > > > +++ b/sys/conf/kern.post.mk > > > @@ -32,7 +32,11 @@ KERN_DEBUGDIR?= ${DEBUGDIR} > > > > > > .for target in all clean cleandepend cleandir clobber depend install \ > > > obj reinstall tags > > > +.if !defined(NO_KERNEL) > > > ${target}: kernel-${target} > > > +.else > > > +${target}: > > > +.endif > > > .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists($S/modules) > > > ${target}: modules-${target} > > > modules-${target}: > > > > It allows only a single module with MODULES_OVERRIDE= and NO_KERNEL=YES > > to be built with universe in very little time. This can save a lot of > > build time when changes are limited to a set of kernel modules. > > Can you just use something like MODULES_WITH_WORLD instead? > > make tinderbox MAKE_JUST_WORLDS=yes SUBDIR_OVERRIDE=sys/modules MODULES_OVERRIDE=foo > > (If it's only 1 module directory you can probably just use SUBDIR_OVERRIDE directly?) > > make tinderbox MAKE_JUST_WORLDS=yes SUBDIR_OVERRIDE=sys/modules/foo > In any variant, this proposal sounds strange. Almost all in-kernel code is compiled both for kernel and for modules. I am only aware of exceptions for i915kms, which was done for a reason which is no longer valid. In other words, if your goal is to check that the change does not break compilation of some kernel code, then it is wrong to not compile kernels. Note that kernel and modules compilation environments are differrent.