summaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/utils.py
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2020-05-26 15:38:09 +0300
committerGeert Uytterhoeven <geert@linux-m68k.org>2020-07-13 12:39:13 +0300
commit2367b0264294a50cd2cd9d4c1270a9393f32038c (patch)
tree99afce8b274c8e99e1b8634b44b36dde34f89b11 /scripts/gdb/linux/utils.py
parentbd3ff3f1b69cdb315d91fef0fb9512af83ae579b (diff)
downloadlinux-2367b0264294a50cd2cd9d4c1270a9393f32038c.tar.xz
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>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions