lkml.org 
[lkml]   [2022]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH v2 10/10] kbuild: refactor cmd_modversions_S
    On Tue, Apr 5, 2022 at 4:34 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
    >
    > Split the code into two macros, cmd_gen_symversions_S for running
    > genksyms, and cmd_modversions for running $(LD) to update the object
    > with CRCs.
    >
    > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

    Thanks for the patch!
    Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>

    > ---
    >
    > Changes in v2:
    > - new
    >
    > scripts/Makefile.build | 15 ++++-----------
    > 1 file changed, 4 insertions(+), 11 deletions(-)
    >
    > diff --git a/scripts/Makefile.build b/scripts/Makefile.build
    > index ba2be555f942..58be0997c5dd 100644
    > --- a/scripts/Makefile.build
    > +++ b/scripts/Makefile.build
    > @@ -274,7 +274,8 @@ define rule_as_o_S
    > $(call cmd_and_fixdep,as_o_S)
    > $(call cmd,gen_ksymdeps)
    > $(call cmd,gen_objtooldep)
    > - $(call cmd,modversions_S)
    > + $(call cmd,gen_symversions_S)
    > + $(call cmd,modversions)
    > endef
    >
    > # Built-in and composite module parts
    > @@ -366,16 +367,8 @@ ifdef CONFIG_ASM_MODVERSIONS
    > # versioning matches the C process described above, with difference that
    > # we parse asm-prototypes.h C header to get function definitions.
    >
    > -cmd_modversions_S = \
    > - if $(OBJDUMP) -h $@ | grep -q __ksymtab; then \
    > - $(call cmd_gensymtypes_S,$(KBUILD_SYMTYPES),$(@:.o=.symtypes)) \
    > - > $(@D)/.tmp_$(@F:.o=.ver); \
    > - \
    > - $(LD) $(KBUILD_LDFLAGS) -r -o $(@D)/.tmp_$(@F) $@ \
    > - -T $(@D)/.tmp_$(@F:.o=.ver); \
    > - mv -f $(@D)/.tmp_$(@F) $@; \
    > - rm -f $(@D)/.tmp_$(@F:.o=.ver); \
    > - fi
    > +cmd_gen_symversions_S = $(call gen_symversions,S)
    > +
    > endif
    >
    > $(obj)/%.o: $(src)/%.S FORCE
    > --
    > 2.32.0
    >


    --
    Thanks,
    ~Nick Desaulniers

    \
     
     \ /
      Last update: 2022-04-05 22:30    [W:4.318 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site