All of lore.kernel.org
 help / color / mirror / Atom feed
From: Waldemar Brodkorb <wbx@openadk.org>
To: buildroot@buildroot.org
Subject: [Buildroot] [PATCH v2] package/{glibc, localedef}: update to 2.35
Date: Tue, 15 Feb 2022 12:18:02 +0100	[thread overview]
Message-ID: <YguL6gkGFVEhpb1H@waldemar-brodkorb.de> (raw)

https://sourceware.org/pipermail/libc-alpha/2022-February/136040.html

- allow to use optimization CFLAGS (not CPPFLAGS) which are nowadays
  supported by upstream (except nios2)
- enable support for or1k, which is now included upstream
- runtime tested with qemu-system for aarch64/arm/microblaze/mips/mips64/nios2/
  or1k/powerpc/powerpc64/powerpc64le/riscv32/riscv64/s390x/sh4/sparc64/x86/x86_64

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
---
v1->v2: - remove subdirs for patches/hash file no longer required,
          sugested by Arnout
        - use TARGET_OPTIMIZATION instead of TARGET_FCFLAGS
          requested by Arnout
---
 ...v-linux-microblaze-pselect32.c-add-m.patch | 85 -------------------
 .../glibc.hash                                |  7 --
 package/glibc/glibc.hash                      |  9 +-
 package/glibc/glibc.mk                        | 17 ++--
 ...ACK-only-build-and-install-localedef.patch |  0
 ...y-on-GCC-to-4.8-and-binutils-to-2.24.patch |  0
 .../localedef.hash                            |  7 --
 package/localedef/localedef.hash              |  9 +-
 package/localedef/localedef.mk                |  2 +-
 toolchain/toolchain-buildroot/Config.in       |  3 +-
 10 files changed, 28 insertions(+), 111 deletions(-)
 delete mode 100644 package/glibc/2.34-109-gd64b08d5ba7ffbc9155630f4843cf2e271b1629c/0001-sysdeps-unix-sysv-linux-microblaze-pselect32.c-add-m.patch
 delete mode 100644 package/glibc/2.34-109-gd64b08d5ba7ffbc9155630f4843cf2e271b1629c/glibc.hash
 rename package/localedef/{2.34-109-gd64b08d5ba7ffbc9155630f4843cf2e271b1629c => }/0001-HACK-only-build-and-install-localedef.patch (100%)
 rename package/localedef/{2.34-109-gd64b08d5ba7ffbc9155630f4843cf2e271b1629c => }/0002-relax-dependency-on-GCC-to-4.8-and-binutils-to-2.24.patch (100%)
 delete mode 100644 package/localedef/2.34-109-gd64b08d5ba7ffbc9155630f4843cf2e271b1629c/localedef.hash

diff --git a/package/glibc/2.34-109-gd64b08d5ba7ffbc9155630f4843cf2e271b1629c/0001-sysdeps-unix-sysv-linux-microblaze-pselect32.c-add-m.patch b/package/glibc/2.34-109-gd64b08d5ba7ffbc9155630f4843cf2e271b1629c/0001-sysdeps-unix-sysv-linux-microblaze-pselect32.c-add-m.patch
deleted file mode 100644
index 3597cd6a11..0000000000
--- a/package/glibc/2.34-109-gd64b08d5ba7ffbc9155630f4843cf2e271b1629c/0001-sysdeps-unix-sysv-linux-microblaze-pselect32.c-add-m.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From af06fe63f9babb6d0179ae5d7d9245daada6bf56 Mon Sep 17 00:00:00 2001
-From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
-Date: Sun, 26 Dec 2021 10:30:01 +0100
-Subject: [PATCH] sysdeps/unix/sysv/linux/microblaze/pselect32.c: add missing
- implementation when !__ASSUME_TIME64_SYSCALLS
-
-In commit a92f4e6299fe0e3cb6f77e79de00817aece501ce ("linux: Add time64
-pselect support"), a Microblaze specific implementation of
-__pselect32() was added to cover the case of kernels < 3.15 which lack
-the pselect6 system call.
-
-This new file sysdeps/unix/sysv/linux/microblaze/pselect32.c takes
-precedence over the default implementation
-sysdeps/unix/sysv/linux/pselect32.c.
-
-However sysdeps/unix/sysv/linux/pselect32.c provides an implementation
-of __pselect32() which is needed when __ASSUME_TIME64_SYSCALLS is not
-defined. On Microblaze, which is a 32-bit architecture,
-__ASSUME_TIME64_SYSCALLS is only true for kernels >= 5.1.
-
-Due to sysdeps/unix/sysv/linux/microblaze/pselect32.c taking
-precedence over sysdeps/unix/sysv/linux/pselect32.c, it means that
-when we are with a kernel >= 3.15 but < 5.1, we need a __pselect32()
-implementation, but sysdeps/unix/sysv/linux/microblaze/pselect32.c
-doesn't provide it, and sysdeps/unix/sysv/linux/pselect32.c which
-would provide it is not compiled in.
-
-This causes the following build failure on Microblaze with for example
-Linux kernel headers 4.9:
-
-/home/thomas/buildroot/buildroot/output/host/lib/gcc/microblazeel-buildroot-linux-gnu/10.3.0/../../../../microblazeel-buildroot-linux-gnu/bin/ld: /home/thomas/buildroot/buildroot/output/build/glibc-2.34-9-g9acab0bba6a5a57323b1f94bf95b21618a9e5aa4/build/libc_pic.os: in function `__pselect64':
-(.text+0x120b44): undefined reference to `__pselect32'
-collect2: error: ld returned 1 exit status
-
-To fix this, we take a crude approach: replicate in
-sysdeps/unix/sysv/linux/microblaze/pselect32.c the
-!__ASSUME_TIME64_SYSCALLS implementation that is already in
-sysdeps/unix/sysv/linux/pselect32.c.
-
-Upstream: https://sourceware.org/pipermail/libc-alpha/2021-December/134635.html
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
----
- .../unix/sysv/linux/microblaze/pselect32.c    | 22 +++++++++++++++++--
- 1 file changed, 20 insertions(+), 2 deletions(-)
-
-diff --git a/sysdeps/unix/sysv/linux/microblaze/pselect32.c b/sysdeps/unix/sysv/linux/microblaze/pselect32.c
-index 70b7b52a48..6b6b3e8a2e 100644
---- a/sysdeps/unix/sysv/linux/microblaze/pselect32.c
-+++ b/sysdeps/unix/sysv/linux/microblaze/pselect32.c
-@@ -22,7 +22,25 @@
- #include <sys/poll.h>
- #include <sysdep-cancel.h>
- 
--#ifndef __ASSUME_PSELECT
-+#if !defined(__ASSUME_TIME64_SYSCALLS)
-+int
-+__pselect32 (int nfds, fd_set *readfds, fd_set *writefds,
-+	     fd_set *exceptfds, const struct __timespec64 *timeout,
-+	     const sigset_t *sigmask)
-+{
-+  struct timespec ts32, *pts32 = NULL;
-+  if (timeout != NULL)
-+    {
-+      ts32 = valid_timespec64_to_timespec (*timeout);
-+      pts32 = &ts32;
-+    }
-+
-+  return SYSCALL_CANCEL (pselect6, nfds, readfds, writefds, exceptfds,
-+			 pts32,
-+			 ((__syscall_ulong_t[]){ (uintptr_t) sigmask,
-+						 __NSIG_BYTES }));
-+}
-+#elif !defined(__ASSUME_PSELECT)
- int
- __pselect32 (int nfds, fd_set *readfds, fd_set *writefds,
- 	     fd_set *exceptfds, const struct __timespec64 *timeout,
-@@ -57,4 +75,4 @@ __pselect32 (int nfds, fd_set *readfds, fd_set *writefds,
- 
-   return ret;
- }
--#endif /* __ASSUME_PSELECT  */
-+#endif
--- 
-2.31.1
-
diff --git a/package/glibc/2.34-109-gd64b08d5ba7ffbc9155630f4843cf2e271b1629c/glibc.hash b/package/glibc/2.34-109-gd64b08d5ba7ffbc9155630f4843cf2e271b1629c/glibc.hash
deleted file mode 100644
index dfd939020f..0000000000
--- a/package/glibc/2.34-109-gd64b08d5ba7ffbc9155630f4843cf2e271b1629c/glibc.hash
+++ /dev/null
@@ -1,7 +0,0 @@
-# Locally calculated (fetched from Github)
-sha256  3c299a21468a80356b848ca341f45551616c4928a6c871e6d45cee942e8b0f24  glibc-2.34-109-gd64b08d5ba7ffbc9155630f4843cf2e271b1629c.tar.gz
-
-# Hashes for license files
-sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  COPYING
-sha256  dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551  COPYING.LIB
-sha256  b33d0bd9f685b46853548814893a6135e74430d12f6d94ab3eba42fc591f83bc  LICENSES
diff --git a/package/glibc/glibc.hash b/package/glibc/glibc.hash
index 5316f03b10..f28c15c2a3 100644
--- a/package/glibc/glibc.hash
+++ b/package/glibc/glibc.hash
@@ -1,2 +1,7 @@
-# This hash file is not used; instead, update the
-# hash files in the per-version sub-directories.
+# Locally calculated (fetched from Github)
+sha256  0ca43b2a6cd74609519554303a16e350abdac0e66943c5d98d91228233c826a0  glibc-2.35-6-g491f2ef1f0ff849490f374917957018d07ee0586.tar.gz
+
+# Hashes for license files
+sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  COPYING
+sha256  dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551  COPYING.LIB
+sha256  b33d0bd9f685b46853548814893a6135e74430d12f6d94ab3eba42fc591f83bc  LICENSES
diff --git a/package/glibc/glibc.mk b/package/glibc/glibc.mk
index 2702994c6b..7b46ad42c3 100644
--- a/package/glibc/glibc.mk
+++ b/package/glibc/glibc.mk
@@ -7,7 +7,7 @@
 # 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.34-109-gd64b08d5ba7ffbc9155630f4843cf2e271b1629c
+GLIBC_VERSION = 2.35-6-g491f2ef1f0ff849490f374917957018d07ee0586
 # Upstream doesn't officially provide an https download link.
 # There is one (https://sourceware.org/git/glibc.git) but it's not reliable,
 # sometimes the connection times out. So use an unofficial github mirror.
@@ -110,16 +110,21 @@ endif
 #
 #  2. We have to execute the configure script with bash and not sh.
 #
-# Note that as mentionned in
-# http://patches.openembedded.org/patch/38849/, glibc must be
-# built with -O2, so we pass our own CFLAGS and CXXFLAGS below.
+# Glibc nowadays can be build with optimization flags f.e. -Os
+
+GLIBC_CFLAGS = $(TARGET_OPTIMIZATION)
+# crash in qemu-system-nios2 with -Os
+ifeq ($(BR2_nios2),y)
+GLIBC_CFLAGS += -O2
+endif
+
 define GLIBC_CONFIGURE_CMDS
 	mkdir -p $(@D)/build
 	# Do the configuration
 	(cd $(@D)/build; \
 		$(TARGET_CONFIGURE_OPTS) \
-		CFLAGS="-O2 $(GLIBC_EXTRA_CFLAGS)" CPPFLAGS="" \
-		CXXFLAGS="-O2 $(GLIBC_EXTRA_CFLAGS)" \
+		CFLAGS="$(GLIBC_CFLAGS) $(GLIBC_EXTRA_CFLAGS)" CPPFLAGS="" \
+		CXXFLAGS="$(GLIBC_CFLAGS) $(GLIBC_EXTRA_CFLAGS)" \
 		$(GLIBC_CONF_ENV) \
 		$(SHELL) $(@D)/configure \
 		--target=$(GNU_TARGET_NAME) \
diff --git a/package/localedef/2.34-109-gd64b08d5ba7ffbc9155630f4843cf2e271b1629c/0001-HACK-only-build-and-install-localedef.patch b/package/localedef/0001-HACK-only-build-and-install-localedef.patch
similarity index 100%
rename from package/localedef/2.34-109-gd64b08d5ba7ffbc9155630f4843cf2e271b1629c/0001-HACK-only-build-and-install-localedef.patch
rename to package/localedef/0001-HACK-only-build-and-install-localedef.patch
diff --git a/package/localedef/2.34-109-gd64b08d5ba7ffbc9155630f4843cf2e271b1629c/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
similarity index 100%
rename from package/localedef/2.34-109-gd64b08d5ba7ffbc9155630f4843cf2e271b1629c/0002-relax-dependency-on-GCC-to-4.8-and-binutils-to-2.24.patch
rename to package/localedef/0002-relax-dependency-on-GCC-to-4.8-and-binutils-to-2.24.patch
diff --git a/package/localedef/2.34-109-gd64b08d5ba7ffbc9155630f4843cf2e271b1629c/localedef.hash b/package/localedef/2.34-109-gd64b08d5ba7ffbc9155630f4843cf2e271b1629c/localedef.hash
deleted file mode 100644
index dfd939020f..0000000000
--- a/package/localedef/2.34-109-gd64b08d5ba7ffbc9155630f4843cf2e271b1629c/localedef.hash
+++ /dev/null
@@ -1,7 +0,0 @@
-# Locally calculated (fetched from Github)
-sha256  3c299a21468a80356b848ca341f45551616c4928a6c871e6d45cee942e8b0f24  glibc-2.34-109-gd64b08d5ba7ffbc9155630f4843cf2e271b1629c.tar.gz
-
-# Hashes for license files
-sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  COPYING
-sha256  dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551  COPYING.LIB
-sha256  b33d0bd9f685b46853548814893a6135e74430d12f6d94ab3eba42fc591f83bc  LICENSES
diff --git a/package/localedef/localedef.hash b/package/localedef/localedef.hash
index 5316f03b10..f28c15c2a3 100644
--- a/package/localedef/localedef.hash
+++ b/package/localedef/localedef.hash
@@ -1,2 +1,7 @@
-# This hash file is not used; instead, update the
-# hash files in the per-version sub-directories.
+# Locally calculated (fetched from Github)
+sha256  0ca43b2a6cd74609519554303a16e350abdac0e66943c5d98d91228233c826a0  glibc-2.35-6-g491f2ef1f0ff849490f374917957018d07ee0586.tar.gz
+
+# Hashes for license files
+sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  COPYING
+sha256  dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551  COPYING.LIB
+sha256  b33d0bd9f685b46853548814893a6135e74430d12f6d94ab3eba42fc591f83bc  LICENSES
diff --git a/package/localedef/localedef.mk b/package/localedef/localedef.mk
index f8f0b42984..fb5edde0c2 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.34-109-gd64b08d5ba7ffbc9155630f4843cf2e271b1629c
+LOCALEDEF_VERSION = 2.35-6-g491f2ef1f0ff849490f374917957018d07ee0586
 LOCALEDEF_SOURCE = glibc-$(LOCALEDEF_VERSION).tar.gz
 LOCALEDEF_SITE = $(call github,bminor,glibc,$(LOCALEDEF_VERSION))
 HOST_LOCALEDEF_DL_SUBDIR = glibc
diff --git a/toolchain/toolchain-buildroot/Config.in b/toolchain/toolchain-buildroot/Config.in
index 4004c0edf8..437daafa74 100644
--- a/toolchain/toolchain-buildroot/Config.in
+++ b/toolchain/toolchain-buildroot/Config.in
@@ -49,7 +49,8 @@ config BR2_TOOLCHAIN_BUILDROOT_GLIBC
 		   BR2_powerpc     || BR2_powerpc64  || BR2_powerpc64le || \
 		   BR2_riscv       || BR2_s390x      || BR2_sh          || \
 		   BR2_sparc64     || BR2_x86_64     || BR2_microblaze  || \
-		   BR2_nios2       || (BR2_arc && BR2_ARC_ATOMIC_EXT)   || BR2_csky
+		   BR2_nios2       || (BR2_arc && BR2_ARC_ATOMIC_EXT)   || \
+		   BR2_csky 	   || BR2_or1k
 	depends on BR2_USE_MMU
 	depends on !BR2_STATIC_LIBS
 	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
-- 
2.30.2

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

             reply	other threads:[~2022-02-15 11:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-15 11:18 Waldemar Brodkorb [this message]
2022-05-07 20:32 ` [Buildroot] [PATCH v2] package/{glibc, localedef}: update to 2.35 Petr Vorel
2022-05-10 19:45   ` Arnout Vandecappelle

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=YguL6gkGFVEhpb1H@waldemar-brodkorb.de \
    --to=wbx@openadk.org \
    --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 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.