Re: [PATCH] Makefile: fix parallel build race

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 16, 2021 at 10:18:14PM -0500, Jeff King wrote:
> On Wed, Nov 17, 2021 at 08:25:55AM +0700, Đoàn Trần Công Danh wrote:
> 
> > * builtin/bugreport.c includes hook-list.h, hence generated files from
> > it must depend on hook-list.h
> 
> Good catch. This is trivially reproducible with:
> 
>   make clean
>   make builtin/bugreport.o
> 
> The problem comes from cfe853e66b (hook-list.h: add a generated list of
> hooks, like config-list.h, 2021-09-26), as you might expect.
> 
> > diff --git a/Makefile b/Makefile
> > index 241dc322c0..413503b488 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -2222,6 +2222,7 @@ git$X: git.o GIT-LDFLAGS $(BUILTIN_OBJS) $(GITLIBS)
> >  
> >  help.sp help.s help.o: command-list.h
> >  hook.sp hook.s hook.o: hook-list.h
> > +builtin/bugreport.sp builtin/bugreport.s builtin/bugreport.o: hook-list.h
> 
> This fix looks correct. I grepped for other similar cases, but this is
> the only file that needs it.
> 
> Curiously, the existing hook.c does not seem to include hook-list.h,
> even though you can see a dependency in the context above. Nor does
> help.c, which gained a similar dependency in cfe853e66b. Those seem
> superfluous, but maybe I'm missing something.

Neither does builtin/help.c. This was discussed in the subthread
starting at https://lore.kernel.org/all/20211115220455.xse7mhbwabrheej4@xxxxxxxxxxxx/
and is covered by https://lore.kernel.org/all/patch-v3-19.23-234b4eb613c-20211116T114334Z-avarab@xxxxxxxxx/
(to which I responded that the line for hook.o can be removed too)

Mike



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux