commit:     1fa4138518bb8f46774b8a1bb77dbe7f78215faa
Author:     Jory Pratt <anarchy <AT> gentoo <DOT> org>
AuthorDate: Sat Apr  6 20:22:54 2019 +0000
Commit:     Jory Pratt <anarchy <AT> gentoo <DOT> org>
CommitDate: Sat Apr  6 20:23:37 2019 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=1fa41385

sys-devel/gcc: 8.3.0-r1 update along with toolchain.eclass updates

Signed-off-by: Jory Pratt <anarchy <AT> gentoo.org>

 eclass/toolchain.eclass           | 56 ++++++++++++++++++++++-----------------
 sys-devel/gcc/Manifest            |  1 +
 sys-devel/gcc/gcc-8.3.0-r1.ebuild | 28 ++++++++++++++++++++
 3 files changed, 61 insertions(+), 24 deletions(-)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 5411381..be94db8 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 <toolch...@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
@@ -1090,9 +1104,6 @@ toolchain_src_configure() {
        *-elf|*-eabi)
                confgcc+=( --with-newlib )
                ;;
-       *-musl*)
-               confgcc+=( --enable-__cxa_atexit )
-               ;;
        *-gnu*)
                confgcc+=(
                        --enable-__cxa_atexit
@@ -1734,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
 }
 
@@ -2443,17 +2455,13 @@ hardened_gcc_is_stable() {
        if [[ $1 == "pie" ]] ; then
                if [[ ${CTARGET} == *-uclibc* ]] ; then
                        tocheck=${PIE_UCLIBC_STABLE}
-               elif [[ ${CTARGET} == *-musl* ]] ; then
-                       tocheck=${PIE_MUSL_STABLE}
-               elif [[ ${CTARGET} == *-gnu* ]] ; then
+               else
                        tocheck=${PIE_GLIBC_STABLE}
                fi
        elif [[ $1 == "ssp" ]] ; then
                if [[ ${CTARGET} == *-uclibc* ]] ; then
                        tocheck=${SSP_UCLIBC_STABLE}
-               elif [[ ${CTARGET} == *-musl* ]] ; then
-                       tocheck=${SSP_MUSL_STABLE}
-               elif [[ ${CTARGET} == *-gnu* ]] ; then
+               elif  [[ ${CTARGET} == *-gnu* ]] ; then
                        tocheck=${SSP_STABLE}
                fi
        else

diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest
index 506226f..66937be 100644
--- a/sys-devel/gcc/Manifest
+++ b/sys-devel/gcc/Manifest
@@ -11,4 +11,5 @@ DIST gcc-8.2.0-patches-1.6.tar.bz2 17138 BLAKE2B 
edbeba9c41972836de072955c0db514
 DIST gcc-8.2.0-patches-1.7.tar.bz2 18166 BLAKE2B 
2aff918d253d76c9b7d76b2d82e85c42f2ab8717e73831965b3a0fcc92b1ceacd7aa0b433dd0c180ad16906cfe059c020b256d01271ef95a6e56b08d41f4acfe
 SHA512 
5110b610a4c9116ecd91490f66e570c09217c6b4d18bf46af5e1a51ed043df188ce313bdae6ba670b8800842387c98c1b83b7e1e0c396cbce71e6726d81f589c
 DIST gcc-8.2.0.tar.xz 63460876 BLAKE2B 
c5372b0bdfcd2729577dca287b294623b78c583491998404eb307768c573618bdaaedb7d9ae0e39ba41a62a14b9525dff0e3083285754b7f5bb9987ecf635185
 SHA512 
64898a165f67e136d802a92e7633bf1b06c85266027e52127ea025bf5fc2291b5e858288aac0bdba246e6cdf7c6ec88bc8e0e7f3f6f1985f4297710cafde56ed
 DIST gcc-8.3.0-patches-1.0.tar.bz2 12278 BLAKE2B 
793465c5de0af850c7f3017b3011e68f3bd1664e6ce3500a3dc3003d37c03fe81857698957770a135eadd395a7767fa804d354ecdcdeb1d83623280ca569d4ec
 SHA512 
0efadd2481713992807fed2683666f1094b3757674754601c079569f3ef70cd7aed3cefc9f815f4e59a21d37e4e940c122df714e16f3878a5f966450c4273669
+DIST gcc-8.3.0-patches-1.1.tar.bz2 14430 BLAKE2B 
c702fbdb18c3c952cdb9adead3a193c948d78a4cb4b041beaa51a06b907fd357bb10a2f8d47d55978ebb08590fd7c9a6ec3df8e7a007173e20a55d251d947c72
 SHA512 
9e2284f597bab6f78ca24ead358b1f50495aefc9e0a416ace24c94723db7b2fb82d48426876138d00c82bcaf9c2f8b4674885988448dcf16dee1b764face9af4
 DIST gcc-8.3.0.tar.xz 63694700 BLAKE2B 
71df2ff5bd6874d57519c2e9af6b22152c8c4d7fab906a5f427b41bc4e8e742127592a8684120d9d3c9ce6241439531850be08ec0a4f29dbfdee95435655fdca
 SHA512 
1811337ae3add9680cec64968a2509d085b6dc5b6783fc1e8c295e3e47416196fd1a3ad8dfe7e10be2276b4f62c357659ce2902f239f60a8648548231b4b5802

diff --git a/sys-devel/gcc/gcc-8.3.0-r1.ebuild 
b/sys-devel/gcc/gcc-8.3.0-r1.ebuild
new file mode 100644
index 0000000..115bd4f
--- /dev/null
+++ b/sys-devel/gcc/gcc-8.3.0-r1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+PATCH_VER="1.1"
+
+inherit toolchain
+
+KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+       elibc_glibc? ( >=sys-libs/glibc-2.13 )
+       >=${CATEGORY}/binutils-2.20"
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+       PDEPEND="${PDEPEND} elibc_glibc? ( >=sys-libs/glibc-2.13 )"
+fi
+
+src_prepare() {
+       toolchain_src_prepare
+
+       if use elibc_musl || [[ ${CATEGORY} = cross-*-musl* ]]; then
+               epatch "${FILESDIR}"/6.3.0/cpu_indicator.patch
+               epatch "${FILESDIR}"/7.1.0/posix_memalign.patch
+       fi
+}

Reply via email to