diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-03-03 13:42:34 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-03-03 13:42:34 +0000 |
commit | 066d27181e9a797ad9f8fc43b49fc9a10ff2f707 (patch) | |
tree | 3cb05783d73b2c33589ba305144a31c718e123cd /eclass/toolchain.eclass | |
parent | 16449a80e28af2209916cc66d19c9a44ca2b90d9 (diff) |
gentoo resync : 03.03.2019
Diffstat (limited to 'eclass/toolchain.eclass')
-rw-r--r-- | eclass/toolchain.eclass | 45 |
1 files changed, 30 insertions, 15 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index daa62e3a67c0..be94db869d52 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 # Maintainer: Toolchain Ninjas <toolchain@gentoo.org> -# @SUPPORTED_EAPIS: 5 +# @SUPPORTED_EAPIS: 5 6 DESCRIPTION="The GNU Compiler Collection" HOMEPAGE="https://gcc.gnu.org/" @@ -26,7 +26,7 @@ FEATURES=${FEATURES/multilib-strict/} case ${EAPI:-0} in 0|1|2|3|4*) die "Need to upgrade to at least EAPI=5" ;; - 5*) inherit eapi7-ver ;; + 5*|6) inherit eapi7-ver ;; *) die "I don't speak EAPI ${EAPI}." ;; esac EXPORT_FUNCTIONS pkg_pretend pkg_setup src_unpack src_prepare src_configure \ @@ -138,16 +138,23 @@ else fi IUSE="${GCC_EBUILD_TEST_FLAG} vanilla +nls +nptl" +TC_FEATURES=() + +tc_has_feature() { + has "$1" "${TC_FEATURES[@]}" +} + if [[ ${PN} != "kgcc64" && ${PN} != gcc-* ]] ; then - IUSE+=" altivec debug +cxx +fortran" + IUSE+=" altivec debug +cxx +fortran" TC_FEATURES+=(fortran) [[ -n ${PIE_VER} ]] && IUSE+=" nopie" [[ -n ${HTB_VER} ]] && IUSE+=" boundschecking" [[ -n ${D_VER} ]] && IUSE+=" d" [[ -n ${SPECS_VER} ]] && IUSE+=" nossp" tc_version_is_at_least 3 && IUSE+=" doc hardened multilib objc" - tc_version_is_between 3 7 && IUSE+=" awt gcj" + tc_version_is_between 3 7 && IUSE+=" awt gcj" TC_FEATURES+=(gcj) tc_version_is_at_least 3.3 && IUSE+=" pgo" - tc_version_is_at_least 4.0 && IUSE+=" objc-gc" + tc_version_is_at_least 4.0 && + IUSE+=" objc-gc" TC_FEATURES+=(objc-gc) tc_version_is_between 4.0 4.9 && IUSE+=" mudflap" tc_version_is_at_least 4.1 && IUSE+=" libssp objc++" tc_version_is_at_least 4.2 && IUSE+=" +openmp" @@ -156,13 +163,15 @@ if [[ ${PN} != "kgcc64" && ${PN} != gcc-* ]] ; then # Note: while <=gcc-4.7 also supported graphite, it required forked ppl # versions which we dropped. Since graphite was also experimental in # the older versions, we don't want to bother supporting it. #448024 - tc_version_is_at_least 4.8 && IUSE+=" graphite +sanitize" + tc_version_is_at_least 4.8 && + IUSE+=" graphite +sanitize" TC_FEATURES+=(graphite) tc_version_is_between 4.9 8 && IUSE+=" cilk" tc_version_is_at_least 4.9 && IUSE+=" +vtv" tc_version_is_at_least 5.0 && IUSE+=" jit mpx" tc_version_is_at_least 6.0 && IUSE+=" +pie +ssp +pch" # systemtap is a gentoo-specific switch: bug #654748 - tc_version_is_at_least 8.0 && IUSE+=" systemtap" + tc_version_is_at_least 8.0 && + IUSE+=" systemtap" TC_FEATURES+=(systemtap) fi SLOT="${GCC_CONFIG_VER}" @@ -178,20 +187,20 @@ if tc_version_is_at_least 4 ; then GMP_MPFR_DEPS=">=dev-libs/gmp-4.3.2:0= >=dev-libs/mpfr-2.4.2:0=" if tc_version_is_at_least 4.3 ; then RDEPEND+=" ${GMP_MPFR_DEPS}" - elif in_iuse fortran ; then + elif tc_has_feature fortran ; then RDEPEND+=" fortran? ( ${GMP_MPFR_DEPS} )" fi fi tc_version_is_at_least 4.5 && RDEPEND+=" >=dev-libs/mpc-0.8.1:0=" -if in_iuse objc-gc ; then +if tc_has_feature objc-gc ; then if tc_version_is_at_least 7 ; then RDEPEND+=" objc-gc? ( >=dev-libs/boehm-gc-7.4.2 )" fi fi -if in_iuse graphite ; then +if tc_has_feature graphite ; then if tc_version_is_at_least 5.0 ; then RDEPEND+=" graphite? ( >=dev-libs/isl-0.14:0= )" elif tc_version_is_at_least 4.8 ; then @@ -212,7 +221,7 @@ DEPEND="${RDEPEND} >=sys-devel/autogen-5.5.4 )" -if in_iuse gcj ; then +if tc_has_feature gcj ; then GCJ_DEPS=">=media-libs/libart_lgpl-2.1" GCJ_GTK_DEPS=" x11-base/xorg-proto @@ -227,7 +236,7 @@ if in_iuse gcj ; then DEPEND+=" gcj? ( awt? ( ${GCJ_GTK_DEPS} ) ${GCJ_DEPS} )" fi -if in_iuse systemtap ; then +if tc_has_feature systemtap ; then # gcc needs sys/sdt.h headers on target DEPEND+=" systemtap? ( dev-util/systemtap )" fi @@ -380,7 +389,7 @@ get_gcc_src_uri() { [[ -n ${D_VER} ]] && \ GCC_SRC_URI+=" d? ( mirror://sourceforge/dgcc/gdc-${D_VER}-src.tar.bz2 )" - if in_iuse gcj ; then + if tc_has_feature gcj ; then if tc_version_is_at_least 4.5 ; then GCC_SRC_URI+=" gcj? ( ftp://sourceware.org/pub/java/ecj-4.5.jar )" elif tc_version_is_at_least 4.3 ; then @@ -526,7 +535,12 @@ toolchain_src_prepare() { do_gcc_HTB_patches do_gcc_PIE_patches do_gcc_CYGWINPORTS_patches - epatch_user + + case ${EAPI:-0} in + 5*) epatch_user;; + 6) eapply_user ;; + *) die "Update toolchain_src_prepare() for ${EAPI}." ;; + esac if ( tc_version_is_at_least 4.8.2 || use_if_iuse hardened ) && ! use vanilla ; then make_gcc_hard @@ -1731,7 +1745,8 @@ gcc_do_make() { toolchain_src_test() { if use ${GCC_EBUILD_TEST_FLAG} ; then cd "${WORKDIR}"/build - emake -k check + # enable verbose test run and result logging + emake -k check RUNTESTFLAGS='-a -v' fi } |