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

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>

authored by

Yuzhuo Jing and committed by
Namhyung Kim
8e63fd1e e3f612c1

+1 -57
-2
tools/build/Makefile.feature
··· 86 86 libtraceevent \ 87 87 libtracefs \ 88 88 libcpupower \ 89 - libcrypto \ 90 89 pthread-attr-setaffinity-np \ 91 90 pthread-barrier \ 92 91 reallocarray \ ··· 146 147 numa_num_possible_cpus \ 147 148 libperl \ 148 149 libpython \ 149 - libcrypto \ 150 150 libcapstone \ 151 151 llvm-perf \ 152 152 zlib \
-4
tools/build/feature/Makefile
··· 38 38 test-libtraceevent.bin \ 39 39 test-libcpupower.bin \ 40 40 test-libtracefs.bin \ 41 - test-libcrypto.bin \ 42 41 test-libunwind.bin \ 43 42 test-libunwind-debug-frame.bin \ 44 43 test-libunwind-x86.bin \ ··· 245 246 246 247 $(OUTPUT)test-libtracefs.bin: 247 248 $(BUILD) $(shell $(PKG_CONFIG) --cflags libtracefs 2>/dev/null) -ltracefs 248 - 249 - $(OUTPUT)test-libcrypto.bin: 250 - $(BUILD) -lcrypto 251 249 252 250 $(OUTPUT)test-gtk2.bin: 253 251 $(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null) -Wno-deprecated-declarations
-5
tools/build/feature/test-all.c
··· 130 130 # include "test-bpf.c" 131 131 #undef main 132 132 133 - #define main main_test_libcrypto 134 - # include "test-libcrypto.c" 135 - #undef main 136 - 137 133 #define main main_test_sdt 138 134 # include "test-sdt.c" 139 135 #undef main ··· 184 188 main_test_lzma(); 185 189 main_test_get_cpuid(); 186 190 main_test_bpf(); 187 - main_test_libcrypto(); 188 191 main_test_scandirat(); 189 192 main_test_sched_getcpu(); 190 193 main_test_sdt();
-25
tools/build/feature/test-libcrypto.c
··· 1 - // SPDX-License-Identifier: GPL-2.0 2 - #include <openssl/evp.h> 3 - #include <openssl/sha.h> 4 - #include <openssl/md5.h> 5 - 6 - int main(void) 7 - { 8 - EVP_MD_CTX *mdctx; 9 - unsigned char md[MD5_DIGEST_LENGTH + SHA_DIGEST_LENGTH]; 10 - unsigned char dat[] = "12345"; 11 - unsigned int digest_len; 12 - 13 - mdctx = EVP_MD_CTX_new(); 14 - if (!mdctx) 15 - return 0; 16 - 17 - EVP_DigestInit_ex(mdctx, EVP_md5(), NULL); 18 - EVP_DigestUpdate(mdctx, &dat[0], sizeof(dat)); 19 - EVP_DigestFinal_ex(mdctx, &md[0], &digest_len); 20 - EVP_MD_CTX_free(mdctx); 21 - 22 - SHA1(&dat[0], sizeof(dat), &md[0]); 23 - 24 - return 0; 25 - }
-1
tools/perf/Documentation/perf-check.txt
··· 54 54 libbfd / HAVE_LIBBFD_SUPPORT 55 55 libbpf-strings / HAVE_LIBBPF_STRINGS_SUPPORT 56 56 libcapstone / HAVE_LIBCAPSTONE_SUPPORT 57 - libcrypto / HAVE_LIBCRYPTO_SUPPORT 58 57 libdw-dwarf-unwind / HAVE_LIBDW_SUPPORT 59 58 libelf / HAVE_LIBELF_SUPPORT 60 59 libnuma / HAVE_LIBNUMA_SUPPORT
-13
tools/perf/Makefile.config
··· 134 134 FEATURE_CHECK_LDFLAGS-libunwind-x86_64 += -lunwind -llzma -lunwind-x86_64 135 135 endif 136 136 137 - FEATURE_CHECK_LDFLAGS-libcrypto = -lcrypto 138 - 139 137 ifdef CSINCLUDES 140 138 LIBOPENCSD_CFLAGS := -I$(CSINCLUDES) 141 139 endif ··· 780 782 781 783 ifneq ($(NO_LIBTRACEEVENT),1) 782 784 $(call detected,CONFIG_TRACE) 783 - endif 784 - 785 - ifndef NO_LIBCRYPTO 786 - ifneq ($(feature-libcrypto), 1) 787 - $(warning No libcrypto.h found, disables jitted code injection, please install openssl-devel or libssl-dev) 788 - NO_LIBCRYPTO := 1 789 - else 790 - CFLAGS += -DHAVE_LIBCRYPTO_SUPPORT 791 - EXTLIBS += -lcrypto 792 - $(call detected,CONFIG_CRYPTO) 793 - endif 794 785 endif 795 786 796 787 ifndef NO_SLANG
-3
tools/perf/Makefile.perf
··· 61 61 # 62 62 # Define NO_LIBBIONIC if you do not want bionic support 63 63 # 64 - # Define NO_LIBCRYPTO if you do not want libcrypto (openssl) support 65 - # used for generating build-ids for ELFs generated by jitdump. 66 - # 67 64 # Define NO_LIBDW_DWARF_UNWIND if you do not want libdw support 68 65 # for dwarf backtrace post unwind. 69 66 #
-1
tools/perf/builtin-check.c
··· 45 45 FEATURE_STATUS_TIP("libbfd", HAVE_LIBBFD_SUPPORT, "Deprecated, license incompatibility, use BUILD_NONDISTRO=1 and install binutils-dev[el]"), 46 46 FEATURE_STATUS("libbpf-strings", HAVE_LIBBPF_STRINGS_SUPPORT), 47 47 FEATURE_STATUS("libcapstone", HAVE_LIBCAPSTONE_SUPPORT), 48 - FEATURE_STATUS("libcrypto", HAVE_LIBCRYPTO_SUPPORT), 49 48 FEATURE_STATUS("libdw-dwarf-unwind", HAVE_LIBDW_SUPPORT), 50 49 FEATURE_STATUS("libelf", HAVE_LIBELF_SUPPORT), 51 50 FEATURE_STATUS("libnuma", HAVE_LIBNUMA_SUPPORT),
+1 -3
tools/perf/tests/make
··· 91 91 make_no_libbpf := NO_LIBBPF=1 92 92 make_libbpf_dynamic := LIBBPF_DYNAMIC=1 93 93 make_no_libbpf_DEBUG := NO_LIBBPF=1 DEBUG=1 94 - make_no_libcrypto := NO_LIBCRYPTO=1 95 94 make_no_libllvm := NO_LIBLLVM=1 96 95 make_with_babeltrace:= LIBBABELTRACE=1 97 96 make_with_coresight := CORESIGHT=1 ··· 121 122 make_minimal += NO_DEMANGLE=1 NO_LIBELF=1 NO_BACKTRACE=1 122 123 make_minimal += NO_LIBNUMA=1 NO_LIBBIONIC=1 123 124 make_minimal += NO_LIBDW_DWARF_UNWIND=1 NO_AUXTRACE=1 NO_LIBBPF=1 124 - make_minimal += NO_LIBCRYPTO=1 NO_SDT=1 NO_JVMTI=1 NO_LIBZSTD=1 125 + make_minimal += NO_SDT=1 NO_JVMTI=1 NO_LIBZSTD=1 125 126 make_minimal += NO_LIBCAP=1 NO_CAPSTONE=1 126 127 127 128 # $(run) contains all available tests ··· 159 160 run += make_no_auxtrace 160 161 run += make_no_libbpf 161 162 run += make_no_libbpf_DEBUG 162 - run += make_no_libcrypto 163 163 run += make_no_libllvm 164 164 run += make_no_sdt 165 165 run += make_no_syscall_tbl