lkml.org 
[lkml]   [2022]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 26/27] kbuild: stop generating *.symversions
On Thu, Apr 28, 2022 at 12:15 PM Nicolas Schier <nicolas@fjasle.eu> wrote:
>
> On Mon 25 Apr 2022 04:08:10 GMT Masahiro Yamada wrote:
> > Now *.symversions is unneeded. Clean up the Makefile and script.
> >
> > I will keep *.symversions in .gitignore and 'make clean' for a while
> > to avoid flooding the output from 'git status'.
> >
> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> > ---
> >
> > scripts/Makefile.build | 28 ++++------------------------
> > scripts/link-vmlinux.sh | 19 -------------------
> > 2 files changed, 4 insertions(+), 43 deletions(-)
> >
> > diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> > index aadc16e04632..7f199b0a5170 100644
> > --- a/scripts/Makefile.build
> > +++ b/scripts/Makefile.build
> > @@ -170,12 +170,9 @@ ifdef CONFIG_MODVERSIONS
> > # to the kernel and/or modules at the end.
> > gen_symversions = \
> > if $(NM) $@ 2>/dev/null | grep -q __ksymtab; then \
> > - $(call cmd_gensymtypes_$(1),$(KBUILD_SYMTYPES),$(@:.o=.symtypes)) \
> > - > $@.symversions; \
> > echo >> $(dot-target).cmd ; \
> > - sed 's/\(.*\) = \(.*\);/$(pound)\1=\2/' $@.symversions >> $(dot-target).cmd ; \
> > - else \
> > - rm -f $@.symversions; \
> > + $(call cmd_gensymtypes_$(1),$(KBUILD_SYMTYPES),$(@:.o=.symtypes)) | \
> > + sed 's/\(.*\) = \(.*\);/$(pound)\1=\2/' >> $(dot-target).cmd ; \
>
> I was wondering, whether we should integrate the 'sed' part into
> genksyms and make it output the lines as we need them.
> If genksyms fails, we now don't see any error code and make will
> silently continue as the pipe hides genksyms' exit code, right?


You are right.
I was also thinking of doing this directly in genksyms.
I will do it in v2.

bash supports 'set -o pipefail', but I do not know how
to do it in other shells.

I am also thinking of switching over to SHELL=/bin/bash,
but we cannot rely on bash'ism here yet.

--
Best Regards
Masahiro Yamada

\
 
 \ /
  Last update: 2022-04-28 06:49    [W:0.096 / U:0.720 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site