From: Alexander Dahl <ada@thorsis.com>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH] libgmp: Override CFLAGS
Date: Tue, 17 Dec 2024 09:43:18 +0100 [thread overview]
Message-ID: <20241217084318.2038729-1-ada@thorsis.com> (raw)
Mainline libgmp autoconfs tries to be smart and uses
-O2 -pedantic -fomit-frame-pointer -march=armv4 -mfloat-abi=softfp
which leads to `nft list ruleset` crashing, when nft uses some printf
function of libgmp.
The -march=armv4 -mfloat-abi=softfp seems to create arm assembler code
with illegal instructions. Don't know if these -march and -mfloat-abi
options make sense at all when cross-compiling anyways?
The new options allow for debugging and nft does not crash anymore.
Link: https://lore.ptxdist.org/ptxdist/20241210-pesticide-garnet-ef57e562fa17@thorsis.com/T/#u
Signed-off-by: Alexander Dahl <ada@thorsis.com>
---
Notes:
Not sure about the wording. Explanations work for me, but could be
improved maybe?
rules/libgmp.make | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/rules/libgmp.make b/rules/libgmp.make
index 3ed6faaa3..bf6b88d7c 100644
--- a/rules/libgmp.make
+++ b/rules/libgmp.make
@@ -37,6 +37,11 @@ LIBGMP_LICENSE_FILES := \
# autoconf
#
LIBGMP_CONF_TOOL := autoconf
+# libgmp autoconf guesses target arch and sets CFLAGS to options leading
+# to crashes on at least armv5te, so override those CFLAGS with working
+# ones, replacing the wrong ones set by libgmp in the first place
+LIBGMP_CONF_ENV := \
+ CFLAGS='-O2 -pedantic -g'
LIBGMP_CONF_OPT := \
$(CROSS_AUTOCONF_USR) \
--disable-assert \
base-commit: b922a1e6bf2c7764c3e6032557b259f755464be3
--
2.39.5
reply other threads:[~2024-12-17 8:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20241217084318.2038729-1-ada@thorsis.com \
--to=ada@thorsis.com \
--cc=ptxdist@pengutronix.de \
/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