Date: Mon, 4 Jul 2016 10:56:24 -0700 From: Bryan Drewery <bdrewery@FreeBSD.org> To: John Baldwin <jhb@FreeBSD.org>, freebsd-arch@freebsd.org Subject: Re: Build work 11.0 plans status update Message-ID: <81a1a205-381b-4651-91e1-660525589cd5@FreeBSD.org> In-Reply-To: <e027e2fd-915e-c0d6-f727-4bc5edde2bde@FreeBSD.org> References: <201605270001.u4R01mKT087678@repo.freebsd.org> <fb451ad5-da16-cdbe-6106-8b67705600b3@FreeBSD.org> <20160527182543.GB4025@FreeBSD.org> <0d639d52-3ed4-a86d-3d45-b93c02939ce7@FreeBSD.org> <e027e2fd-915e-c0d6-f727-4bc5edde2bde@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 7/1/16 6:57 AM, John Baldwin wrote:
> On 6/30/16 12:42 PM, Bryan Drewery wrote:
>> (bcc'd some specific interested parties)
>>
>> This is from a private mail I sent to re@ a while back and is a status
>> update for upcoming work.
>>
>>> On Fri, May 27, 2016 at 11:18:58AM -0700, Bryan Drewery wrote:
>>>> Heads up, I intend to continue adding a few new features during the
>>>> slush/stable period since they are so impactful. They will be
>>>> off-by-default for stable/11 at this point I guess. I feel this is fine
>>>> since it is not ABI-related.
>>>>
>>>> - AUTO_OBJ: For subdir builds and buildworld, automatically create obj
>>>> dirs without needing 'make obj'. I wanted to enable this by default but
>>>> can wait for the branch to be created. There is some work pending for this.
>
> Will there be a way to disable use of /usr/obj if desired?
>
> Normally I do want it, but sometimes I don't. One of my use cases is when
> I have a src tree mounted via NFS into a VM guest and /usr/obj is private
> to the guest. Being able to build "in-tree" in a work checkout means that
> the binary is available on the host so I can run a debugger against it,
> and/or I can build the binary in one place and run it in both.
>
> For my work with gdb which uses auto*, I use a 'obj' subdir of the checkout
> which is akin to what Simon suggests, but I can do that on a per-tree basis
> without having to set various env vars or having to specify make vars on each
> make invocation.
>
> Also, when building random little source files ('vi foo.c' / 'make foo') it's
> handy to be able to ./foo instead of /usr/obj/<tab><tab><tab>/foo to find
> the binary I just built.
>
Yes, the context you quoted was an earlier description rather than the
newer where I said:
> - AUTO_OBJ I am splitting into 3 separate patches after feedback.
> 1. Removing 'make obj' treewalks from buildworld/buildkernel. This is
> coming in the next few days. No risk to it.
> 2. Unifying the objtree as like
> /usr/obj/usr/src/TARGET.TARGET_ARCH/bin/sh. This I will bring in
> an option of UNIFIED_OBJDIR to flip between the old and new
> patterns. Some tools such as picobsd and the options survey will
> rely on the old pattern. A CFT is needed to discover what else
> relies on the old patterns still. There's also a problem of
> migrating from the old tree to the new. I will bring this patch
> as off-by-default to re@ in the next week.
> 3. Default AUTO_OBJ in subdirs. This one is kind of tricky and needs
> some more thought. Non-root especially may be problematic since
> it will try to write to /usr/obj by default. I likely will hold
> off on this and not propose it for 11.0.
This last bit (3) is what you're asking about and is why I am more
hesitant to push it forward too quickly. People often do want to build
in the local directory. You would be able to disable it with
'WITHOUT_AUTO_OBJ=yes make', if it were on by default.
The argument for enabling this in a subdir build by default is because
it is too easy to get into a situation where stale files in the source
tree break the build and lead to confusion. I get reports of this at
least once a week lately. I don't want to cause more problems by
enabling it though.
--
Regards,
Bryan Drewery
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?81a1a205-381b-4651-91e1-660525589cd5>
