commit:     ead9249ea8caed8815234a0b4fbc54382819b906
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Oct  5 23:04:47 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Oct  5 23:05:00 2025 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=ead9249e

16.0.0: cut patchset 16 w/ rebase/restore GNU2 TLS patch and libatomic

Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...fault-to-mtls-dialect-gnu2-if-appropriate.patch | 459 +++++++++++++++++++++
 .../gentoo/89_all_PR81358-autolink-libatomic.patch |  61 ++-
 16.0.0/gentoo/README.history                       |   5 +
 3 files changed, 491 insertions(+), 34 deletions(-)

diff --git 
a/16.0.0/gentoo/86_all_PR120933-i386-default-to-mtls-dialect-gnu2-if-appropriate.patch
 
b/16.0.0/gentoo/86_all_PR120933-i386-default-to-mtls-dialect-gnu2-if-appropriate.patch
new file mode 100644
index 0000000..add05ac
--- /dev/null
+++ 
b/16.0.0/gentoo/86_all_PR120933-i386-default-to-mtls-dialect-gnu2-if-appropriate.patch
@@ -0,0 +1,459 @@
+From d05f32416543cc2050dd259e958bbc62f4120c6f Mon Sep 17 00:00:00 2001
+Message-ID: 
<d05f32416543cc2050dd259e958bbc62f4120c6f.1759705126.git....@gentoo.org>
+From: Sam James <[email protected]>
+Date: Sun, 24 Aug 2025 00:30:45 +0100
+Subject: [PATCH] i386: default to -mtls-dialect=gnu2 if appropriate
+
+GNU2 TLS descriptors were introduced in 2006 (r0-73091-g5bf5a10b1ccacf)
+but were only opt-in with -mtls-dialect=gnu2. They are more efficient
+and it's time to enable them by default.
+
+Builds on the --with-tls= machinery from r16-3355-g96a291c4bb0b8a.
+
+We achieve this for GNU/Linux IA-32/X86-64 targets by checking if ld emits
+GLIBC_ABI_GNU2_TLS, using its presence to decide if we can default to
+-mtls-dialect=gnu2.
+
+For PR ld/33130, newer ld will add GLIBC_ABI_GNU2_TLS if either unconfigured
+(auto mode) or if configured with --enable-gnu2-tls-tag. In auto mode,
+GLIBC_ABI_GNU2_TLS is only added if glibc provides it. In explicit mode, the
+user has asked for this behavior and binaries will depend on GLIBC_ABI_GNU2_TLS
+and fixed glibc. Hence the presence of GLIBC_ABI_GNU2_TLS tells us if we can
+safely default to GNU2 TLS descriptors. We added GLIBC_ABI_GNU2_TLS in glibc
+to indicate that PR dynamic-link/33129 is fixed.
+
+If distributions wish to opt-out of this for systems which meet the above
+conditions, they can either configure GCC using --with-tls=gnu, or configure
+binutils with --disable-gnu2-tls-tag: if this is necessary, it is recommended
+to use --with-tls=gnu instead, to avoid affecting the ecosystem negatively by
+having unmarked binaries.
+
+Some implementation notes:
+* The readelf check had to be moved earlier because we want
+  to set `with_tls` before `config.gcc` is processed (which has default
+  machinery for TLS).
+
+* The check doesn't really handle cross, but I don't see
+  this as a huge problem. The check is already opportunistic and if it
+  fails, it falls back to --with-tls=DIALECT if passed, and failing that,
+  the previous and safe default of 'gnu'.
+
+* The change is only made for glibc systems at this time. Enablement and 
testing
+  can be done for other libcs as future work.
+
+* In future, we may do the same thing for ARM if/when appropriate equivalent
+  machinery is added to glibc and bfd. This makes the separate position of
+  the check (not with some of the others) a bit more palatable IMO.
+
+gcc/ChangeLog:
+       PR target/120933
+       * configure: Regenerate.
+       * configure.ac (gcc_cv_readelf): Move check earlier.
+       (gcc_cv_libc_x86_tlsdesc_call): Define to 'yes' if
+       glibc has the GLIBC_ABI_GNU2_TLS version tag and ld emits it.
+       (with_tls): Default to 'gnu2' if --with-tls is not passed and
+       gcc_cv_libc_x86_tlsdesc_call is 'yes'.
+
+---
+ gcc/configure    | 217 +++++++++++++++++++++++++++++++----------------
+ gcc/configure.ac | 112 ++++++++++++++++++------
+ 2 files changed, 229 insertions(+), 100 deletions(-)
+
+diff --git a/gcc/configure b/gcc/configure
+index 38d8cd919cba..996f7f7d4644 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -737,7 +737,6 @@ libgcc_visibility
+ ORIGINAL_DSYMUTIL_FOR_TARGET
+ gcc_cv_dsymutil
+ gcc_cv_otool
+-gcc_cv_readelf
+ gcc_cv_objdump
+ ORIGINAL_NM_FOR_TARGET
+ gcc_cv_nm
+@@ -802,6 +801,7 @@ HAVE_AUTO_BUILD
+ extra_opt_files
+ extra_modes_file
+ NATIVE_SYSTEM_HEADER_DIR
++gcc_cv_readelf
+ objext
+ manext
+ LIBICONV_DEP
+@@ -12928,6 +12928,145 @@ if test "x$enable_win32_utf8_manifest" != xno; then
+   host_extra_objs_mingw=utf8-mingw32.o
+ fi
+ 
++
++# Figure out what readelf we will be using.
++if ${gcc_cv_readelf+:} false; then :
++
++else
++
++if test -f $gcc_cv_binutils_srcdir/configure.ac \
++     && test -f ../binutils/Makefile \
++     && test x$build = x$host; then
++      # Single tree build which includes binutils.
++      gcc_cv_readelf=../binutils/readelf$build_exeext
++elif test -x readelf$build_exeext; then
++      gcc_cv_readelf=./readelf$build_exeext
++elif ( set dummy $READELF_FOR_TARGET; test -x $2 ); then
++        gcc_cv_readelf="$READELF_FOR_TARGET"
++else
++        # Extract the first word of "$READELF_FOR_TARGET", so it can be a 
program name with args.
++set dummy $READELF_FOR_TARGET; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_path_gcc_cv_readelf+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++  case $gcc_cv_readelf in
++  [\\/]* | ?:[\\/]*)
++  ac_cv_path_gcc_cv_readelf="$gcc_cv_readelf" # Let the user override the 
test with a path.
++  ;;
++  *)
++  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++    ac_cv_path_gcc_cv_readelf="$as_dir/$ac_word$ac_exec_ext"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found 
$as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++  ;;
++esac
++fi
++gcc_cv_readelf=$ac_cv_path_gcc_cv_readelf
++if test -n "$gcc_cv_readelf"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_readelf" >&5
++$as_echo "$gcc_cv_readelf" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++fi
++fi
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what readelf to use" >&5
++$as_echo_n "checking what readelf to use... " >&6; }
++if test "$gcc_cv_readelf" = ../binutils/readelf$build_exeext; then
++      # Single tree build which includes binutils.
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result: newly built readelf" 
>&5
++$as_echo "newly built readelf" >&6; }
++elif test x$gcc_cv_readelf = x; then
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
++$as_echo "not found" >&6; }
++else
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_readelf" >&5
++$as_echo "$gcc_cv_readelf" >&6; }
++fi
++
++case $target in
++  i[34567]86-*-gnu* | x86_64-*-gnu* )
++      # PR target/120933
++      # For GNU/Linux targets, check if ld emits GLIBC_ABI_GNU2_TLS.  For PR 
ld/33130,
++      # newer ld will add GLIBC_ABI_GNU2_TLS if either unconfigured (auto 
mode) or if
++      # configured with --enable-gnu2-tls-tag.  In auto mode, 
GLIBC_ABI_GNU2_TLS
++      # is only added if glibc provides it.  In explicit mode, the user has 
asked
++      # for this behavior and binaries will depend on GLIBC_ABI_GNU2_TLS and 
fixed
++      # glibc.  Hence the presence of GLIBC_ABI_GNU2_TLS tells us if we can 
safely
++      # default to GNU2 TLS descriptors.
++      conftest_S='
++              .section        .text.startup,"ax",@progbits
++              .p2align 4
++              .globl  main
++              .type   main, @function
++              main:
++              #ifdef __x86_64__
++                      leaq    foo@TLSDESC(%rip), %rax
++                      call    *foo@TLSCALL(%rax)
++                      movl    %fs:(%rax), %eax
++              #else
++                      leal    ld@TLSDESC(%ebx), %eax
++                      call    *ld@TLSCALL(%eax)
++                      addl    %gs:0, %eax
++              #endif
++                      ret
++                      .size   main, .-main
++                      .section        .note.GNU-stack,"",@progbits
++      '
++
++      { $as_echo "$as_me:${as_lineno-$LINENO}: checking libc has 
GLIBC_ABI_GNU2_TLS symbol dep and ld emits it" >&5
++$as_echo_n "checking libc has GLIBC_ABI_GNU2_TLS symbol dep and ld emits 
it... " >&6; }
++if ${gcc_cv_libc_x86_tlsdesc_call+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++
++              gcc_cv_libc_x86_tlsdesc_call=no
++              echo "$conftest_S" > conftest.S
++              if $CC $CFLAGS conftest.S -o conftest -shared > /dev/null 2>&1; 
then
++                      if test x$gcc_cv_readelf != x; then
++                              if $gcc_cv_readelf --version-info conftest 2>&1 
\
++                                      | grep "GLIBC_ABI_GNU2_TLS" > /dev/null 
2>&1; then
++                                      gcc_cv_libc_x86_tlsdesc_call=yes
++                              else
++                                      gcc_cv_libc_x86_tlsdesc_call=no
++                              fi
++                      fi
++              fi
++              rm -f conftest.*
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: 
$gcc_cv_libc_x86_tlsdesc_call" >&5
++$as_echo "$gcc_cv_libc_x86_tlsdesc_call" >&6; }
++
++      # Set with_tls only if it's not already set via --with-tls=DIALECT
++      case "$gcc_cv_libc_x86_tlsdesc_call" in
++      yes)
++              with_tls=${with_tls:-gnu2}
++              ;;
++      *)
++              with_tls=${with_tls:-gnu}
++              ;;
++      esac
++  ;;
++esac
++
+ # --------------------------------------------------------
+ # Build, host, and target specific configuration fragments
+ # --------------------------------------------------------
+@@ -21859,7 +21998,7 @@ else
+   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+   lt_status=$lt_dlunknown
+   cat > conftest.$ac_ext <<_LT_EOF
+-#line 21862 "configure"
++#line 22001 "configure"
+ #include "confdefs.h"
+ 
+ #if HAVE_DLFCN_H
+@@ -21965,7 +22104,7 @@ else
+   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+   lt_status=$lt_dlunknown
+   cat > conftest.$ac_ext <<_LT_EOF
+-#line 21968 "configure"
++#line 22107 "configure"
+ #include "confdefs.h"
+ 
+ #if HAVE_DLFCN_H
+@@ -25794,78 +25933,6 @@ else
+ $as_echo "$gcc_cv_objdump" >&6; }
+ fi
+ 
+-# Figure out what readelf we will be using.
+-if ${gcc_cv_readelf+:} false; then :
+-
+-else
+-
+-if test -f $gcc_cv_binutils_srcdir/configure.ac \
+-     && test -f ../binutils/Makefile \
+-     && test x$build = x$host; then
+-      # Single tree build which includes binutils.
+-      gcc_cv_readelf=../binutils/readelf$build_exeext
+-elif test -x readelf$build_exeext; then
+-      gcc_cv_readelf=./readelf$build_exeext
+-elif ( set dummy $READELF_FOR_TARGET; test -x $2 ); then
+-        gcc_cv_readelf="$READELF_FOR_TARGET"
+-else
+-        # Extract the first word of "$READELF_FOR_TARGET", so it can be a 
program name with args.
+-set dummy $READELF_FOR_TARGET; ac_word=$2
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+-$as_echo_n "checking for $ac_word... " >&6; }
+-if ${ac_cv_path_gcc_cv_readelf+:} false; then :
+-  $as_echo_n "(cached) " >&6
+-else
+-  case $gcc_cv_readelf in
+-  [\\/]* | ?:[\\/]*)
+-  ac_cv_path_gcc_cv_readelf="$gcc_cv_readelf" # Let the user override the 
test with a path.
+-  ;;
+-  *)
+-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in $PATH
+-do
+-  IFS=$as_save_IFS
+-  test -z "$as_dir" && as_dir=.
+-    for ac_exec_ext in '' $ac_executable_extensions; do
+-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+-    ac_cv_path_gcc_cv_readelf="$as_dir/$ac_word$ac_exec_ext"
+-    $as_echo "$as_me:${as_lineno-$LINENO}: found 
$as_dir/$ac_word$ac_exec_ext" >&5
+-    break 2
+-  fi
+-done
+-  done
+-IFS=$as_save_IFS
+-
+-  ;;
+-esac
+-fi
+-gcc_cv_readelf=$ac_cv_path_gcc_cv_readelf
+-if test -n "$gcc_cv_readelf"; then
+-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_readelf" >&5
+-$as_echo "$gcc_cv_readelf" >&6; }
+-else
+-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+-$as_echo "no" >&6; }
+-fi
+-
+-
+-fi
+-fi
+-
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what readelf to use" >&5
+-$as_echo_n "checking what readelf to use... " >&6; }
+-if test "$gcc_cv_readelf" = ../binutils/readelf$build_exeext; then
+-      # Single tree build which includes binutils.
+-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: newly built readelf" 
>&5
+-$as_echo "newly built readelf" >&6; }
+-elif test x$gcc_cv_readelf = x; then
+-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+-$as_echo "not found" >&6; }
+-else
+-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_readelf" >&5
+-$as_echo "$gcc_cv_readelf" >&6; }
+-fi
+-
+ # Figure out what otool we will be using.
+ if ${gcc_cv_otool+:} false; then :
+ 
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index 19975fa5be5b..83fbf1fe9d60 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -1886,6 +1886,93 @@ if test "x$enable_win32_utf8_manifest" != xno; then
+   host_extra_objs_mingw=utf8-mingw32.o
+ fi
+ 
++
++# Figure out what readelf we will be using.
++AS_VAR_SET_IF(gcc_cv_readelf,, [
++if test -f $gcc_cv_binutils_srcdir/configure.ac \
++     && test -f ../binutils/Makefile \
++     && test x$build = x$host; then
++      # Single tree build which includes binutils.
++      gcc_cv_readelf=../binutils/readelf$build_exeext
++elif test -x readelf$build_exeext; then
++      gcc_cv_readelf=./readelf$build_exeext
++elif ( set dummy $READELF_FOR_TARGET; test -x $[2] ); then
++        gcc_cv_readelf="$READELF_FOR_TARGET"
++else
++        AC_PATH_PROG(gcc_cv_readelf, $READELF_FOR_TARGET)
++fi])
++
++AC_MSG_CHECKING(what readelf to use)
++if test "$gcc_cv_readelf" = ../binutils/readelf$build_exeext; then
++      # Single tree build which includes binutils.
++      AC_MSG_RESULT(newly built readelf)
++elif test x$gcc_cv_readelf = x; then
++      AC_MSG_RESULT(not found)
++else
++      AC_MSG_RESULT($gcc_cv_readelf)
++fi
++
++case $target in
++changequote(,)dnl
++  i[34567]86-*-gnu* | x86_64-*-gnu* )
++changequote([,])dnl
++      # PR target/120933
++      # For GNU/Linux targets, check if ld emits GLIBC_ABI_GNU2_TLS.  For PR 
ld/33130,
++      # newer ld will add GLIBC_ABI_GNU2_TLS if either unconfigured (auto 
mode) or if
++      # configured with --enable-gnu2-tls-tag.  In auto mode, 
GLIBC_ABI_GNU2_TLS
++      # is only added if glibc provides it.  In explicit mode, the user has 
asked
++      # for this behavior and binaries will depend on GLIBC_ABI_GNU2_TLS and 
fixed
++      # glibc.  Hence the presence of GLIBC_ABI_GNU2_TLS tells us if we can 
safely
++      # default to GNU2 TLS descriptors.
++      conftest_S='
++              .section        .text.startup,"ax",@progbits
++              .p2align 4
++              .globl  main
++              .type   main, @function
++              main:
++              #ifdef __x86_64__
++                      leaq    foo@TLSDESC(%rip), %rax
++                      call    *foo@TLSCALL(%rax)
++                      movl    %fs:(%rax), %eax
++              #else
++                      leal    ld@TLSDESC(%ebx), %eax
++                      call    *ld@TLSCALL(%eax)
++                      addl    %gs:0, %eax
++              #endif
++                      ret
++                      .size   main, .-main
++                      .section        .note.GNU-stack,"",@progbits
++      '
++
++      AC_CACHE_CHECK([libc has GLIBC_ABI_GNU2_TLS symbol dep and ld emits it],
++              gcc_cv_libc_x86_tlsdesc_call, [
++              gcc_cv_libc_x86_tlsdesc_call=no
++              echo "$conftest_S" > conftest.S
++              if $CC $CFLAGS conftest.S -o conftest -shared > /dev/null 2>&1; 
then
++                      if test x$gcc_cv_readelf != x; then
++                              if $gcc_cv_readelf --version-info conftest 2>&1 
\
++                                      | grep "GLIBC_ABI_GNU2_TLS" > /dev/null 
2>&1; then
++                                      gcc_cv_libc_x86_tlsdesc_call=yes
++                              else
++                                      gcc_cv_libc_x86_tlsdesc_call=no
++                              fi
++                      fi
++              fi
++              rm -f conftest.*
++      ])
++
++      # Set with_tls only if it's not already set via --with-tls=DIALECT
++      case "$gcc_cv_libc_x86_tlsdesc_call" in
++      yes)
++              with_tls=${with_tls:-gnu2}
++              ;;
++      *)
++              with_tls=${with_tls:-gnu}
++              ;;
++      esac
++  ;;
++esac
++
+ # --------------------------------------------------------
+ # Build, host, and target specific configuration fragments
+ # --------------------------------------------------------
+@@ -2934,31 +3021,6 @@ else
+       AC_MSG_RESULT($gcc_cv_objdump)
+ fi
+ 
+-# Figure out what readelf we will be using.
+-AS_VAR_SET_IF(gcc_cv_readelf,, [
+-if test -f $gcc_cv_binutils_srcdir/configure.ac \
+-     && test -f ../binutils/Makefile \
+-     && test x$build = x$host; then
+-      # Single tree build which includes binutils.
+-      gcc_cv_readelf=../binutils/readelf$build_exeext
+-elif test -x readelf$build_exeext; then
+-      gcc_cv_readelf=./readelf$build_exeext
+-elif ( set dummy $READELF_FOR_TARGET; test -x $[2] ); then
+-        gcc_cv_readelf="$READELF_FOR_TARGET"
+-else
+-        AC_PATH_PROG(gcc_cv_readelf, $READELF_FOR_TARGET)
+-fi])
+-
+-AC_MSG_CHECKING(what readelf to use)
+-if test "$gcc_cv_readelf" = ../binutils/readelf$build_exeext; then
+-      # Single tree build which includes binutils.
+-      AC_MSG_RESULT(newly built readelf)
+-elif test x$gcc_cv_readelf = x; then
+-      AC_MSG_RESULT(not found)
+-else
+-      AC_MSG_RESULT($gcc_cv_readelf)
+-fi
+-
+ # Figure out what otool we will be using.
+ AS_VAR_SET_IF(gcc_cv_otool,, [
+ if test -x otool$build_exeext; then
+
+base-commit: a3727eb5e821d6a1916805029aeaed092e5e739d
+-- 
+2.51.0
+

diff --git a/16.0.0/gentoo/89_all_PR81358-autolink-libatomic.patch 
b/16.0.0/gentoo/89_all_PR81358-autolink-libatomic.patch
index 61a5c5e..4d0959c 100644
--- a/16.0.0/gentoo/89_all_PR81358-autolink-libatomic.patch
+++ b/16.0.0/gentoo/89_all_PR81358-autolink-libatomic.patch
@@ -3485,10 +3485,10 @@ index 2ac4d5b46686..431ce5ceb9c0 100644
  
  CONFIGURE_GDB_TK = @CONFIGURE_GDB_TK@
 diff --git a/configure b/configure
-index a960918dcf6c..6b87bb4641a2 100755
+index 54b71af5d3be..4f2ba5e8a056 100755
 --- a/configure
 +++ b/configure
-@@ -11079,6 +11079,11 @@ if echo " ${target_configdirs} " | grep " libgomp " > 
/dev/null 2>&1 ; then
+@@ -11075,6 +11075,11 @@ if echo " ${target_configdirs} " | grep " libgomp " > 
/dev/null 2>&1 ; then
    bootstrap_target_libs=${bootstrap_target_libs}target-libgomp,
  fi
  
@@ -3501,10 +3501,10 @@ index a960918dcf6c..6b87bb4641a2 100755
  # or bootstrap-ubsan, bootstrap it.
  if echo " ${target_configdirs} " | grep " libsanitizer " > /dev/null 2>&1; 
then
 diff --git a/configure.ac b/configure.ac
-index 49ac5d605146..6f12fe9c306b 100644
+index 2996a124206a..94321ffd20ab 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -3255,6 +3255,11 @@ if echo " ${target_configdirs} " | grep " libgomp " > 
/dev/null 2>&1 ; then
+@@ -3251,6 +3251,11 @@ if echo " ${target_configdirs} " | grep " libgomp " > 
/dev/null 2>&1 ; then
    bootstrap_target_libs=${bootstrap_target_libs}target-libgomp,
  fi
  
@@ -3713,10 +3713,10 @@ index 68aba07881d9..48ddb3d96c21 100644
  
  #define PTRDIFF_TYPE (TARGET_ARCH64 ? "long int" : "int")
 diff --git a/gcc/configure b/gcc/configure
-index d6cc7fc17ca0..c3b6def04ae8 100755
+index 996f7f7d4644..484231e34abf 100755
 --- a/gcc/configure
 +++ b/gcc/configure
-@@ -33545,6 +33545,12 @@ $as_echo "#define ENABLE_DEFAULT_SSP 1" >>confdefs.h
+@@ -33987,6 +33987,12 @@ $as_echo "#define ENABLE_DEFAULT_SSP 1" >>confdefs.h
  fi
  
  
@@ -3730,10 +3730,10 @@ index d6cc7fc17ca0..c3b6def04ae8 100755
  
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/sdt.h in the target C 
library" >&5
 diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 19975fa5be5b..403974e091c6 100644
+index 83fbf1fe9d60..f6295fb273e8 100644
 --- a/gcc/configure.ac
 +++ b/gcc/configure.ac
-@@ -7049,6 +7049,11 @@ if test x$enable_default_ssp = xyes ; then
+@@ -7111,6 +7111,11 @@ if test x$enable_default_ssp = xyes ; then
  fi
  AC_SUBST([enable_default_ssp])
  
@@ -3746,7 +3746,7 @@ index 19975fa5be5b..403974e091c6 100644
  GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H])
  AC_CACHE_CHECK([sys/sdt.h in the target C library], [gcc_cv_sys_sdt_h], [
 diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index 492ca2914323..2d89f30446bd 100644
+index f93fe43733dc..0dc7333a0df7 100644
 --- a/gcc/doc/invoke.texi
 +++ b/gcc/doc/invoke.texi
 @@ -731,7 +731,7 @@ Objective-C and Objective-C++ Dialects}.
@@ -3758,7 +3758,7 @@ index 492ca2914323..2d89f30446bd 100644
  -nostartfiles  -nodefaultlibs  -nolibc  -nostdlib  -nostdlib++
  -e @var{entry}  --entry=@var{entry}
  -pie  -pthread  -r  -rdynamic
-@@ -19438,6 +19438,12 @@ If any of these options is used, then the linker is 
not run, and
+@@ -19466,6 +19466,12 @@ If any of these options is used, then the linker is 
not run, and
  object file names should not be used as arguments.  @xref{Overall
  Options}.
  
@@ -3823,10 +3823,10 @@ index 65dff6ece9ff..6dde874fa388 100644
  -include $(tmake_file)
  
 diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in
-index 4344ac4a2e8f..d07fa1b7e830 100644
+index 5f9de22d6c5a..be06e38e7235 100644
 --- a/libatomic/Makefile.in
 +++ b/libatomic/Makefile.in
-@@ -429,7 +429,7 @@ libatomic_version_info = -version-info $(libtool_VERSION)
+@@ -432,7 +432,7 @@ libatomic_version_info = -version-info $(libtool_VERSION)
  @ENABLE_DARWIN_AT_RPATH_TRUE@ -Wc,-nodefaultrpaths \
  @ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path
  libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script) \
@@ -3835,7 +3835,7 @@ index 4344ac4a2e8f..d07fa1b7e830 100644
  
  @PARTIAL_VXWORKS_FALSE@libatomic_la_SOURCES = gload.c gstore.c gcas.c \
  @PARTIAL_VXWORKS_FALSE@       gexch.c glfree.c lock.c init.c fenv.c \
-@@ -471,6 +471,15 @@ libatomic_la_LDFLAGS = $(libatomic_version_info) 
$(libatomic_version_script) \
+@@ -474,6 +474,15 @@ libatomic_la_LDFLAGS = $(libatomic_version_info) 
$(libatomic_version_script) \
  @ARCH_X86_64_TRUE@@HAVE_IFUNC_TRUE@@PARTIAL_VXWORKS_FALSE@IFUNC_OPTIONS = 
-mcx16 -mcx16
  libatomic_convenience_la_SOURCES = $(libatomic_la_SOURCES)
  libatomic_convenience_la_LIBADD = $(libatomic_la_LIBADD)
@@ -3851,7 +3851,7 @@ index 4344ac4a2e8f..d07fa1b7e830 100644
  MULTISRCTOP = 
  MULTIBUILDTOP = 
  MULTIDIRS = 
-@@ -914,6 +923,9 @@ vpath % $(strip $(search_path))
+@@ -917,6 +926,9 @@ vpath % $(strip $(search_path))
  # makefile fragments to avoid broken *.Ppo getting included into the Makefile
  # when it is reloaded during the build of all-multi.
  all-multi: $(libatomic_la_LIBADD)
@@ -3862,10 +3862,10 @@ index 4344ac4a2e8f..d07fa1b7e830 100644
  # target overrides
  -include $(tmake_file)
 diff --git a/libatomic/configure b/libatomic/configure
-index 67b3a6388d7f..6c6eb250b5b5 100755
+index 0945b173f6cc..cd9fcdb15181 100755
 --- a/libatomic/configure
 +++ b/libatomic/configure
-@@ -3417,6 +3417,26 @@ esac
+@@ -3418,6 +3418,26 @@ esac
  # the wrong, non-multilib-adjusted value will be used in multilibs.
  # As a side effect, we have to subst CFLAGS ourselves.
  
@@ -3892,7 +3892,7 @@ index 67b3a6388d7f..6c6eb250b5b5 100755
  
  
  ac_ext=c
-@@ -4595,11 +4615,6 @@ fi
+@@ -4596,11 +4616,6 @@ fi
  
  
  
@@ -3904,25 +3904,25 @@ index 67b3a6388d7f..6c6eb250b5b5 100755
  # Find other programs we need.
  if test -n "$ac_tool_prefix"; then
    # Extract the first word of "${ac_tool_prefix}ar", so it can be a program 
name with args.
-@@ -11458,7 +11473,7 @@ else
+@@ -11833,7 +11848,7 @@ else
    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
    lt_status=$lt_dlunknown
    cat > conftest.$ac_ext <<_LT_EOF
--#line 11461 "configure"
-+#line 11476 "configure"
+-#line 11836 "configure"
++#line 11851 "configure"
  #include "confdefs.h"
  
  #if HAVE_DLFCN_H
-@@ -11564,7 +11579,7 @@ else
+@@ -11939,7 +11954,7 @@ else
    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
    lt_status=$lt_dlunknown
    cat > conftest.$ac_ext <<_LT_EOF
--#line 11567 "configure"
-+#line 11582 "configure"
+-#line 11942 "configure"
++#line 11957 "configure"
  #include "confdefs.h"
  
  #if HAVE_DLFCN_H
-@@ -11958,7 +11973,7 @@ _ACEOF
+@@ -12333,7 +12348,7 @@ _ACEOF
  
  # Disable fallbacks to __sync routines from libgcc.  Otherwise we'll
  # make silly decisions about what the cpu can do.
@@ -3931,7 +3931,7 @@ index 67b3a6388d7f..6c6eb250b5b5 100755
  
  # Check header files.
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-@@ -14979,7 +14994,7 @@ _ACEOF
+@@ -15354,7 +15369,7 @@ _ACEOF
  if ac_fn_c_try_link "$LINENO"; then :
    XPCFLAGS=" -pthread"
  else
@@ -3940,7 +3940,7 @@ index 67b3a6388d7f..6c6eb250b5b5 100755
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  #include <pthread.h>
-@@ -15002,7 +15017,7 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -15377,7 +15392,7 @@ rm -f core conftest.err conftest.$ac_objext \
  fi
  rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
@@ -3949,7 +3949,7 @@ index 67b3a6388d7f..6c6eb250b5b5 100755
    ;;
  esac
  
-@@ -15577,7 +15592,7 @@ $as_echo "$as_me: versioning on shared library symbols 
is $enable_symvers" >&6;}
+@@ -15952,7 +15967,7 @@ $as_echo "$as_me: versioning on shared library symbols 
is $enable_symvers" >&6;}
  
  
  # Cleanup and exit.
@@ -4037,10 +4037,3 @@ index 01141f643769..ded382233562 100644
  AC_CACHE_SAVE
  
  AC_ARG_ENABLE([werror],
-
-base-commit: 790bbb9ca6b7ef871a092c6f5622c7eb9c7306bb
-prerequisite-patch-id: e3e90e25301cf73bd7ed26f62ac750b6e5cdb7eb
-prerequisite-patch-id: bdc72fb3b44c9bbff1dc7e7eb6d99ada0fa05581
--- 
-2.51.0
-

diff --git a/16.0.0/gentoo/README.history b/16.0.0/gentoo/README.history
index e08e2a3..7228145 100644
--- a/16.0.0/gentoo/README.history
+++ b/16.0.0/gentoo/README.history
@@ -1,3 +1,8 @@
+16     5 October 2025
+
+       + 86_all_PR120933-i386-default-to-mtls-dialect-gnu2-if-appropriate.patch
+       U 89_all_PR81358-autolink-libatomic.patch
+
 15     5 October 2025
 
        - 86_all_PR120933-i386-default-to-mtls-dialect-gnu2-if-appropriate.patch

Reply via email to