From 798bf1411518689d531f8f4bbc6b0f7e8f1b388f Mon Sep 17 00:00:00 2001 From: Theo Buehler Date: Wed, 13 Dec 2023 19:10:08 +0100 Subject: [PATCH] Remove EXTRA_EXPORT and LIBTLS_EXTRA_EXPORT Fixes #969 --- crypto/CMakeLists.txt | 45 ------------------------------------------- tls/CMakeLists.txt | 8 -------- 2 files changed, 53 deletions(-) diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt index 8046efe87f..84e6529687 100644 --- a/crypto/CMakeLists.txt +++ b/crypto/CMakeLists.txt @@ -750,37 +750,18 @@ endif() if(WIN32) set(CRYPTO_SRC ${CRYPTO_SRC} compat/posix_win.c) - set(EXTRA_EXPORT ${EXTRA_EXPORT} gettimeofday) - set(EXTRA_EXPORT ${EXTRA_EXPORT} getuid) - set(EXTRA_EXPORT ${EXTRA_EXPORT} posix_perror) - set(EXTRA_EXPORT ${EXTRA_EXPORT} posix_fopen) - set(EXTRA_EXPORT ${EXTRA_EXPORT} posix_fgets) - set(EXTRA_EXPORT ${EXTRA_EXPORT} posix_open) - set(EXTRA_EXPORT ${EXTRA_EXPORT} posix_rename) - set(EXTRA_EXPORT ${EXTRA_EXPORT} posix_connect) - set(EXTRA_EXPORT ${EXTRA_EXPORT} posix_close) - set(EXTRA_EXPORT ${EXTRA_EXPORT} posix_read) - set(EXTRA_EXPORT ${EXTRA_EXPORT} posix_write) - set(EXTRA_EXPORT ${EXTRA_EXPORT} posix_getsockopt) - set(EXTRA_EXPORT ${EXTRA_EXPORT} posix_setsockopt) endif() if(NOT HAVE_ASPRINTF) set(CRYPTO_SRC ${CRYPTO_SRC} compat/bsd-asprintf.c) - set(EXTRA_EXPORT ${EXTRA_EXPORT} libressl_asprintf) - set(EXTRA_EXPORT ${EXTRA_EXPORT} libressl_vasprintf) endif() if(NOT HAVE_FREEZERO) set(CRYPTO_SRC ${CRYPTO_SRC} compat/freezero.c) - set(EXTRA_EXPORT ${EXTRA_EXPORT} libressl_freezero) endif() if(NOT HAVE_GETOPT) set(CRYPTO_SRC ${CRYPTO_SRC} compat/getopt_long.c) - set(EXTRA_EXPORT ${EXTRA_EXPORT} getopt) - set(EXTRA_EXPORT ${EXTRA_EXPORT} optarg) - set(EXTRA_EXPORT ${EXTRA_EXPORT} optind) endif() if(NOT HAVE_GETPAGESIZE) @@ -799,46 +780,37 @@ endif() if(NOT HAVE_REALLOCARRAY) set(CRYPTO_SRC ${CRYPTO_SRC} compat/reallocarray.c) - set(EXTRA_EXPORT ${EXTRA_EXPORT} libressl_reallocarray) endif() if(NOT HAVE_RECALLOCARRAY) set(CRYPTO_SRC ${CRYPTO_SRC} compat/recallocarray.c) - set(EXTRA_EXPORT ${EXTRA_EXPORT} libressl_recallocarray) endif() if(NOT HAVE_STRCASECMP) set(CRYPTO_SRC ${CRYPTO_SRC} compat/strcasecmp.c) - set(EXTRA_EXPORT ${EXTRA_EXPORT} libressl_strcasecmp) endif() if(NOT HAVE_STRLCAT) set(CRYPTO_SRC ${CRYPTO_SRC} compat/strlcat.c) - set(EXTRA_EXPORT ${EXTRA_EXPORT} libressl_strlcat) endif() if(NOT HAVE_STRLCPY) set(CRYPTO_SRC ${CRYPTO_SRC} compat/strlcpy.c) - set(EXTRA_EXPORT ${EXTRA_EXPORT} libressl_strlcpy) endif() if(NOT HAVE_STRNDUP) set(CRYPTO_SRC ${CRYPTO_SRC} compat/strndup.c) - set(EXTRA_EXPORT ${EXTRA_EXPORT} libressl_strndup) if(NOT HAVE_STRNLEN) set(CRYPTO_SRC ${CRYPTO_SRC} compat/strnlen.c) - set(EXTRA_EXPORT ${EXTRA_EXPORT} libressl_strnlen) endif() endif() if(NOT HAVE_STRSEP) set(CRYPTO_SRC ${CRYPTO_SRC} compat/strsep.c) - set(EXTRA_EXPORT ${EXTRA_EXPORT} libressl_strsep) endif() if(NOT HAVE_STRTONUM) set(CRYPTO_SRC ${CRYPTO_SRC} compat/strtonum.c) - set(EXTRA_EXPORT ${EXTRA_EXPORT} libressl_strtonum) endif() if(NOT HAVE_SYSLOG_R) @@ -847,7 +819,6 @@ endif() if(NOT HAVE_TIMEGM) set(CRYPTO_SRC ${CRYPTO_SRC} compat/timegm.c) - set(EXTRA_EXPORT ${EXTRA_EXPORT} timegm) endif() if(NOT HAVE_EXPLICIT_BZERO) @@ -857,15 +828,11 @@ if(NOT HAVE_EXPLICIT_BZERO) set(CRYPTO_SRC ${CRYPTO_SRC} compat/explicit_bzero.c) set_source_files_properties(compat/explicit_bzero.c PROPERTIES COMPILE_FLAGS -O0) endif() - set(EXTRA_EXPORT ${EXTRA_EXPORT} libressl_explicit_bzero) endif() if(NOT HAVE_ARC4RANDOM_BUF) set(CRYPTO_SRC ${CRYPTO_SRC} compat/arc4random.c) set(CRYPTO_SRC ${CRYPTO_SRC} compat/arc4random_uniform.c) - set(EXTRA_EXPORT ${EXTRA_EXPORT} libressl_arc4random) - set(EXTRA_EXPORT ${EXTRA_EXPORT} libressl_arc4random_buf) - set(EXTRA_EXPORT ${EXTRA_EXPORT} libressl_arc4random_uniform) if(NOT HAVE_GETENTROPY) if(WIN32) @@ -885,18 +852,15 @@ if(NOT HAVE_ARC4RANDOM_BUF) elseif(CMAKE_SYSTEM_NAME MATCHES "SunOS") set(CRYPTO_SRC ${CRYPTO_SRC} compat/getentropy_solaris.c) endif() - set(EXTRA_EXPORT ${EXTRA_EXPORT} getentropy) endif() endif() if(NOT HAVE_TIMINGSAFE_BCMP) set(CRYPTO_SRC ${CRYPTO_SRC} compat/timingsafe_bcmp.c) - set(EXTRA_EXPORT ${EXTRA_EXPORT} libressl_timingsafe_bcmp) endif() if(NOT HAVE_TIMINGSAFE_MEMCMP) set(CRYPTO_SRC ${CRYPTO_SRC} compat/timingsafe_memcmp.c) - set(EXTRA_EXPORT ${EXTRA_EXPORT} libressl_timingsafe_memcmp) endif() if(NOT ENABLE_ASM) @@ -919,15 +883,6 @@ foreach(SYM IN LISTS CRYPTO_UNEXPORT) string(REPLACE "${SYM}\n" "" SYMS ${SYMS}) endforeach() file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/crypto_p.sym ${SYMS}) -# XXX should we still be doing this? -if(EXTRA_EXPORT) - list(SORT EXTRA_EXPORT) - foreach(SYM IN LISTS EXTRA_EXPORT) - file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/crypto_p.sym "${SYM}\n") - endforeach() -endif() - -set(LIBTLS_EXTRA_EXPORT ${EXTRA_EXPORT} PARENT_SCOPE) add_library(crypto_obj OBJECT ${CRYPTO_SRC}) target_include_directories(crypto_obj diff --git a/tls/CMakeLists.txt b/tls/CMakeLists.txt index c3c942446f..4d5b6a01be 100644 --- a/tls/CMakeLists.txt +++ b/tls/CMakeLists.txt @@ -22,20 +22,12 @@ if(WIN32) compat/pread.c compat/pwrite.c ) - - set(LIBTLS_EXTRA_EXPORT ${LIBTLS_EXTRA_EXPORT} ftruncate) endif() add_definitions(-DTLS_DEFAULT_CA_FILE=\"${OPENSSLDIR}/cert.pem\") file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/tls.sym DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) -if(LIBTLS_EXTRA_EXPORT) - list(SORT LIBTLS_EXTRA_EXPORT) - foreach(SYM IN LISTS LIBTLS_EXTRA_EXPORT) - file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/tls.sym "${SYM}\n") - endforeach() -endif() add_library(tls_obj OBJECT ${TLS_SRC}) target_include_directories(tls_obj