872d11bca9
Some of our tests use VSX or newer VMX instructions, so need to be skipped on older CPUs to avoid SIGILL'ing. Similarly TAR was added in v2.07, and the PMU event used in the stcx fail test only works on Power8 or later. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20200803020719.96114-1-mpe@ellerman.id.au
36 lines
747 B
Makefile
36 lines
747 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
# The loops are all 64-bit code
|
|
CFLAGS += -I$(CURDIR)
|
|
|
|
EXTRA_SOURCES := ../harness.c
|
|
|
|
build_32bit = $(shell if ($(CC) $(CFLAGS) -m32 -o /dev/null memcmp.c >/dev/null 2>&1) then echo "1"; fi)
|
|
|
|
TEST_GEN_PROGS := memcmp_64 strlen
|
|
|
|
$(OUTPUT)/memcmp_64: memcmp.c ../utils.c
|
|
$(OUTPUT)/memcmp_64: CFLAGS += -m64 -maltivec
|
|
|
|
ifeq ($(build_32bit),1)
|
|
$(OUTPUT)/memcmp_32: memcmp.c
|
|
$(OUTPUT)/memcmp_32: CFLAGS += -m32
|
|
|
|
TEST_GEN_PROGS += memcmp_32
|
|
endif
|
|
|
|
$(OUTPUT)/strlen: strlen.c string.c
|
|
|
|
ifeq ($(build_32bit),1)
|
|
$(OUTPUT)/strlen_32: strlen.c
|
|
$(OUTPUT)/strlen_32: CFLAGS += -m32
|
|
|
|
TEST_GEN_PROGS += strlen_32
|
|
endif
|
|
|
|
ASFLAGS = $(CFLAGS)
|
|
|
|
top_srcdir = ../../../../..
|
|
include ../../lib.mk
|
|
|
|
$(TEST_GEN_PROGS): $(EXTRA_SOURCES)
|