Skip to contentSkip to conversation

package/stunnel: fix build on ARM Thumb-1

Buildroot Thomas Petazzoni via buildroot 1 participant 1 message Sep 20

lore
Share & tools
lore
#0 lore raw

commit: https://gitlab.com/buildroot.org/buildroot/-/commit/15ccf339c999e79222e031e9b265d9aeac1b5252
branch: https://gitlab.com/buildroot.org/buildroot/-/tree/master

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
---
 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

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