aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/powerpc/Makefile
diff options
context:
space:
mode:
authorGravatar Madhavan Srinivasan <maddy@linux.ibm.com> 2024-02-29 15:07:11 +0530
committerGravatar Michael Ellerman <mpe@ellerman.id.au> 2024-04-29 23:54:42 +1000
commit108e5e683333615023265a9a73a29d4c2fa16c70 (patch)
tree1e286fdfa47dec376be4fa1245e0ce21a40e92fa /tools/testing/selftests/powerpc/Makefile
parentselftests/powerpc: Add flags.mk to support pmu buildable (diff)
downloadlinux-108e5e683333615023265a9a73a29d4c2fa16c70.tar.gz
linux-108e5e683333615023265a9a73a29d4c2fa16c70.tar.bz2
linux-108e5e683333615023265a9a73a29d4c2fa16c70.zip
selftests/powerpc: make sub-folders buildable on their own
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
Diffstat (limited to 'tools/testing/selftests/powerpc/Makefile')
-rw-r--r--tools/testing/selftests/powerpc/Makefile7
1 files changed, 1 insertions, 6 deletions
diff --git a/tools/testing/selftests/powerpc/Makefile b/tools/testing/selftests/powerpc/Makefile
index c376151982c4..2f299fd04d2d 100644
--- a/tools/testing/selftests/powerpc/Makefile
+++ b/tools/testing/selftests/powerpc/Makefile
@@ -7,12 +7,6 @@ ARCH := $(shell echo $(ARCH) | sed -e s/ppc.*/powerpc/)
ifeq ($(ARCH),powerpc)
-GIT_VERSION = $(shell git describe --always --long --dirty || echo "unknown")
-
-CFLAGS := -std=gnu99 -O2 -Wall -Werror -DGIT_VERSION='"$(GIT_VERSION)"' -I$(CURDIR)/include $(CFLAGS)
-
-export CFLAGS
-
SUB_DIRS = alignment \
benchmarks \
cache_shape \
@@ -46,6 +40,7 @@ $(SUB_DIRS):
BUILD_TARGET=$(OUTPUT)/$@; mkdir -p $$BUILD_TARGET; $(MAKE) OUTPUT=$$BUILD_TARGET -k -C $@ all
include ../lib.mk
+include ./flags.mk
override define RUN_TESTS
+@for TARGET in $(SUB_DIRS); do \