toolchain.eclass: add USE=zstd for gcc-10
authorSergei Trofimovich <slyfox@gentoo.org>
Sat, 29 Feb 2020 07:54:38 +0000 (07:54 +0000)
committerSergei Trofimovich <slyfox@gentoo.org>
Sat, 29 Feb 2020 07:55:57 +0000 (07:55 +0000)
gcc-10 added support for zstd compression algorithm for LTO
streaming.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
eclass/toolchain.eclass

index beab4cfc68101ac3dd43bad9657a41cf49a8bcfa..62520ae92dff26354a3c0f0626de10c4313a26a8 100644 (file)
@@ -192,6 +192,7 @@ if [[ ${PN} != "kgcc64" && ${PN} != gcc-* ]] ; then
                IUSE+=" systemtap" TC_FEATURES+=(systemtap)
        tc_version_is_at_least 9.0 && IUSE+=" d"
        tc_version_is_at_least 9.1 && IUSE+=" lto"
+       tc_version_is_at_least 10 && IUSE+=" zstd" TC_FEATURES+=(zstd)
 fi
 
 if tc_version_is_at_least 10; then
@@ -259,6 +260,10 @@ if tc_has_feature systemtap ; then
        DEPEND+=" systemtap? ( dev-util/systemtap )"
 fi
 
+if tc_has_feature zstd ; then
+       DEPEND+=" zstd? ( app-arch/zstd )"
+fi
+
 PDEPEND=">=sys-devel/gcc-config-1.7"
 
 #---->> S + SRC_URI essentials <<----
@@ -1273,6 +1278,10 @@ toolchain_src_configure() {
                )
        fi
 
+       if in_iuse zstd ; then
+               confgcc+=( $(use_with zstd) )
+       fi
+
        # newer gcc's come with libquadmath, but only fortran uses
        # it, so auto punt it when we don't care
        if tc_version_is_at_least 4.6 && ! is_fortran ; then