From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 631FA138E74 for ; Tue, 4 Nov 2014 00:03:24 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 494DFE085D; Tue, 4 Nov 2014 00:03:23 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CC44BE085D for ; Tue, 4 Nov 2014 00:03:22 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 93DD934042B for ; Tue, 4 Nov 2014 00:03:21 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3980495F7 for ; Tue, 4 Nov 2014 00:03:20 +0000 (UTC) From: "Anthony G. Basile" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" Message-ID: <1415059503.341b1345e345cd926dcdb75448fbf77197ad8ad5.blueness@gentoo> Subject: [gentoo-commits] proj/hardened-dev:musl commit in: eclass/ X-VCS-Repository: proj/hardened-dev X-VCS-Files: eclass/toolchain.eclass X-VCS-Directories: eclass/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: 341b1345e345cd926dcdb75448fbf77197ad8ad5 X-VCS-Branch: musl Date: Tue, 4 Nov 2014 00:03:20 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: e6b4e9b4-f94a-4fb4-8505-34297b221544 X-Archives-Hash: db982a0a0a13f2c6a77e8722d6f9f4d8 commit: 341b1345e345cd926dcdb75448fbf77197ad8ad5 Author: Anthony G. Basile gentoo org> AuthorDate: Tue Nov 4 00:05:03 2014 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Tue Nov 4 00:05:03 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=341b1345 eclass/toolchain.eclass: bring up to date with upstream --- eclass/toolchain.eclass | 69 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 54 insertions(+), 15 deletions(-) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 00fdba0..f6e451a 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -6,7 +6,6 @@ DESCRIPTION="The GNU Compiler Collection" HOMEPAGE="http://gcc.gnu.org/" -LICENSE="GPL-2 LGPL-2.1" RESTRICT="strip" # cross-compilers need controlled stripping inherit eutils fixheadtails flag-o-matic gnuconfig libtool multilib pax-utils toolchain-funcs versionator @@ -77,12 +76,9 @@ GCCMICRO=$(get_version_component_range 3 ${GCC_PV}) GCC_CONFIG_VER=${GCC_CONFIG_VER:-$(replace_version_separator 3 '-' ${GCC_PV})} # Pre-release support -if [[ ${GCC_PV} != ${GCC_PV/_pre/-} ]] ; then +if [[ ${GCC_PV} == *_pre* ]] ; then PRERELEASE=${GCC_PV/_pre/-} -fi - -# make _alpha and _beta ebuilds automatically use a snapshot -if [[ ${GCC_PV} == *_alpha* ]] ; then +elif [[ ${GCC_PV} == *_alpha* ]] ; then SNAPSHOT=${GCC_BRANCH_VER}-${GCC_PV##*_alpha} elif [[ ${GCC_PV} == *_beta* ]] ; then SNAPSHOT=${GCC_BRANCH_VER}-${GCC_PV##*_beta} @@ -90,6 +86,11 @@ elif [[ ${GCC_PV} == *_rc* ]] ; then SNAPSHOT=${GCC_PV%_rc*}-RC-${GCC_PV##*_rc} fi +if [[ ${SNAPSHOT} == 5.0-* ]] ; then + # The gcc-5 release has dropped the .0 for some reason. + SNAPSHOT=${SNAPSHOT/5.0/5} +fi + export GCC_FILESDIR=${GCC_FILESDIR:-${FILESDIR}} PREFIX=${TOOLCHAIN_PREFIX:-/usr} @@ -113,14 +114,28 @@ DATAPATH=${TOOLCHAIN_DATAPATH:-${PREFIX}/share/gcc-data/${CTARGET}/${GCC_CONFIG_ # We will handle /usr/include/g++-v3/ with gcc-config ... STDCXX_INCDIR=${TOOLCHAIN_STDCXX_INCDIR:-${LIBPATH}/include/g++-v${GCC_BRANCH_VER/\.*/}} -#---->> SLOT+IUSE logic <<---- +#---->> LICENSE+SLOT+IUSE logic <<---- + +if tc_version_is_at_least 4.6 ; then + LICENSE="GPL-3+ LGPL-3+ || ( GPL-3+ libgcc libstdc++ gcc-runtime-library-exception-3.1 ) FDL-1.3+" +elif tc_version_is_at_least 4.4 ; then + LICENSE="GPL-3+ LGPL-3+ || ( GPL-3+ libgcc libstdc++ gcc-runtime-library-exception-3.1 ) FDL-1.2+" +elif tc_version_is_at_least 4.3 ; then + LICENSE="GPL-3+ LGPL-3+ || ( GPL-3+ libgcc libstdc++ ) FDL-1.2+" +elif tc_version_is_at_least 4.2 ; then + LICENSE="GPL-3+ LGPL-2.1+ || ( GPL-3+ libgcc libstdc++ ) FDL-1.2+" +elif tc_version_is_at_least 3.3 ; then + LICENSE="GPL-2+ LGPL-2.1+ FDL-1.2+" +else + LICENSE="GPL-2+ LGPL-2.1+ FDL-1.1+" +fi IUSE="multislot regression-test vanilla" -IUSE_DEF="nls nptl" +IUSE_DEF=( nls nptl ) if [[ ${PN} != "kgcc64" && ${PN} != gcc-* ]] ; then IUSE+=" altivec" - IUSE_DEF+=" cxx fortran" + IUSE_DEF+=( cxx fortran ) [[ -n ${PIE_VER} ]] && IUSE+=" nopie" [[ -n ${HTB_VER} ]] && IUSE+=" boundschecking" [[ -n ${D_VER} ]] && IUSE+=" d" @@ -129,17 +144,18 @@ if [[ ${PN} != "kgcc64" && ${PN} != gcc-* ]] ; then tc_version_is_at_least 4.0 && IUSE+=" 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_DEF+=" openmp" + tc_version_is_at_least 4.2 && IUSE_DEF+=( openmp ) tc_version_is_at_least 4.3 && IUSE+=" fixed-point" tc_version_is_at_least 4.6 && IUSE+=" graphite" tc_version_is_at_least 4.7 && IUSE+=" go" + tc_version_is_at_least 4.8 && IUSE_DEF+=( sanitize ) fi -[[ ${EAPI:-0} != 0 ]] && IUSE_DEF="+${IUSE_DEF// / +}" -IUSE+=" ${IUSE_DEF}" +[[ ${EAPI:-0} != 0 ]] && IUSE_DEF=( "${IUSE_DEF[@]/#/+}" ) +IUSE+=" ${IUSE_DEF[*]}" # Support upgrade paths here or people get pissed -if use multislot ; then +if ! tc_version_is_at_least 4.7 || use multislot ; then SLOT="${GCC_CONFIG_VER}" else SLOT="${GCC_BRANCH_VER}" @@ -298,11 +314,14 @@ get_gcc_src_uri() { # Set where to download gcc itself depending on whether we're using a # prerelease, snapshot, or release tarball. - if [[ -n ${PRERELEASE} ]] ; then + if [[ ${PV} == *9999* ]] ; then + # Nothing to do w/git snapshots. + : + elif [[ -n ${PRERELEASE} ]] ; then GCC_SRC_URI="ftp://gcc.gnu.org/pub/gcc/prerelease-${PRERELEASE}/gcc-${PRERELEASE}.tar.bz2" elif [[ -n ${SNAPSHOT} ]] ; then GCC_SRC_URI="ftp://gcc.gnu.org/pub/gcc/snapshots/${SNAPSHOT}/gcc-${SNAPSHOT}.tar.bz2" - elif [[ ${PV} != *9999* ]] ; then + else GCC_SRC_URI="mirror://gnu/gcc/gcc-${GCC_PV}/gcc-${GCC_RELEASE_VER}.tar.bz2" # we want all branch updates to be against the main release [[ -n ${BRANCH_UPDATE} ]] && \ @@ -891,6 +910,16 @@ toolchain_src_configure() { confgcc+=( --enable-libstdcxx-time ) fi + # # Turn on the -Wl,--build-id flag by default for ELF targets. #525942 + # # This helps with locating debug files. + # case ${CTARGET} in + # *-linux-*|*-elf|*-eabi) + # tc_version_is_at_least 4.5 && confgcc+=( + # --enable-linker-build-id + # ) + # ;; + # esac + # newer gcc versions like to bootstrap themselves with C++, # so we need to manually disable it ourselves if tc_version_is_between 4.7 4.8 && ! is_cxx ; then @@ -1170,6 +1199,10 @@ toolchain_src_configure() { confgcc+=( --without-ppl ) fi + if tc_version_is_at_least 4.8 ; then + confgcc+=( $(use_enable sanitize libsanitizer) ) + fi + # Disable gcc info regeneration -- it ships with generated info pages # already. Our custom version/urls/etc... trigger it. #464008 export gcc_cv_prog_makeinfo_modern=no @@ -1939,6 +1972,12 @@ toolchain_pkg_postinst() { elog "Testsuite results have been installed into /usr/share/doc/${PF}/testsuite" echo fi + + if [[ -n ${PRERELEASE}${SNAPSHOT} ]] ; then + einfo "This GCC ebuild is provided for your convenience, and the use" + einfo "of this compiler is not supported by the Gentoo Developers." + einfo "Please report bugs to upstream at http://gcc.gnu.org/bugzilla/" + fi } toolchain_pkg_postrm() {