linux-stable/arch
Masahiro Yamada 2367b02642 m68k: Optimize cc-option calls for cpuflags-y
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 <masahiroy@kernel.org>
Acked-by: Greg Ungerer <gerg@linux-m68k.org>
Link: https://lore.kernel.org/r/20200526123810.301667-3-masahiroy@kernel.org
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2020-07-13 11:39:13 +02:00
..
alpha Kbuild updates for v5.8 (2nd) 2020-06-13 13:29:16 -07:00
arc treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
arm ARM: OMAP fixes for v5.8 2020-06-28 14:57:14 -07:00
arm64 ARM: SoC fixes for v5.8 2020-06-28 14:55:18 -07:00
c6x
csky maccess: rename probe_kernel_{read,write} to copy_{from,to}_kernel_nofault 2020-06-17 10:57:41 -07:00
h8300
hexagon treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
ia64 Merge branch 'hch' (maccess patches from Christoph Hellwig) 2020-06-18 12:35:51 -07:00
m68k m68k: Optimize cc-option calls for cpuflags-y 2020-07-13 11:39:13 +02:00
microblaze
mips All bugfixes except for a couple cleanup patches. 2020-06-23 11:01:16 -07:00
nds32 maccess: rename probe_kernel_{read,write} to copy_{from,to}_kernel_nofault 2020-06-17 10:57:41 -07:00
nios2 nios2 update for v5.8-rc1 2020-06-12 11:55:11 -07:00
openrisc openrisc: fix boot oops when DEBUG_VM is enabled 2020-06-26 00:27:36 -07:00
parisc maccess: make get_kernel_nofault() check for minimal type compatibility 2020-06-18 12:10:37 -07:00
powerpc powerpc/kvm/book3s64: Fix kernel crash with nested kvm & DEBUG_VIRTUAL 2020-06-22 21:55:45 +10:00
riscv riscv: Fixup __vdso_gettimeofday broke dynamic ftrace 2020-06-25 15:38:39 -07:00
s390 s390/debug: avoid kernel warning on too large number of pages 2020-06-23 14:05:55 +02:00
sh maccess: rename probe_kernel_address to get_kernel_nofault 2020-06-18 11:14:40 -07:00
sparc treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
um maccess: rename probe_kernel_{read,write} to copy_{from,to}_kernel_nofault 2020-06-17 10:57:41 -07:00
unicore32
x86 A single Kbuild dependency fix. 2020-06-28 11:58:14 -07:00
xtensa
.gitignore
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00