[PATCH 1/3] openssl: reorganise the config dependencies

Rui Salvaterra rsalvaterra at gmail.com
Thu Oct 15 18:35:57 EDT 2020


There's no technical reason for OPENSSL_OPTIMIZE_SPEED to imply
OPENSSL_WITH_ASM, but it definitely makes sense to have OPENSSL_WITH_ASM
selected by default if OPENSSL_OPTIMIZE_SPEED is enabled. No changes to the
current defaults.

Library sizes (in bytes):

O3, 74kc, OPENSSL_OPTIMIZE_SPEED
2019956 libcrypto.so.1.1
 443848 libssl.so.1.1

O3, 74kc, OPENSSL_OPTIMIZE_SPEED, OPENSSL_WITH_ASM
2010840 libcrypto.so.1.1
 443848 libssl.so.1.1

O3, 74kc
1824148 libcrypto.so.1.1
 428384 libssl.so.1.1

Signed-off-by: Rui Salvaterra <rsalvaterra at gmail.com>
---
 package/libs/openssl/Config.in | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/package/libs/openssl/Config.in b/package/libs/openssl/Config.in
index d1281ec6fa..8be6ee732a 100644
--- a/package/libs/openssl/Config.in
+++ b/package/libs/openssl/Config.in
@@ -6,7 +6,6 @@ config OPENSSL_OPTIMIZE_SPEED
 	bool
 	default y if x86_64 || i386
 	prompt "Enable optimization for speed instead of size"
-	select OPENSSL_WITH_ASM
 	help
 		Enabling this option increases code size (around 20%) and
 		performance.  The increase in performance and size depends on the
@@ -18,7 +17,7 @@ config OPENSSL_WITH_ASM
 	bool
 	default y if !SMALL_FLASH || !arm
 	prompt "Compile with optimized assembly code"
-	depends on !arc
+	depends on !arc && OPENSSL_OPTIMIZE_SPEED
 	help
 		Disabling this option will reduce code size and performance.
 		The increase in performance and size depends on the target
-- 
2.28.0




More information about the openwrt-devel mailing list