mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-09-04 18:49:41 +00:00

Build breaks when executing make with run_tests for sub-folders under powerpc. This is because, CFLAGS and GIT_VERSION macros are defined in Makefile of toplevel powerpc folder. make: Entering directory '/home/maddy/linux/tools/testing/selftests/powerpc/mm' gcc hugetlb_vs_thp_test.c ../harness.c ../utils.c -o /home/maddy/selftest_output//hugetlb_vs_thp_test hugetlb_vs_thp_test.c:6:10: fatal error: utils.h: No such file or directory 6 | #include "utils.h" | ^~~~~~~~~ compilation terminated. Fix this by adding the flags.mk in each sub-folder Makefile. Also remove the CFLAGS and GIT_VERSION macros from powerpc/ folder Makefile since the same is definied in flags.mk Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20240229093711.581230-3-maddy@linux.ibm.com
44 lines
1.0 KiB
Makefile
44 lines
1.0 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
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-hwbreak
|
|
TESTS_64 += ptrace-perf-hwbreak
|
|
TESTS_64 += ptrace-pkey
|
|
TESTS_64 += ptrace-syscall
|
|
TESTS_64 += ptrace-tar
|
|
TESTS_64 += ptrace-vsx
|
|
|
|
TESTS += ptrace-gpr
|
|
|
|
TEST_GEN_PROGS := $(TESTS) $(TESTS_64)
|
|
|
|
LOCAL_HDRS += $(patsubst %,$(selfdir)/powerpc/ptrace/%,$(wildcard *.h))
|
|
|
|
top_srcdir = ../../../../..
|
|
include ../../lib.mk
|
|
include ../flags.mk
|
|
|
|
TM_TESTS := $(patsubst %,$(OUTPUT)/%,$(TM_TESTS))
|
|
TESTS_64 := $(patsubst %,$(OUTPUT)/%,$(TESTS_64))
|
|
|
|
$(TESTS_64): CFLAGS += -m64
|
|
$(TM_TESTS): CFLAGS += -I../tm -mhtm
|
|
|
|
CFLAGS += $(KHDR_INCLUDES) -fno-pie
|
|
|
|
$(OUTPUT)/ptrace-gpr: ptrace-gpr.S
|
|
$(OUTPUT)/ptrace-perf-hwbreak: ptrace-perf-asm.S
|
|
$(OUTPUT)/ptrace-pkey $(OUTPUT)/core-pkey: LDLIBS += -pthread
|
|
|
|
$(TEST_GEN_PROGS): ../harness.c ../utils.c ../lib/reg.S
|