To my understanding this is about the user space threads implementation, while kgcc64 is solely a kernel compiler. Reproducible: Always
Yes, you are right. toolchain.eclass is shared across gcc/kgcc64. USE=nptl (and likely many other flags) seems to be used for a single uclibc target: https://gitweb.gentoo.org/repo/gentoo.git/tree/eclass/toolchain.eclass#n1032 case ${CTARGET} in *-uclibc*) confgcc+=( --disable-__cxa_atexit $(use_enable nptl tls) )
Commit 63b0d66c654dce7e4a75776357cac44379eba802 may have a solution for that. OTOH it doesn't make sense to run into this block for kgcc64 as the kernel does not care for the libc implementation.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6809e503179036054f1f45979b09808ecd4a4342 commit 6809e503179036054f1f45979b09808ecd4a4342 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2019-08-22 06:35:09 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2019-08-22 06:35:09 +0000 toolchain.eclass: drop USE=nptl from kgcc64, bug #642932 USE=nptl is neededonly for compilers that target userspace. kgcc64 is for building kernels only. Reported-by: Rolf Eike Beer Closes: https://bugs.gentoo.org/642932 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> eclass/toolchain.eclass | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36e43f119894be5631b564e41ade681547784630 commit 36e43f119894be5631b564e41ade681547784630 Author: Sam James <sam@gentoo.org> AuthorDate: 2024-01-12 11:02:14 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-01-12 11:04:36 +0000 toolchain.eclass: drop noop USE=nptl This doesn't make sense to toggle nowadays anyway given linuxthreads is long gone, but it's not even wired up to do anything in the eclass. The last remaining consumer was for uclibc which was dropped in 4d33143e5b807af00d29ec59d9512ac05ab0e131. Bug: https://bugs.gentoo.org/642932 Bug: https://bugs.gentoo.org/820905 Signed-off-by: Sam James <sam@gentoo.org> eclass/toolchain.eclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)