From 61ba075d9911d2a6db181fbb5602762a24d5d0a9 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Thu, 18 Apr 2024 18:15:33 -0300 Subject: Revert "tools headers: Remove almost unused copy of uapi/stat.h, add few conditional defines" This reverts commit a672af9139a843eb7a48fd7846bb6df8f81b5f86. By now it is not used for building tools/perf, but Stephen Rothwell reported that when building on a O= directory that had been built with torvalds/master and this perf build command line: $ make -C tools/perf -f Makefile.perf -s -O -j60 O=/home/sfr/next/perf NO_BPF_SKEL=1 If we then merge perf-tools-next, as he did for linux-next, then we end up with a build failure for libbpf: PERF_VERSION = 6.9.rc3.g42c4635c8dee make[3]: *** No rule to make target '/home/sfr/next/next/tools/include/uapi/linux/stat.h', needed by '/home/sfr/next/perf/libbpf/staticobjs/libbpf.o'. Stop. make[2]: *** [Makefile:157: /home/sfr/next/perf/libbpf/staticobjs/libbpf-in.o] Error 2 make[1]: *** [Makefile.perf:892: /home/sfr/next/perf/libbpf/libbpf.a] Error 2 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile.perf:264: sub-make] Error 2 This needs to be further investigated to figure out how to check if libbpf really needs something that is in that tools/include/uapi/linux/stat.h file and if not to remove that file in a way that we don't break the build in any situation, to avoid requiring doing a 'make clean'. Reported-by: Stephen Rothwell Tested-by: Stephen Rothwell # PowerPC le incermental build Cc: Namhyung Kim Link: https://lore.kernel.org/lkml/20240413124340.4d48c6d8@canb.auug.org.au Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/check-headers.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'tools/perf/check-headers.sh') diff --git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh index 95a3a404bc6f..9c84fd049070 100755 --- a/tools/perf/check-headers.sh +++ b/tools/perf/check-headers.sh @@ -16,6 +16,7 @@ FILES=( "include/uapi/linux/in.h" "include/uapi/linux/perf_event.h" "include/uapi/linux/seccomp.h" + "include/uapi/linux/stat.h" "include/linux/bits.h" "include/vdso/bits.h" "include/linux/const.h" -- cgit v1.2.3