Re: [PATCH] Makefile: crash multi-target and multithread compile support

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

 



Hi Kazu,

Thanks for the comments!

On Mon, Feb 21, 2022 at 5:36 PM HAGIO KAZUHITO(萩尾 一仁)
<k-hagio-ab@xxxxxxx> wrote:
>
> Hi Tao Liu,
>
> > -----Original Message-----
> > This patch will enable making crash as follows:
> >
> >     $ make -j8 warn lzo zstd
> >
> > Signed-off-by: Tao Liu <ltao@xxxxxxxxxx>
> > ---
> >  Makefile | 50 ++++++++++++++++++++++++++++++--------------------
> >  1 file changed, 30 insertions(+), 20 deletions(-)
> >
> > diff --git a/Makefile b/Makefile
> > index ede87a1..79017a0 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -305,33 +305,43 @@ install:
> >  unconfig: make_configure
> >       @./configure -u
> >
> > -warn: make_configure
> > -     @./configure ${CONF_TARGET_FLAG} -w -b
> > +config: make_configure
> > +     if [ -n "$(findstring warn,$(MAKECMDGOALS))" ]; then \
> > +       ./configure ${CONF_TARGET_FLAG} -w -b; fi
> > +     if [ -n "$(findstring Warn,$(MAKECMDGOALS))" ]; then \
> > +       ./configure ${CONF_TARGET_FLAG} -W -b; fi
> > +     if [ -n "$(findstring nowarn,$(MAKECMDGOALS))" ]; then \
> > +       ./configure ${CONF_TARGET_FLAG} -n -b; fi
> > +     if [ -n "$(findstring lzo,$(MAKECMDGOALS))" ]; then \
> > +       ./configure -x lzo ${CONF_TARGET_FLAG} -w -b; fi
> > +     if [ -n "$(findstring snappy,$(MAKECMDGOALS))" ]; then \
> > +       ./configure -x snappy ${CONF_TARGET_FLAG} -w -b; fi
> > +     if [ -n "$(findstring zstd,$(MAKECMDGOALS))" ]; then \
> > +       ./configure -x zstd ${CONF_TARGET_FLAG} -w -b; fi
> > +     if [ -n "$(findstring valgrind,$(MAKECMDGOALS))" ]; then \
> > +       ./configure -x valgrind ${CONF_TARGET_FLAG} -w -b; fi
> >       @$(MAKE) gdb_merge
>
> Nice, I didn't think of this way.
>
> But some superfluous logs are emitted.
>
> $ make -j 8 warn lzo snappy zstd
> if [ -n "warn" ]; then \
>   ./configure  -w -b; fi
> TARGET: X86_64
>  CRASH: 8.0.0++
>    GDB: 10.2
>
> if [ -n "" ]; then \
>   ./configure  -W -b; fi
> if [ -n "" ]; then \
>   ./configure  -n -b; fi
> if [ -n "lzo" ]; then \
>   ./configure -x lzo  -w -b; fi
> TARGET: X86_64
>  CRASH: 8.0.0++
>    GDB: 10.2
>
> if [ -n "snappy" ]; then \
>   ./configure -x snappy  -w -b; fi
> TARGET: X86_64
>  CRASH: 8.0.0++
>    GDB: 10.2
>
> if [ -n "zstd" ]; then \
>   ./configure -x zstd  -w -b; fi
> TARGET: X86_64
>  CRASH: 8.0.0++
>    GDB: 10.2
>
> if [ -n "" ]; then \
>   ./configure -x valgrind  -w -b; fi
> cc -c -g -DX86_64 -DLZO -DSNAPPY -DZSTD -DGDB_10_2  build_data.c -Wall -O2 -Wstrict-prototypes -Wmissing-prototypes -fstack-protector -Wformat-security
> cc -c -g -DX86_64 -DLZO -DSNAPPY -DZSTD -DGDB_10_2  diskdump.c -Wall -O2 -Wstrict-prototypes -Wmissing-prototypes -fstack-protector -Wformat-security
> ar -rs crashlib.a main.o tools.o global_data.o memory.o filesys.o help.o task.o build_data.o kernel.o test.o gdb_interface.o net.o dev.o bpf.o printk.o alpha.o x86.o ppc.o ia64.o s390.o s390x.o s390dbf.o ppc64.o x86_64.o arm.o arm64.o mips.o mips64.o sparc64.o extensions.o remote.o va_server.o va_server_v1.o symbols.o cmdline.o lkcd_common.o lkcd_v1.o lkcd_v2_v3.o lkcd_v5.o lkcd_v7.o lkcd_v8.o lkcd_fix_mem.o s390_dump.o netdump.o diskdump.o makedumpfile.o xendump.o lkcd_x86_trace.o unwind_v1.o unwind_v2.o unwind_v3.o unwind_x86_32_64.o unwind_arm.o xen_hyper.o xen_hyper_command.o xen_hyper_global_data.o xen_hyper_dump_tables.o kvmdump.o qemu.o qemu-load.o sadump.o ipcs.o ramdump.o vmware_vmss.o vmware_guestdump.o xen_dom0.o kaslr_helper.o
>   CXXLD  gdb
> make: 'lzo' is up to date.
> make: 'snappy' is up to date.
> make: 'zstd' is up to date.
>
>
> With "@if" and "configure -q", we can reduce the former half ones, but

I agree with "@if" and "configure -q", which are already integrated in
the v2 patch.

> also multiple executions of configure can be removed with this way.
>
> +ifeq ($(findstring warn,$(MAKECMDGOALS)),warn)
> +CONF_TARGET_FLAG += -w
> +endif
> +ifeq ($(findstring Warn,$(MAKECMDGOALS)),Warn)
> +CONF_TARGET_FLAG += -W
> +endif

I agree with your idea, but I didn't succeed in this way,
when making CONF_TARGET_FLAG += -W in
the makefile receipt as follows, I couldn't get the value
of ${CONF_TARGET_FLAG}:

config: make_configure
    ifeq ($(findstring warn,$(MAKECMDGOALS)),warn)
    CONF_TARGET_FLAG += -w
    endif
    ifeq ($(findstring Warn,$(MAKECMDGOALS)),Warn)
    CONF_TARGET_FLAG += -W
    endif
    ....
    @echo ${CONF_TARGET_FLAG}      <------- output nothing

> ...
>
> warn: all
>
>
> Warn: all
>
> ...
>
> What do you think?
> But even with this way, "make: 'lzo' is up to date." is still emitted.
>
> $ make -j 8 warn lzo snappy zstd
> TARGET: X86_64
>  CRASH: 8.0.0++
>    GDB: 10.2
>
> cc -c -g -DX86_64 -DLZO -DSNAPPY -DZSTD -DGDB_10_2  build_data.c -Wall -O2 -Wstrict-prototypes -Wmissing-prototypes -fstack-protector -Wformat-security
> cc -c -g -DX86_64 -DLZO -DSNAPPY -DZSTD -DGDB_10_2  diskdump.c -Wall -O2 -Wstrict-prototypes -Wmissing-prototypes -fstack-protector -Wformat-security
> ar -rs crashlib.a main.o tools.o global_data.o memory.o filesys.o help.o task.o build_data.o kernel.o test.o gdb_interface.o net.o dev.o bpf.o printk.o alpha.o x86.o ppc.o ia64.o s390.o s390x.o s390dbf.o ppc64.o x86_64.o arm.o arm64.o mips.o mips64.o sparc64.o extensions.o remote.o va_server.o va_server_v1.o symbols.o cmdline.o lkcd_common.o lkcd_v1.o lkcd_v2_v3.o lkcd_v5.o lkcd_v7.o lkcd_v8.o lkcd_fix_mem.o s390_dump.o netdump.o diskdump.o makedumpfile.o xendump.o lkcd_x86_trace.o unwind_v1.o unwind_v2.o unwind_v3.o unwind_x86_32_64.o unwind_arm.o xen_hyper.o xen_hyper_command.o xen_hyper_global_data.o xen_hyper_dump_tables.o kvmdump.o qemu.o qemu-load.o sadump.o ipcs.o ramdump.o vmware_vmss.o vmware_guestdump.o xen_dom0.o kaslr_helper.o
>   CXXLD  gdb
> make: 'lzo' is up to date.
> make: 'snappy' is up to date.
> make: 'zstd' is up to date.
>
> Is there any way not to print these messages?
>
Please see the V2 patch, which won't output "is up to date" anymore.

Thanks,
Tao Liu

> Thanks,
> Kazu
>
> >
> > -Warn: make_configure
> > -     @./configure ${CONF_TARGET_FLAG} -W -b
> > -     @$(MAKE) gdb_merge
> > +warn: config
> > +
> >
> > -nowarn: make_configure
> > -     @./configure ${CONF_TARGET_FLAG} -n -b
> > -     @$(MAKE) gdb_merge
> > +Warn: config
> > +
> >
> > -lzo: make_configure
> > -     @./configure -x lzo ${CONF_TARGET_FLAG} -w -b
> > -     @$(MAKE) gdb_merge
> > +nowarn: config
> > +
> >
> > -snappy: make_configure
> > -     @./configure -x snappy ${CONF_TARGET_FLAG} -w -b
> > -     @$(MAKE) gdb_merge
> > +lzo: config
> > +
> >
> > -zstd: make_configure
> > -     @./configure -x zstd ${CONF_TARGET_FLAG} -w -b
> > -     @$(MAKE) gdb_merge
> > +snappy: config
> > +
> >
> > -valgrind: make_configure
> > -     @./configure -x valgrind ${CONF_TARGET_FLAG} -w -b
> > -     @$(MAKE) gdb_merge
> > +zstd: config
> > +
> > +
> > +valgrind: config
> > +
> >
> >  main.o: ${GENERIC_HFILES} main.c
> >       ${CC} -c ${CRASH_CFLAGS} main.c ${WARNING_OPTIONS} ${WARNING_ERROR}
> > --
> > 2.33.1
> >
> > --
> > Crash-utility mailing list
> > Crash-utility@xxxxxxxxxx
> > https://listman.redhat.com/mailman/listinfo/crash-utility
>


--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/crash-utility




[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux