Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Aug 2019 14:38:30 -0700
From:      John Baldwin <jhb@FreeBSD.org>
To:        Ian Lepore <ian@freebsd.org>, Warner Losh <imp@bsdimp.com>
Cc:        Kyle Evans <kevans@freebsd.org>, x11@freebsd.org, current <current@freebsd.org>, Niclas Zeising <zeising@freebsd.org>
Subject:   Re: HEADSUP: drm-current-kmod now installs sources
Message-ID:  <de052df4-db5f-5c1c-1963-afbf18cc3e4a@FreeBSD.org>
In-Reply-To: <a88355cd83fd4e76b22e521cb842e0fb941508d6.camel@freebsd.org>
References:  <67ca217f-b7de-8707-c4de-51e3f895d06f@FreeBSD.org> <bee728a59abb033657a20de4e716698fb2b1c927.camel@freebsd.org> <b2951cc6-e5e8-6c14-6368-41d51f949011@FreeBSD.org> <469b61c7c939b4e70f4304eaeb73eaae9b1d4c9a.camel@freebsd.org> <c3a3eb30-584f-a5f1-18f7-b94a45d20dd7@FreeBSD.org> <20190814192353.166bd3e7d1af44a55a61c915@bidouilliste.com> <c9ade020-92b3-2f78-ddbb-2182ea4b41d2@freebsd.org> <ac5725eddb2410558b825905ed248c4cba86da2d.camel@freebsd.org> <CACNAnaFAtPdG9E7OmUmg34QVjcRcD1cWQoKW6vyBWSikyQcJ6Q@mail.gmail.com> <ba2d1428-8fd9-2091-db00-c489beb9a0ef@FreeBSD.org> <02c501907f6eca8f4bd9b44331ac6ab2e28d624f.camel@freebsd.org> <CANCZdfoWVDgbbJXzeAGMbdYWxY0pRbqQAGptxszKZ_QByjyvyQ@mail.gmail.com> <a88355cd83fd4e76b22e521cb842e0fb941508d6.camel@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 8/14/19 1:19 PM, Ian Lepore wrote:
> On Wed, 2019-08-14 at 13:59 -0600, Warner Losh wrote:
>> On Wed, Aug 14, 2019 at 1:56 PM Ian Lepore <ian@freebsd.org> wrote:
>>
>>> On Wed, 2019-08-14 at 12:00 -0700, John Baldwin wrote:
>>>> On 8/14/19 11:06 AM, Kyle Evans wrote:
>>>>> LOCAL_MODULES="" does seem like a sensible default when we're
>>>>> not
>>>>> building a native kernel.
>>>>
>>>> Unfortunately kern.post.mk has no way of knowing that as
>>>> MACHINE_*
>>>> are already set to the TARGET_* values by the time this target is
>>>> invoked.  Also, the 'make tinderbox' use case is a legit use case
>>>> that some folks want (for CI, etc.)
>>>>
>>>
>>> BUILDHOST_ARCH!= uname -p
>>> .if ${BUILDHOST_ARCH} != ${TARGET_ARCH}
>>>
>>> Unfortunately, I don't think it's as easy to compare the buildhost
>>> running version with the version of source being built, unless the
>>> build is started from the top level so that Makefile.inc1 sets the
>>> variables.
>>>
>>
>> We already know MACHINE_ARCH != TARGET_ARCH in Makefile.inc1 and
>> already do
>> different things based on it. But to be honest, I'd think there'd be
>> times
>> I'd absolutely want to build them all, and other times I wouldn't
>> which
>> strongly suggests some kind of knob specific for cross building the
>> port/pkg-based kernel modules. We could then pass that knob into the
>> kernel
>> builds which would then not try to guess whether or not to build
>> LOCAL_MODULES...
>>
>>
> 
> This is just about AUTOMATICALLY deciding to build something, based on
> the presence of source code in an arbitrary fixed location outside of
> the source tree on the build machine.  Anything set by the user should
> be honored without question, including LOCAL_MODULES.  
> 
> My point is only that the build machinery should not be deciding to
> build something the user didn't specify based on the existence of out-
> of-tree files on the build machine (I'd like to put the period right
> here in this sentence), unless there's a very high likelyhood that the
> build being done is for the build machine.
> 
> Things like CI that want to include more than in-tree sources as part
> of the build should be handling that by setting appropriate knobs as
> part of invoking the build.

I talked with Warner some offline and I think having some knob that
controls whether or not LOCAL_MODULES auto-populates and having make
buildkernel default it to on/off for native/cross builds (but it can
always be forcefully set on the command line) is fine with me.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?de052df4-db5f-5c1c-1963-afbf18cc3e4a>