Skip to content

Commit f42596c

Browse files
Leo-Yannamhyung
authored andcommitted
perf: build: Link lib 'zstd' for static build
When build static perf, Makefile reports the error: Makefile.config:480: No libdw DWARF unwind found, Please install elfutils-devel/libdw-dev >= 0.158 and/or set LIBDW_DIR The libdw has been installed on the system, but the build system fails to build the feature detecting binary 'test-libdw-dwarf-unwind'. The failure is caused by missing to link the lib 'zstd'. Link lib 'zstd' for the static build, in the end, the dwarf feature can be enabled in the static perf. Signed-off-by: Leo Yan <[email protected]> Tested-by: Ian Rogers <[email protected]> Cc: [email protected] Cc: James Clark <[email protected]> Cc: Thomas Richter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Namhyung Kim <[email protected]>
1 parent 91b6a53 commit f42596c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tools/build/feature/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ $(OUTPUT)test-libopencsd.bin:
170170

171171
DWARFLIBS := -ldw
172172
ifeq ($(findstring -static,${LDFLAGS}),-static)
173-
DWARFLIBS += -lelf -lz -llzma -lbz2
173+
DWARFLIBS += -lelf -lz -llzma -lbz2 -lzstd
174174

175175
LIBDW_VERSION := $(shell $(PKG_CONFIG) --modversion libdw)
176176
LIBDW_VERSION_1 := $(word 1, $(subst ., ,$(LIBDW_VERSION)))

tools/perf/Makefile.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ ifdef LIBDW_DIR
152152
endif
153153
DWARFLIBS := -ldw
154154
ifeq ($(findstring -static,${LDFLAGS}),-static)
155-
DWARFLIBS += -lelf -ldl -lz -llzma -lbz2
155+
DWARFLIBS += -lelf -ldl -lz -llzma -lbz2 -lzstd
156156

157157
LIBDW_VERSION := $(shell $(PKG_CONFIG) --modversion libdw)
158158
LIBDW_VERSION_1 := $(word 1, $(subst ., ,$(LIBDW_VERSION)))

0 commit comments

Comments
 (0)