mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-11 17:10:13 +00:00
tools/build: Add a feature test for libopenssl
It's used by bpftool and the kernel build. Let's add a feature test so that perf can decide what to do based on the availability. Signed-off-by: Namhyung Kim <namhyung@kernel.org>
This commit is contained in:
parent
8f0b4cce44
commit
7678523109
@ -99,7 +99,8 @@ FEATURE_TESTS_BASIC := \
|
||||
libzstd \
|
||||
disassembler-four-args \
|
||||
disassembler-init-styled \
|
||||
file-handle
|
||||
file-handle \
|
||||
libopenssl
|
||||
|
||||
# FEATURE_TESTS_BASIC + FEATURE_TESTS_EXTRA is the complete list
|
||||
# of all feature tests
|
||||
@ -147,7 +148,8 @@ FEATURE_DISPLAY ?= \
|
||||
lzma \
|
||||
bpf \
|
||||
libaio \
|
||||
libzstd
|
||||
libzstd \
|
||||
libopenssl
|
||||
|
||||
#
|
||||
# Declare group members of a feature to display the logical OR of the detection
|
||||
|
||||
@ -67,12 +67,13 @@ FILES= \
|
||||
test-libopencsd.bin \
|
||||
test-clang.bin \
|
||||
test-llvm.bin \
|
||||
test-llvm-perf.bin \
|
||||
test-llvm-perf.bin \
|
||||
test-libaio.bin \
|
||||
test-libzstd.bin \
|
||||
test-clang-bpf-co-re.bin \
|
||||
test-file-handle.bin \
|
||||
test-libpfm4.bin
|
||||
test-libpfm4.bin \
|
||||
test-libopenssl.bin
|
||||
|
||||
FILES := $(addprefix $(OUTPUT),$(FILES))
|
||||
|
||||
@ -381,6 +382,9 @@ $(OUTPUT)test-file-handle.bin:
|
||||
$(OUTPUT)test-libpfm4.bin:
|
||||
$(BUILD) -lpfm
|
||||
|
||||
$(OUTPUT)test-libopenssl.bin:
|
||||
$(BUILD) -lssl
|
||||
|
||||
$(OUTPUT)test-bpftool-skeletons.bin:
|
||||
$(SYSTEM_BPFTOOL) version | grep '^features:.*skeletons' \
|
||||
> $(@:.bin=.make.output) 2>&1
|
||||
|
||||
@ -142,6 +142,10 @@
|
||||
# include "test-libtraceevent.c"
|
||||
#undef main
|
||||
|
||||
#define main main_test_libopenssl
|
||||
# include "test-libopenssl.c"
|
||||
#undef main
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
main_test_libpython();
|
||||
@ -173,6 +177,7 @@ int main(int argc, char *argv[])
|
||||
main_test_reallocarray();
|
||||
main_test_libzstd();
|
||||
main_test_libtraceevent();
|
||||
main_test_libopenssl();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
7
tools/build/feature/test-libopenssl.c
Normal file
7
tools/build/feature/test-libopenssl.c
Normal file
@ -0,0 +1,7 @@
|
||||
#include <openssl/ssl.h>
|
||||
#include <openssl/opensslv.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
return SSL_library_init();
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user