default n
prompt "Enable hardware support"
+config OPENSSL_OPTIMIZE_SPEED
+ bool
+ default n
+ prompt "Enable optimization for speed instead of size"
+
endif
config OPENSSL_ENGINE_CRYPTO
CONFIG_OPENSSL_WITH_COMPRESSION \
CONFIG_OPENSSL_WITH_NPN \
CONFIG_OPENSSL_WITH_PSK \
- CONFIG_OPENSSL_WITH_SRP
+ CONFIG_OPENSSL_WITH_SRP \
+ CONFIG_OPENSSL_OPTIMIZE_SPEED
include $(INCLUDE_DIR)/package.mk
OPENSSL_OPTIONS += no-srp
endif
+ifeq ($(CONFIG_OPENSSL_OPTIMIZE_SPEED),y)
+ TARGET_CFLAGS := $(filter-out -Os,$(TARGET_CFLAGS)) -O3
+endif
+
ifeq ($(CONFIG_x86_64),y)
OPENSSL_TARGET:=linux-x86_64-openwrt
OPENSSL_MAKEFLAGS += LIBDIR=lib
--openssldir=/etc/ssl \
$(TARGET_CPPFLAGS) \
$(TARGET_LDFLAGS) -ldl \
- -DOPENSSL_SMALL_FOOTPRINT \
+ $(if $(CONFIG_OPENSSL_OPTIMIZE_SPEED),,-DOPENSSL_SMALL_FOOTPRINT) \
$(OPENSSL_NO_CIPHERS) \
$(OPENSSL_OPTIONS) \
)