* [ptxdist] [PATCH] libgmp: Override CFLAGS
@ 2024-12-17 8:43 Alexander Dahl
0 siblings, 0 replies; only message in thread
From: Alexander Dahl @ 2024-12-17 8:43 UTC (permalink / raw)
To: ptxdist
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-12-17 8:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-17 8:43 [ptxdist] [PATCH] libgmp: Override CFLAGS Alexander Dahl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox