From e83fd0f637c46d4abb0b0cb9d057268a018122b0 Mon Sep 17 00:00:00 2001 From: Namhyung Kim Date: Mon, 6 Jul 2026 17:03:57 -0700 Subject: [PATCH] perf build: Do not pass -static to dlfilters The recent commit caused a failure in make build-test for static builds. Let's not pass -static the option to dlfilters which is dynamically loaded as it's hard-coded with -shared even for static builds. Tested-by: Leo Yan Cc: Trevor Allison Fixes: e1065ed188cf ("perf build: Add LDFLAGS to dlfilters .so link") Signed-off-by: Namhyung Kim --- 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 2b53d9e0c73b..0031112c036e 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -680,7 +680,7 @@ $(OUTPUT)dlfilters/%.o: dlfilters/%.c include/perf/perf_dlfilter.h .SECONDARY: $(DLFILTERS:.so=.o) $(OUTPUT)dlfilters/%.so: $(OUTPUT)dlfilters/%.o - $(QUIET_LINK)$(CC) $(LDFLAGS) $(EXTRA_CFLAGS) -shared -o $@ $< + $(QUIET_LINK)$(CC) $(filter-out -static,$(LDFLAGS)) $(EXTRA_CFLAGS) -shared -o $@ $< ifndef NO_JVMTI LIBJVMTI_IN := $(OUTPUT)jvmti/jvmti-in.o