Skip to contentSkip to conversation

package/stunnel: fix build on ARM Thumb-1

PATCH Applied Yegor Yefremov via buildroot 1 participant 3 messages Sep 17 – Sep 25

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/stunnel: fix build on ARM Thumb-1

From: Yegor Yefremov <[email protected]>

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/

Assisted-by Claude:claude-opus-5

---
Changes v1 -> v2:
- add fixes tag

 package/stunnel/stunnel.mk | 5 +++++
 1 file changed, 5 insertions(+)
package/stunnel/stunnel.mk +5 -0
index a8eb652bff..473fc81900 100644
@@ -17,6 +17,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
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 15 lines · Yegor Yefremov via buildroot

From: Yegor Yefremov <[email protected]>

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.

Quoted 5 lines

Fixes:
https://autobuild.buildroot.org/results/3d691184ba83ba4d881632f2b2bb4da5aa50f491/

Assisted-by Claude:claude-opus-5

Applied to master, thanks!

Best regards,

Thomas Petazzoni

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw
In reply to Yegor Yefremov via buildroot

In reply of:

Quoted 13 lines

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.

Quoted 5 lines

Fixes:
https://autobuild.buildroot.org/results/3d691184ba83ba4d881632f2b2bb4da5aa50f491/

Assisted-by Claude:claude-opus-5

Applied to 2025.02.x, 2026.08.x. Thanks

Quoted 13 lines

---
Changes v1 -> v2:
- add fixes tag

 package/stunnel/stunnel.mk | 5 +++++
 1 file changed, 5 insertions(+)
package/stunnel/stunnel.mk +0 -0
index a8eb652bff..473fc81900 100644
@@ -17,6 +17,11 @@ STUNNEL_LICENSE_FILES = COPYING.md COPYRIGHT.md
 STUNNEL_CPE_ID_VENDOR = stunnel

package/stunnel/stunnel.mk STUNNEL_LICENSE_FILES = COPYING.md COPYRIGHT.md · line 27

Quoted 10 lines
package/stunnel/stunnel.mk +5 -0
 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

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot