Re: [PATCH] kbuild: Disable extra debugging info in .s output

From: Masahiro Yamada
Date: Sat Feb 02 2019 - 08:49:05 EST


On Sat, Feb 2, 2019 at 12:12 AM Borislav Petkov <bp@xxxxxxxxx> wrote:
>
> On Fri, Feb 01, 2019 at 08:58:13PM +0900, Masahiro Yamada wrote:
> > Variables assigned with ':=' are evaluated just on parsing Makefile.
> >
> > The scripts/Makefile.build is parsed over and over again,
> > so the compiler is invoked hundreds times to test these four options
> > even when you are not actually building any new objects.
> >
> > It is mitigated by replacing ':=' with '=',
> > but they are still evaluated multiple times when generating asm-offset.
>
> Now that you mention it, how about ?=

'?=' is the same as '=' here.




> disable_extra_cc_dbg ?= $(call cc-option,-gno-as-locview-support)
> disable_extra_cc_dbg += $(call cc-option,-fno-dwarf2-cfi-asm)
> disable_extra_cc_dbg += $(call cc-option,-feliminate-unused-debug-symbols)
> disable_extra_cc_dbg += $(call cc-option,-gno-statement-frontiers)
>
> With it, the slowdown of the incremental build is ~0.2s (on an old laptop):
>
> defconfig without: 9.6128 +- 0.0327 seconds time elapsed ( +- 0.34% )
>
> vs
>
> defconfig with: 9.8483 +- 0.0273 seconds time elapsed ( +- 0.28% )
>
>
> --
> Regards/Gruss,
> Boris.
>
> Good mailing practices for 400: avoid top-posting and trim the reply.



--
Best Regards
Masahiro Yamada