diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2014-12-02 00:52:08 -0500 |
---|---|---|
committer | Shuah Khan <shuahkh@osg.samsung.com> | 2014-12-02 15:53:24 -0500 |
commit | 4c12df63f7ff27fe2e14f243a6906ad84e641964 (patch) | |
tree | f047f743d2f1a56a7bbf5b136464fe9e560fd744 | |
parent | 41ec8cdcfaf98db194807ac38a685b52387604c3 (diff) |
selftests/kcmp: Always try to build the test
Don't prevent the test building on non-x86. Just try and build it and
let the chips fall where they may.
Add support for CROSS_COMPILE while we're at it. Also we don't need a
custom rule for building kcmp_test.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Christopher Covington <cov@codeaurora.org>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
-rw-r--r-- | tools/testing/selftests/kcmp/Makefile | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/tools/testing/selftests/kcmp/Makefile b/tools/testing/selftests/kcmp/Makefile index 4f00c0524501..ff0eefdc6ceb 100644 --- a/tools/testing/selftests/kcmp/Makefile +++ b/tools/testing/selftests/kcmp/Makefile | |||
@@ -1,21 +1,7 @@ | |||
1 | uname_M := $(shell uname -m 2>/dev/null || echo not) | 1 | CC := $(CROSS_COMPILE)$(CC) |
2 | ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/) | ||
3 | ifeq ($(ARCH),i386) | ||
4 | ARCH := x86 | ||
5 | CFLAGS := -DCONFIG_X86_32 -D__i386__ | ||
6 | endif | ||
7 | ifeq ($(ARCH),x86_64) | ||
8 | ARCH := x86 | ||
9 | CFLAGS := -DCONFIG_X86_64 -D__x86_64__ | ||
10 | endif | ||
11 | CFLAGS += -I../../../../usr/include/ | 2 | CFLAGS += -I../../../../usr/include/ |
12 | 3 | ||
13 | all: | 4 | all: kcmp_test |
14 | ifeq ($(ARCH),x86) | ||
15 | gcc $(CFLAGS) kcmp_test.c -o kcmp_test | ||
16 | else | ||
17 | echo "Not an x86 target, can't build kcmp selftest" | ||
18 | endif | ||
19 | 5 | ||
20 | run_tests: all | 6 | run_tests: all |
21 | @./kcmp_test || echo "kcmp_test: [FAIL]" | 7 | @./kcmp_test || echo "kcmp_test: [FAIL]" |