[PATCH v10 01/16] perf build: Link the GTK UI with EXTRA_CFLAGS
From: Arnaldo Carvalho de Melo
Date: Fri Nov 20 2026 - 22:21:23 EST
From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
The GTK objects are compiled with EXTRA_CFLAGS but libperf-gtk.so is
linked with LDFLAGS only, so flags with link-time parts never reach it.
With -fprofile-instr-generate the profiler runtime is missing at link
time. Pass EXTRA_CFLAGS at link time, as the dlfilter rule does.
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/Makefile.perf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 1850ca2eeffe962a..d4b641925ab296db 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -644,7 +644,7 @@ $(GTK_IN): FORCE prepare
$(Q)$(MAKE) $(build)=gtk
$(OUTPUT)libperf-gtk.so: $(GTK_IN) $(PERFLIBS)
- $(QUIET_LINK)$(CC) -o $@ -shared $(LDFLAGS) $(filter %.o,$^) $(GTK_LIBS)
+ $(QUIET_LINK)$(CC) -o $@ -shared $(LDFLAGS) $(EXTRA_CFLAGS) $(filter %.o,$^) $(GTK_LIBS)
$(SCRIPTS) : $(OUTPUT)% : %.sh
$(QUIET_GEN)$(INSTALL) '$<' '$@'
--
2.56.0