]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
perf: make libraries for install_headers configurable
authorPeter Marko <peter.marko@siemens.com>
Tue, 5 May 2026 09:46:01 +0000 (11:46 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 7 May 2026 10:19:26 +0000 (11:19 +0100)
Older kernels don't support install_headers for all libraries.
For instance kernel 6.1 fails for two (api and symbol) with:
make: *** No rule to make target 'install_headers'.  Stop.

Also sort the list when moving to variable.

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-kernel/perf/perf.bb

index f24b44954e7401dfa2b805e23719f7d35cc3c1af..c3ef25fd999995ad18d5b6084146f2e288b7e3e1 100644 (file)
@@ -169,6 +169,9 @@ PERF_EXTRA_LDFLAGS:mipsarchn32el = "-m elf32ltsmipn32"
 PERF_EXTRA_LDFLAGS:mipsarchn64eb = "-m elf64btsmip"
 PERF_EXTRA_LDFLAGS:mipsarchn64el = "-m elf64ltsmip"
 
+# override for older kernels which don't support installing headers for all libraries
+REPRODUCIBLE_HEADERS_TARGETS ?= "api bpf perf subcmd symbol"
+
 do_compile() {
        # Linux kernel build system is expected to do the right thing
        unset CFLAGS
@@ -179,7 +182,7 @@ do_compile() {
        # There are two copies of internal headers such as:
        # libperf/include/internal/xyarray.h and tools/lib/perf/include/internal/xyarray.h
        # For reproducibile binaries, we need to find one copy, hence force libXXX to be created first
-       for i in api bpf subcmd symbol perf
+       for i in ${REPRODUCIBLE_HEADERS_TARGETS}
        do
                oe_runmake -C ${S}/tools/lib/$i DESTDIR=${B}/lib$i prefix= install_headers V=1
        done