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, 6 May 2025 19:33:52 +0000 (21:33 +0200)
commite13cf773309b6c0f0b9340de14654d33b6e3acd2
treeb7b4544ddfcf0e8e0527b3c391936b648754afcb
parent100f446dfe6ef71169e3eeeff4f0b35a658098f6
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