From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2F20615827B for ; Sun, 24 Aug 2025 23:42:53 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 1C84F340D1F for ; Sun, 24 Aug 2025 23:42:53 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 14818110560; Sun, 24 Aug 2025 23:42:52 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 0BDAB110560 for ; Sun, 24 Aug 2025 23:42:52 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id AA1CB3408A2 for ; Sun, 24 Aug 2025 23:42:51 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D7F5934D7 for ; Sun, 24 Aug 2025 23:42:49 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1756078664.8c150c66bafa10ce66400f30b9e35700c7216fbf.sam@gentoo> Subject: [gentoo-commits] proj/gcc-patches:master commit in: 16.0.0/gentoo/ X-VCS-Repository: proj/gcc-patches X-VCS-Files: 16.0.0/gentoo/86_all_PR120933-i386-default-to-mtls-dialect-gnu2-if-appropriate.patch 16.0.0/gentoo/README.history X-VCS-Directories: 16.0.0/gentoo/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 8c150c66bafa10ce66400f30b9e35700c7216fbf X-VCS-Branch: master Date: Sun, 24 Aug 2025 23:42:49 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: ec8d1d23-6557-4086-aca9-76790b3aa926 X-Archives-Hash: 4fe7a7a28720fd2879e5d045a86973ae commit: 8c150c66bafa10ce66400f30b9e35700c7216fbf Author: Sam James gentoo org> AuthorDate: Sun Aug 24 23:37:44 2025 +0000 Commit: Sam James gentoo org> CommitDate: Sun Aug 24 23:37:44 2025 +0000 URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=8c150c66 16.0.0: cut patchset 12, add default -mtls-dialect=gnu2 patch Note that the -mtls-dialect=gnu2 patch only takes effect with: a) new enough glibc, AND b) new enough (unreleased) binutils Signed-off-by: Sam James gentoo.org> ...fault-to-mtls-dialect-gnu2-if-appropriate.patch | 511 +++++++++++++++++++++ 16.0.0/gentoo/README.history | 3 +- 2 files changed, 513 insertions(+), 1 deletion(-) 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..11cbfdf --- /dev/null +++ b/16.0.0/gentoo/86_all_PR120933-i386-default-to-mtls-dialect-gnu2-if-appropriate.patch @@ -0,0 +1,511 @@ +From 49dee4e109d23a7a2f9644a84909c9dec7896fa5 Mon Sep 17 00:00:00 2001 +Message-ID: <49dee4e109d23a7a2f9644a84909c9dec7896fa5.1756009689.git.sam@gentoo.org> +From: Sam James +Date: Sun, 24 Aug 2025 00:30:45 +0100 +Subject: [PATCH] i386: default to -mtls-dialect=gnu2 if appropriate + +For GNU/Linux IA-32/X86-64 targets, check if ld emits GLIBC_ABI_GNU2_TLS and +use it 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. + +Builds on the --with-tls= machinery from r16-3355-g96a291c4bb0b8a. + +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'. + +* 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. + +TODO: Handle -x32 +TODO: Test i686 + +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 | 254 +++++++++++++++++++++++++++++++++-------------- + gcc/configure.ac | 142 +++++++++++++++++++++----- + 2 files changed, 296 insertions(+), 100 deletions(-) + +diff --git a/gcc/configure b/gcc/configure +index 4a751d969bab..54b67908e701 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 +@@ -801,6 +800,7 @@ HAVE_AUTO_BUILD + extra_opt_files + extra_modes_file + NATIVE_SYSTEM_HEADER_DIR ++gcc_cv_readelf + objext + manext + LIBICONV_DEP +@@ -12927,6 +12927,182 @@ 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-*-* | x86_64-*-*) ++ # 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. ++ case $target in ++ # TODO: x32 ++ i?86-*-linux*gnu* ) ++ conftest_s=' ++ .section .text.startup,"ax",@progbits ++ .p2align 4 ++ .globl main ++ .type main, @function ++ main: ++ leal ld@TLSDESC(%ebx), %eax ++ call *ld@TLSCALL(%eax) ++ addl %gs:0, %eax ++ 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; } ++ ;; ++ x86_64-*-linux*gnu* ) ++ conftest_s=' ++ .section .text.startup,"ax",@progbits ++ .p2align 4 ++ .globl main ++ .type main, @function ++ main: ++ leaq foo@TLSDESC(%rip), %rax ++ call *foo@TLSCALL(%rax) ++ movl %fs:(%rax), %eax ++ 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; } ++ ;; ++ esac ++ ++ 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 + # -------------------------------------------------------- +@@ -21484,7 +21660,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 21487 "configure" ++#line 21663 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -21590,7 +21766,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 21593 "configure" ++#line 21769 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -25419,78 +25595,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 4532c5c22fe5..b62cb747ee50 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -1886,6 +1886,123 @@ 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-*-* | x86_64-*-*) ++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. ++ case $target in ++ # TODO: x32 ++ i?86-*-linux*gnu* ) ++ conftest_s=' ++ .section .text.startup,"ax",@progbits ++ .p2align 4 ++ .globl main ++ .type main, @function ++ main: ++ leal ld@TLSDESC(%ebx), %eax ++ call *ld@TLSCALL(%eax) ++ addl %gs:0, %eax ++ 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.* ++ ]) ++ ;; ++ x86_64-*-linux*gnu* ) ++ conftest_s=' ++ .section .text.startup,"ax",@progbits ++ .p2align 4 ++ .globl main ++ .type main, @function ++ main: ++ leaq foo@TLSDESC(%rip), %rax ++ call *foo@TLSCALL(%rax) ++ movl %fs:(%rax), %eax ++ 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.* ++ ]) ++ ;; ++ esac ++ ++ 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 +3051,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 +-- +2.51.0 + diff --git a/16.0.0/gentoo/README.history b/16.0.0/gentoo/README.history index 53a4c78..140c03f 100644 --- a/16.0.0/gentoo/README.history +++ b/16.0.0/gentoo/README.history @@ -1,5 +1,6 @@ -12 ???? +12 24 August 2025 + + 86_all_PR120933-i386-default-to-mtls-dialect-gnu2-if-appropriate.patch - 86_all_PR121572_x86-Place-the-TLS-call-before-all-FLAGS_REG-setting-.patch - 87_all_PR121553-Revert-c-P2036R3-Change-scope-of-lambda-trailing-ret.patch