linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] kbuild: Run syncconfig with -s
@ 2020-09-14 13:35 Alexey Dobriyan
  2020-09-14 14:29 ` Masahiro Yamada
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Dobriyan @ 2020-09-14 13:35 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel, linux-kbuild, masahiroy

> BTW., there's another, rather spurious bug I recently triggered in kbuild.
> 
> Occasionally when I Ctrl-C a kernel build on a system with a lot of CPUs, 
> the .o.cmd file gets corrupted:

Those are temporary files, truncated at page boundary.

	$ stat -c %s XXX.pata_sil680.mod.o.cmd
	12288

I tried to fix this by inserting shell 'trap' directive but it failed
somewhere else.

	cmd_and_fixdep =                                                     \
        $(cmd);                                                              \
        scripts/basic/fixdep $(depfile) $@ '$(make-cmd)' > $(dot-target).cmd;\
        rm -f $(depfile)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] kbuild: Run syncconfig with -s
  2020-09-14 13:35 [PATCH] kbuild: Run syncconfig with -s Alexey Dobriyan
@ 2020-09-14 14:29 ` Masahiro Yamada
  0 siblings, 0 replies; 2+ messages in thread
From: Masahiro Yamada @ 2020-09-14 14:29 UTC (permalink / raw)
  To: Alexey Dobriyan
  Cc: Ingo Molnar, Linux Kernel Mailing List, Linux Kbuild mailing list

On Mon, Sep 14, 2020 at 10:36 PM Alexey Dobriyan <adobriyan@gmail.com> wrote:
>
> > BTW., there's another, rather spurious bug I recently triggered in kbuild.
> >
> > Occasionally when I Ctrl-C a kernel build on a system with a lot of CPUs,
> > the .o.cmd file gets corrupted:
>
> Those are temporary files, truncated at page boundary.
>
>         $ stat -c %s XXX.pata_sil680.mod.o.cmd
>         12288
>
> I tried to fix this by inserting shell 'trap' directive but it failed
> somewhere else.
>
>         cmd_and_fixdep =                                                     \
>         $(cmd);                                                              \
>         scripts/basic/fixdep $(depfile) $@ '$(make-cmd)' > $(dot-target).cmd;\
>         rm -f $(depfile)



No. It is *OK* to have broken .o.cmd files
as long as .o files are deleted on error or interruption
(and this should be automatically handled by GNU Make).


.o.cmd is included only when the corresponding .o exists.


This is explained in the case [2] of commit
392885ee82d35d515ba2af7b72c5e357c3002113



-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-14 14:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-14 13:35 [PATCH] kbuild: Run syncconfig with -s Alexey Dobriyan
2020-09-14 14:29 ` Masahiro Yamada

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).