linux/arch/m68k
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
..
68000 mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
amiga mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
apollo mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
atari mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
bvme6000 mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
coldfire m68knommu: collection of fixes for v5.8 2020-06-11 12:50:54 -07:00
configs m68knommu: collection of fixes for v5.8 2020-06-11 12:50:54 -07:00
emu block: simplify queue allocation 2020-03-27 10:23:43 -06:00
fpsp040 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hp300 treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
ifpsp060 scripts/spelling.txt: add regsiter -> register spelling mistake 2017-05-08 17:15:13 -07:00
include m68knommu: collection of fixes for v5.8 2020-06-11 12:50:54 -07:00
kernel mmap locking API: use coccinelle to convert mmap_sem rwsem call sites 2020-06-09 09:39:14 -07:00
lib m68k: convert to csum_and_copy_from_user() 2020-05-29 16:11:49 -04:00
mac mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
math-emu treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 74 2019-05-24 17:36:47 +02:00
mm mmap locking API: convert mmap_sem API comments 2020-06-09 09:39:14 -07:00
mvme16x mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
mvme147 mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
q40 mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
sun3 m68k: sun3: Descend to prom from arch/m68k/sun3 2020-07-13 11:39:12 +02:00
sun3x mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
tools/amiga m68k: tools: Replace zero-length array with flexible-array member 2020-05-25 10:55:56 +02:00
install.sh
Kbuild m68k: sun3: Descend to prom from arch/m68k/sun3 2020-07-13 11:39:12 +02:00
Kconfig m68k: Implement copy_thread_tls() 2020-01-14 10:43:38 +01:00
Kconfig.bus m68k: Fix Kconfig indentation 2020-03-09 11:12:19 +01:00
Kconfig.cpu treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Kconfig.debug m68k: Fix Kconfig indentation 2020-03-09 11:12:19 +01:00
Kconfig.devices treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Kconfig.machine treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile m68k: Optimize cc-option calls for cpuflags-y 2020-07-13 11:39:13 +02:00