perf tools: Pass EXTRA_CFLAGS through to libbpf build again
authorBen Hutchings <benh@debian.org>
Fri, 16 Aug 2024 13:58:04 +0000 (15:58 +0200)
committerSalvatore Bonaccorso <carnil@debian.org>
Fri, 25 Apr 2025 15:07:45 +0000 (17:07 +0200)
commit7c6b11529b0fdddd4671bae4cb9e3af7da8639a9
tree61509ac460e5af6d96a5e823a7c5c1f24cb446da
parent76150dc365a7deea22a8e73933a887bc10ab195e
perf tools: Pass EXTRA_CFLAGS through to libbpf build again

When perf was statically linked to libbpf, any definition of
EXTRA_CFLAGS passed to Makefile.perf propagated to the sub-make of
libbpf.  Since commit 9dabf4003423 ("perf python: Switch module to
linking libraries from building source"), EXTRA_CFLAGS is overridden
to "-fPIC" for the sub-make.

Change to include any user-provided EXTRA_CFLAGS before the "-fPIC"
option.

Fixes: 9dabf4003423 ("perf python: Switch module to linking libraries ...")
Signed-off-by: Ben Hutchings <benh@debian.org>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name perf-tools-pass-extra_cflags-through-to-libbpf-build-again.patch
tools/perf/Makefile.perf