1# SPDX-License-Identifier: GPL-2.0 2 3# A proper top_srcdir is needed by KSFT(lib.mk) 4top_srcdir = $(realpath ../../../../../) 5 6CFLAGS += -I$(top_srcdir)/usr/include/ 7 8TEST_GEN_PROGS := sve-ptrace sve-probe-vls vec-syscfg za-fork za-ptrace 9TEST_GEN_PROGS_EXTENDED := fp-pidbench fpsimd-test \ 10 rdvl-sme rdvl-sve \ 11 sve-test \ 12 ssve-test \ 13 za-test \ 14 vlset 15TEST_PROGS_EXTENDED := fpsimd-stress sve-stress ssve-stress za-stress 16 17# Build with nolibc to avoid effects due to libc's clone() support 18fp-pidbench: fp-pidbench.S asm-utils.o 19 $(CC) -nostdlib $^ -o $@ 20fpsimd-test: fpsimd-test.o asm-utils.o 21 $(CC) -nostdlib $^ -o $@ 22rdvl-sme: rdvl-sme.o rdvl.o 23rdvl-sve: rdvl-sve.o rdvl.o 24sve-ptrace: sve-ptrace.o 25sve-probe-vls: sve-probe-vls.o rdvl.o 26sve-test: sve-test.o asm-utils.o 27 $(CC) -nostdlib $^ -o $@ 28ssve-test: sve-test.S asm-utils.o 29 $(CC) -DSSVE -nostdlib $^ -o $@ 30vec-syscfg: vec-syscfg.o rdvl.o 31vlset: vlset.o 32za-fork: za-fork.o za-fork-asm.o 33 $(CC) -nostdlib -static $^ -o $@ -lgcc 34za-fork.o: za-fork.c 35 $(CC) -c -fno-asynchronous-unwind-tables -fno-ident -s -Os -nostdlib \ 36 -include ../../../../include/nolibc/nolibc.h \ 37 -ffreestanding -Wall $^ -o $@ 38za-test: za-test.o asm-utils.o 39 $(CC) -nostdlib $^ -o $@ 40za-ptrace: za-ptrace.o 41 42include ../../lib.mk 43