From: Michael Ellerman Date: Thu, 9 Feb 2017 08:56:28 +0000 (+1100) Subject: selftests: Fix the .S and .S -> .o rules X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=634ce97cdfa94a0c5444489b656a662fcc344536;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git selftests: Fix the .S and .S -> .o rules Both these rules incorrectly use $< (first prerequisite) rather than $^ (all prerequisites), meaning they don't work if we're using more than one .S file as input. Switch them to using $^. They also don't include $(CPPFLAGS) and other variables used in the default rules, which breaks targets that require those. Fix that by using the builtin $(COMPILE.S) and $(LINK.S) rules. Fixes: a8ba798bc8ec ("selftests: enable O and KBUILD_OUTPUT") Signed-off-by: Michael Ellerman Tested by: Bamvor Jian Zhang Signed-off-by: Shuah Khan --- diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk index 98841c54763a..ce96d80ad64f 100644 --- a/tools/testing/selftests/lib.mk +++ b/tools/testing/selftests/lib.mk @@ -54,9 +54,9 @@ $(OUTPUT)/%:%.c $(LINK.c) $^ $(LDLIBS) -o $@ $(OUTPUT)/%.o:%.S - $(CC) $(ASFLAGS) -c $< -o $@ + $(COMPILE.S) $^ -o $@ $(OUTPUT)/%:%.S - $(CC) $(ASFLAGS) $< -o $@ + $(LINK.S) $^ $(LDLIBS) -o $@ .PHONY: run_tests all clean install emit_tests