public inbox for buildroot@busybox.net
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v3 1/2] package/gcc/15.2.0: fix build with glibc 2.43
@ 2026-03-07  9:27 Bernd Kuhls
  2026-03-07  9:27 ` [Buildroot] [PATCH v3 2/2] package/{glibc, localedef}: bump version to 2.43 Bernd Kuhls
  2026-03-08 16:43 ` [Buildroot] [PATCH v3 1/2] package/gcc/15.2.0: fix build with glibc 2.43 Julien Olivain via buildroot
  0 siblings, 2 replies; 3+ messages in thread
From: Bernd Kuhls @ 2026-03-07  9:27 UTC (permalink / raw)
  To: buildroot; +Cc: Giulio Benetti, Romain Naour, Thomas Petazzoni

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
v3: fix format error
v2: no changes

 ...mp-Fix-GCC-build-after-glibc-cd748a6.patch | 77 +++++++++++++++++++
 1 file changed, 77 insertions(+)
 create mode 100644 package/gcc/15.2.0/0004-libgomp-Fix-GCC-build-after-glibc-cd748a6.patch

diff --git a/package/gcc/15.2.0/0004-libgomp-Fix-GCC-build-after-glibc-cd748a6.patch b/package/gcc/15.2.0/0004-libgomp-Fix-GCC-build-after-glibc-cd748a6.patch
new file mode 100644
index 0000000000..e24c4dd57e
--- /dev/null
+++ b/package/gcc/15.2.0/0004-libgomp-Fix-GCC-build-after-glibc-cd748a6.patch
@@ -0,0 +1,77 @@
+From 9c9d3aef2f66625d9cb03ef4baee10ed6648e681 Mon Sep 17 00:00:00 2001
+From: Frank Scheiner <frank.scheiner@web.de>
+Date: Tue, 25 Nov 2025 16:58:23 -0700
+Subject: [PATCH] [PATCH] libgomp: Fix GCC build after glibc@cd748a6
+
+The toolchain autobuilds for ia64 failed ([1]) yesterday with:
+
+```
+libtool: compile:  /usr/src/t2-src/src.gcc.ia64-toolchain.251121.040147.278918/gcc-16-20251116/objs/gcc/xgcc-wrapper /usr/src/t2-src/src.gcc.ia64-toolchain.251121.040147.278918/gcc-16-20251116/objs/./gcc/xgcc -B/usr/src/t2-src/src.gcc.ia64-toolchain.251121.040147.278918/gcc-16-20251116/objs/./gcc/ -B/usr/src/t2-src/build/ia64-toolchain-24-svn-generic-ia64-itanium2-cross-linux/TOOLCHAIN/cross/usr/ia64-t2-linux-gnu/bin/ -B/usr/src/t2-src/build/ia64-toolchain-24-svn-generic-ia64-itanium2-cross-linux/TOOLCHAIN/cross/usr/ia64-t2-linux-gnu/lib/ -isystem /usr/src/t2-src/build/ia64-toolchain-24-svn-generic-ia64-itanium2-cross-linux/TOOLCHAIN/cross/usr/ia64-t2-linux-gnu/include -isystem /usr/src/t2-src/build/ia64-toolchain-24-svn-generic-ia64-itanium2-cross-linux/TOOLCHAIN/cross/usr/ia64-t2-linux-gnu/sys-include --sysroot=/usr/src/t2-src/build/ia64-toolchain-24-svn-generic-ia64-itanium2-cross-linux -DHAVE_CONFIG_H -I. -I../../../libgomp -I../../../libgomp/config/linux/ia64 -I../../../libgomp
 /config/linux -I../../../libgomp/config/posix -I../../../libgomp -I../../../libgomp/../include -Wall -Werror -ftls-model=initial-exec -pthread -DUSING_INITIAL_EXEC_TLS -g -O2 -MT oacc-cuda.lo -MD -MP -MF .deps/oacc-cuda.Tpo -c ../../../libgomp/oacc-cuda.c -o oacc-cuda.o >/dev/null 2>&1
+../../../libgomp/affinity-fmt.c: In function 'gomp_display_affinity':
+../../../libgomp/affinity-fmt.c:330:25: error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
+  330 |               char *q = strchr (p + 1, '}');
+      |                         ^~~~~~
+```
+
+[1]: https://github.com/johnny-mnemonic/toolchain-autobuilds/actions/runs/19559235881
+
+This is not ia64-specific but due to the changes in the recent glibc
+commit "Implement C23 const-preserving standard library macros" (i.e.
+[2]) now requiring "char *q" to be a pointer to a const char to compile
+w/o error because of the return value of strchr() .
+
+[2]: https://sourceware.org/git/?p=glibc.git;a=commit;h=cd748a63ab1a7ae846175c532a3daab341c62690
+
+Also see the related discussion at [3] for details.
+
+[3]: https://sourceware.org/pipermail/libc-alpha/2025-November/172809.html
+
+The GCC build is fixed by the attached patch, see [4] for a successful
+build with the then latest snapshots of binutils, glibc and GCC.
+
+[4]: https://github.com/johnny-mnemonic/toolchain-autobuilds/actions/runs/19585045571
+
+Idea from Tomas, attached patch from me.
+
+Cheers,
+Frank
+
+0001-libgomp-Fix-GCC-build-after-glibc-cd748a6.patch
+
+From 80af9c233c694904174b54a59404d311378f41f8 Mon Sep 17 00:00:00 2001
+From: Frank Scheiner <frank.scheiner@web.de>
+Date: Sat, 22 Nov 2025 14:58:10 +0100
+Subject: [PATCH] libgomp: Fix GCC build after glibc@cd748a6
+
+char *q needs to be a pointer to a const char for the return value of
+strchr() with glibc after "Implement C23 const-preserving standard library
+macros".
+
+[glibc@cd748a6]: https://sourceware.org/git/?p=glibc.git;a=commit;h=cd748a63ab1a7ae846175c532a3daab341c62690
+
+libgomp/ChangeLog:
+	* affinity-fmt.c: Make char *q a pointer to a const char.
+
+Upstream: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=9c9d3aef2f66625d9cb03ef4baee10ed6648e681
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ libgomp/affinity-fmt.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libgomp/affinity-fmt.c b/libgomp/affinity-fmt.c
+index 1fae893cbaca..8d3df5f1cd55 100644
+--- a/libgomp/affinity-fmt.c
++++ b/libgomp/affinity-fmt.c
+@@ -327,7 +327,7 @@ gomp_display_affinity (char *buffer, size_t size,
+ 	      }
+ 	  if (c == '{')
+ 	    {
+-	      char *q = strchr (p + 1, '}');
++	      const char *q = strchr (p + 1, '}');
+ 	      if (q)
+ 		gomp_fatal ("unsupported long type name '%.*s' in affinity "
+ 			    "format", (int) (q - (p + 1)), p + 1);
+-- 
+2.43.7
+
-- 
2.47.3

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

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

* [Buildroot] [PATCH v3 2/2] package/{glibc, localedef}: bump version to 2.43
  2026-03-07  9:27 [Buildroot] [PATCH v3 1/2] package/gcc/15.2.0: fix build with glibc 2.43 Bernd Kuhls
@ 2026-03-07  9:27 ` Bernd Kuhls
  2026-03-08 16:43 ` [Buildroot] [PATCH v3 1/2] package/gcc/15.2.0: fix build with glibc 2.43 Julien Olivain via buildroot
  1 sibling, 0 replies; 3+ messages in thread
From: Bernd Kuhls @ 2026-03-07  9:27 UTC (permalink / raw)
  To: buildroot; +Cc: Giulio Benetti, Romain Naour, Thomas Petazzoni

Updated license files and hashes due to upstream commit:
https://sourceware.org/git/?p=glibc.git;a=commit;h=a0ce8b0779e290596e99ca6d96c301684a2d7cfe

Rebased patches 0001-0003.

Added patch 0004 to fix build on hosts with glibc < 2.43 due to upstream
commit:
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=f28a11e43f40df2ad92ece62b28ee004a8ad600b

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
v3: no changes
v2: To fix build with older glibc re-added patch 0003 and added new
    patch 0004 (Julien)
    Rebased complete patch set.

 package/glibc/glibc.hash                      |  6 +--
 package/glibc/glibc.mk                        |  4 +-
 ...ACK-only-build-and-install-localedef.patch |  8 ++--
 ...y-on-GCC-to-4.8-and-binutils-to-2.24.patch | 10 +++--
 ...3_SOURCE-undefined-to-build-localede.patch |  6 ++-
 ...ONOTONIC-ACTIVE-THREAD_ACTIVE-withou.patch | 40 +++++++++++++++++++
 package/localedef/localedef.mk                |  2 +-
 7 files changed, 61 insertions(+), 15 deletions(-)
 create mode 100644 package/localedef/0004-HACK-use-TIME_-MONOTONIC-ACTIVE-THREAD_ACTIVE-withou.patch

diff --git a/package/glibc/glibc.hash b/package/glibc/glibc.hash
index 0a11cfdb5e..ed6d69acc2 100644
--- a/package/glibc/glibc.hash
+++ b/package/glibc/glibc.hash
@@ -1,7 +1,7 @@
 # Locally calculated (fetched from git)
-sha256  737e3b2bfee2e3e209e514133f4ff7d2bef0d0dc903fd46b4e2244f6c998f7b2  glibc-2.42-51-gcbf39c26b25801e9bc88499b4fd361ac172d4125-git4.tar.gz
+sha256  5e21722755f466d15770574788394a4abb4fb1e02603a707beeb199706a26a46  glibc-2.43-10-gc3ceb93dc4f67253037644dc8f194831e27f3160-git4.tar.gz
 
 # Hashes for license files
-sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  COPYING
-sha256  dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551  COPYING.LIB
+sha256  edaef632cbb643e4e7a221717a6c441a4c1a7c918e6e4d56debc3d8739b233f6  COPYINGv2
+sha256  20e50fe7aae3e56378ebf0417d9de904f55a0e61e4df315333e632a4d3555d95  COPYING.LESSERv2
 sha256  b22a69aa3f80a5201818c66cb0df0f25f9fa13cf5861b0093a058dbd12d50dce  LICENSES
diff --git a/package/glibc/glibc.mk b/package/glibc/glibc.mk
index 80d21b86ed..64a2c58377 100644
--- a/package/glibc/glibc.mk
+++ b/package/glibc/glibc.mk
@@ -7,12 +7,12 @@
 # Generate version string using:
 #   git describe --match 'glibc-*' --abbrev=40 origin/release/MAJOR.MINOR/master | cut -d '-' -f 2-
 # When updating the version, please also update localedef
-GLIBC_VERSION = 2.42-51-gcbf39c26b25801e9bc88499b4fd361ac172d4125
+GLIBC_VERSION = 2.43-10-gc3ceb93dc4f67253037644dc8f194831e27f3160
 GLIBC_SITE = https://sourceware.org/git/glibc.git
 GLIBC_SITE_METHOD = git
 
 GLIBC_LICENSE = GPL-2.0+ (programs), LGPL-2.1+, BSD-3-Clause, MIT (library)
-GLIBC_LICENSE_FILES = COPYING COPYING.LIB LICENSES
+GLIBC_LICENSE_FILES = COPYINGv2 COPYING.LESSERv2 LICENSES
 GLIBC_CPE_ID_VENDOR = gnu
 
 # Extract the base version (e.g. 2.38) from GLIBC_VERSION in order to
diff --git a/package/localedef/0001-HACK-only-build-and-install-localedef.patch b/package/localedef/0001-HACK-only-build-and-install-localedef.patch
index dd3906eb37..b7c51c4ed3 100644
--- a/package/localedef/0001-HACK-only-build-and-install-localedef.patch
+++ b/package/localedef/0001-HACK-only-build-and-install-localedef.patch
@@ -11,16 +11,18 @@ Signed-off-by: Peter Seiderer <ps.report@gmx.net>
 Signed-off-by: Romain Naour <romain.naour@gmail.com>
 [yann.morin.1998@free.fr: rebase for 2.39]
 Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
+[Bernd: rebase for 2.43]
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
 ---
  Rules           | 14 ++++++++++----
  locale/Makefile |  3 ---
  2 files changed, 10 insertions(+), 7 deletions(-)
 
 diff --git a/Rules b/Rules
-index 44c041c491..156c82619b 100644
+index b07400a979..4ce2180b49 100644
 --- a/Rules
 +++ b/Rules
-@@ -239,10 +239,16 @@ binaries-shared-notests = $(filter-out $(binaries-pie) $(binaries-static), \
+@@ -247,10 +247,16 @@ binaries-shared-notests = $(filter-out $(binaries-pie) $(binaries-static), \
  				       $(binaries-all-notests))
  
  ifneq "$(strip $(binaries-shared-notests))" ""
@@ -42,7 +44,7 @@ index 44c041c491..156c82619b 100644
  
  ifneq "$(strip $(binaries-shared-tests))" ""
 diff --git a/locale/Makefile b/locale/Makefile
-index 9d9c1a7691..4d26032c15 100644
+index fc38c02114..c00bc085b4 100644
 --- a/locale/Makefile
 +++ b/locale/Makefile
 @@ -76,7 +76,6 @@ aux = \
diff --git a/package/localedef/0002-relax-dependency-on-GCC-to-4.8-and-binutils-to-2.24.patch b/package/localedef/0002-relax-dependency-on-GCC-to-4.8-and-binutils-to-2.24.patch
index cc11c9a08c..30799cfc46 100644
--- a/package/localedef/0002-relax-dependency-on-GCC-to-4.8-and-binutils-to-2.24.patch
+++ b/package/localedef/0002-relax-dependency-on-GCC-to-4.8-and-binutils-to-2.24.patch
@@ -30,15 +30,17 @@ Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
 Signed-off-by: Romain Naour <romain.naour@gmail.com>
 [yann.morin.1998@free.fr: rebase for 2.39]
 Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
+[Bernd: rebase for 2.43]
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
 ---
  configure | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/configure b/configure
-index 180e49d95b..fdb19d1d27 100755
+index 0cd2269859..1c7e42ec10 100755
 --- a/configure
 +++ b/configure
-@@ -5352,7 +5352,7 @@ printf %s "checking version of $LD... " >&6; }
+@@ -5350,7 +5350,7 @@ printf %s "checking version of $LD... " >&6; }
    ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*GNU ld.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'`
    case $ac_prog_version in
      '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
@@ -47,11 +49,11 @@ index 180e49d95b..fdb19d1d27 100755
         ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
      *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
  
-@@ -5801,7 +5801,7 @@ int
+@@ -5799,7 +5799,7 @@ int
  main (void)
  {
  
--#if !defined __GNUC__ || __GNUC__ < 12 || (__GNUC__ == 12 && __GNUC_MINOR__ < 1)
+-#if (!defined __GNUC__ || __GNUC__ < 12 || (__GNUC__ == 12 && __GNUC_MINOR__ < 1)) && (!defined __clang__ || __clang_major__ < 18)
 +#if !defined __GNUC__ || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 8)
  #error insufficient compiler
  #endif
diff --git a/package/localedef/0003-HACK-keep-_ISOC23_SOURCE-undefined-to-build-localede.patch b/package/localedef/0003-HACK-keep-_ISOC23_SOURCE-undefined-to-build-localede.patch
index 5c3803d583..cf9c224a44 100644
--- a/package/localedef/0003-HACK-keep-_ISOC23_SOURCE-undefined-to-build-localede.patch
+++ b/package/localedef/0003-HACK-keep-_ISOC23_SOURCE-undefined-to-build-localede.patch
@@ -14,15 +14,17 @@ Signed-off-by: Romain Naour <romain.naour@gmail.com>
 [Thomas: adapted to glibc 2.40, which required the logic to be changed
 to _ISOC23_SOURCE]
 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+[Bernd: rebase for 2.43]
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
 ---
  include/features.h | 2 --
  1 file changed, 2 deletions(-)
 
 diff --git a/include/features.h b/include/features.h
-index 8515b06b36..9abd65af93 100644
+index c080ad4260..230fd2539a 100644
 --- a/include/features.h
 +++ b/include/features.h
-@@ -217,9 +217,7 @@
+@@ -223,9 +223,7 @@
  # undef  _ISOC11_SOURCE
  # define _ISOC11_SOURCE	1
  # undef  _ISOC23_SOURCE
diff --git a/package/localedef/0004-HACK-use-TIME_-MONOTONIC-ACTIVE-THREAD_ACTIVE-withou.patch b/package/localedef/0004-HACK-use-TIME_-MONOTONIC-ACTIVE-THREAD_ACTIVE-withou.patch
new file mode 100644
index 0000000000..166f7a9bcb
--- /dev/null
+++ b/package/localedef/0004-HACK-use-TIME_-MONOTONIC-ACTIVE-THREAD_ACTIVE-withou.patch
@@ -0,0 +1,40 @@
+From e9fe5e8d20b360b8cdf3fe55a52f077c178f7c2d Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <bernd@kuhls.net>
+Date: Fri, 6 Mar 2026 20:59:28 +0100
+Subject: [PATCH] HACK: use TIME_[MONOTONIC|ACTIVE|THREAD_ACTIVE] without
+ _ISOC23_SOURCE to build localedef with old glibc
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes:
+../include/time.h:545:11: error: ‘TIME_MONOTONIC’ undeclared
+ (first use in this function); did you mean ‘CLOCK_MONOTONIC’?
+../include/time.h:546:11: error: ‘TIME_ACTIVE’ undeclared
+ (first use in this function); did you mean ‘TIMER_ABSTIME’?
+../include/time.h:547:11: error: ‘TIME_THREAD_ACTIVE’ undeclared
+ (first use in this function)
+
+Upstream: Not applicable
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ time/time.h | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/time/time.h b/time/time.h
+index ae7beccb72..0a2e8e741f 100644
+--- a/time/time.h
++++ b/time/time.h
+@@ -67,8 +67,6 @@ typedef __pid_t pid_t;
+ #ifdef __USE_ISOC11
+ /* Time base values for timespec_get.  */
+ # define TIME_UTC 1
+-#endif
+-#if __GLIBC_USE (ISOC23)
+ # define TIME_MONOTONIC          2
+ # define TIME_ACTIVE             3
+ # define TIME_THREAD_ACTIVE      4
+-- 
+2.50.1
+
diff --git a/package/localedef/localedef.mk b/package/localedef/localedef.mk
index 4da110417a..aa746a9d70 100644
--- a/package/localedef/localedef.mk
+++ b/package/localedef/localedef.mk
@@ -7,7 +7,7 @@
 # Use the same VERSION and SITE as target glibc
 # As in glibc.mk, generate version string using:
 #   git describe --match 'glibc-*' --abbrev=40 origin/release/MAJOR.MINOR/master | cut -d '-' -f 2-
-LOCALEDEF_VERSION = 2.42-51-gcbf39c26b25801e9bc88499b4fd361ac172d4125
+LOCALEDEF_VERSION = 2.43-10-gc3ceb93dc4f67253037644dc8f194831e27f3160
 LOCALEDEF_SOURCE = glibc-$(LOCALEDEF_VERSION)$(BR_FMT_VERSION_git).tar.gz
 LOCALEDEF_SITE = https://sourceware.org/git/glibc.git
 LOCALEDEF_SITE_METHOD = git
-- 
2.47.3

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

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

* Re: [Buildroot] [PATCH v3 1/2] package/gcc/15.2.0: fix build with glibc 2.43
  2026-03-07  9:27 [Buildroot] [PATCH v3 1/2] package/gcc/15.2.0: fix build with glibc 2.43 Bernd Kuhls
  2026-03-07  9:27 ` [Buildroot] [PATCH v3 2/2] package/{glibc, localedef}: bump version to 2.43 Bernd Kuhls
@ 2026-03-08 16:43 ` Julien Olivain via buildroot
  1 sibling, 0 replies; 3+ messages in thread
From: Julien Olivain via buildroot @ 2026-03-08 16:43 UTC (permalink / raw)
  To: Bernd Kuhls; +Cc: buildroot, Giulio Benetti, Romain Naour, Thomas Petazzoni

On 07/03/2026 10:27, Bernd Kuhls wrote:
> Signed-off-by: Bernd Kuhls <bernd@kuhls.net>

Series applied to master, thanks.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2026-03-08 16:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-07  9:27 [Buildroot] [PATCH v3 1/2] package/gcc/15.2.0: fix build with glibc 2.43 Bernd Kuhls
2026-03-07  9:27 ` [Buildroot] [PATCH v3 2/2] package/{glibc, localedef}: bump version to 2.43 Bernd Kuhls
2026-03-08 16:43 ` [Buildroot] [PATCH v3 1/2] package/gcc/15.2.0: fix build with glibc 2.43 Julien Olivain via buildroot

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