Skip to contentSkip to conversation

perf build: Do not pass -static to dlfilters

PATCH Applied Namhyung Kim 2 participants 3 messages Jul 7 – Jul 14 perf events

lore
Share & tools
lore

Namhyung Kim

author maintainer
#0 lore raw

PATCH 1/1 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.

Fixes e1065ed188cf ("perf build: Add LDFLAGS to dlfilters .so link")
Cc Trevor Allison <[email protected]>
---
 tools/perf/Makefile.perf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/Makefile.perf +1 -1
index 2b53d9e0c73b3382..0031112c036e830e 100644
@@ -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
Signature · 1 line
2.55.0.rc2.803.g1fd1e6609c-goog
Tested-by on v1 1/1
#1 lore raw
Quoted 7 lines · Namhyung Kim

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.

Fixes e1065ed188cf ("perf build: Add LDFLAGS to dlfilters .so link")
Cc Trevor Allison <[email protected]>
author maintainer Applied
#2 lore raw
In reply to Namhyung Kim
Quoted 5 lines · Namhyung Kim

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.

Applied to perf-tools-next, thanks!

Best regards,
Namhyung