Created attachment 592642 [details] build log When emerging sys-libs/libcxx-9.0.0 with USE="static-libs -libcxxabi -libcxxrt -libunwind -test" I get this linker error: /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/libsupc++.a(eh_globals.o): in function `__cxa_get_globals_fast': eh_globals.cc:(.text.__cxa_get_globals_fast+0xc): undefined reference to `__tls_get_addr' /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/libsupc++.a(eh_globals.o): in function `__cxa_get_globals': /var/tmp/portage/sys-devel/gcc-9.2.0-r1/work/gcc-9.2.0/libstdc++-v3/libsupc++/eh_globals.cc:62: undefined reference to `__tls_get_addr' collect2: error: ld returned 1 exit status I also tried building the package with gcc-9.1.0 and gcc-8.3.0 and got the same error. See the attached build log for more details.
Created attachment 592644 [details] emerge --info
I just noticed in the error message I am using ld.bfd for linking currently. Switched to ld.gold and the package links without a problem.
I'm afraid I can't help you here. We really only support USE=libcxxabi these days, the remaining variants are provided for expert users who can handle it.
Alright. As I mentioned, it is now working for me when linking with gold. Maybe the ebuild should enforce using gold with those use flags? Adding a warning message when using unsupported use flags would be a good idea as well.
Well, I'm planning to take a look at all this soon. Most probably, I will lastrite libcxxrt and package.use.force libcxxabi.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f9636c8c75ec0bd05b06bf434f5ee540eec88b8 commit 1f9636c8c75ec0bd05b06bf434f5ee540eec88b8 Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2020-01-12 11:31:24 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2020-01-12 11:48:11 +0000 profiles/base: Force sys-libs/libcxx[libcxxabi] Bug: https://bugs.gentoo.org/697624 Signed-off-by: Michał Górny <mgorny@gentoo.org> profiles/base/package.use.force | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)