diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2017-02-09 19:56:28 +1100 |
---|---|---|
committer | Shuah Khan <shuahkh@osg.samsung.com> | 2017-02-14 08:02:01 -0700 |
commit | 634ce97cdfa94a0c5444489b656a662fcc344536 (patch) | |
tree | e8552713095ce19d5e8db1bdf5afe155fa53410a /tools | |
parent | 2047f1d8ba287d208272b6e26360d1a53f7ebf7d (diff) | |
download | linux-634ce97cdfa94a0c5444489b656a662fcc344536.tar.bz2 |
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 <mpe@ellerman.id.au>
Tested by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/lib.mk | 4 |
1 files changed, 2 insertions, 2 deletions
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 |