From 75fdbdc94c05cf013c7a4ddcd8d33e53559f5be3 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Thu, 10 Sep 2026 13:00:37 +0100 Subject: [PATCH] openssl: use ATOMIC64_DEPENDS The open-coded architecture list pulls libatomic onto every ARM target although ARMv6K and ARMv7 inline 64-bit atomics. ATOMIC64_DEPENDS covers exactly the targets whose compiler emits libatomic calls. OpenSSL's linux-armv4 and mips configurations link libatomic regardless, so link with --as-needed to drop it where libcrypto imports nothing from it. Signed-off-by: Daniel Golle --- package/libs/openssl/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile index d82e84c3cb6..daa47cb21f6 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.5.8 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_BUILD_FLAGS:=no-mips16 gc-sections no-lto PKG_BUILD_PARALLEL:=1 @@ -94,7 +94,7 @@ $(call Package/openssl/Default) +OPENSSL_ENGINE_BUILTIN_AFALG:kmod-crypto-user \ +OPENSSL_ENGINE_BUILTIN_DEVCRYPTO:kmod-cryptodev \ +OPENSSL_ENGINE_BUILTIN_PADLOCK:kmod-crypto-hw-padlock \ - +(arm||armeb||mips||mipsel||powerpc):libatomic + $(ATOMIC64_DEPENDS) TITLE+= (libraries) ABI_VERSION:=$(firstword $(subst .,$(space),$(PKG_VERSION))) MENU:=1 @@ -362,6 +362,7 @@ OPENSSL_TARGET:=linux-$(call qstrip,$(CONFIG_ARCH))-openwrt STAMP_CONFIGURED := $(STAMP_CONFIGURED)_$(shell echo $(OPENSSL_OPTIONS) | $(MKHASH) md5) TARGET_CFLAGS += $(FPIC) +TARGET_LDFLAGS += -Wl,--as-needed define Build/Configure (cd $(PKG_BUILD_DIR); \