Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Charlie Jenkins <charlie@rivosinc.com>
To: Baruch Siach <baruch@tkos.co.il>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH] package/gmp: Fix for c23
Date: Thu, 24 Apr 2025 12:15:56 -0700	[thread overview]
Message-ID: <aAqN7P4xIuw6sm5q@ghost> (raw)
In-Reply-To: <87plh2f0ok.fsf@tarshish>

On Thu, Apr 24, 2025 at 11:01:15AM +0300, Baruch Siach wrote:
> Hi Charlie,
> 
> On Thu, Apr 24 2025, Charlie Jenkins 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>
> > ---
> 
> [...]
> 
> > diff --git
> > a/package/gmp/0002-configure-Patch-configure-script-for-c23-function-pr.patch
> > b/package/gmp/0002-configure-Patch-configure-script-for-c23-function-pr.patch
> > new file mode 100644
> > index 0000000000000000000000000000000000000000..d60c4d39f670d8c4f9dc937b14659695e3cc36a3
> > --- /dev/null
> > +++ b/package/gmp/0002-configure-Patch-configure-script-for-c23-function-pr.patch
> > @@ -0,0 +1,39 @@
> > +From: Charlie Jenkins <charlie@rivosinc.com>
> > +Date: Wed, 23 Apr 2025 23:55:25 -0700
> > +Subject: [PATCH] configure: Patch configure script for c23 function prototype
> > +
> > +The distributed configure script is pre-generated so it will not be
> > +updated by acinclude.m4. Patch the configure script to allow gmp to
> > +compile with c23.
> > +
> > +Signed-off-by: Charlie Jenkins <charlie@rivosinc.com>
> > +Upstream: N/A (patching generated autoconf files)
> 
> When patching autoconf source files we usually add PKG_AUTORECONF to
> regenerate the configure script at build time. This patch should not be
> needed then.

That's much better, thank you! :)

- Charlie

> 
> baruch
> 
> > +---
> > + configure | 4 ++--
> > + 1 file changed, 2 insertions(+), 2 deletions(-)
> > +
> > +diff --git a/configure b/configure
> > +index 7910aa0..259f7c8 100755
> > +--- a/configure
> > ++++ b/configure
> > +@@ -6568,7 +6568,7 @@ if test "$gmp_prog_cc_works" = yes; then
> > + 
> > + #if defined (__GNUC__) && ! defined (__cplusplus)
> > + typedef unsigned long long t1;typedef t1*t2;
> > +-void g(){}
> > ++void g(int a,t1 const* b,t1 c,t2 d,t1 const* e,int f){}
> > + void h(){}
> > + static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0)
> > + {t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;}
> > +@@ -8187,7 +8187,7 @@ if test "$gmp_prog_cc_works" = yes; then
> > + 
> > + #if defined (__GNUC__) && ! defined (__cplusplus)
> > + typedef unsigned long long t1;typedef t1*t2;
> > +-void g(){}
> > ++void g(int a,t1 const* b,t1 c,t2 d,t1 const* e,int f){}
> > + void h(){}
> > + static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0)
> > + {t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;}
> > +-- 
> > +2.43.0
> > +
> >
> > ---
> > base-commit: 1fc51abc27d37c2874823ab864db0f32ae774eb6
> > change-id: 20250424-fix_gmp_c23-c374e940b045
> 
> -- 
>                                                      ~. .~   Tk Open Systems
> =}------------------------------------------------ooO--U--Ooo------------{=
>    - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

      reply	other threads:[~2025-04-24 19:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-24  7:29 [Buildroot] [PATCH] package/gmp: Fix for c23 Charlie Jenkins
2025-04-24  8:01 ` Baruch Siach via buildroot
2025-04-24 19:15   ` Charlie Jenkins [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=aAqN7P4xIuw6sm5q@ghost \
    --to=charlie@rivosinc.com \
    --cc=baruch@tkos.co.il \
    --cc=buildroot@buildroot.org \
    /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