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: a8ba798bc8 ("selftests: enable O and KBUILD_OUTPUT")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Tested by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
This commit is contained in:
Michael Ellerman 2017-02-09 19:56:28 +11:00 committed by Shuah Khan
parent 2047f1d8ba
commit 634ce97cdf
1 changed files with 2 additions and 2 deletions

View File

@ -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