diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2015-03-04 21:41:31 +1100 |
---|---|---|
committer | Shuah Khan <shuahkh@osg.samsung.com> | 2015-03-19 15:16:51 -0600 |
commit | 84f887bfb930e7fbc01c060edd68c7cc6e2b824b (patch) | |
tree | 4eee03c4146aa2174e4b90b4098c0875ecb08f26 /tools/testing/selftests/lib.mk | |
parent | 6faeeea44b84ce24fc6c1f1beb07ee5de9885dc8 (diff) | |
download | op-kernel-dev-84f887bfb930e7fbc01c060edd68c7cc6e2b824b.zip op-kernel-dev-84f887bfb930e7fbc01c060edd68c7cc6e2b824b.tar.gz |
selftests: Set CC using CROSS_COMPILE once in lib.mk
This avoids repeating the logic in every Makefile. We mimic the
top-level Makefile and use $(CROSS_COMPILE)gcc.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Diffstat (limited to 'tools/testing/selftests/lib.mk')
-rw-r--r-- | tools/testing/selftests/lib.mk | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk index 0baf7d3..2194155 100644 --- a/tools/testing/selftests/lib.mk +++ b/tools/testing/selftests/lib.mk @@ -1,3 +1,7 @@ +# This mimics the top-level Makefile. We do it explicitly here so that this +# Makefile can operate with or without the kbuild infrastructure. +CC := $(CROSS_COMPILE)gcc + define RUN_TESTS @for TEST in $(TEST_PROGS); do \ (./$$TEST && echo "selftests: $$TEST [PASS]") || echo "selftests: $$TEST [FAIL]"; \ |