commit:     58a0c177b6de816f2c6a767edb3803b112c3c4ea
Author:     Magnus Granberg <zorry <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 12 20:44:12 2016 +0000
Commit:     Magnus Granberg <zorry <AT> gentoo <DOT> org>
CommitDate: Mon Sep 12 22:08:54 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=58a0c177

toolchain.eclass: add use pch for gcc 6.x support

 eclass/toolchain.eclass | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 5dff279..054d487 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -154,7 +154,7 @@ if [[ ${PN} != "kgcc64" && ${PN} != gcc-* ]] ; then
        tc_version_is_at_least 4.8 && IUSE+=" graphite" IUSE_DEF+=( sanitize )
        tc_version_is_at_least 4.9 && IUSE+=" cilk +vtv"
        tc_version_is_at_least 5.0 && IUSE+=" jit mpx"
-       tc_version_is_at_least 6.0 && IUSE+=" pie +ssp"
+       tc_version_is_at_least 6.0 && IUSE+=" pie +ssp +pch"
 fi
 
 IUSE+=" ${IUSE_DEF[*]/#/+}"
@@ -899,6 +899,11 @@ toolchain_src_configure() {
                confgcc+=( --enable-libstdcxx-time )
        fi
 
+       # Support to disable pch when building libstdcxx
+       if tc_version_is_at_least 6.0 && ! use pch ; then
+               confgcc+=( --disable-libstdcxx-pch )
+       fi
+
        # The jit language requires this.
        is_jit && confgcc+=( --enable-host-shared )
 

Reply via email to