Skip to content

Commit d9f78ed

Browse files
committed
kbuild: fix false-positive need-builtin calculation
The current implementation of need-builtin is false-positive, for example, in the following Makefile: obj-m := foo/ obj-y := foo/bar/ ..., where foo/built-in.a is not required. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
1 parent 47801c9 commit d9f78ed

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎scripts/Makefile.build‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,8 @@ targets += $(call intermediate_targets, .asn1.o, .asn1.c .asn1.h) \
487487

488488
PHONY += $(subdir-ym)
489489
$(subdir-ym):
490-
$(Q)$(MAKE) $(build)=$@ need-builtin=$(if $(findstring $@,$(subdir-obj-y)),1)
490+
$(Q)$(MAKE) $(build)=$@ \
491+
need-builtin=$(if $(filter $@/built-in.a, $(subdir-obj-y)),1)
491492

492493
# Add FORCE to the prequisites of a target to force it to be always rebuilt.
493494
# ---------------------------------------------------------------------------

0 commit comments

Comments
 (0)