[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-kbuild
Subject: Re: [PATCH 2/2] kbuild: do not remove empty *.symtypes explicitly
From: Masahiro Yamada <masahiroy () kernel ! org>
Date: 2022-03-30 2:27:48
Message-ID: CAK7LNARUj8tsC-m95-UbQdaQcYTBQWN=7OFQuS81+B9RdLo4KQ () mail ! gmail ! com
[Download RAW message or body]
On Wed, Mar 30, 2022 at 3:28 AM Nick Desaulniers
<ndesaulniers@google.com> wrote:
>
> On Mon, Mar 28, 2022 at 7:15 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
> >
> > Presumably, 'test -s $@ || rm -f $@' intends to remove the output when
> > the genksyms command fails.
> >
> > It is unneeded because .DELETE_ON_ERROR automatically removes the output
> > on failure.
> >
> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> > ---
> >
> > scripts/Makefile.build | 8 ++------
> > 1 file changed, 2 insertions(+), 6 deletions(-)
> >
> > diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> > index 3f2985df4d60..974bb6435826 100644
> > --- a/scripts/Makefile.build
> > +++ b/scripts/Makefile.build
> > @@ -135,9 +135,7 @@ genksyms = scripts/genksyms/genksyms \
> > cmd_gensymtypes_c = $(CPP) -D__GENKSYMS__ $(c_flags) $< | $(genksyms)
> >
> > quiet_cmd_cc_symtypes_c = SYM $(quiet_modtag) $@
> > -cmd_cc_symtypes_c = \
> > - $(call cmd_gensymtypes_c,true,$@) >/dev/null; \
> > - test -s $@ || rm -f $@
> > + cmd_cc_symtypes_c = $(call cmd_gensymtypes_c,true,$@)
>
> Was it an accident that you removed the redirection of stdout to
> /dev/null here, but not also below?
It was an accident. I will fix it. Thanks.
> If quiet_modtag silences the output, perhaps the redirection should be
> dropped below as well?
>
> >
> > $(obj)/%.symtypes : $(src)/%.c FORCE
> > $(call cmd,cc_symtypes_c)
> > @@ -348,9 +346,7 @@ cmd_gensymtypes_S = \
> > $(CPP) -D__GENKSYMS__ $(c_flags) -xc - | $(genksyms)
> >
> > quiet_cmd_cc_symtypes_S = SYM $(quiet_modtag) $@
> > -cmd_cc_symtypes_S = \
> > - $(call cmd_gensymtypes_S,true,$@) >/dev/null; \
> > - test -s $@ || rm -f $@
> > + cmd_cc_symtypes_S = $(call cmd_gensymtypes_S,true,$@) >/dev/null
> >
> > $(obj)/%.symtypes : $(src)/%.S FORCE
> > $(call cmd,cc_symtypes_S)
> > --
> > 2.32.0
> >
>
>
> --
> Thanks,
> ~Nick Desaulniers
--
Best Regards
Masahiro Yamada
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic