From 6326774056b62ab8d0182400c90169009c8e19d9 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 1 Jun 2022 17:37:44 +0200 Subject: [PATCH] mk: trigger CUSTOM_TARGET_DEPS from 'all' rule Build description files that feature both an actual target and CUSTOM_TARGET_DEPS happen to re-link the target each time whenever one of the CUSTOM_TARGET_DEPS is phony, e.g., gems/src/app/menu_view/. The re-linking of the actual target is of course not desired. By triggering the creation of CUSTOM_TARGET_DEPS from 'all:' instead of '$(TARGET)', the specified files do not implicitly become link dependencies of the target. Issue #3972 --- repos/base/mk/prg.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/base/mk/prg.mk b/repos/base/mk/prg.mk index 6636d7f99d..3285274a33 100644 --- a/repos/base/mk/prg.mk +++ b/repos/base/mk/prg.mk @@ -183,7 +183,7 @@ $(LINK_ITEMS) $(TARGET): $(HOST_TOOLS) # # Trigger build of additional program specific targets # -$(TARGET): $(CUSTOM_TARGET_DEPS) +all: $(CUSTOM_TARGET_DEPS) LD_CMD += -Wl,--whole-archive -Wl,--start-group LD_CMD += $(LINK_ITEMS_BRIEF)