From: Ben Hutchings Date: Fri, 16 Aug 2024 13:58:04 +0000 (+0200) Subject: perf tools: Pass EXTRA_CFLAGS through to libbpf build again X-Git-Tag: archive/raspbian/6.12.27-1+rpi1^2~4 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e13cf773309b6c0f0b9340de14654d33b6e3acd2;p=linux.git 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 Gbp-Pq: Topic bugfix/all Gbp-Pq: Name perf-tools-pass-extra_cflags-through-to-libbpf-build-again.patch --- diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index bfa3e6ddb51..a63873fd9f8 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -953,7 +953,7 @@ $(LIBAPI)-clean: $(LIBBPF): FORCE | $(LIBBPF_OUTPUT) $(Q)$(MAKE) -C $(LIBBPF_DIR) FEATURES_DUMP=$(FEATURE_DUMP_EXPORT) \ O= OUTPUT=$(LIBBPF_OUTPUT)/ DESTDIR=$(LIBBPF_DESTDIR) prefix= subdir= \ - EXTRA_CFLAGS="-fPIC" $@ install_headers + EXTRA_CFLAGS="$(EXTRA_CFLAGS) -fPIC" $@ install_headers $(LIBBPF)-clean: $(call QUIET_CLEAN, libbpf)