From: Joel Carlson <joelsoncarl@gmail.com>
To: buildroot@buildroot.org
Subject: [Buildroot] [PATCH 1/1] package/cmocka: don't allow building for Thumb1
Date: Mon, 2 Jan 2023 00:15:22 -0700 [thread overview]
Message-ID: <20230102071522.3229935-1-JoelsonCarl@gmail.com> (raw)
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). So disallow building cmocka for Thumb1.
Building for ARM or Thumb2 is fine.
As an example in GCC 12.2.0, within the file gcc/config/arm/arm.cc, the
error occurs in the thumb1_expand_prologue() call:
/* If we have a frame, then do stack checking. FIXME: not implemented. */
if ((flag_stack_check == STATIC_BUILTIN_STACK_CHECK
|| flag_stack_clash_protection)
&& size)
sorry ("%<-fstack-check=specific%> for Thumb-1");
An example build error output:
/tmp/instance-7/output-1/build/cmocka-1.1.5/src/cmocka.c: In function 'c_strmatch.part.0':
/tmp/instance-7/output-1/build/cmocka-1.1.5/src/cmocka.c:539:1: sorry, unimplemented: '-fstack-check=specific' for Thumb-1
539 | }
| ^
Fixes:
http://autobuild.buildroot.net/results/4044b3a71d3130d934c7a7c0c5badfabb2a97030/
Signed-off-by: Joel Carlson <JoelsonCarl@gmail.com>
---
package/cmocka/Config.in | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/package/cmocka/Config.in b/package/cmocka/Config.in
index cf49d0f6be..6cadaa616a 100644
--- a/package/cmocka/Config.in
+++ b/package/cmocka/Config.in
@@ -1,6 +1,7 @@
config BR2_PACKAGE_CMOCKA
bool cmocka
depends on !BR2_STATIC_LIBS
+ depends on !BR2_ARM_INSTRUCTIONS_THUMB
help
cmocka is an elegant unit testing framework for C with support
for mock objects. It only requires the standard C library,
@@ -11,5 +12,5 @@ config BR2_PACKAGE_CMOCKA
https://cmocka.org
-comment "cmocka needs a toolchain w/ dynamic library"
- depends on BR2_STATIC_LIBS
+comment "cmocka needs a toolchain w/ dynamic library, and can't be built for Thumb1"
+ depends on BR2_STATIC_LIBS || BR2_ARM_INSTRUCTIONS_THUMB
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next reply other threads:[~2023-01-02 7:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-02 7:15 Joel Carlson [this message]
2023-03-09 21:54 ` [Buildroot] [PATCH 1/1] package/cmocka: don't allow building for Thumb1 Arnout Vandecappelle
2023-07-30 22:13 ` Thomas Petazzoni via buildroot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230102071522.3229935-1-JoelsonCarl@gmail.com \
--to=joelsoncarl@gmail.com \
--cc=buildroot@buildroot.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox