Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tools build: Correct link flags for libopenssl

The perf static build reports that the BPF skeleton is disabled due to
the missing libopenssl feature.

Use PKG_CONFIG to determine the link flags for libopenssl. Add
"--static" to the PKG_CONFIG command for static linking.

Fixes: 7678523109d1 ("tools/build: Add a feature test for libopenssl")
Signed-off-by: Leo Yan <leo.yan@arm.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>

authored by

Leo Yan and committed by
Namhyung Kim
5c980ab2 54fcc7f6

+8 -2
+8 -2
tools/build/feature/Makefile
··· 103 103 endif 104 104 endif 105 105 106 + ifeq ($(findstring -static,${LDFLAGS}),-static) 107 + PKG_CONFIG += --static 108 + endif 109 + 106 110 all: $(FILES) 107 111 108 112 __BUILD = $(CC) $(CFLAGS) -MD -Wall -Werror -o $@ $(patsubst %.bin,%.c,$(@F)) $(LDFLAGS) 109 113 BUILD = $(__BUILD) > $(@:.bin=.make.output) 2>&1 110 114 BUILD_BFD = $(BUILD) -DPACKAGE='"perf"' -lbfd -ldl 111 - BUILD_ALL = $(BUILD) -fstack-protector-all -O2 -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lelf -lslang $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -ldl -lz -llzma -lzstd -lssl 115 + BUILD_ALL = $(BUILD) -fstack-protector-all -O2 -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lelf -lslang \ 116 + $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -ldl -lz -llzma -lzstd \ 117 + $(shell $(PKG_CONFIG) --libs --cflags openssl 2>/dev/null) 112 118 113 119 __BUILDXX = $(CXX) $(CXXFLAGS) -MD -Wall -Werror -o $@ $(patsubst %.bin,%.cpp,$(@F)) $(LDFLAGS) 114 120 BUILDXX = $(__BUILDXX) > $(@:.bin=.make.output) 2>&1 ··· 390 384 $(BUILD) -lpfm 391 385 392 386 $(OUTPUT)test-libopenssl.bin: 393 - $(BUILD) -lssl 387 + $(BUILD) $(shell $(PKG_CONFIG) --libs --cflags openssl 2>/dev/null) 394 388 395 389 $(OUTPUT)test-bpftool-skeletons.bin: 396 390 $(SYSTEM_BPFTOOL) version | grep '^features:.*skeletons' \