aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--package/libs/openssl/Config.in18
-rw-r--r--package/libs/openssl/Makefile7
2 files changed, 21 insertions, 4 deletions
diff --git a/package/libs/openssl/Config.in b/package/libs/openssl/Config.in
index 6a668fe4cd..b948aab709 100644
--- a/package/libs/openssl/Config.in
+++ b/package/libs/openssl/Config.in
@@ -12,9 +12,23 @@ config OPENSSL_OPTIMIZE_SPEED
The increase in performance and size depends on the
target CPU. EC and AES seem to benefit the most.
+config OPENSSL_SMALL_FOOTPRINT
+ bool
+ depends on !OPENSSL_OPTIMIZE_SPEED
+ default y if SMALL_FLASH || LOW_MEMORY_FOOTPRINT
+ prompt "Build with OPENSSL_SMALL_FOOTPRINT (read help)"
+ help
+ This turns on -DOPENSSL_SMALL_FOOTPRINT. This will save only
+ 1-3% of of the ipk size. The performance drop depends on
+ architecture and algorithm. MIPS drops 13% of performance for
+ a 3% decrease in ipk size. On Aarch64, for a 1% reduction in
+ size, ghash and GCM performance decreases 90%, while
+ Chacha20-Poly1305 is 15% slower. X86_64 drops 1% of its size
+ for 3% of performance. Other arches have not been tested.
+
config OPENSSL_WITH_ASM
bool
- default y if !SMALL_FLASH || !arm
+ default y
prompt "Compile with optimized assembly code"
depends on !arc
help
@@ -46,7 +60,7 @@ config OPENSSL_NO_DEPRECATED
config OPENSSL_WITH_ERROR_MESSAGES
bool
- default y if !SMALL_FLASH && !LOW_MEMORY_FOOTPRINT
+ default y if !OPENSSL_SMALL_FOOTPRINT || (!SMALL_FLASH && !LOW_MEMORY_FOOTPRINT)
prompt "Include error messages"
help
This option aids debugging, but increases package size and
diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile
index 9fe5da9dd3..b076a9c1fa 100644
--- a/package/libs/openssl/Makefile
+++ b/package/libs/openssl/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=openssl
PKG_VERSION:=3.0.8
-PKG_RELEASE:=4
+PKG_RELEASE:=5
PKG_BUILD_FLAGS:=no-mips16 gc-sections
PKG_BUILD_PARALLEL:=1
@@ -39,6 +39,7 @@ PKG_CONFIG_DEPENDS:= \
CONFIG_OPENSSL_NO_DEPRECATED \
CONFIG_OPENSSL_OPTIMIZE_SPEED \
CONFIG_OPENSSL_PREFER_CHACHA_OVER_GCM \
+ CONFIG_OPENSSL_SMALL_FOOTPRINT \
CONFIG_OPENSSL_WITH_ARIA \
CONFIG_OPENSSL_WITH_ASM \
CONFIG_OPENSSL_WITH_ASYNC \
@@ -258,7 +259,9 @@ endif
ifeq ($(CONFIG_OPENSSL_OPTIMIZE_SPEED),y)
TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS)) -O3
-else
+endif
+
+ifeq ($(CONFIG_OPENSSL_SMALL_FOOTPRINT),y)
OPENSSL_OPTIONS += -DOPENSSL_SMALL_FOOTPRINT
endif