From 58a0c177b6de816f2c6a767edb3803b112c3c4ea Mon Sep 17 00:00:00 2001 From: Magnus Granberg Date: Mon, 12 Sep 2016 22:44:12 +0200 Subject: [PATCH] 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 5dff279503c1..054d487a8866 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 ) -- 2.26.2