mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Alexander Dahl <ada@thorsis.com>
Subject: Re: [ptxdist] [APPLIED] libgmp: Override CFLAGS
Date: Thu, 16 Jan 2025 17:09:32 +0100	[thread overview]
Message-ID: <20250116160932.426888-1-m.olbrich@pengutronix.de> (raw)
In-Reply-To: <20241217084318.2038729-1-ada@thorsis.com>

Thanks, applied as d70a3245d185a3a1bb4620f0be5191b89affb4e3.

Michael

[sent from post-receive hook]

On Thu, 16 Jan 2025 17:09:32 +0100, Alexander Dahl <ada@thorsis.com> wrote:
> 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>
> Message-Id: <20241217084318.2038729-1-ada@thorsis.com>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/rules/libgmp.make b/rules/libgmp.make
> index 3ed6faaa33de..bf6b88d7c84f 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 \



      reply	other threads:[~2025-01-16 16:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-17  8:43 [ptxdist] [PATCH] " Alexander Dahl
2025-01-16 16:09 ` Michael Olbrich [this message]

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=20250116160932.426888-1-m.olbrich@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=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