From 67163f7e1d96208ce884e1359e95e8071794b181 Mon Sep 17 00:00:00 2001 From: Yegor Yefremov Date: Thu, 17 Sep 2026 14:52:42 +0200 Subject: [PATCH] package/stunnel: fix build on ARM Thumb-1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit stunnel's configure unconditionally probes -fstack-clash-protection using AX_APPEND_COMPILE_FLAGS. The probe compiles a trivial conftest.c, which succeeds, so the flag ends up in CFLAGS. However, on ARM Thumb-1 gcc implements stack clash protection through -fstack-check=specific, which it refuses for any real function body, so every source file fails to build: stunnel.c:1003:1: sorry, unimplemented: '-fstack-check=specific' for Thumb-1 Force the corresponding autoconf cache variable to "no" on Thumb-1, in the same way cmocka already works around this gcc limitation, and consistently with the existing -fstack-protector-strong override. Fixes: https://autobuild.buildroot.org/results/3d691184ba83ba4d881632f2b2bb4da5aa50f491/ Signed-off-by: Yegor Yefremov Assisted-by: Claude:claude-opus-5 Signed-off-by: Thomas Petazzoni (cherry picked from commit 15ccf339c999e79222e031e9b265d9aeac1b5252) Signed-off-by: Raphaël Mélotte --- package/stunnel/stunnel.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package/stunnel/stunnel.mk b/package/stunnel/stunnel.mk index 1421b706b7..e59b52a9a7 100644 --- a/package/stunnel/stunnel.mk +++ b/package/stunnel/stunnel.mk @@ -18,6 +18,11 @@ STUNNEL_LICENSE_FILES = COPYING.md COPYRIGHT.md STUNNEL_CPE_ID_VENDOR = stunnel STUNNEL_SELINUX_MODULES = stunnel +# gcc for ARM Thumb1 doesn't implement -fstack-clash-protection +ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y) +STUNNEL_CONF_ENV += ax_cv_check_cflags___fstack_clash_protection=no +endif + ifeq ($(BR2_INIT_SYSTEMD),y) STUNNEL_DEPENDENCIES += systemd else