This patch adds an option to OpenSSL's configuration to enable threading support. This is to enable compiling software dependent on this feature of OpenSSL, e.g. pound, for which the patch has originally been created some time ago (see https://dev.openwrt.org/ticket/8855).
(When first checking around why the --no-threads option has been enabled in OpenSSL's Makefile, chats suggested that the decision has been made because of stability issues. I have run pound with a threaded libopenssl on my WNDR3700 for the last ~2 years under low to moderate stress with no segfaults/out-of-memory errors/etc. of pound.) Signed-off-by: Barnabás Králik <[email protected]> --- Index: package/libs/openssl/Config.in =================================================================== --- package/libs/openssl/Config.in (revision 35763) +++ package/libs/openssl/Config.in (working copy) @@ -5,6 +5,12 @@ bool prompt "Crypto acceleration support" +config OPENSSL_THREADS + bool + prompt "Threading support" + default n + select PACKAGE_libpthread + config OPENSSL_ENGINE_DIGEST bool depends OPENSSL_ENGINE_CRYPTO Index: package/libs/openssl/Makefile =================================================================== --- package/libs/openssl/Makefile (revision 35763) +++ package/libs/openssl/Makefile (working copy) @@ -20,7 +20,7 @@ PKG_LICENSE:=SSLEAY OPENSSL PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DEPENDS:=ocf-crypto-headers -PKG_CONFIG_DEPENDS:=CONFIG_OPENSSL_ENGINE_CRYPTO CONFIG_OPENSSL_ENGINE_DIGEST +PKG_CONFIG_DEPENDS:=CONFIG_OPENSSL_ENGINE_CRYPTO CONFIG_OPENSSL_ENGINE_DIGEST CONFIG_OPENSSL_THREADS include $(INCLUDE_DIR)/package.mk @@ -45,7 +45,7 @@ SECTION:=libs SUBMENU:=SSL CATEGORY:=Libraries - DEPENDS:=+zlib + DEPENDS:=+zlib TITLE+= (libraries) MENU:=1 endef @@ -75,8 +75,14 @@ OPENSSL_NO_CIPHERS:= no-idea no-md2 no-mdc2 no-rc5 no-sha0 no-smime \ no-rmd160 no-aes192 no-ripemd no-camellia no-ans1 no-krb5 -OPENSSL_OPTIONS:= shared no-ec no-err no-hw no-threads zlib-dynamic no-sse2 +OPENSSL_OPTIONS:= shared no-ec no-err no-hw zlib-dynamic no-sse2 +ifdef CONFIG_OPENSSL_THREADS + OPENSSL_OPTIONS += threads +else + OPENSSL_OPTIONS += no-threads +endif + ifdef CONFIG_OPENSSL_ENGINE_CRYPTO OPENSSL_OPTIONS += -DHAVE_CRYPTODEV ifdef CONFIG_OPENSSL_ENGINE_DIGEST _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
