toolchain.eclass: drop USE=nptl from kgcc64, bug #642932
authorSergei Trofimovich <slyfox@gentoo.org>
Thu, 22 Aug 2019 06:35:09 +0000 (07:35 +0100)
committerSergei Trofimovich <slyfox@gentoo.org>
Thu, 22 Aug 2019 06:35:09 +0000 (07:35 +0100)
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

index e8fa4d69412baf989c30aa02b04de81b802b9f42..12b86214a055d78626e63054dc0eded735b318a3 100644 (file)
@@ -136,7 +136,7 @@ else
        # is commonly used as a main compiler.
        GCC_EBUILD_TEST_FLAG='regression-test'
 fi
-IUSE="${GCC_EBUILD_TEST_FLAG} vanilla +nls +nptl"
+IUSE="${GCC_EBUILD_TEST_FLAG} vanilla +nls"
 
 TC_FEATURES=()
 
@@ -145,7 +145,7 @@ tc_has_feature() {
 }
 
 if [[ ${PN} != "kgcc64" && ${PN} != gcc-* ]] ; then
-       IUSE+=" altivec debug +cxx +fortran" TC_FEATURES+=(fortran)
+       IUSE+=" altivec debug +cxx +fortran +nptl" TC_FEATURES+=(fortran nptl)
        [[ -n ${PIE_VER} ]] && IUSE+=" nopie"
        [[ -n ${HTB_VER} ]] && IUSE+=" boundschecking"
        [[ -n ${D_VER}   ]] && IUSE+=" d"
@@ -1100,10 +1100,12 @@ toolchain_src_configure() {
        # destructors", but apparently requires glibc.
        case ${CTARGET} in
        *-uclibc*)
-               confgcc+=(
-                       --disable-__cxa_atexit
-                       $(use_enable nptl tls)
-               )
+               if tc_has_feature nptl ; then
+                       confgcc+=(
+                               --disable-__cxa_atexit
+                               $(use_enable nptl tls)
+                       )
+               fi
                tc_version_is_between 3.3 3.4 && confgcc+=( --enable-sjlj-exceptions )
                if tc_version_is_between 3.4 4.3 ; then
                        confgcc+=( --enable-clocale=uclibc )