/var/lib/portage/tmp/portage/sys-devel/gcc-15.0.0_pre20241201/work/gcc-15-20241201/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cpp: In function 'void __sanitizer::GetTls(uptr*, uptr*)': /var/lib/portage/tmp/portage/sys-devel/gcc-15.0.0_pre20241201/work/gcc-15-20241201/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cpp:627:29: error: 'TlsPreTcbSize' was not declared in this scope 627 | const uptr pre_tcb_size = TlsPreTcbSize(); | ^~~~~~~~~~~~~ make[4]: *** [Makefile:631: sanitizer_linux_libcdep.lo] Error 1 I had this same problem with an earlier snapshot but was in too much of a hurry to report it, and worked around it by disabling some USE flags: $ emerge -pv1 gcc [ebuild U *] sys-devel/gcc-15.0.0_pre20241201:15::gentoo [15.0.0_pre20241117-r2:15::gentoo] USE="(cxx) (default-stack-clash-protection) (default-znow) fortran* hardened jit* lto* openmp (pie) sanitize* ssp (-ada) (-cet) (-custom-cflags) -d -debug -doc (-fixed-point) -go -graphite (-ieee-long-double) -libgdiagnostics% (-libssp) -modula2 (-multilib) (-nls) -objc -objc++ -objc-gc (-pch) -pgo -rust (-systemtap) -test (-time64) (-valgrind) -vanilla (-vtv) -zstd" 0 KiB As you can see, I disabled fortran, jit, lto, and sanitize to get it to build. From the error it looks like USE=sanitize to me. This is on riscv/musl. My eselected GCC is still hardened 14.2.1.
There was a libsanitizer import recently (specifically to fix issues on riscv, actually!) so I guess that's to blame.
Can you give me the full build.log please so I can pass it on?
Created attachment 913415 [details] gcc-build.log.xz Sure thing.
Let it build again today to see if anything had changed, but same thing: /var/lib/portage/tmp/portage/sys-devel/gcc-15.0.1_pre20250216/work/gcc-15-2025\ 0216/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cpp:627:29: error: \ 'TlsPreTcbSize' was not declared in this scope 627 | const uptr pre_tcb_size = TlsPreTcbSize();
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=485d5bafcc11703825cb6c3cf7ce2cdd246fb7b1 commit 485d5bafcc11703825cb6c3cf7ce2cdd246fb7b1 Author: Sam James <sam@gentoo.org> AuthorDate: 2025-05-07 11:19:38 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-05-07 11:19:38 +0000 15.1.0: fix libsanitizer build on riscv/musl Bug: https://gcc.gnu.org/PR119356 Bug: https://bugs.gentoo.org/945920 Signed-off-by: Sam James <sam@gentoo.org> .../85_all_PR119356-riscv-libsanitizer.patch | 102 +++++++++++++++++++++ 15.1.0/gentoo/README.history | 1 + 2 files changed, 103 insertions(+)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ba10a7b8126a5f651a272fa06424d75b1de5be9 commit 3ba10a7b8126a5f651a272fa06424d75b1de5be9 Author: Sam James <sam@gentoo.org> AuthorDate: 2025-05-07 11:21:32 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-05-07 11:21:32 +0000 sys-devel/gcc: fix libsanitizer build on riscv/musl for 15 Bug: https://gcc.gnu.org/PR119356 Bug: https://bugs.gentoo.org/945920 Signed-off-by: Sam James <sam@gentoo.org> sys-devel/gcc/Manifest | 4 ++-- sys-devel/gcc/gcc-15.1.0.ebuild | 8 ++++---- sys-devel/gcc/gcc-15.1.1_p20250426.ebuild | 8 ++++---- sys-devel/gcc/gcc-15.1.1_p20250503.ebuild | 8 ++++---- 4 files changed, 14 insertions(+), 14 deletions(-)