History

kbuild: add CONFIG_ASM_MODVERSIONS

Add CONFIG_ASM_MODVERSIONS. This allows to remove one if-conditional nesting in scripts/Makefile.build. scripts/Makefile.build is run every time Kbuild descends into a sub-directory. So, I want to avoid $(wildcard ...) evaluation where possible although computing $(wildcard ...) is so cheap that it may not make measurable performance difference.

Masahiro Yamada committed 7 years ago

Commit 2ff2b7e1 parent a564bde14 files · +27 −6Browse files

Showing the changes to scripts (1 of 14 files). Show all

Unified · Split

scripts/Makefile.build+1−6
@@ -349,11 +349,7 @@ $(obj)/%.s: $(src)/%.S FORCE · 348 unmodified lines
349349 quiet_cmd_as_o_S = AS $(quiet_modtag) $@
350350 cmd_as_o_S = $(CC) $(a_flags) -c -o $@ $<
351351
352−ifdef CONFIG_MODVERSIONS
353−
354−ASM_PROTOTYPES := $(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/asm-prototypes.h)
355−
356−ifneq ($(ASM_PROTOTYPES),)
352+ifdef CONFIG_ASM_MODVERSIONS
357353
358354 # versioning matches the C process described above, with difference that
359355 # we parse asm-prototypes.h C header to get function definitions.
@@ -369,7 +365,6 @@ cmd_modversions_S = \ · 9 unmodified lines
369365 rm -f $(@D)/.tmp_$(@F:.o=.ver); \
370366 fi
371367 endif
372−endif
373368
374369 $(obj)/%.o: $(src)/%.S $(objtool_dep) FORCE
375370 $(call if_changed_rule,as_o_S)