Hi,

On 2025-06-06 00:24, Sebastian Ramacher wrote:
> Control: tags -1 confirmed moreinfo
> 
> On 2025-06-05 23:16:55 +0200, Aurelien Jarno wrote:
> > Package: release.debian.org
> > Severity: normal
> > Tags: trixie security
> > X-Debbugs-Cc: gl...@packages.debian.org
> > Control: affects -1 + src:glibc
> > User: release.debian....@packages.debian.org
> > Usertags: unblock
> > 
> > Please pre-approve unblocking of package glibc/2.41-9
> 
> Please go ahead and remove the moreinfo tag once it has been uploaded
> and built everywhere.

It took longer to expected, but the two CVE issues are now fixed 
upstream. At the end instead of fixing the optimized POWER10 functions, 
they just got removed. The diff is therefore a bit bigger than expected, 
but the result is safer, with the same optimized versiona s in bookworm. 
In addition two hurd patches got added in the meantime, but they only 
touch Hurd specific files that are not compiled on Linux.

I have attached the new debdiff and just uploaded the package. I will 
remove the moreinfo tag once all looks fine.

Regards
Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurel...@aurel32.net                     http://aurel32.net
diff -Nru glibc-2.41/debian/changelog glibc-2.41/debian/changelog
--- glibc-2.41/debian/changelog 2025-05-17 17:15:43.000000000 +0200
+++ glibc-2.41/debian/changelog 2025-06-18 06:49:31.000000000 +0200
@@ -1,3 +1,25 @@
+glibc (2.41-9) unstable; urgency=medium
+
+  [ Aurelien Jarno ]
+  * debian/patches/git-updates.diff: update from upstream stable branch:
+    - Fix loading TLS-using modules using LD_AUDIT.
+    - Add tests for CVE-2025-4802.
+    - Fix swapped wcsncpy and wcpncpy function names in IFUNC definition.
+    - Fix elf/tst-execstack-prog-static-tunable on sparc64.
+    - Remove POWER10 optimized strcmp function (GLIBC-SA-2025-0003 /
+      CVE-2025-5702).  Closes: #1107365.
+    - Remove POWER10 optimized strncmp function (GLIBC-SA-2025-0004 /
+      CVE-2025-5745).  Closes: #1107366.
+    - Remove POWER10 optimized memchr function.
+
+  [ Samuel Thibault ]
+  * debian/patches/hurd-i386/git-rename.diff: Make rename refuse trailing
+    slashes.
+  * debian/patches/hurd-i386/local-64b-align.diff: Avoid 64b typing error on
+    RPCs using 64b fields in structures.
+
+ -- Aurelien Jarno <aure...@debian.org>  Wed, 18 Jun 2025 06:49:31 +0200
+
 glibc (2.41-8) unstable; urgency=medium
 
   [ Samuel Thibault ]
diff -Nru glibc-2.41/debian/patches/git-updates.diff 
glibc-2.41/debian/patches/git-updates.diff
--- glibc-2.41/debian/patches/git-updates.diff  2025-05-09 22:40:48.000000000 
+0200
+++ glibc-2.41/debian/patches/git-updates.diff  2025-06-18 06:49:31.000000000 
+0200
@@ -22,10 +22,10 @@
  $(common-objdir):$(subst $(empty) ,:,$(patsubst 
../$(subdir),.,$(rpath-dirs:%=$(common-objpfx)%)))
  else  # build-static
 diff --git a/NEWS b/NEWS
-index b11422b060..51586aaad7 100644
+index b11422b060..90d090ea77 100644
 --- a/NEWS
 +++ b/NEWS
-@@ -5,6 +5,31 @@ See the end for copying conditions.
+@@ -5,6 +5,34 @@ See the end for copying conditions.
  Please send GNU C library bug reports via <https://sourceware.org/bugzilla/>
  using `glibc' in the "product" field.
  
@@ -53,6 +53,9 @@
 +  [32882] tst-audit10 fails with SIGILL on CPUs without AVX
 +  [32897] dynamic-link: pthread_getattr_np fails when executable stack
 +    tunable is set
++  [32981] ports: elf/tst-execstack-prog-static-tunable fails on
++    sparc64-linux-gnu
++  [32987] elf: Fix subprocess status handling for tst-dlopen-sgid
 +
  Version 2.41
  
@@ -904,7 +907,7 @@
  AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#ifdef PIE_UNSUPPORTED
  # error PIE is not supported
 diff --git a/elf/Makefile b/elf/Makefile
-index 4b1d0d8741..3a3ae56a24 100644
+index 4b1d0d8741..f42cb154fb 100644
 --- a/elf/Makefile
 +++ b/elf/Makefile
 @@ -61,6 +61,7 @@ dl-routines = \
@@ -915,7 +918,23 @@
    dl-fini \
    dl-init \
    dl-load \
-@@ -567,9 +568,11 @@ tests-execstack-yes = \
+@@ -266,6 +267,7 @@ tests-static-normal := \
+   tst-array1-static \
+   tst-array5-static \
+   tst-dl-iter-static \
++  tst-dlopen-sgid \
+   tst-dst-static \
+   tst-env-setuid-static \
+   tst-getauxval-static \
+@@ -379,6 +381,7 @@ tests += \
+   tst-align3 \
+   tst-audit-tlsdesc \
+   tst-audit-tlsdesc-dlopen \
++  tst-audit-tlsdesc-dlopen2 \
+   tst-audit1 \
+   tst-audit2 \
+   tst-audit8 \
+@@ -567,9 +570,11 @@ tests-execstack-yes = \
    tst-execstack \
    tst-execstack-needed \
    tst-execstack-prog \
@@ -928,7 +947,23 @@
    # tests-execstack-static-yes
  ifeq (yes,$(run-built-tests))
  tests-execstack-special-yes = \
-@@ -1144,6 +1147,10 @@ tests-pie += \
+@@ -863,6 +868,7 @@ modules-names += \
+   tst-auditmanymod8 \
+   tst-auditmanymod9 \
+   tst-auditmod-tlsdesc  \
++  tst-auditmod-tlsdesc2 \
+   tst-auditmod1 \
+   tst-auditmod11 \
+   tst-auditmod12 \
+@@ -905,6 +911,7 @@ modules-names += \
+   tst-dlmopen1mod \
+   tst-dlopen-auditdup-auditmod \
+   tst-dlopen-auditdupmod \
++  tst-dlopen-sgid-mod \
+   tst-dlopen-tlsreinitmod1 \
+   tst-dlopen-tlsreinitmod2 \
+   tst-dlopen-tlsreinitmod3 \
+@@ -1144,6 +1151,10 @@ tests-pie += \
    tst-pie1 \
    tst-pie2 \
    # tests-pie
@@ -939,7 +974,7 @@
  ifneq (,$(load-address-ldflag))
  tests += \
    tst-pie-address \
-@@ -1159,6 +1166,10 @@ tests += \
+@@ -1159,6 +1170,10 @@ tests += \
  tests-static += \
    tst-pie-address-static \
    # tests-static
@@ -950,7 +985,7 @@
  LDFLAGS-tst-pie-address-static += \
    $(load-address-ldflag)=$(pde-load-address)
  endif
-@@ -1988,6 +1999,9 @@ $(objpfx)tst-execstack.out: $(objpfx)tst-execstack-mod.so
+@@ -1988,6 +2003,9 @@ $(objpfx)tst-execstack.out: $(objpfx)tst-execstack-mod.so
  CPPFLAGS-tst-execstack.c += -DUSE_PTHREADS=0
  LDFLAGS-tst-execstack = -Wl,-z,noexecstack
  LDFLAGS-tst-execstack-mod.so = -Wl,-z,execstack
@@ -960,7 +995,7 @@
  
  $(objpfx)tst-execstack-needed: $(objpfx)tst-execstack-mod.so
  LDFLAGS-tst-execstack-needed = -Wl,-z,noexecstack
-@@ -1996,7 +2010,18 @@ LDFLAGS-tst-execstack-prog = -Wl,-z,execstack
+@@ -1996,7 +2014,18 @@ LDFLAGS-tst-execstack-prog = -Wl,-z,execstack
  CFLAGS-tst-execstack-prog.c += -Wno-trampolines
  CFLAGS-tst-execstack-mod.c += -Wno-trampolines
  
@@ -979,7 +1014,7 @@
  CFLAGS-tst-execstack-prog-static.c += -Wno-trampolines
  
  ifeq (yes,$(build-hardcoded-path-in-tests))
-@@ -2074,6 +2099,7 @@ $(objpfx)tst-array5-static-cmp.out: 
tst-array5-static.exp \
+@@ -2074,6 +2103,7 @@ $(objpfx)tst-array5-static-cmp.out: 
tst-array5-static.exp \
  
  CFLAGS-tst-pie1.c += $(pie-ccflag)
  CFLAGS-tst-pie2.c += $(pie-ccflag)
@@ -987,6 +1022,22 @@
  CFLAGS-tst-pie-address.c += $(pie-ccflag)
  
  $(objpfx)tst-piemod1.so: $(libsupport)
+@@ -3189,6 +3219,9 @@ $(objpfx)tst-audit-tlsdesc.out: 
$(objpfx)tst-auditmod-tlsdesc.so
+ tst-audit-tlsdesc-ENV = LD_AUDIT=$(objpfx)tst-auditmod-tlsdesc.so
+ $(objpfx)tst-audit-tlsdesc-dlopen.out: $(objpfx)tst-auditmod-tlsdesc.so
+ tst-audit-tlsdesc-dlopen-ENV = LD_AUDIT=$(objpfx)tst-auditmod-tlsdesc.so
++$(objpfx)tst-audit-tlsdesc-dlopen2.out: $(objpfx)tst-auditmod-tlsdesc2.so \
++  $(patsubst %, $(objpfx)%.so, $(tlsmod17a-modules))
++tst-audit-tlsdesc-dlopen2-ENV = LD_AUDIT=$(objpfx)tst-auditmod-tlsdesc2.so
+ 
+ $(objpfx)tst-dlmopen-twice.out: \
+   $(objpfx)tst-dlmopen-twice-mod1.so \
+@@ -3392,3 +3425,5 @@ $(objpfx)tst-nolink-libc-2: $(objpfx)tst-nolink-libc.o
+         -Wl,--dynamic-linker=$(objpfx)ld.so
+ $(objpfx)tst-nolink-libc-2.out: $(objpfx)tst-nolink-libc-2 $(objpfx)ld.so
+       $< > $@ 2>&1; $(evaluate-test)
++
++$(objpfx)tst-dlopen-sgid.out: $(objpfx)tst-dlopen-sgid-mod.so
 diff --git a/elf/dl-execstack-tunable.c b/elf/dl-execstack-tunable.c
 new file mode 100644
 index 0000000000..e3b638aeaa
@@ -1096,6 +1147,24 @@
  
    call_function_static_weak (_dl_find_object_init);
  
+diff --git a/elf/dl-tls.c b/elf/dl-tls.c
+index 8306a39e8d..5686df5ad2 100644
+--- a/elf/dl-tls.c
++++ b/elf/dl-tls.c
+@@ -560,6 +560,13 @@ _dl_resize_dtv (dtv_t *dtv, size_t max_modid)
+       if (newp == NULL)
+       oom ();
+       memcpy (newp, &dtv[-1], (2 + oldsize) * sizeof (dtv_t));
++#ifdef SHARED
++      /* Auditors can trigger a DTV resize event while the full malloc
++       is not yet in use.  Mark the new DTV allocation as the
++       initial allocation.  */
++      if (!__rtld_malloc_is_complete ())
++      GL(dl_initial_dtv) = &newp[1];
++#endif
+     }
+   else
+     {
 diff --git a/elf/dl-tunables.list b/elf/dl-tunables.list
 index 0b6721bc51..c03c9967f0 100644
 --- a/elf/dl-tunables.list
@@ -1126,6 +1195,248 @@
  
    /* If the current libname is different from the SONAME, add the
       latter as well.  */
+diff --git a/elf/tst-audit-tlsdesc-dlopen2.c b/elf/tst-audit-tlsdesc-dlopen2.c
+new file mode 100644
+index 0000000000..7ba2c4129a
+--- /dev/null
++++ b/elf/tst-audit-tlsdesc-dlopen2.c
+@@ -0,0 +1,46 @@
++/* Loading TLS-using modules from auditors (bug 32412).  Main program.
++   Copyright (C) 2021-2025 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, see
++   <https://www.gnu.org/licenses/>.  */
++
++#include <support/xdlfcn.h>
++#include <stdio.h>
++
++static int
++do_test (void)
++{
++  puts ("info: start of main program");
++
++  /* Load TLS-using modules, to trigger DTV resizing.  The dynamic
++     linker will load them again (requiring their own TLS) because the
++     dlopen calls from the auditor were in the auditing namespace.  */
++  for (int i = 1; i <= 19; ++i)
++    {
++      char dso[30];
++      snprintf (dso, sizeof (dso), "tst-tlsmod17a%d.so", i);
++      char sym[30];
++      snprintf (sym, sizeof(sym), "tlsmod17a%d", i);
++
++      void *handle = xdlopen (dso, RTLD_LAZY);
++      int (*func) (void) = xdlsym (handle, sym);
++      /* Trigger TLS allocation.  */
++      func ();
++    }
++
++  return 0;
++}
++
++#include <support/test-driver.c>
+diff --git a/elf/tst-auditmod-tlsdesc2.c b/elf/tst-auditmod-tlsdesc2.c
+new file mode 100644
+index 0000000000..50275cd34d
+--- /dev/null
++++ b/elf/tst-auditmod-tlsdesc2.c
+@@ -0,0 +1,59 @@
++/* Loading TLS-using modules from auditors (bug 32412).  Audit module.
++   Copyright (C) 2021-2025 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, see
++   <https://www.gnu.org/licenses/>.  */
++
++#include <dlfcn.h>
++#include <link.h>
++#include <stdbool.h>
++#include <stdio.h>
++#include <unistd.h>
++
++unsigned int
++la_version (unsigned int version)
++{
++  /* Open some modules, to trigger DTV resizing before the switch to
++     the main malloc.  */
++  for (int i = 1; i <= 19; ++i)
++    {
++      char dso[30];
++      snprintf (dso, sizeof (dso), "tst-tlsmod17a%d.so", i);
++      char sym[30];
++      snprintf (sym, sizeof(sym), "tlsmod17a%d", i);
++
++      void *handle = dlopen (dso, RTLD_LAZY);
++      if (handle == NULL)
++        {
++          printf ("error: dlmopen from auditor: %s\n", dlerror  ());
++          fflush (stdout);
++          _exit (1);
++        }
++      int (*func) (void) = dlsym (handle, sym);
++      if (func == NULL)
++        {
++          printf ("error: dlsym from auditor: %s\n", dlerror  ());
++          fflush (stdout);
++          _exit (1);
++        }
++      /* Trigger TLS allocation.  */
++      func ();
++    }
++
++  puts ("info: TLS-using modules loaded from auditor");
++  fflush (stdout);
++
++  return LAV_CURRENT;
++}
+diff --git a/elf/tst-dlopen-sgid-mod.c b/elf/tst-dlopen-sgid-mod.c
+new file mode 100644
+index 0000000000..5eb79eef48
+--- /dev/null
++++ b/elf/tst-dlopen-sgid-mod.c
+@@ -0,0 +1 @@
++/* Opening this object should not succeed.  */
+diff --git a/elf/tst-dlopen-sgid.c b/elf/tst-dlopen-sgid.c
+new file mode 100644
+index 0000000000..5688b79f2e
+--- /dev/null
++++ b/elf/tst-dlopen-sgid.c
+@@ -0,0 +1,112 @@
++/* Test case for ignored LD_LIBRARY_PATH in static startug (bug 32976).
++   Copyright (C) 2025 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, see
++   <https://www.gnu.org/licenses/>.  */
++
++#include <dlfcn.h>
++#include <gnu/lib-names.h>
++#include <stddef.h>
++#include <stdint.h>
++#include <stdlib.h>
++#include <string.h>
++#include <support/capture_subprocess.h>
++#include <support/check.h>
++#include <support/support.h>
++#include <support/temp_file.h>
++#include <support/test-driver.h>
++#include <sys/wait.h>
++#include <unistd.h>
++
++/* This is the name of our test object.  Use a custom module for
++   testing, so that this object does not get picked up from the system
++   path.  */
++static const char dso_name[] = "tst-dlopen-sgid-mod.so";
++
++/* Used to mark the recursive invocation.  */
++static const char magic_argument[] = "run-actual-test";
++
++static int
++do_test (void)
++{
++/* Pathname of the directory that receives the shared objects this
++   test attempts to load.  */
++  char *libdir = support_create_temp_directory ("tst-dlopen-sgid-");
++
++  /* This is supposed to be ignored and stripped.  */
++  TEST_COMPARE (setenv ("LD_LIBRARY_PATH", libdir, 1), 0);
++
++  /* Copy of libc.so.6.  */
++  {
++    char *from = xasprintf ("%s/%s", support_objdir_root, LIBC_SO);
++    char *to = xasprintf ("%s/%s", libdir, LIBC_SO);
++    add_temp_file (to);
++    support_copy_file (from, to);
++    free (to);
++    free (from);
++  }
++
++  /* Copy of the test object.   */
++  {
++    char *from = xasprintf ("%s/elf/%s", support_objdir_root, dso_name);
++    char *to = xasprintf ("%s/%s", libdir, dso_name);
++    add_temp_file (to);
++    support_copy_file (from, to);
++    free (to);
++    free (from);
++  }
++
++  free (libdir);
++
++  int status = support_capture_subprogram_self_sgid (magic_argument);
++
++  if (WEXITSTATUS (status) == EXIT_UNSUPPORTED)
++    return EXIT_UNSUPPORTED;
++
++  if (!WIFEXITED (status))
++    FAIL_EXIT1 ("Unexpected exit status %d from child process\n", status);
++
++  return 0;
++}
++
++static void
++alternative_main (int argc, char **argv)
++{
++  if (argc == 2 && strcmp (argv[1], magic_argument) == 0)
++    {
++      if (getgid () == getegid ())
++        /* This can happen if the file system is mounted nosuid.  */
++        FAIL_UNSUPPORTED ("SGID failed: GID and EGID match (%jd)\n",
++                          (intmax_t) getgid ());
++
++      /* Should be removed due to SGID.  */
++      TEST_COMPARE_STRING (getenv ("LD_LIBRARY_PATH"), NULL);
++
++      TEST_VERIFY (dlopen (dso_name, RTLD_NOW) == NULL);
++      {
++        const char *message = dlerror ();
++        TEST_COMPARE_STRING (message,
++                             "tst-dlopen-sgid-mod.so:"
++                             " cannot open shared object file:"
++                             " No such file or directory");
++      }
++
++      support_record_failure_barrier ();
++      exit (EXIT_SUCCESS);
++    }
++}
++
++#define PREPARE alternative_main
++#include <support/test-driver.c>
 diff --git a/elf/tst-execstack-prog-static-tunable.c 
b/elf/tst-execstack-prog-static-tunable.c
 new file mode 100644
 index 0000000000..88b0ca1263
@@ -1518,6 +1829,51 @@
 +}
 +
 +#include <support/test-driver.c>
+diff --git a/support/capture_subprocess.h b/support/capture_subprocess.h
+index 91d75e5d6b..77140430d2 100644
+--- a/support/capture_subprocess.h
++++ b/support/capture_subprocess.h
+@@ -45,8 +45,7 @@ struct support_capture_subprocess support_capture_subprogram
+ /* Copy the running program into a setgid binary and run it with CHILD_ID
+    argument.  If execution is successful, return the exit status of the child
+    program, otherwise return a non-zero failure exit code.  */
+-int support_capture_subprogram_self_sgid
+-  (char *child_id);
++int support_capture_subprogram_self_sgid (const char *child_id);
+ 
+ /* Deallocate the subprocess data captured by
+    support_capture_subprocess.  */
+diff --git a/support/support_capture_subprocess.c 
b/support/support_capture_subprocess.c
+index c3ef478d17..d99aafd370 100644
+--- a/support/support_capture_subprocess.c
++++ b/support/support_capture_subprocess.c
+@@ -110,7 +110,7 @@ support_capture_subprogram (const char *file, char *const 
argv[],
+    safely make it SGID with the TARGET group ID.  Then runs the
+    executable.  */
+ static int
+-copy_and_spawn_sgid (char *child_id, gid_t gid)
++copy_and_spawn_sgid (const char *child_id, gid_t gid)
+ {
+   char *dirname = xasprintf ("%s/tst-tunables-setuid.%jd",
+                            test_dir, (intmax_t) getpid ());
+@@ -182,7 +182,7 @@ copy_and_spawn_sgid (char *child_id, gid_t gid)
+   ret = 0;
+   infd = outfd = -1;
+ 
+-  char * const args[] = {execname, child_id, NULL};
++  char * const args[] = {execname, (char *) child_id, NULL};
+ 
+   status = support_subprogram_wait (args[0], args);
+ 
+@@ -211,7 +211,7 @@ err:
+ }
+ 
+ int
+-support_capture_subprogram_self_sgid (char *child_id)
++support_capture_subprogram_self_sgid (const char *child_id)
+ {
+   gid_t target = 0;
+   const int count = 64;
 diff --git a/sysdeps/aarch64/fpu/asinh_sve.c b/sysdeps/aarch64/fpu/asinh_sve.c
 index 0889f79dbb..ff6b71390c 100644
 --- a/sysdeps/aarch64/fpu/asinh_sve.c
@@ -3049,6 +3405,1077 @@
  
  
  /* Cleanup buffers */
+diff --git a/sysdeps/powerpc/powerpc64/le/power10/memchr.S 
b/sysdeps/powerpc/powerpc64/le/power10/memchr.S
+deleted file mode 100644
+index 96ad5a2e1d..0000000000
+--- a/sysdeps/powerpc/powerpc64/le/power10/memchr.S
++++ /dev/null
+@@ -1,315 +0,0 @@
+-/* Optimized memchr implementation for POWER10 LE.
+-   Copyright (C) 2021-2025 Free Software Foundation, Inc.
+-   This file is part of the GNU C Library.
+-
+-   The GNU C Library is free software; you can redistribute it and/or
+-   modify it under the terms of the GNU Lesser General Public
+-   License as published by the Free Software Foundation; either
+-   version 2.1 of the License, or (at your option) any later version.
+-
+-   The GNU C Library is distributed in the hope that it will be useful,
+-   but WITHOUT ANY WARRANTY; without even the implied warranty of
+-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.        See the GNU
+-   Lesser General Public License for more details.
+-
+-   You should have received a copy of the GNU Lesser General Public
+-   License along with the GNU C Library; if not, see
+-   <https://www.gnu.org/licenses/>.  */
+-
+-#include <sysdep.h>
+-
+-# ifndef MEMCHR
+-#  define MEMCHR __memchr
+-# endif
+-# define M_VREG_ZERO v20
+-# define M_OFF_START_LOOP 256
+-# define MEMCHR_SUBTRACT_VECTORS \
+-      vsububm   v4,v4,v18;        \
+-      vsububm   v5,v5,v18;        \
+-      vsububm   v6,v6,v18;        \
+-      vsububm   v7,v7,v18;
+-# define M_TAIL(vreg,increment)          \
+-      vctzlsbb  r4,vreg;         \
+-      cmpld     r5,r4;           \
+-      ble       L(null);         \
+-      addi      r4,r4,increment; \
+-      add       r3,r6,r4;        \
+-      blr
+-
+-/* TODO: Replace macros by the actual instructions when minimum binutils 
becomes
+-   >= 2.35.  This is used to keep compatibility with older versions.  */
+-#define M_VEXTRACTBM(rt,vrb)   \
+-      .long(((4)<<(32-6))      \
+-            | ((rt)<<(32-11))  \
+-            | ((8)<<(32-16))   \
+-            | ((vrb)<<(32-21)) \
+-            | 1602)
+-
+-#define M_LXVP(xtp,dq,ra)                \
+-      .long(((6)<<(32-6))                \
+-            | ((((xtp)-32)>>1)<<(32-10)) \
+-            | ((1)<<(32-11))             \
+-            | ((ra)<<(32-16))            \
+-            | dq)
+-
+-#define CHECK16B(vreg,offset,addr,label) \
+-      lxv       vreg+32,offset(addr); \
+-      vcmpequb. vreg,vreg,v18;        \
+-      bne       cr6,L(label);         \
+-      cmpldi    r5,16;                \
+-      ble       L(null);              \
+-      addi      r5,r5,-16;
+-
+-/* Load 4 quadwords, merge into one VR for speed and check for NULLs.  r6 has 
#
+-   of bytes already checked.  */
+-#define CHECK64B(offset,addr,label)       \
+-      M_LXVP(v4+32,offset,addr);          \
+-      M_LXVP(v6+32,offset+32,addr);       \
+-      MEMCHR_SUBTRACT_VECTORS;            \
+-      vminub    v14,v4,v5;                \
+-      vminub    v15,v6,v7;                \
+-      vminub    v16,v14,v15;              \
+-      vcmpequb. v0,v16,M_VREG_ZERO;       \
+-      beq       cr6,$+12;                 \
+-      li        r7,offset;                \
+-      b         L(label);                 \
+-      cmpldi    r5,64;                    \
+-      ble       L(null);                  \
+-      addi      r5,r5,-64
+-
+-/* Implements the function
+-   void *[r3] memchr (const void *s [r3], int c [r4], size_t n [r5]).  */
+-
+-      .machine power9
+-
+-ENTRY_TOCLESS (MEMCHR)
+-      CALL_MCOUNT 3
+-
+-      cmpldi  r5,0
+-      beq     L(null)
+-      mr      r0,r5
+-      xori    r6,r4,0xff
+-
+-      mtvsrd  v18+32,r4       /* matching char in v18  */
+-      mtvsrd  v19+32,r6       /* non matching char in v19  */
+-
+-      vspltb  v18,v18,7       /* replicate  */
+-      vspltb  v19,v19,7       /* replicate  */
+-      vspltisb  M_VREG_ZERO,0
+-
+-      /* Next 16B-aligned address. Prepare address for L(aligned).  */
+-      addi      r6,r3,16
+-      clrrdi    r6,r6,4
+-
+-      /* Align data and fill bytes not loaded with non matching char.  */
+-      lvx       v0,0,r3
+-      lvsr      v1,0,r3
+-      vperm     v0,v19,v0,v1
+-
+-      vcmpequb. v6,v0,v18
+-      bne       cr6,L(found)
+-      sub       r4,r6,r3
+-      cmpld     r5,r4
+-      ble       L(null)
+-      sub       r5,r5,r4
+-
+-      /* Test up to OFF_START_LOOP-16 bytes in 16B chunks.  The main loop is
+-         optimized for longer strings, so checking the first bytes in 16B
+-         chunks benefits a lot small strings.  */
+-      .p2align 5
+-L(aligned):
+-      cmpldi  r5,0
+-      beq     L(null)
+-
+-      CHECK16B(v0,0,r6,tail1)
+-      CHECK16B(v1,16,r6,tail2)
+-      CHECK16B(v2,32,r6,tail3)
+-      CHECK16B(v3,48,r6,tail4)
+-      CHECK16B(v4,64,r6,tail5)
+-      CHECK16B(v5,80,r6,tail6)
+-      CHECK16B(v6,96,r6,tail7)
+-      CHECK16B(v7,112,r6,tail8)
+-      CHECK16B(v8,128,r6,tail9)
+-      CHECK16B(v9,144,r6,tail10)
+-      CHECK16B(v10,160,r6,tail11)
+-      CHECK16B(v0,176,r6,tail12)
+-      CHECK16B(v1,192,r6,tail13)
+-      CHECK16B(v2,208,r6,tail14)
+-      CHECK16B(v3,224,r6,tail15)
+-
+-      cmpdi   cr5,r4,0        /* Check if c == 0.  This will be useful to
+-                                 choose how we will perform the main loop.  */
+-
+-      /* Prepare address for the loop.  */
+-      addi      r4,r3,M_OFF_START_LOOP
+-      clrrdi    r4,r4,6
+-      sub       r6,r4,r3
+-      sub       r5,r0,r6
+-      addi      r6,r4,128
+-
+-      /* If c == 0, use the loop without the vsububm.  */
+-      beq     cr5,L(loop)
+-
+-      /* This is very similar to the block after L(loop), the difference is
+-         that here MEMCHR_SUBTRACT_VECTORS is not empty, and we subtract
+-         each byte loaded by the char we are looking for, this way we can keep
+-         using vminub to merge the results and checking for nulls.  */
+-      .p2align 5
+-L(memchr_loop):
+-      CHECK64B(0,r4,pre_tail_64b)
+-      CHECK64B(64,r4,pre_tail_64b)
+-      addi    r4,r4,256
+-
+-      CHECK64B(0,r6,tail_64b)
+-      CHECK64B(64,r6,tail_64b)
+-      addi    r6,r6,256
+-
+-      CHECK64B(0,r4,pre_tail_64b)
+-      CHECK64B(64,r4,pre_tail_64b)
+-      addi    r4,r4,256
+-
+-      CHECK64B(0,r6,tail_64b)
+-      CHECK64B(64,r6,tail_64b)
+-      addi    r6,r6,256
+-
+-      b       L(memchr_loop)
+-      /* Switch to a more aggressive approach checking 64B each time.  Use 2
+-         pointers 128B apart and unroll the loop once to make the pointer
+-         updates and usages separated enough to avoid stalls waiting for
+-         address calculation.  */
+-      .p2align 5
+-L(loop):
+-#undef MEMCHR_SUBTRACT_VECTORS
+-#define MEMCHR_SUBTRACT_VECTORS /* nothing */
+-      CHECK64B(0,r4,pre_tail_64b)
+-      CHECK64B(64,r4,pre_tail_64b)
+-      addi      r4,r4,256
+-
+-      CHECK64B(0,r6,tail_64b)
+-      CHECK64B(64,r6,tail_64b)
+-      addi      r6,r6,256
+-
+-      CHECK64B(0,r4,pre_tail_64b)
+-      CHECK64B(64,r4,pre_tail_64b)
+-      addi      r4,r4,256
+-
+-      CHECK64B(0,r6,tail_64b)
+-      CHECK64B(64,r6,tail_64b)
+-      addi      r6,r6,256
+-
+-      b         L(loop)
+-
+-      .p2align  5
+-L(pre_tail_64b):
+-      mr      r6,r4
+-L(tail_64b):
+-      /* OK, we found a null byte.  Let's look for it in the current 64-byte
+-         block and mark it in its corresponding VR.  lxvp vx,0(ry) puts the
+-         low 16B bytes into vx+1, and the high into vx, so the order here is
+-         v5, v4, v7, v6.  */
+-      vcmpequb  v1,v5,M_VREG_ZERO
+-      vcmpequb  v2,v4,M_VREG_ZERO
+-      vcmpequb  v3,v7,M_VREG_ZERO
+-      vcmpequb  v4,v6,M_VREG_ZERO
+-
+-      /* Take into account the other 64B blocks we had already checked.  */
+-      add     r6,r6,r7
+-      /* Extract first bit of each byte.  */
+-      M_VEXTRACTBM(r8,v1)
+-      M_VEXTRACTBM(r9,v2)
+-      M_VEXTRACTBM(r10,v3)
+-      M_VEXTRACTBM(r11,v4)
+-
+-      /* Shift each value into their corresponding position.  */
+-      sldi      r9,r9,16
+-      sldi      r10,r10,32
+-      sldi      r11,r11,48
+-
+-      /* Merge the results.  */
+-      or        r8,r8,r9
+-      or        r9,r10,r11
+-      or        r11,r9,r8
+-
+-      cnttzd    r0,r11          /* Count trailing zeros before the match.  */
+-      cmpld     r5,r0
+-      ble       L(null)
+-      add       r3,r6,r0        /* Compute final address.  */
+-      blr
+-
+-      .p2align  5
+-L(tail1):
+-      M_TAIL(v0,0)
+-
+-      .p2align  5
+-L(tail2):
+-      M_TAIL(v1,16)
+-
+-      .p2align  5
+-L(tail3):
+-      M_TAIL(v2,32)
+-
+-      .p2align  5
+-L(tail4):
+-      M_TAIL(v3,48)
+-
+-      .p2align  5
+-L(tail5):
+-      M_TAIL(v4,64)
+-
+-      .p2align  5
+-L(tail6):
+-      M_TAIL(v5,80)
+-
+-      .p2align  5
+-L(tail7):
+-      M_TAIL(v6,96)
+-
+-      .p2align  5
+-L(tail8):
+-      M_TAIL(v7,112)
+-
+-      .p2align  5
+-L(tail9):
+-      M_TAIL(v8,128)
+-
+-      .p2align  5
+-L(tail10):
+-      M_TAIL(v9,144)
+-
+-      .p2align  5
+-L(tail11):
+-      M_TAIL(v10,160)
+-
+-      .p2align  5
+-L(tail12):
+-      M_TAIL(v0,176)
+-
+-      .p2align  5
+-L(tail13):
+-      M_TAIL(v1,192)
+-
+-      .p2align  5
+-L(tail14):
+-      M_TAIL(v2,208)
+-
+-      .p2align  5
+-L(tail15):
+-      M_TAIL(v3,224)
+-
+-      .p2align  5
+-L(found):
+-      vctzlsbb  r7,v6
+-      cmpld     r5,r7
+-      ble       L(null)
+-      add       r3,r3,r7
+-      blr
+-
+-      .p2align  5
+-L(null):
+-      li      r3,0
+-      blr
+-
+-END (MEMCHR)
+-
+-weak_alias (__memchr, memchr)
+-libc_hidden_builtin_def (memchr)
+diff --git a/sysdeps/powerpc/powerpc64/le/power10/strcmp.S 
b/sysdeps/powerpc/powerpc64/le/power10/strcmp.S
+deleted file mode 100644
+index fffa1ee0a9..0000000000
+--- a/sysdeps/powerpc/powerpc64/le/power10/strcmp.S
++++ /dev/null
+@@ -1,233 +0,0 @@
+-/* Optimized strcmp implementation for PowerPC64/POWER10.
+-   Copyright (C) 2021-2025 Free Software Foundation, Inc.
+-   This file is part of the GNU C Library.
+-
+-   The GNU C Library is free software; you can redistribute it and/or
+-   modify it under the terms of the GNU Lesser General Public
+-   License as published by the Free Software Foundation; either
+-   version 2.1 of the License, or (at your option) any later version.
+-
+-   The GNU C Library is distributed in the hope that it will be useful,
+-   but WITHOUT ANY WARRANTY; without even the implied warranty of
+-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+-   Lesser General Public License for more details.
+-
+-   You should have received a copy of the GNU Lesser General Public
+-   License along with the GNU C Library; if not, see
+-   <https://www.gnu.org/licenses/>.  */
+-#include <sysdep.h>
+-
+-#ifndef STRCMP
+-# define STRCMP strcmp
+-#endif
+-
+-/* Implements the function
+-   int [r3] strcmp (const char *s1 [r3], const char *s2 [r4]).  */
+-
+-/* TODO: Change this to actual instructions when minimum binutils is upgraded
+-   to 2.27.  Macros are defined below for these newer instructions in order
+-   to maintain compatibility.  */
+-
+-#define LXVP(xtp,dq,ra)                    \
+-      .long(((6)<<(32-6))          \
+-      | ((((xtp)-32)>>1)<<(32-10)) \
+-      | ((1)<<(32-11))             \
+-      | ((ra)<<(32-16))            \
+-      | dq)
+-
+-#define COMPARE_16(vreg1,vreg2,offset)  \
+-      lxv       vreg1+32,offset(r3);  \
+-      lxv       vreg2+32,offset(r4);  \
+-      vcmpnezb. v7,vreg1,vreg2;       \
+-      bne       cr6,L(different);     \
+-
+-#define COMPARE_32(vreg1,vreg2,offset,label1,label2) \
+-      LXVP(vreg1+32,offset,r3);                    \
+-      LXVP(vreg2+32,offset,r4);                    \
+-      vcmpnezb. v7,vreg1+1,vreg2+1;                \
+-      bne       cr6,L(label1);                     \
+-      vcmpnezb. v7,vreg1,vreg2;                    \
+-      bne       cr6,L(label2);                     \
+-
+-#define TAIL(vreg1,vreg2)     \
+-      vctzlsbb r6,v7;       \
+-      vextubrx r5,r6,vreg1; \
+-      vextubrx r4,r6,vreg2; \
+-      subf     r3,r4,r5;    \
+-      blr;                  \
+-
+-#define CHECK_N_BYTES(reg1,reg2,len_reg) \
+-      sldi      r0,len_reg,56;         \
+-      lxvl      32+v4,reg1,r0;         \
+-      lxvl      32+v5,reg2,r0;         \
+-      add       reg1,reg1,len_reg;     \
+-      add       reg2,reg2,len_reg;     \
+-      vcmpnezb  v7,v4,v5;              \
+-      vctzlsbb  r6,v7;                 \
+-      cmpld     cr7,r6,len_reg;        \
+-      blt       cr7,L(different);      \
+-
+-      /* TODO: change this to .machine power10 when the minimum required
+-      binutils allows it.  */
+-
+-      .machine  power9
+-ENTRY_TOCLESS (STRCMP, 4)
+-      andi.   r7,r3,4095
+-      andi.   r8,r4,4095
+-      cmpldi  cr0,r7,4096-16
+-      cmpldi  cr1,r8,4096-16
+-      bgt     cr0,L(crosses)
+-      bgt     cr1,L(crosses)
+-      COMPARE_16(v4,v5,0)
+-
+-L(crosses):
+-      andi.   r7,r3,15
+-      subfic  r7,r7,16        /* r7(nalign1) = 16 - (str1 & 15).  */
+-      andi.   r9,r4,15
+-      subfic  r5,r9,16        /* r5(nalign2) = 16 - (str2 & 15).  */
+-      cmpld   cr7,r7,r5
+-      beq     cr7,L(same_aligned)
+-      blt     cr7,L(nalign1_min)
+-
+-      /* nalign2 is minimum and s2 pointer is aligned.  */
+-      CHECK_N_BYTES(r3,r4,r5)
+-      /* Are we on the 64B hunk which crosses a page?  */
+-      andi.   r10,r3,63       /* Determine offset into 64B hunk.  */
+-      andi.   r8,r3,15        /* The offset into the 16B hunk.  */
+-      neg     r7,r3
+-      andi.   r9,r7,15        /* Number of bytes after a 16B cross.  */
+-      rlwinm. r7,r7,26,0x3F   /* ((r3-4096))>>6&63.  */
+-      beq     L(compare_64_pagecross)
+-      mtctr   r7
+-      b       L(compare_64B_unaligned)
+-
+-      /* nalign1 is minimum and s1 pointer is aligned.  */
+-L(nalign1_min):
+-      CHECK_N_BYTES(r3,r4,r7)
+-      /* Are we on the 64B hunk which crosses a page?  */
+-      andi.   r10,r4,63       /* Determine offset into 64B hunk.  */
+-      andi.   r8,r4,15        /* The offset into the 16B hunk.  */
+-      neg     r7,r4
+-      andi.   r9,r7,15        /* Number of bytes after a 16B cross.  */
+-      rlwinm. r7,r7,26,0x3F   /* ((r4-4096))>>6&63.  */
+-      beq     L(compare_64_pagecross)
+-      mtctr   r7
+-
+-      .p2align 5
+-L(compare_64B_unaligned):
+-      COMPARE_16(v4,v5,0)
+-      COMPARE_16(v4,v5,16)
+-      COMPARE_16(v4,v5,32)
+-      COMPARE_16(v4,v5,48)
+-      addi    r3,r3,64
+-      addi    r4,r4,64
+-      bdnz    L(compare_64B_unaligned)
+-
+-      /* Cross the page boundary of s2, carefully. Only for first
+-      iteration we have to get the count of 64B blocks to be checked.
+-      From second iteration and beyond, loop counter is always 63.  */
+-L(compare_64_pagecross):
+-      li      r11, 63
+-      mtctr   r11
+-      cmpldi  r10,16
+-      ble     L(cross_4)
+-      cmpldi  r10,32
+-      ble     L(cross_3)
+-      cmpldi  r10,48
+-      ble     L(cross_2)
+-L(cross_1):
+-      CHECK_N_BYTES(r3,r4,r9)
+-      CHECK_N_BYTES(r3,r4,r8)
+-      COMPARE_16(v4,v5,0)
+-      COMPARE_16(v4,v5,16)
+-      COMPARE_16(v4,v5,32)
+-      addi    r3,r3,48
+-      addi    r4,r4,48
+-      b       L(compare_64B_unaligned)
+-L(cross_2):
+-      COMPARE_16(v4,v5,0)
+-      addi    r3,r3,16
+-      addi    r4,r4,16
+-      CHECK_N_BYTES(r3,r4,r9)
+-      CHECK_N_BYTES(r3,r4,r8)
+-      COMPARE_16(v4,v5,0)
+-      COMPARE_16(v4,v5,16)
+-      addi    r3,r3,32
+-      addi    r4,r4,32
+-      b       L(compare_64B_unaligned)
+-L(cross_3):
+-      COMPARE_16(v4,v5,0)
+-      COMPARE_16(v4,v5,16)
+-      addi    r3,r3,32
+-      addi    r4,r4,32
+-      CHECK_N_BYTES(r3,r4,r9)
+-      CHECK_N_BYTES(r3,r4,r8)
+-      COMPARE_16(v4,v5,0)
+-      addi    r3,r3,16
+-      addi    r4,r4,16
+-      b       L(compare_64B_unaligned)
+-L(cross_4):
+-      COMPARE_16(v4,v5,0)
+-      COMPARE_16(v4,v5,16)
+-      COMPARE_16(v4,v5,32)
+-      addi    r3,r3,48
+-      addi    r4,r4,48
+-      CHECK_N_BYTES(r3,r4,r9)
+-      CHECK_N_BYTES(r3,r4,r8)
+-      b       L(compare_64B_unaligned)
+-
+-L(same_aligned):
+-      CHECK_N_BYTES(r3,r4,r7)
+-        /* Align s1 to 32B and adjust s2 address.
+-         Use lxvp only if both s1 and s2 are 32B aligned.  */
+-      COMPARE_16(v4,v5,0)
+-      COMPARE_16(v4,v5,16)
+-      COMPARE_16(v4,v5,32)
+-      COMPARE_16(v4,v5,48)
+-      addi    r3,r3,64
+-      addi    r4,r4,64
+-      COMPARE_16(v4,v5,0)
+-      COMPARE_16(v4,v5,16)
+-
+-      clrldi  r6,r3,59
+-      subfic  r5,r6,32
+-      add     r3,r3,r5
+-      add     r4,r4,r5
+-      andi.   r5,r4,0x1F
+-      beq     cr0,L(32B_aligned_loop)
+-
+-      .p2align 5
+-L(16B_aligned_loop):
+-      COMPARE_16(v4,v5,0)
+-      COMPARE_16(v4,v5,16)
+-      COMPARE_16(v4,v5,32)
+-      COMPARE_16(v4,v5,48)
+-      addi    r3,r3,64
+-      addi    r4,r4,64
+-      b       L(16B_aligned_loop)
+-
+-      /* Calculate and return the difference.  */
+-L(different):
+-      TAIL(v4,v5)
+-
+-      .p2align 5
+-L(32B_aligned_loop):
+-      COMPARE_32(v14,v16,0,tail1,tail2)
+-      COMPARE_32(v18,v20,32,tail3,tail4)
+-      COMPARE_32(v22,v24,64,tail5,tail6)
+-      COMPARE_32(v26,v28,96,tail7,tail8)
+-      addi    r3,r3,128
+-      addi    r4,r4,128
+-      b       L(32B_aligned_loop)
+-
+-L(tail1): TAIL(v15,v17)
+-L(tail2): TAIL(v14,v16)
+-L(tail3): TAIL(v19,v21)
+-L(tail4): TAIL(v18,v20)
+-L(tail5): TAIL(v23,v25)
+-L(tail6): TAIL(v22,v24)
+-L(tail7): TAIL(v27,v29)
+-L(tail8): TAIL(v26,v28)
+-
+-END (STRCMP)
+-libc_hidden_builtin_def (strcmp)
+diff --git a/sysdeps/powerpc/powerpc64/le/power10/strncmp.S 
b/sysdeps/powerpc/powerpc64/le/power10/strncmp.S
+deleted file mode 100644
+index 10700dd400..0000000000
+--- a/sysdeps/powerpc/powerpc64/le/power10/strncmp.S
++++ /dev/null
+@@ -1,271 +0,0 @@
+-/* Optimized strncmp implementation for PowerPC64/POWER10.
+-   Copyright (C) 2024-2025 Free Software Foundation, Inc.
+-   This file is part of the GNU C Library.
+-
+-   The GNU C Library is free software; you can redistribute it and/or
+-   modify it under the terms of the GNU Lesser General Public
+-   License as published by the Free Software Foundation; either
+-   version 2.1 of the License, or (at your option) any later version.
+-
+-   The GNU C Library is distributed in the hope that it will be useful,
+-   but WITHOUT ANY WARRANTY; without even the implied warranty of
+-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+-   Lesser General Public License for more details.
+-
+-   You should have received a copy of the GNU Lesser General Public
+-   License along with the GNU C Library; if not, see
+-   <https://www.gnu.org/licenses/>.  */
+-
+-#include <sysdep.h>
+-
+-/* Implements the function
+-
+-   int [r3] strncmp (const char *s1 [r3], const char *s2 [r4], size_t [r5] n)
+-
+-   The implementation uses unaligned doubleword access to avoid specialized
+-   code paths depending of data alignment for first 32 bytes and uses
+-   vectorised loops after that.  */
+-
+-#ifndef STRNCMP
+-# define STRNCMP strncmp
+-#endif
+-
+-/* TODO: Change this to actual instructions when minimum binutils is upgraded
+-   to 2.27.  Macros are defined below for these newer instructions in order
+-   to maintain compatibility.  */
+-
+-#define LXVP(xtp,dq,ra)              \
+-      .long(((6)<<(32-6))          \
+-      | ((((xtp)-32)>>1)<<(32-10)) \
+-      | ((1)<<(32-11))             \
+-      | ((ra)<<(32-16))            \
+-      | dq)
+-
+-#define COMPARE_16(vreg1,vreg2,offset) \
+-      lxv       vreg1+32,offset(r3); \
+-      lxv       vreg2+32,offset(r4); \
+-      vcmpnezb. v7,vreg1,vreg2;      \
+-      bne       cr6,L(different);    \
+-      cmpldi    cr7,r5,16;           \
+-      ble       cr7,L(ret0);         \
+-      addi      r5,r5,-16;
+-
+-#define COMPARE_32(vreg1,vreg2,offset,label1,label2) \
+-      LXVP(vreg1+32,offset,r3);                    \
+-      LXVP(vreg2+32,offset,r4);                    \
+-      vcmpnezb. v7,vreg1+1,vreg2+1;                \
+-      bne       cr6,L(label1);                     \
+-      vcmpnezb. v7,vreg1,vreg2;                    \
+-      bne       cr6,L(label2);                     \
+-      cmpldi    cr7,r5,32;                         \
+-      ble       cr7,L(ret0);                       \
+-      addi      r5,r5,-32;
+-
+-#define TAIL_FIRST_16B(vreg1,vreg2) \
+-      vctzlsbb r6,v7;             \
+-      cmpld    cr7,r5,r6;         \
+-      ble      cr7,L(ret0);       \
+-      vextubrx r5,r6,vreg1;       \
+-      vextubrx r4,r6,vreg2;       \
+-      subf     r3,r4,r5;          \
+-      blr;
+-
+-#define TAIL_SECOND_16B(vreg1,vreg2) \
+-      vctzlsbb r6,v7;              \
+-      addi     r0,r6,16;           \
+-      cmpld    cr7,r5,r0;          \
+-      ble      cr7,L(ret0);        \
+-      vextubrx r5,r6,vreg1;        \
+-      vextubrx r4,r6,vreg2;        \
+-      subf     r3,r4,r5;           \
+-      blr;
+-
+-#define CHECK_N_BYTES(reg1,reg2,len_reg) \
+-      sldi      r6,len_reg,56;         \
+-      lxvl      32+v4,reg1,r6;         \
+-      lxvl      32+v5,reg2,r6;         \
+-      add       reg1,reg1,len_reg;     \
+-      add       reg2,reg2,len_reg;     \
+-      vcmpnezb  v7,v4,v5;              \
+-      vctzlsbb  r6,v7;                 \
+-      cmpld     cr7,r6,len_reg;        \
+-      blt       cr7,L(different);      \
+-      cmpld     cr7,r5,len_reg;        \
+-      ble       cr7,L(ret0);           \
+-      sub       r5,r5,len_reg;         \
+-
+-      /* TODO: change this to .machine power10 when the minimum required
+-       binutils allows it.  */
+-      .machine  power9
+-ENTRY_TOCLESS (STRNCMP, 4)
+-      /* Check if size is 0.  */
+-      cmpdi    cr0,r5,0
+-      beq      cr0,L(ret0)
+-      andi.   r7,r3,4095
+-      andi.   r8,r4,4095
+-      cmpldi  cr0,r7,4096-16
+-      cmpldi  cr1,r8,4096-16
+-      bgt     cr0,L(crosses)
+-      bgt     cr1,L(crosses)
+-      COMPARE_16(v4,v5,0)
+-      addi    r3,r3,16
+-      addi    r4,r4,16
+-
+-L(crosses):
+-      andi.    r7,r3,15
+-      subfic   r7,r7,16       /* r7(nalign1) = 16 - (str1 & 15).  */
+-      andi.    r9,r4,15
+-      subfic   r8,r9,16       /* r8(nalign2) = 16 - (str2 & 15).  */
+-      cmpld    cr7,r7,r8
+-      beq      cr7,L(same_aligned)
+-      blt      cr7,L(nalign1_min)
+-
+-      /* nalign2 is minimum and s2 pointer is aligned.  */
+-      CHECK_N_BYTES(r3,r4,r8)
+-      /* Are we on the 64B hunk which crosses a page?  */
+-      andi.   r10,r3,63       /* Determine offset into 64B hunk.  */
+-      andi.   r8,r3,15        /* The offset into the 16B hunk.  */
+-      neg     r7,r3
+-      andi.   r9,r7,15        /* Number of bytes after a 16B cross.  */
+-      rlwinm. r7,r7,26,0x3F   /* ((r4-4096))>>6&63.  */
+-      beq     L(compare_64_pagecross)
+-      mtctr   r7
+-      b       L(compare_64B_unaligned)
+-
+-      /* nalign1 is minimum and s1 pointer is aligned.  */
+-L(nalign1_min):
+-      CHECK_N_BYTES(r3,r4,r7)
+-      /* Are we on the 64B hunk which crosses a page?  */
+-      andi.   r10,r4,63       /* Determine offset into 64B hunk.  */
+-      andi.   r8,r4,15        /* The offset into the 16B hunk.  */
+-      neg     r7,r4
+-      andi.   r9,r7,15        /* Number of bytes after a 16B cross.  */
+-      rlwinm. r7,r7,26,0x3F   /* ((r4-4096))>>6&63.  */
+-      beq     L(compare_64_pagecross)
+-      mtctr   r7
+-
+-      .p2align 5
+-L(compare_64B_unaligned):
+-      COMPARE_16(v4,v5,0)
+-      COMPARE_16(v4,v5,16)
+-      COMPARE_16(v4,v5,32)
+-      COMPARE_16(v4,v5,48)
+-      addi    r3,r3,64
+-      addi    r4,r4,64
+-      bdnz    L(compare_64B_unaligned)
+-
+-      /* Cross the page boundary of s2, carefully. Only for first
+-      iteration we have to get the count of 64B blocks to be checked.
+-      From second iteration and beyond, loop counter is always 63.  */
+-L(compare_64_pagecross):
+-      li      r11, 63
+-      mtctr   r11
+-      cmpldi  r10,16
+-      ble     L(cross_4)
+-      cmpldi  r10,32
+-      ble     L(cross_3)
+-      cmpldi  r10,48
+-      ble     L(cross_2)
+-L(cross_1):
+-      CHECK_N_BYTES(r3,r4,r9)
+-      CHECK_N_BYTES(r3,r4,r8)
+-      COMPARE_16(v4,v5,0)
+-      COMPARE_16(v4,v5,16)
+-      COMPARE_16(v4,v5,32)
+-      addi    r3,r3,48
+-      addi    r4,r4,48
+-      b       L(compare_64B_unaligned)
+-L(cross_2):
+-      COMPARE_16(v4,v5,0)
+-      addi    r3,r3,16
+-      addi    r4,r4,16
+-      CHECK_N_BYTES(r3,r4,r9)
+-      CHECK_N_BYTES(r3,r4,r8)
+-      COMPARE_16(v4,v5,0)
+-      COMPARE_16(v4,v5,16)
+-      addi    r3,r3,32
+-      addi    r4,r4,32
+-      b       L(compare_64B_unaligned)
+-L(cross_3):
+-      COMPARE_16(v4,v5,0)
+-      COMPARE_16(v4,v5,16)
+-      addi    r3,r3,32
+-      addi    r4,r4,32
+-      CHECK_N_BYTES(r3,r4,r9)
+-      CHECK_N_BYTES(r3,r4,r8)
+-      COMPARE_16(v4,v5,0)
+-      addi    r3,r3,16
+-      addi    r4,r4,16
+-      b       L(compare_64B_unaligned)
+-L(cross_4):
+-      COMPARE_16(v4,v5,0)
+-      COMPARE_16(v4,v5,16)
+-      COMPARE_16(v4,v5,32)
+-      addi    r3,r3,48
+-      addi    r4,r4,48
+-      CHECK_N_BYTES(r3,r4,r9)
+-      CHECK_N_BYTES(r3,r4,r8)
+-      b       L(compare_64B_unaligned)
+-
+-L(same_aligned):
+-      CHECK_N_BYTES(r3,r4,r7)
+-      /* Align s1 to 32B and adjust s2 address.
+-         Use lxvp only if both s1 and s2 are 32B aligned.  */
+-      COMPARE_16(v4,v5,0)
+-      COMPARE_16(v4,v5,16)
+-      COMPARE_16(v4,v5,32)
+-      COMPARE_16(v4,v5,48)
+-      addi    r3,r3,64
+-      addi    r4,r4,64
+-      COMPARE_16(v4,v5,0)
+-      COMPARE_16(v4,v5,16)
+-      addi    r5,r5,32
+-
+-      clrldi  r6,r3,59
+-      subfic  r7,r6,32
+-      add     r3,r3,r7
+-      add     r4,r4,r7
+-      subf    r5,r7,r5
+-      andi.   r7,r4,0x1F
+-      beq     cr0,L(32B_aligned_loop)
+-
+-      .p2align 5
+-L(16B_aligned_loop):
+-      COMPARE_16(v4,v5,0)
+-      COMPARE_16(v4,v5,16)
+-      COMPARE_16(v4,v5,32)
+-      COMPARE_16(v4,v5,48)
+-      addi    r3,r3,64
+-      addi    r4,r4,64
+-      b       L(16B_aligned_loop)
+-
+-      /* Calculate and return the difference.  */
+-L(different):
+-      TAIL_FIRST_16B(v4,v5)
+-
+-      .p2align 5
+-L(32B_aligned_loop):
+-      COMPARE_32(v14,v16,0,tail1,tail2)
+-      COMPARE_32(v18,v20,32,tail3,tail4)
+-      COMPARE_32(v22,v24,64,tail5,tail6)
+-      COMPARE_32(v26,v28,96,tail7,tail8)
+-      addi    r3,r3,128
+-      addi    r4,r4,128
+-      b       L(32B_aligned_loop)
+-
+-L(tail1): TAIL_FIRST_16B(v15,v17)
+-L(tail2): TAIL_SECOND_16B(v14,v16)
+-L(tail3): TAIL_FIRST_16B(v19,v21)
+-L(tail4): TAIL_SECOND_16B(v18,v20)
+-L(tail5): TAIL_FIRST_16B(v23,v25)
+-L(tail6): TAIL_SECOND_16B(v22,v24)
+-L(tail7): TAIL_FIRST_16B(v27,v29)
+-L(tail8): TAIL_SECOND_16B(v26,v28)
+-
+-      .p2align 5
+-L(ret0):
+-      li      r3,0
+-      blr
+-
+-END(STRNCMP)
+-libc_hidden_builtin_def(strncmp)
+diff --git a/sysdeps/powerpc/powerpc64/multiarch/Makefile 
b/sysdeps/powerpc/powerpc64/multiarch/Makefile
+index dc7c5b14ee..142e6c24c7 100644
+--- a/sysdeps/powerpc/powerpc64/multiarch/Makefile
++++ b/sysdeps/powerpc/powerpc64/multiarch/Makefile
+@@ -31,12 +31,11 @@ sysdep_routines += memcpy-power8-cached memcpy-power7 
memcpy-a2 memcpy-power6 \
+                  strncase-power8
+ 
+ ifneq (,$(filter %le,$(config-machine)))
+-sysdep_routines += memchr-power10 memcmp-power10 memcpy-power10 \
+-                 memmove-power10 memset-power10 rawmemchr-power9 \
+-                 rawmemchr-power10 strcmp-power9 strcmp-power10 \
+-                 strncmp-power9 strncmp-power10 strcpy-power9 strcat-power10 \
+-                 stpcpy-power9 strlen-power9 strncpy-power9 stpncpy-power9 \
+-                 strlen-power10
++sysdep_routines += memcmp-power10 memcpy-power10 memmove-power10 
memset-power10 \
++                 rawmemchr-power9 rawmemchr-power10 \
++                 strcmp-power9 strncmp-power9 \
++                 strcpy-power9 strcat-power10 stpcpy-power9 \
++                 strlen-power9 strncpy-power9 stpncpy-power9 strlen-power10
+ endif
+ CFLAGS-strncase-power7.c += -mcpu=power7 -funroll-loops
+ CFLAGS-strncase_l-power7.c += -mcpu=power7 -funroll-loops
+diff --git a/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c 
b/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c
+index 0a31a5853c..de288a0d80 100644
+--- a/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c
++++ b/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c
+@@ -164,9 +164,6 @@ __libc_ifunc_impl_list (const char *name, struct 
libc_ifunc_impl *array,
+   /* Support sysdeps/powerpc/powerpc64/multiarch/strncmp.c.  */
+   IFUNC_IMPL (i, name, strncmp,
+ #ifdef __LITTLE_ENDIAN__
+-            IFUNC_IMPL_ADD (array, i, strncmp, hwcap2 & PPC_FEATURE2_ARCH_3_1
+-                            && hwcap & PPC_FEATURE_HAS_VSX,
+-                            __strncmp_power10)
+             IFUNC_IMPL_ADD (array, i, strncmp, hwcap2 & PPC_FEATURE2_ARCH_3_00
+                             && hwcap & PPC_FEATURE_HAS_ALTIVEC,
+                             __strncmp_power9)
+@@ -229,12 +226,6 @@ __libc_ifunc_impl_list (const char *name, struct 
libc_ifunc_impl *array,
+ 
+   /* Support sysdeps/powerpc/powerpc64/multiarch/memchr.c.  */
+   IFUNC_IMPL (i, name, memchr,
+-#ifdef __LITTLE_ENDIAN__
+-            IFUNC_IMPL_ADD (array, i, memchr,
+-                            hwcap2 & PPC_FEATURE2_ARCH_3_1
+-                            && hwcap & PPC_FEATURE_HAS_VSX,
+-                            __memchr_power10)
+-#endif
+             IFUNC_IMPL_ADD (array, i, memchr,
+                             hwcap2 & PPC_FEATURE2_ARCH_2_07
+                             && hwcap & PPC_FEATURE_HAS_ALTIVEC,
+@@ -386,10 +377,6 @@ __libc_ifunc_impl_list (const char *name, struct 
libc_ifunc_impl *array,
+   /* Support sysdeps/powerpc/powerpc64/multiarch/strcmp.c.  */
+   IFUNC_IMPL (i, name, strcmp,
+ #ifdef __LITTLE_ENDIAN__
+-            IFUNC_IMPL_ADD (array, i, strcmp,
+-                            (hwcap2 & PPC_FEATURE2_ARCH_3_1)
+-                            && (hwcap & PPC_FEATURE_HAS_VSX),
+-                            __strcmp_power10)
+             IFUNC_IMPL_ADD (array, i, strcmp,
+                             hwcap2 & PPC_FEATURE2_ARCH_3_00
+                             && hwcap & PPC_FEATURE_HAS_ALTIVEC,
+diff --git a/sysdeps/powerpc/powerpc64/multiarch/memchr-power10.S 
b/sysdeps/powerpc/powerpc64/multiarch/memchr-power10.S
+deleted file mode 100644
+index c9d2f4efd1..0000000000
+--- a/sysdeps/powerpc/powerpc64/multiarch/memchr-power10.S
++++ /dev/null
+@@ -1,28 +0,0 @@
+-/* Optimized memchr implementation for POWER10/PPC64.
+-   Copyright (C) 2016-2025 Free Software Foundation, Inc.
+-   This file is part of the GNU C Library.
+-
+-   The GNU C Library is free software; you can redistribute it and/or
+-   modify it under the terms of the GNU Lesser General Public
+-   License as published by the Free Software Foundation; either
+-   version 2.1 of the License, or (at your option) any later version.
+-
+-   The GNU C Library is distributed in the hope that it will be useful,
+-   but WITHOUT ANY WARRANTY; without even the implied warranty of
+-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+-   Lesser General Public License for more details.
+-
+-   You should have received a copy of the GNU Lesser General Public
+-   License along with the GNU C Library; if not, see
+-   <https://www.gnu.org/licenses/>.  */
+-
+-#if defined __LITTLE_ENDIAN__ && IS_IN (libc)
+-#define MEMCHR __memchr_power10
+-
+-#undef libc_hidden_builtin_def
+-#define libc_hidden_builtin_def(name)
+-#undef weak_alias
+-#define weak_alias(name,alias)
+-
+-#include <sysdeps/powerpc/powerpc64/le/power10/memchr.S>
+-#endif
+diff --git a/sysdeps/powerpc/powerpc64/multiarch/memchr.c 
b/sysdeps/powerpc/powerpc64/multiarch/memchr.c
+index b63c7968c0..3abd64aed4 100644
+--- a/sysdeps/powerpc/powerpc64/multiarch/memchr.c
++++ b/sysdeps/powerpc/powerpc64/multiarch/memchr.c
+@@ -25,23 +25,15 @@ extern __typeof (__memchr) __memchr_ppc attribute_hidden;
+ extern __typeof (__memchr) __memchr_power7 attribute_hidden;
+ extern __typeof (__memchr) __memchr_power8 attribute_hidden;
+ 
+-# ifdef __LITTLE_ENDIAN__
+-extern __typeof (__memchr) __memchr_power10 attribute_hidden;
+-# endif
+ /* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle
+    ifunc symbol properly.  */
+ libc_ifunc (__memchr,
+-# ifdef __LITTLE_ENDIAN__
+-          (hwcap2 & PPC_FEATURE2_ARCH_3_1
+-           && hwcap & PPC_FEATURE_HAS_VSX)
+-          ? __memchr_power10 :
+-# endif
+-            (hwcap2 & PPC_FEATURE2_ARCH_2_07
+-            && hwcap & PPC_FEATURE_HAS_ALTIVEC)
+-            ? __memchr_power8 :
+-              (hwcap & PPC_FEATURE_ARCH_2_06)
+-              ? __memchr_power7
+-              : __memchr_ppc);
++          (hwcap2 & PPC_FEATURE2_ARCH_2_07
++           && hwcap & PPC_FEATURE_HAS_ALTIVEC)
++          ? __memchr_power8 :
++          (hwcap & PPC_FEATURE_ARCH_2_06)
++            ? __memchr_power7
++            : __memchr_ppc);
+ 
+ weak_alias (__memchr, memchr)
+ libc_hidden_builtin_def (memchr)
+diff --git a/sysdeps/powerpc/powerpc64/multiarch/strcmp-power10.S 
b/sysdeps/powerpc/powerpc64/multiarch/strcmp-power10.S
+deleted file mode 100644
+index 7b45fcd63a..0000000000
+--- a/sysdeps/powerpc/powerpc64/multiarch/strcmp-power10.S
++++ /dev/null
+@@ -1,26 +0,0 @@
+-/* Optimized strcmp implementation for POWER10/PPC64.
+-   Copyright (C) 2021-2025 Free Software Foundation, Inc.
+-   This file is part of the GNU C Library.
+-
+-   The GNU C Library is free software; you can redistribute it and/or
+-   modify it under the terms of the GNU Lesser General Public
+-   License as published by the Free Software Foundation; either
+-   version 2.1 of the License, or (at your option) any later version.
+-
+-   The GNU C Library is distributed in the hope that it will be useful,
+-   but WITHOUT ANY WARRANTY; without even the implied warranty of
+-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+-   Lesser General Public License for more details.
+-
+-   You should have received a copy of the GNU Lesser General Public
+-   License along with the GNU C Library; if not, see
+-   <https://www.gnu.org/licenses/>.  */
+-
+-#if defined __LITTLE_ENDIAN__ && IS_IN (libc)
+-#define STRCMP __strcmp_power10
+-
+-#undef libc_hidden_builtin_def
+-#define libc_hidden_builtin_def(name)
+-
+-#include <sysdeps/powerpc/powerpc64/le/power10/strcmp.S>
+-#endif /* __LITTLE_ENDIAN__ && IS_IN (libc) */
+diff --git a/sysdeps/powerpc/powerpc64/multiarch/strcmp.c 
b/sysdeps/powerpc/powerpc64/multiarch/strcmp.c
+index 3c636e3bbc..7c77c084a7 100644
+--- a/sysdeps/powerpc/powerpc64/multiarch/strcmp.c
++++ b/sysdeps/powerpc/powerpc64/multiarch/strcmp.c
+@@ -29,16 +29,12 @@ extern __typeof (strcmp) __strcmp_power7 attribute_hidden;
+ extern __typeof (strcmp) __strcmp_power8 attribute_hidden;
+ # ifdef __LITTLE_ENDIAN__
+ extern __typeof (strcmp) __strcmp_power9 attribute_hidden;
+-extern __typeof (strcmp) __strcmp_power10 attribute_hidden;
+ # endif
+ 
+ # undef strcmp
+ 
+ libc_ifunc_redirected (__redirect_strcmp, strcmp,
+ # ifdef __LITTLE_ENDIAN__
+-                      (hwcap2 & PPC_FEATURE2_ARCH_3_1
+-                       && hwcap & PPC_FEATURE_HAS_VSX)
+-                      ? __strcmp_power10 :
+                       (hwcap2 & PPC_FEATURE2_ARCH_3_00
+                        && hwcap & PPC_FEATURE_HAS_ALTIVEC)
+                       ? __strcmp_power9 :
+diff --git a/sysdeps/powerpc/powerpc64/multiarch/strncmp-power10.S 
b/sysdeps/powerpc/powerpc64/multiarch/strncmp-power10.S
+deleted file mode 100644
+index 43879085e2..0000000000
+--- a/sysdeps/powerpc/powerpc64/multiarch/strncmp-power10.S
++++ /dev/null
+@@ -1,25 +0,0 @@
+-/* Copyright (C) 2024-2025 Free Software Foundation, Inc.
+-   This file is part of the GNU C Library.
+-
+-   The GNU C Library is free software; you can redistribute it and/or
+-   modify it under the terms of the GNU Lesser General Public
+-   License as published by the Free Software Foundation; either
+-   version 2.1 of the License, or (at your option) any later version.
+-
+-   The GNU C Library is distributed in the hope that it will be useful,
+-   but WITHOUT ANY WARRANTY; without even the implied warranty of
+-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+-   Lesser General Public License for more details.
+-
+-   You should have received a copy of the GNU Lesser General Public
+-   License along with the GNU C Library; if not, see
+-   <https://www.gnu.org/licenses/>.  */
+-
+-#if defined __LITTLE_ENDIAN__ && IS_IN (libc)
+-#define STRNCMP __strncmp_power10
+-
+-#undef libc_hidden_builtin_def
+-#define libc_hidden_builtin_def(name)
+-
+-#include <sysdeps/powerpc/powerpc64/le/power10/strncmp.S>
+-#endif
+diff --git a/sysdeps/powerpc/powerpc64/multiarch/strncmp.c 
b/sysdeps/powerpc/powerpc64/multiarch/strncmp.c
+index 0a664a620d..4cfe27fa45 100644
+--- a/sysdeps/powerpc/powerpc64/multiarch/strncmp.c
++++ b/sysdeps/powerpc/powerpc64/multiarch/strncmp.c
+@@ -29,7 +29,6 @@ extern __typeof (strncmp) __strncmp_ppc attribute_hidden;
+ extern __typeof (strncmp) __strncmp_power8 attribute_hidden;
+ # ifdef __LITTLE_ENDIAN__
+ extern __typeof (strncmp) __strncmp_power9 attribute_hidden;
+-extern __typeof (strncmp) __strncmp_power10 attribute_hidden;
+ # endif
+ # undef strncmp
+ 
+@@ -37,9 +36,6 @@ extern __typeof (strncmp) __strncmp_power10 attribute_hidden;
+    ifunc symbol properly.  */
+ libc_ifunc_redirected (__redirect_strncmp, strncmp,
+ # ifdef __LITTLE_ENDIAN__
+-                      (hwcap2 & PPC_FEATURE2_ARCH_3_1
+-                       && hwcap & PPC_FEATURE_HAS_VSX)
+-                      ? __strncmp_power10 :
+                       (hwcap2 & PPC_FEATURE2_ARCH_3_00
+                        && hwcap & PPC_FEATURE_HAS_ALTIVEC)
+                       ? __strncmp_power9 :
 diff --git a/sysdeps/pthread/Makefile b/sysdeps/pthread/Makefile
 index a123e28a57..7fcbc72bc0 100644
 --- a/sysdeps/pthread/Makefile
@@ -3303,6 +4730,36 @@
  #endif
    return lazy;
  }
+diff --git a/sysdeps/sparc/sparc32/start.S b/sysdeps/sparc/sparc32/start.S
+index 694b020ce0..cef7c96cac 100644
+--- a/sysdeps/sparc/sparc32/start.S
++++ b/sysdeps/sparc/sparc32/start.S
+@@ -73,6 +73,10 @@ _start:
+      be NULL.  */
+       mov     %g1, %o5
+ 
++  /* Provide the highest stack address to update the __libc_stack_end (used
++     to enable executable stacks if required).  */
++      st      %sp, [%sp+23*4]
++
+   /* Let libc do the rest of the initialization, and call main.  */
+       call    __libc_start_main
+        nop
+diff --git a/sysdeps/sparc/sparc64/start.S b/sysdeps/sparc/sparc64/start.S
+index c9c25c2e47..08e1e77210 100644
+--- a/sysdeps/sparc/sparc64/start.S
++++ b/sysdeps/sparc/sparc64/start.S
+@@ -74,6 +74,10 @@ _start:
+      be NULL.  */
+       mov     %g1, %o5
+ 
++  /* Provide the highest stack address to update the __libc_stack_end (used
++     to enable executable stacks if required).  */
++      stx     %sp, [%sp+STACK_BIAS+22*8]
++
+   /* Let libc do the rest of the initialization, and call main.  */
+       call    __libc_start_main
+        nop
 diff --git a/sysdeps/unix/sysv/linux/aarch64/Makefile 
b/sysdeps/unix/sysv/linux/aarch64/Makefile
 index 1fdad67fae..0839f0b08c 100644
 --- a/sysdeps/unix/sysv/linux/aarch64/Makefile
@@ -5095,6 +6552,28 @@
 +# define __tanh __tanh_sse2
 +#endif
 +#include <sysdeps/ieee754/dbl-64/s_tanh.c>
+diff --git a/sysdeps/x86_64/multiarch/ifunc-impl-list.c 
b/sysdeps/x86_64/multiarch/ifunc-impl-list.c
+index a8349775df..c2dcadd1a9 100644
+--- a/sysdeps/x86_64/multiarch/ifunc-impl-list.c
++++ b/sysdeps/x86_64/multiarch/ifunc-impl-list.c
+@@ -922,7 +922,7 @@ __libc_ifunc_impl_list (const char *name, struct 
libc_ifunc_impl *array,
+                                    (CPU_FEATURE_USABLE (AVX2)
+                                     && CPU_FEATURE_USABLE (BMI2)),
+                                    __wcsncpy_avx2)
+-            X86_IFUNC_IMPL_ADD_V2 (array, i, wcpncpy,
++            X86_IFUNC_IMPL_ADD_V2 (array, i, wcsncpy,
+                                    1,
+                                    __wcsncpy_generic))
+ 
+@@ -952,7 +952,7 @@ __libc_ifunc_impl_list (const char *name, struct 
libc_ifunc_impl *array,
+                                    (CPU_FEATURE_USABLE (AVX2)
+                                     && CPU_FEATURE_USABLE (BMI2)),
+                                    __wcpncpy_avx2)
+-            X86_IFUNC_IMPL_ADD_V2 (array, i, wcsncpy,
++            X86_IFUNC_IMPL_ADD_V2 (array, i, wcpncpy,
+                                    1,
+                                    __wcpncpy_generic))
+ 
 diff --git a/sysdeps/x86_64/tst-auditmod10b.c 
b/sysdeps/x86_64/tst-auditmod10b.c
 index 6eb21b6f06..0b994ef0f0 100644
 --- a/sysdeps/x86_64/tst-auditmod10b.c
diff -Nru glibc-2.41/debian/patches/hurd-i386/git-rename.diff 
glibc-2.41/debian/patches/hurd-i386/git-rename.diff
--- glibc-2.41/debian/patches/hurd-i386/git-rename.diff 1970-01-01 
01:00:00.000000000 +0100
+++ glibc-2.41/debian/patches/hurd-i386/git-rename.diff 2025-06-18 
06:49:31.000000000 +0200
@@ -0,0 +1,47 @@
+commit 2ae4ec56c2b18c46ef8220bcddac4303a4b6ef1c
+Author: Samuel Thibault <samuel.thiba...@ens-lyon.org>
+Date:   Mon May 12 01:52:51 2025 +0200
+
+    hurd: Make rename refuse trailing slashes [BZ #32570]
+    
+    As tested by Gnulib's renameatu module.
+    
+    Reported by Collin Funk on
+    https://sourceware.org/bugzilla/show_bug.cgi?id=32570
+
+diff --git a/sysdeps/mach/hurd/renameat2.c b/sysdeps/mach/hurd/renameat2.c
+index 59a4e314fc..5b09fedf7f 100644
+--- a/sysdeps/mach/hurd/renameat2.c
++++ b/sysdeps/mach/hurd/renameat2.c
+@@ -37,15 +37,28 @@ __renameat2 (int oldfd, const char *old, int newfd, const 
char *new,
+   if (flags & RENAME_NOREPLACE)
+     excl = 1;
+ 
+-  olddir = __directory_name_split_at (oldfd, old, (char **) &oldname);
++  olddir = __file_name_split_at (oldfd, old, (char **) &oldname);
+   if (olddir == MACH_PORT_NULL)
+     return -1;
+-  newdir = __directory_name_split_at (newfd, new, (char **) &newname);
++  if (!*oldname)
++    {
++      /* Trailing slash.  */
++      __mach_port_deallocate (__mach_task_self (), olddir);
++      return __hurd_fail (ENOTDIR);
++    }
++  newdir = __file_name_split_at (newfd, new, (char **) &newname);
+   if (newdir == MACH_PORT_NULL)
+     {
+-       __mach_port_deallocate (__mach_task_self (), olddir);
++      __mach_port_deallocate (__mach_task_self (), olddir);
+       return -1;
+     }
++  if (!*newname)
++    {
++      /* Trailing slash.  */
++      __mach_port_deallocate (__mach_task_self (), olddir);
++      __mach_port_deallocate (__mach_task_self (), newdir);
++      return __hurd_fail (ENOTDIR);
++    }
+ 
+   err = __dir_rename (olddir, oldname, newdir, newname, excl);
+   __mach_port_deallocate (__mach_task_self (), olddir);
diff -Nru glibc-2.41/debian/patches/hurd-i386/local-64b-align.diff 
glibc-2.41/debian/patches/hurd-i386/local-64b-align.diff
--- glibc-2.41/debian/patches/hurd-i386/local-64b-align.diff    1970-01-01 
01:00:00.000000000 +0100
+++ glibc-2.41/debian/patches/hurd-i386/local-64b-align.diff    2025-06-18 
06:49:31.000000000 +0200
@@ -0,0 +1,45 @@
+Avoid 64b typing error on RPC with 64b members in structures, while we migrate
+to the fixed 64b structure alignment.
+
+To be removed after people have migrated both gnumach libc+hurd rebuilt against
+fixed mig.
+
+Index: glibc-2.41/mach/Makefile
+===================================================================
+--- glibc-2.41.orig/mach/Makefile
++++ glibc-2.41/mach/Makefile
+@@ -63,6 +63,9 @@ CFLAGS-RPC_i386_set_gdt.o = $(no-stack-p
+ CFLAGS-RPC_i386_set_ldt.o = $(no-stack-protector)
+ CFLAGS-RPC_task_get_special_port.o = $(no-stack-protector)
+ CFLAGS-RPC_thread_set_state.o = $(no-stack-protector)
++CFLAGS-RPC_host_get_time.c = -DTypeCheck=0
++CFLAGS-RPC_host_get_time64.c = -DTypeCheck=0
++CFLAGS-RPC_host_get_uptime64.c = -DTypeCheck=0
+ 
+ # Translate GNU names for CPUs into the names used in Mach header files.
+ mach-machine = $(patsubst powerpc,ppc,$(base-machine))
+Index: glibc-2.41/hurd/Makefile
+===================================================================
+--- glibc-2.41.orig/hurd/Makefile
++++ glibc-2.41/hurd/Makefile
+@@ -182,6 +182,20 @@ generated += $(inlines:=.c)
+ CFLAGS-hurdstartup.o = $(no-stack-protector)
+ CFLAGS-RPC_exec_startup_get_info.o = $(no-stack-protector)
+ 
++CFLAGS-RPC_file_record_lock.c = -DTypeCheck=0
++CFLAGS-RPC_file_statfs.c = -DTypeCheck=0
++CFLAGS-RPC_file_utimens.c = -DTypeCheck=0
++CFLAGS-RPC_file_utimes.c = -DTypeCheck=0
++CFLAGS-RPC_io_select_timeout.c = -DTypeCheck=0
++CFLAGS-RPC_io_select_timeout_request.c = -DTypeCheck=0
++CFLAGS-RPC_io_select_timeout_request.os= -DTypeCheck=0
++CFLAGS-RPC_io_stat.c = -DTypeCheck=0
++CFLAGS-RPC_io_stat_reply.c = -DTypeCheck=0
++CFLAGS-RPC_login_get_idle_time.c = -DTypeCheck=0
++CFLAGS-RPC_proc_getchildren_rusage.c = -DTypeCheck=0
++CFLAGS-RPC_proc_wait.c = -DTypeCheck=0
++CFLAGS-RPC_proc_waitid.c = -DTypeCheck=0
++
+ # Make it simpler to unwind over INTR_MSG_TRAP
+ CFLAGS-intr-msg.o = -fno-omit-frame-pointer
+ CFLAGS-intr-msg.os = -fno-omit-frame-pointer
diff -Nru glibc-2.41/debian/patches/series glibc-2.41/debian/patches/series
--- glibc-2.41/debian/patches/series    2025-04-30 21:33:03.000000000 +0200
+++ glibc-2.41/debian/patches/series    2025-06-18 06:49:31.000000000 +0200
@@ -35,8 +35,10 @@
 hurd-i386/git-xstate-initialized.diff
 hurd-i386/git-signal-fpe-exceptions.diff
 hurd-i386/git-symlink-eexist.diff
+hurd-i386/git-rename.diff
 
 hurd-i386/local-pthread_once.diff
+hurd-i386/local-64b-align.diff
 
 hurd-i386/local-enable-ldconfig.diff
 hurd-i386/tg-sysvshm.diff

Reply via email to