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

selftests: vDSO - fix to exclude x86 test on non-x86 platforms

Fix to exclude vdso_standalone_test_x86 test from building on non-x86
platforms. In addition, fix it to use TEST_GEN_PROGS which is the right
variable to use for generated programs. TEST_PROGS is for shell scripts.

Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>

+9 -4
+9 -4
tools/testing/selftests/vDSO/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 include ../lib.mk 3 3 4 + uname_M := $(shell uname -m 2>/dev/null || echo not) 5 + ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/) 6 + 7 + TEST_GEN_PROGS := $(OUTPUT)/vdso_test 8 + ifeq ($(ARCH),x86) 9 + TEST_GEN_PROGS += $(OUTPUT)/vdso_standalone_test_x86 10 + endif 11 + 4 12 ifndef CROSS_COMPILE 5 13 CFLAGS := -std=gnu99 6 14 CFLAGS_vdso_standalone_test_x86 := -nostdlib -fno-asynchronous-unwind-tables -fno-stack-protector ··· 16 8 LDLIBS += -lgcc_s 17 9 endif 18 10 19 - TEST_PROGS := $(OUTPUT)/vdso_test $(OUTPUT)/vdso_standalone_test_x86 20 - 21 - all: $(TEST_PROGS) 11 + all: $(TEST_GEN_PROGS) 22 12 $(OUTPUT)/vdso_test: parse_vdso.c vdso_test.c 23 13 $(OUTPUT)/vdso_standalone_test_x86: vdso_standalone_test_x86.c parse_vdso.c 24 14 $(CC) $(CFLAGS) $(CFLAGS_vdso_standalone_test_x86) \ 25 15 vdso_standalone_test_x86.c parse_vdso.c \ 26 16 -o $@ 27 17 28 - EXTRA_CLEAN := $(TEST_PROGS) 29 18 endif