toolchain.eclass: add use pch for gcc 6.x support
authorMagnus Granberg <zorry@gentoo.org>
Mon, 12 Sep 2016 20:44:12 +0000 (22:44 +0200)
committerMagnus Granberg <zorry@gentoo.org>
Mon, 12 Sep 2016 22:08:54 +0000 (00:08 +0200)
eclass/toolchain.eclass

index 5dff279503c1e1fb2daf4491935cbd155588fdbb..054d487a8866ff46e8eb785067eab4a47f243028 100644 (file)
@@ -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 )