[lkml]   [2020]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 3/4] m68k: optimize cc-option calls for cpuflags-y
On Tue, May 26, 2020 at 2:38 PM Masahiro Yamada <> wrote:
> arch/m68k/Makefile computes lots of unneeded cc-option calls.
> For example, if CONFIG_M5441x is not defined, there is not point in
> evaluating the following compiler flag.
> cpuflags-$(CONFIG_M5441x) := $(call cc-option,-mcpu=54455,-mcfv4e)
> The result is set to cpuflags-, then thrown away.
> The right hand side of ':=' is immediately expanded. Hence, all of the
> 16 calls for cc-option are evaluated. This is expensive since cc-option
> invokes the compiler. This occurs even if you are not attempting to
> build anything, like 'make ARCH=m68k help'.
> Use '=' to expand the value _lazily_. The evaluation for cc-option is
> delayed until $(cpuflags-y) is expanded. So, the cc-option test happens
> just once at most.
> This commit mimics tune-y of arch/arm/Makefile.
> Signed-off-by: Masahiro Yamada <>

Reviewed-by: Geert Uytterhoeven <>
i.e. will queue in the m68k for-v5.9 branch.



Geert Uytterhoeven -- There's lots of Linux beyond ia32 --

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

 \ /
  Last update: 2020-06-29 21:09    [W:0.083 / U:2.576 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site