From 46191b478ebcb6bc6831627526da44f04dfcd1be Mon Sep 17 00:00:00 2001 From: Sam James Date: Thu, 18 Dec 2025 21:29:55 +0000 Subject: [PATCH] toolchain.eclass: default to -mtls-dialect=gnu2 with GCC 16 on x86_64 Bug: https://gcc.gnu.org/PR120933 Signed-off-by: Sam James --- eclass/toolchain.eclass | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 92e48b66979f8..aaf24c50426ba 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -1581,6 +1581,10 @@ toolchain_src_configure() { --enable-__cxa_atexit --enable-clocale=gnu ) + + if [[ ${CTARGET} == *linux* ]] && tc_version_is_at_least 16.0.0_p20251214 ${PV} ; then + confgcc+=( --with-tls=gnu2 ) + fi ;; *-solaris*) confgcc+=( --enable-__cxa_atexit )