Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/1] package/gawk: Add upstream fix for systems without MPFR and GMP
@ 2026-10-03 10:16 Bernd Kuhls
  2026-10-03 13:19 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Bernd Kuhls @ 2026-10-03 10:16 UTC (permalink / raw)
  To: buildroot

Fixes build error with host-gcc-final:

options.cc:27216:2: error: #error 0Wabsolute-value does not have a Var() flag
27216 | #error 0Wabsolute-value does not have a Var() flag

$ head -n1 output/build/host-gcc-final-16.2.0/build/gcc/options.cc
  /* This file is auto-generated by optc-gen.awk.  */

introduced by the bump of gawk to 5.4.1 with buildroot commit
aa3db5b4e15c8dd67914d58c8d03ae2df3c92cab.

Fixes:
https://autobuild.buildroot.net/results/672/6727e71716af3df8e2175a50740388bc669e5462/

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
v2: fixed patch

 ...fix-for-systems-without-MPFR-and-GMP.patch | 63 +++++++++++++++++++
 1 file changed, 63 insertions(+)
 create mode 100644 package/gawk/0001-Workaround-fix-for-systems-without-MPFR-and-GMP.patch

diff --git a/package/gawk/0001-Workaround-fix-for-systems-without-MPFR-and-GMP.patch b/package/gawk/0001-Workaround-fix-for-systems-without-MPFR-and-GMP.patch
new file mode 100644
index 0000000000..f2377592c5
--- /dev/null
+++ b/package/gawk/0001-Workaround-fix-for-systems-without-MPFR-and-GMP.patch
@@ -0,0 +1,63 @@
+From 3cfe33f90aa3899dac3d4e933e3c1ee9ee21491d Mon Sep 17 00:00:00 2001
+From: "Arnold D. Robbins" <arnold@skeeve.com>
+Date: Tue, 14 Jul 2026 10:14:50 +0300
+Subject: [PATCH] Workaround fix for systems without MPFR and GMP.
+
+Upstream: https://cgit.git.savannah.gnu.org/cgit/gawk.git/commit/?id=bf85f8a3175af703597082d4c7e0abc2066a44d3
+https://lists.gnu.org/archive/html/bug-gawk/2026-10/msg00003.html
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ awk.h | 23 ++++++++++++++---------
+ 1 file changed, 14 insertions(+), 9 deletions(-)
+
+diff --git a/awk.h b/awk.h
+index dbad0d810..f4a84300f 100644
+--- a/awk.h
++++ b/awk.h
+@@ -406,17 +406,24 @@ typedef struct exp_node {
+ 		} nodep;
+ 
+ 		struct {
+-#ifdef HAVE_MPFR
+ 			union {
+ 				AWKNUM fltnum;
++#ifdef HAVE_MPFR
+ 				mpfr_t mpnum;
+ 				mpz_t mpi;
+-			} nm;
+-			int rndmode;
+ #else
+-			AWKNUM fltnum;
+-			int for_alignment_only;	// especially on 32-bit
+-#endif
++				// 7/2026:
++				// This is a workaround for systems that build
++				// gawk without MPFR and GMP.  The NODE struct
++				// desperately needs to be refactored.
++#if SIZEOF_VOID_P == 4
++				char alignment[28];
++#else	// SIZEOF_VOID_P != 4
++				char alignment[48];
++#endif	// SIZEOF_VOID_P != 4
++#endif	// HAVE_MPFR
++			} nm;
++			int rndmode;	// only used for MPFR.
+ 			char *sp;
+ 			size_t slen;
+ 			int idx;
+@@ -561,10 +568,8 @@ typedef struct exp_node {
+ #ifdef HAVE_MPFR
+ #define mpg_numbr	sub.val.nm.mpnum
+ #define mpg_i		sub.val.nm.mpi
+-#define numbr		sub.val.nm.fltnum
+-#else
+-#define numbr		sub.val.fltnum
+ #endif
++#define numbr		sub.val.nm.fltnum
+ #define typed_re	sub.val.typre
+ 
+ /*
+-- 
+2.47.3
+
-- 
2.47.3

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Buildroot] [PATCH v2 1/1] package/gawk: Add upstream fix for systems without MPFR and GMP
  2026-10-03 10:16 [Buildroot] [PATCH v2 1/1] package/gawk: Add upstream fix for systems without MPFR and GMP Bernd Kuhls
@ 2026-10-03 13:19 ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-10-03 13:19 UTC (permalink / raw)
  To: Bernd Kuhls; +Cc: buildroot

On Sat, Oct 03, 2026 at 12:16:32PM +0200, Bernd Kuhls wrote:
> Fixes build error with host-gcc-final:
> 
> options.cc:27216:2: error: #error 0Wabsolute-value does not have a Var() flag
> 27216 | #error 0Wabsolute-value does not have a Var() flag
> 
> $ head -n1 output/build/host-gcc-final-16.2.0/build/gcc/options.cc
>   /* This file is auto-generated by optc-gen.awk.  */
> 
> introduced by the bump of gawk to 5.4.1 with buildroot commit
> aa3db5b4e15c8dd67914d58c8d03ae2df3c92cab.
> 
> Fixes:
> https://autobuild.buildroot.net/results/672/6727e71716af3df8e2175a50740388bc669e5462/
> 
> Signed-off-by: Bernd Kuhls <bernd@kuhls.net>

Applied to master, thanks!

Best regards,

Thomas Petazzoni
-- 
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-03 13:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-03 10:16 [Buildroot] [PATCH v2 1/1] package/gawk: Add upstream fix for systems without MPFR and GMP Bernd Kuhls
2026-10-03 13:19 ` Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox