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>
Tue, 12 Aug 2025 03:28:04 +0000 (05:28 +0200)
commit4ba0cac139d1d4d99bc8c884a05ec84ea1446170
tree8d4ea3acc6c332e188218f56fd453189f5aaf2d3
parent48ef6de5b90f3a7911ffc56e0fa31263ade47bde
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