From b025ddcc8f18de5d69977fb32dda4cc4edc8635b Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Fri, 1 Sep 2023 16:39:41 +0200 Subject: [PATCH] tool/dde_linux: fix create_dummies for GNU Make 4.4 GNU Make 4.4 will pass TARGET to the sub-make of UNDEF_REFS where it can be later used as link TARGET by Genode's build system. Before 4.4 TARGET was undefined in the sub-make leading to the correct result. --- tool/dde_linux/create_dummies | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tool/dde_linux/create_dummies b/tool/dde_linux/create_dummies index e126eede61..7100002ea6 100755 --- a/tool/dde_linux/create_dummies +++ b/tool/dde_linux/create_dummies @@ -154,8 +154,10 @@ endif # LINUX_KERNEL_DIR specified # # Collect undefined references for target # - -UNDEF_REFS := $(sort $(subst `,,$(subst ',,$(shell make -C $(BUILD_DIR) $(TARGET) 2>&1 | grep " undefined reference to " | sed -e "s/.* reference to //")))) +# use 'env - ' to reset environment, especially TARGET because it will be used by Genode's build sytem +# during linking later on and not point to the actual build TARGET (GNU Make 4.4+) +# +UNDEF_REFS := $(sort $(subst `,,$(subst ',,$(shell env - PATH=$(PATH) make -C $(BUILD_DIR) $(TARGET) 2>&1 | grep " undefined reference to " | sed -e "s/.* reference to //")))) define print_file_header echo "/*" > $(2);