Commit 3c20a1d0 authored by Michael Ellerman's avatar Michael Ellerman

selftests/powerpc/ptrace: Split CFLAGS better

Currently all ptrace tests are built 64-bit and with TM enabled.

Only the TM tests need TM enabled, so split those out into a separate
variable so that can be specified precisely.

Split the rest of the tests into a variable, and add -m64 to CFLAGS for
those tests, so that in a subsequent patch some tests can be made to
build 32-bit.
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220627140239.2464900-3-mpe@ellerman.id.au
parent cf4baafd
# SPDX-License-Identifier: GPL-2.0
TEST_GEN_PROGS := ptrace-gpr ptrace-tm-gpr ptrace-tm-spd-gpr \
ptrace-tar ptrace-tm-tar ptrace-tm-spd-tar ptrace-vsx ptrace-tm-vsx \
ptrace-tm-spd-vsx ptrace-tm-spr ptrace-hwbreak ptrace-pkey core-pkey \
perf-hwbreak ptrace-syscall ptrace-perf-hwbreak
TM_TESTS := ptrace-tm-gpr
TM_TESTS += ptrace-tm-spd-gpr
TM_TESTS += ptrace-tm-spd-tar
TM_TESTS += ptrace-tm-spd-vsx
TM_TESTS += ptrace-tm-spr
TM_TESTS += ptrace-tm-tar
TM_TESTS += ptrace-tm-vsx
TESTS_64 := $(TM_TESTS)
TESTS_64 += core-pkey
TESTS_64 += perf-hwbreak
TESTS_64 += ptrace-gpr
TESTS_64 += ptrace-hwbreak
TESTS_64 += ptrace-perf-hwbreak
TESTS_64 += ptrace-pkey
TESTS_64 += ptrace-syscall
TESTS_64 += ptrace-tar
TESTS_64 += ptrace-vsx
TEST_GEN_PROGS := $(TESTS_64)
LOCAL_HDRS += $(patsubst %,$(selfdir)/powerpc/ptrace/%,$(wildcard *.h))
top_srcdir = ../../../../..
include ../../lib.mk
CFLAGS += -m64 -I../../../../../usr/include -I../tm -mhtm -fno-pie
TM_TESTS := $(patsubst %,$(OUTPUT)/%,$(TM_TESTS))
TESTS_64 := $(patsubst %,$(OUTPUT)/%,$(TESTS_64))
$(TESTS_64): CFLAGS += -m64
$(TM_TESTS): CFLAGS += -I../tm -mhtm
CFLAGS += -I../../../../../usr/include -fno-pie
$(OUTPUT)/ptrace-pkey $(OUTPUT)/core-pkey: LDLIBS += -pthread
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment