Thanks, applied as d70a3245d185a3a1bb4620f0be5191b89affb4e3.

Michael

[sent from post-receive hook]

On Thu, 16 Jan 2025 17:09:32 +0100, Alexander Dahl <[email protected]> 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/[email protected]/T/#u
> Signed-off-by: Alexander Dahl <[email protected]>
> Message-Id: <[email protected]>
> Signed-off-by: Michael Olbrich <[email protected]>
> 
> 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 via email to