All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Charlie Jenkins <charlie@rivosinc.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v2] package/gmp: Fix for c23
Date: Thu, 24 Apr 2025 23:48:14 +0200	[thread overview]
Message-ID: <20250424234814.28d834df@windsurf> (raw)
In-Reply-To: <20250424-fix_gmp_c23-v2-1-a03fc808a87c@rivosinc.com>

Hello Charlie,

On Thu, 24 Apr 2025 12:17:26 -0700
Charlie Jenkins <charlie@rivosinc.com> wrote:

> GMP will not build for a C compiler configured for c23 because its
> autoconf scripts use deprecated function prototypes. Include an upstream
> patch that fixes this issue.
> 
> Signed-off-by: Charlie Jenkins <charlie@rivosinc.com>
> ---
> Changes in v2:
> - Use autoreconf instead of patching configure
> - Link to v1: https://lore.kernel.org/r/20250424-fix_gmp_c23-v1-1-b2474a9585b6@rivosinc.com

Thanks for this v2.

> diff --git a/package/gmp/0001-acinclude.m4-Add-parameter-names-in-prototype-for-g.patch b/package/gmp/0001-acinclude.m4-Add-parameter-names-in-prototype-for-g.patch
> new file mode 100644
> index 0000000000000000000000000000000000000000..339718888d0e1dd6bf0c3601632fceee4eff5f81
> --- /dev/null
> +++ b/package/gmp/0001-acinclude.m4-Add-parameter-names-in-prototype-for-g.patch
> @@ -0,0 +1,56 @@
> +From: Khem Raj <raj.khem@gmail.com>
> +Date: Sat, 15 Mar 2025 17:58:40 +0100
> +Subject: [PATCH] acinclude.m4: Add parameter names in prototype for g().
> +
> +This allows it to compile with older gcc e.g. gcc-10
> +which does not have allow parameter name omission, it results
> +in
> +
> +a.c: In function ‘g’:
> +a.c:3:8: error: parameter name omitted
> +    3 | void g(int,t1 const*,t1,t2,t1 const*,int){}
> +      |        ^~~
> +
> +this was added to gcc via [1] thats why it is supported in
> +newer gcc.
> +
> +Adding the parameter names make it compatible with
> +old and new gcc
> +
> +[1] https://gcc.gnu.org/pipermail/gcc-cvs/2020-October/336068.html
> +
> +Signed-off-by: Khem Raj <raj.khem at gmail.com>
> +Upstream: https://gmplib.org/list-archives/gmp-devel/2025-March/006294.html

Our policy requires that you add your Signed-off-by right here.


> diff --git a/package/gmp/gmp.mk b/package/gmp/gmp.mk
> index 7e8da9025c93b98b5820f297b6ea3549597395a5..fff211a4f61accce32760885bca2d32ce99c4701 100644
> --- a/package/gmp/gmp.mk
> +++ b/package/gmp/gmp.mk
> @@ -7,6 +7,7 @@
>  GMP_VERSION = 6.3.0
>  GMP_SITE = $(BR2_GNU_MIRROR)/gmp
>  GMP_SOURCE = gmp-$(GMP_VERSION).tar.xz

And here add:

# 0001-acinclude.m4-Add-parameter-names-in-prototype-for-g.patch

> +GMP_AUTORECONF = YES
>  GMP_INSTALL_STAGING = YES
>  GMP_LICENSE = LGPL-3.0+ or GPL-2.0+
>  GMP_LICENSE_FILES = COPYING.LESSERv3 COPYINGv2

Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

      reply	other threads:[~2025-04-24 21:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-24 19:17 [Buildroot] [PATCH v2] package/gmp: Fix for c23 Charlie Jenkins
2025-04-24 21:48 ` Thomas Petazzoni via buildroot [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=20250424234814.28d834df@windsurf \
    --to=buildroot@buildroot.org \
    --cc=charlie@rivosinc.com \
    --cc=thomas.petazzoni@bootlin.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.