buildroot.busybox.net archive mirror
 help / color / mirror / Atom feed
* [Buildroot] [git commit branch/2023.02.x] package/cmocka: fix build on Thumb classic configurations
@ 2023-08-30 22:28 Peter Korsgaard
  0 siblings, 0 replies; only message in thread
From: Peter Korsgaard @ 2023-08-30 22:28 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=08c379dca090b32c0f39fab02123aa911e17c020
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2023.02.x

The cmocka package checks if a toolchain supports the
-fstack-clash-protection compiler flag, and if it does automatically
uses it. That flag is not supported by GCC for Thumb1 builds (at least
as of both GCC 11 and GCC 12). Let's tell cmocka about this by passing
-DWITH_STACK_CLASH_PROTECTION=OFF in this configuration, as suggested
by Arnout Vandecappelle.

Fixes:
http://autobuild.buildroot.net/results/4044b3a71d3130d934c7a7c0c5badfabb2a97030/

Signed-off-by: Joel Carlson <JoelsonCarl@gmail.com>
[Thomas: change the initial patch from Joel to use the suggestion from
Arnout]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 5622c76bf42fd29f8dfc231d0fccb623960b3542)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 package/cmocka/cmocka.mk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/cmocka/cmocka.mk b/package/cmocka/cmocka.mk
index eafb4898e1..297f95f465 100644
--- a/package/cmocka/cmocka.mk
+++ b/package/cmocka/cmocka.mk
@@ -21,4 +21,9 @@ ifeq ($(BR2_SHARED_STATIC_LIBS),y)
 CMOCKA_CONF_OPTS += -DWITH_STATIC_LIB=ON
 endif
 
+# gcc for ARM Thumb1 doesn't implement -fstack-clash-protection
+ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y)
+CMOCKA_CONF_OPTS += -DWITH_STACK_CLASH_PROTECTION=OFF
+endif
+
 $(eval $(cmake-package))
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-08-30 22:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-30 22:28 [Buildroot] [git commit branch/2023.02.x] package/cmocka: fix build on Thumb classic configurations Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).