[openwrt/openwrt] mbedtls: restore previous configuration behavior
LEDE Commits
lede-commits at lists.infradead.org
Wed Jul 23 15:31:32 PDT 2025
hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/69f8f17f007cef09bcadd0c7c43b5118e3d0d436
commit 69f8f17f007cef09bcadd0c7c43b5118e3d0d436
Author: Tianling Shen <cnsztl at immortalwrt.org>
AuthorDate: Tue Jul 22 23:35:49 2025 +0800
mbedtls: restore previous configuration behavior
Fallback to default mbedtls configurations in case of the package is
not configured. It is possible for some reasons it get built even if
it's unselected because of build system bugs or other build-only
dependencies. In this case current behavior will comment out all
necessary configurations and lead build errors.
Fixes: 5359639c2b74 ("mbedtls: Apply configuration in Configure instead of Prepare")
Signed-off-by: Tianling Shen <cnsztl at immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/19495
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
package/libs/mbedtls/Makefile | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/package/libs/mbedtls/Makefile b/package/libs/mbedtls/Makefile
index 655526eecb..1533cff519 100644
--- a/package/libs/mbedtls/Makefile
+++ b/package/libs/mbedtls/Makefile
@@ -138,11 +138,13 @@ CMAKE_OPTIONS += \
-DENABLE_PROGRAMS:Bool=ON
define Build/Configure
- $(call Build/Configure/Default,)
- $(foreach opt,$(MBEDTLS_BUILD_OPTS),
- $(PKG_BUILD_DIR)/scripts/config.py \
- -f $(PKG_BUILD_DIR)/include/mbedtls/mbedtls_config.h \
- $(if $($(opt)),set,unset) $(patsubst CONFIG_%,%,$(opt)))
+ $(call Build/Configure/Default)
+
+ $(if $(strip $(foreach opt,$(MBEDTLS_BUILD_OPTS),$($(opt)))),
+ $(foreach opt,$(MBEDTLS_BUILD_OPTS),
+ $(PKG_BUILD_DIR)/scripts/config.py \
+ -f $(PKG_BUILD_DIR)/include/mbedtls/mbedtls_config.h \
+ $(if $($(opt)),set,unset) $(patsubst CONFIG_%,%,$(opt))),)
endef
define Build/InstallDev
More information about the lede-commits
mailing list