Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Michael Ellerman and committed by
Shuah Khan
4c12df63 41ec8cdc

+2 -16
+2 -16
tools/testing/selftests/kcmp/Makefile
··· 1 - uname_M := $(shell uname -m 2>/dev/null || echo not) 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 1 + CC := $(CROSS_COMPILE)$(CC) 11 2 CFLAGS += -I../../../../usr/include/ 12 3 13 - all: 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 4 + all: kcmp_test 19 5 20 6 run_tests: all 21 7 @./kcmp_test || echo "kcmp_test: [FAIL]"