commit:     fd6e329dc80a8deba2aaf7c65ab0192d00754d9e
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 29 07:54:38 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Feb 29 07:55:57 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd6e329d

toolchain.eclass: add USE=zstd for gcc-10

gcc-10 added support for zstd compression algorithm for LTO
streaming.

Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 eclass/toolchain.eclass | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index beab4cfc681..62520ae92df 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -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

Reply via email to