mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-04 20:19:47 +08:00
tools: Remove libcrypto dependency
Remove all occurrence of libcrypto in the build system. Signed-off-by: Yuzhuo Jing <yuzhuo@google.com> Signed-off-by: Eric Biggers <ebiggers@kernel.org> Reviewed-by: Ian Rogers <irogers@google.com> Link: https://lore.kernel.org/r/20250625202311.23244-5-ebiggers@kernel.org Signed-off-by: Namhyung Kim <namhyung@kernel.org>
This commit is contained in:
parent
e3f612c1d8
commit
8e63fd1e00
@ -86,7 +86,6 @@ FEATURE_TESTS_BASIC := \
|
|||||||
libtraceevent \
|
libtraceevent \
|
||||||
libtracefs \
|
libtracefs \
|
||||||
libcpupower \
|
libcpupower \
|
||||||
libcrypto \
|
|
||||||
pthread-attr-setaffinity-np \
|
pthread-attr-setaffinity-np \
|
||||||
pthread-barrier \
|
pthread-barrier \
|
||||||
reallocarray \
|
reallocarray \
|
||||||
@ -147,7 +146,6 @@ FEATURE_DISPLAY ?= \
|
|||||||
numa_num_possible_cpus \
|
numa_num_possible_cpus \
|
||||||
libperl \
|
libperl \
|
||||||
libpython \
|
libpython \
|
||||||
libcrypto \
|
|
||||||
libcapstone \
|
libcapstone \
|
||||||
llvm-perf \
|
llvm-perf \
|
||||||
zlib \
|
zlib \
|
||||||
|
@ -38,7 +38,6 @@ FILES= \
|
|||||||
test-libtraceevent.bin \
|
test-libtraceevent.bin \
|
||||||
test-libcpupower.bin \
|
test-libcpupower.bin \
|
||||||
test-libtracefs.bin \
|
test-libtracefs.bin \
|
||||||
test-libcrypto.bin \
|
|
||||||
test-libunwind.bin \
|
test-libunwind.bin \
|
||||||
test-libunwind-debug-frame.bin \
|
test-libunwind-debug-frame.bin \
|
||||||
test-libunwind-x86.bin \
|
test-libunwind-x86.bin \
|
||||||
@ -247,9 +246,6 @@ $(OUTPUT)test-libcpupower.bin:
|
|||||||
$(OUTPUT)test-libtracefs.bin:
|
$(OUTPUT)test-libtracefs.bin:
|
||||||
$(BUILD) $(shell $(PKG_CONFIG) --cflags libtracefs 2>/dev/null) -ltracefs
|
$(BUILD) $(shell $(PKG_CONFIG) --cflags libtracefs 2>/dev/null) -ltracefs
|
||||||
|
|
||||||
$(OUTPUT)test-libcrypto.bin:
|
|
||||||
$(BUILD) -lcrypto
|
|
||||||
|
|
||||||
$(OUTPUT)test-gtk2.bin:
|
$(OUTPUT)test-gtk2.bin:
|
||||||
$(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null) -Wno-deprecated-declarations
|
$(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null) -Wno-deprecated-declarations
|
||||||
|
|
||||||
|
@ -130,10 +130,6 @@
|
|||||||
# include "test-bpf.c"
|
# include "test-bpf.c"
|
||||||
#undef main
|
#undef main
|
||||||
|
|
||||||
#define main main_test_libcrypto
|
|
||||||
# include "test-libcrypto.c"
|
|
||||||
#undef main
|
|
||||||
|
|
||||||
#define main main_test_sdt
|
#define main main_test_sdt
|
||||||
# include "test-sdt.c"
|
# include "test-sdt.c"
|
||||||
#undef main
|
#undef main
|
||||||
@ -188,7 +184,6 @@ int main(int argc, char *argv[])
|
|||||||
main_test_lzma();
|
main_test_lzma();
|
||||||
main_test_get_cpuid();
|
main_test_get_cpuid();
|
||||||
main_test_bpf();
|
main_test_bpf();
|
||||||
main_test_libcrypto();
|
|
||||||
main_test_scandirat();
|
main_test_scandirat();
|
||||||
main_test_sched_getcpu();
|
main_test_sched_getcpu();
|
||||||
main_test_sdt();
|
main_test_sdt();
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0
|
|
||||||
#include <openssl/evp.h>
|
|
||||||
#include <openssl/sha.h>
|
|
||||||
#include <openssl/md5.h>
|
|
||||||
|
|
||||||
int main(void)
|
|
||||||
{
|
|
||||||
EVP_MD_CTX *mdctx;
|
|
||||||
unsigned char md[MD5_DIGEST_LENGTH + SHA_DIGEST_LENGTH];
|
|
||||||
unsigned char dat[] = "12345";
|
|
||||||
unsigned int digest_len;
|
|
||||||
|
|
||||||
mdctx = EVP_MD_CTX_new();
|
|
||||||
if (!mdctx)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
EVP_DigestInit_ex(mdctx, EVP_md5(), NULL);
|
|
||||||
EVP_DigestUpdate(mdctx, &dat[0], sizeof(dat));
|
|
||||||
EVP_DigestFinal_ex(mdctx, &md[0], &digest_len);
|
|
||||||
EVP_MD_CTX_free(mdctx);
|
|
||||||
|
|
||||||
SHA1(&dat[0], sizeof(dat), &md[0]);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
@ -54,7 +54,6 @@ feature::
|
|||||||
libbfd / HAVE_LIBBFD_SUPPORT
|
libbfd / HAVE_LIBBFD_SUPPORT
|
||||||
libbpf-strings / HAVE_LIBBPF_STRINGS_SUPPORT
|
libbpf-strings / HAVE_LIBBPF_STRINGS_SUPPORT
|
||||||
libcapstone / HAVE_LIBCAPSTONE_SUPPORT
|
libcapstone / HAVE_LIBCAPSTONE_SUPPORT
|
||||||
libcrypto / HAVE_LIBCRYPTO_SUPPORT
|
|
||||||
libdw-dwarf-unwind / HAVE_LIBDW_SUPPORT
|
libdw-dwarf-unwind / HAVE_LIBDW_SUPPORT
|
||||||
libelf / HAVE_LIBELF_SUPPORT
|
libelf / HAVE_LIBELF_SUPPORT
|
||||||
libnuma / HAVE_LIBNUMA_SUPPORT
|
libnuma / HAVE_LIBNUMA_SUPPORT
|
||||||
|
@ -134,8 +134,6 @@ ifndef NO_LIBUNWIND
|
|||||||
FEATURE_CHECK_LDFLAGS-libunwind-x86_64 += -lunwind -llzma -lunwind-x86_64
|
FEATURE_CHECK_LDFLAGS-libunwind-x86_64 += -lunwind -llzma -lunwind-x86_64
|
||||||
endif
|
endif
|
||||||
|
|
||||||
FEATURE_CHECK_LDFLAGS-libcrypto = -lcrypto
|
|
||||||
|
|
||||||
ifdef CSINCLUDES
|
ifdef CSINCLUDES
|
||||||
LIBOPENCSD_CFLAGS := -I$(CSINCLUDES)
|
LIBOPENCSD_CFLAGS := -I$(CSINCLUDES)
|
||||||
endif
|
endif
|
||||||
@ -784,17 +782,6 @@ ifneq ($(NO_LIBTRACEEVENT),1)
|
|||||||
$(call detected,CONFIG_TRACE)
|
$(call detected,CONFIG_TRACE)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifndef NO_LIBCRYPTO
|
|
||||||
ifneq ($(feature-libcrypto), 1)
|
|
||||||
$(warning No libcrypto.h found, disables jitted code injection, please install openssl-devel or libssl-dev)
|
|
||||||
NO_LIBCRYPTO := 1
|
|
||||||
else
|
|
||||||
CFLAGS += -DHAVE_LIBCRYPTO_SUPPORT
|
|
||||||
EXTLIBS += -lcrypto
|
|
||||||
$(call detected,CONFIG_CRYPTO)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifndef NO_SLANG
|
ifndef NO_SLANG
|
||||||
ifneq ($(feature-libslang), 1)
|
ifneq ($(feature-libslang), 1)
|
||||||
ifneq ($(feature-libslang-include-subdir), 1)
|
ifneq ($(feature-libslang-include-subdir), 1)
|
||||||
|
@ -61,9 +61,6 @@ include ../scripts/utilities.mak
|
|||||||
#
|
#
|
||||||
# Define NO_LIBBIONIC if you do not want bionic support
|
# Define NO_LIBBIONIC if you do not want bionic support
|
||||||
#
|
#
|
||||||
# Define NO_LIBCRYPTO if you do not want libcrypto (openssl) support
|
|
||||||
# used for generating build-ids for ELFs generated by jitdump.
|
|
||||||
#
|
|
||||||
# Define NO_LIBDW_DWARF_UNWIND if you do not want libdw support
|
# Define NO_LIBDW_DWARF_UNWIND if you do not want libdw support
|
||||||
# for dwarf backtrace post unwind.
|
# for dwarf backtrace post unwind.
|
||||||
#
|
#
|
||||||
|
@ -45,7 +45,6 @@ struct feature_status supported_features[] = {
|
|||||||
FEATURE_STATUS_TIP("libbfd", HAVE_LIBBFD_SUPPORT, "Deprecated, license incompatibility, use BUILD_NONDISTRO=1 and install binutils-dev[el]"),
|
FEATURE_STATUS_TIP("libbfd", HAVE_LIBBFD_SUPPORT, "Deprecated, license incompatibility, use BUILD_NONDISTRO=1 and install binutils-dev[el]"),
|
||||||
FEATURE_STATUS("libbpf-strings", HAVE_LIBBPF_STRINGS_SUPPORT),
|
FEATURE_STATUS("libbpf-strings", HAVE_LIBBPF_STRINGS_SUPPORT),
|
||||||
FEATURE_STATUS("libcapstone", HAVE_LIBCAPSTONE_SUPPORT),
|
FEATURE_STATUS("libcapstone", HAVE_LIBCAPSTONE_SUPPORT),
|
||||||
FEATURE_STATUS("libcrypto", HAVE_LIBCRYPTO_SUPPORT),
|
|
||||||
FEATURE_STATUS("libdw-dwarf-unwind", HAVE_LIBDW_SUPPORT),
|
FEATURE_STATUS("libdw-dwarf-unwind", HAVE_LIBDW_SUPPORT),
|
||||||
FEATURE_STATUS("libelf", HAVE_LIBELF_SUPPORT),
|
FEATURE_STATUS("libelf", HAVE_LIBELF_SUPPORT),
|
||||||
FEATURE_STATUS("libnuma", HAVE_LIBNUMA_SUPPORT),
|
FEATURE_STATUS("libnuma", HAVE_LIBNUMA_SUPPORT),
|
||||||
|
@ -91,7 +91,6 @@ make_no_auxtrace := NO_AUXTRACE=1
|
|||||||
make_no_libbpf := NO_LIBBPF=1
|
make_no_libbpf := NO_LIBBPF=1
|
||||||
make_libbpf_dynamic := LIBBPF_DYNAMIC=1
|
make_libbpf_dynamic := LIBBPF_DYNAMIC=1
|
||||||
make_no_libbpf_DEBUG := NO_LIBBPF=1 DEBUG=1
|
make_no_libbpf_DEBUG := NO_LIBBPF=1 DEBUG=1
|
||||||
make_no_libcrypto := NO_LIBCRYPTO=1
|
|
||||||
make_no_libllvm := NO_LIBLLVM=1
|
make_no_libllvm := NO_LIBLLVM=1
|
||||||
make_with_babeltrace:= LIBBABELTRACE=1
|
make_with_babeltrace:= LIBBABELTRACE=1
|
||||||
make_with_coresight := CORESIGHT=1
|
make_with_coresight := CORESIGHT=1
|
||||||
@ -122,7 +121,7 @@ make_minimal := NO_LIBPERL=1 NO_LIBPYTHON=1 NO_GTK2=1
|
|||||||
make_minimal += NO_DEMANGLE=1 NO_LIBELF=1 NO_BACKTRACE=1
|
make_minimal += NO_DEMANGLE=1 NO_LIBELF=1 NO_BACKTRACE=1
|
||||||
make_minimal += NO_LIBNUMA=1 NO_LIBBIONIC=1
|
make_minimal += NO_LIBNUMA=1 NO_LIBBIONIC=1
|
||||||
make_minimal += NO_LIBDW_DWARF_UNWIND=1 NO_AUXTRACE=1 NO_LIBBPF=1
|
make_minimal += NO_LIBDW_DWARF_UNWIND=1 NO_AUXTRACE=1 NO_LIBBPF=1
|
||||||
make_minimal += NO_LIBCRYPTO=1 NO_SDT=1 NO_JVMTI=1 NO_LIBZSTD=1
|
make_minimal += NO_SDT=1 NO_JVMTI=1 NO_LIBZSTD=1
|
||||||
make_minimal += NO_LIBCAP=1 NO_CAPSTONE=1
|
make_minimal += NO_LIBCAP=1 NO_CAPSTONE=1
|
||||||
|
|
||||||
# $(run) contains all available tests
|
# $(run) contains all available tests
|
||||||
@ -160,7 +159,6 @@ run += make_no_libbionic
|
|||||||
run += make_no_auxtrace
|
run += make_no_auxtrace
|
||||||
run += make_no_libbpf
|
run += make_no_libbpf
|
||||||
run += make_no_libbpf_DEBUG
|
run += make_no_libbpf_DEBUG
|
||||||
run += make_no_libcrypto
|
|
||||||
run += make_no_libllvm
|
run += make_no_libllvm
|
||||||
run += make_no_sdt
|
run += make_no_sdt
|
||||||
run += make_no_syscall_tbl
|
run += make_no_syscall_tbl
|
||||||
|
Loading…
Reference in New Issue
Block a user