From: "Nicholas Piggin" <npiggin@gmail.com>
To: "Segher Boessenkool" <segher@kernel.crashing.org>
Cc: linux-s390@vger.kernel.org, Thomas Huth <thuth@redhat.com>,
kvm@vger.kernel.org, Andrew Jones <andrew.jones@linux.dev>,
Marc Hartmayer <mhartmay@linux.ibm.com>,
kvm-riscv@lists.infradead.org, kvmarm@lists.linux.dev,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [kvm-unit-tests PATCH] build: retain intermediate .aux.o targets
Date: Fri, 14 Jun 2024 18:38:54 +1000 [thread overview]
Message-ID: <D1ZLRVNGPWTV.5H76A3E8DJCV@gmail.com> (raw)
In-Reply-To: <20240614010856.GK19790@gate.crashing.org>
On Fri Jun 14, 2024 at 11:08 AM AEST, Segher Boessenkool wrote:
> On Fri, Jun 14, 2024 at 10:43:39AM +1000, Nicholas Piggin wrote:
> > On Wed Jun 12, 2024 at 6:28 PM AEST, Segher Boessenkool wrote:
> > > On Wed, Jun 12, 2024 at 02:42:32PM +1000, Nicholas Piggin wrote:
> > > > arm, powerpc, riscv, build .aux.o targets with implicit pattern rules
> > > > in dependency chains that cause them to be made as intermediate files,
> > > > which get removed when make finishes. This results in unnecessary
> > > > partial rebuilds. If make is run again, this time the .aux.o targets
> > > > are not intermediate, possibly due to being made via different
> > > > dependencies.
> > > >
> > > > Adding .aux.o files to .PRECIOUS prevents them being removed and solves
> > > > the rebuild problem.
> > > >
> > > > s390x does not have the problem because .SECONDARY prevents dependancies
> > > > from being built as intermediate. However the same change is made for
> > > > s390x, for consistency.
> > >
> > > This is exactly what .SECONDARY is for, as its documentation says,
> > > even. Wouldn't it be better to just add a .SECONDARY to the other
> > > targets as well?
> >
> > Yeah we were debating that and agreed .PRECIOUS may not be the
> > cleanest fix but since we already use that it's okay for a
> > minimal fix.
>
> But why add it to s390x then? It is not a fix there at all!
Eh, not a big deal. I mentioned that in the changelog it doesn't seem to
pracicaly fix something. And I rather the makefiles converge as much as
possible rather than diverge more.
.SECONDARY was added independently and not to fix this problem in
s390x. And s390x has .SECONDARY slightly wrong AFAIKS. It mentions
.SECONDARY: twice in a way that looks like it was meant to depend on
specific targets, it actually gives it no dependencies and the
resulting semantics are that all intermediate files in the build are
treated as secondary. So somethig there should be cleaned up. If the
.SECONDARY was changed to only depend on the .gobj and .hdr.obj then
suddenly that would break .aux.o if I don't make the change.
So I'm meaning to work out what to do with all that, i.e., whether to
add blanket .SECONDARY for all and trim or remove the .PRECIOUS files,
or remove s390x's secondary, or make it more specific, or something
else. But it takes a while for me to do makefile work.
Thanks,
Nick
next prev parent reply other threads:[~2024-06-14 8:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-12 4:42 [kvm-unit-tests PATCH] build: retain intermediate .aux.o targets Nicholas Piggin
2024-06-12 6:48 ` Marc Hartmayer
2024-06-12 7:16 ` Andrew Jones
2024-06-12 8:28 ` Segher Boessenkool
2024-06-14 0:43 ` Nicholas Piggin
2024-06-14 1:08 ` Segher Boessenkool
2024-06-14 8:38 ` Nicholas Piggin [this message]
2024-07-26 4:15 ` Nicholas Piggin
2024-07-26 9:05 ` Thomas Huth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D1ZLRVNGPWTV.5H76A3E8DJCV@gmail.com \
--to=npiggin@gmail.com \
--cc=andrew.jones@linux.dev \
--cc=kvm-riscv@lists.infradead.org \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=linux-s390@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mhartmay@linux.ibm.com \
--cc=segher@kernel.crashing.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).