From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 63EEA139083 for ; Tue, 12 Dec 2017 20:58:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6DEE8E0E5A; Tue, 12 Dec 2017 20:58:16 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3AF7CE0E5A for ; Tue, 12 Dec 2017 20:58:16 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5631A34174B for ; Tue, 12 Dec 2017 20:58:13 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id EAFFDA1A0 for ; Tue, 12 Dec 2017 20:58:11 +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: <1513112240.df8d9caa171abe98f105241aaf1e3351d118a319.blueness@gentoo> Subject: [gentoo-commits] proj/musl:master commit in: eclass/ X-VCS-Repository: proj/musl X-VCS-Files: eclass/toolchain.eclass X-VCS-Directories: eclass/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: df8d9caa171abe98f105241aaf1e3351d118a319 X-VCS-Branch: master Date: Tue, 12 Dec 2017 20:58:11 +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: 5bfff9d0-2956-4d79-b402-f9c60c3bf393 X-Archives-Hash: c40a9048d4e8408bda074c45a61ae9b0 commit: df8d9caa171abe98f105241aaf1e3351d118a319 Author: Anthony G. Basile gentoo org> AuthorDate: Tue Dec 12 20:56:47 2017 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Tue Dec 12 20:57:20 2017 +0000 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=df8d9caa toolchain.eclass: bring into line with in tree versions eclass/toolchain.eclass | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index a07863c..e3011d6 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -90,8 +90,6 @@ if [[ ${SNAPSHOT} == [56789].0-* ]] ; then SNAPSHOT=${SNAPSHOT/.0} fi -export GCC_FILESDIR=${GCC_FILESDIR:-${FILESDIR}} - PREFIX=${TOOLCHAIN_PREFIX:-${EPREFIX}/usr} if tc_version_is_at_least 3.4.0 ; then @@ -141,6 +139,7 @@ if [[ ${PN} != "kgcc64" && ${PN} != gcc-* ]] ; then [[ -n ${D_VER} ]] && IUSE+=" d" [[ -n ${SPECS_VER} ]] && IUSE+=" nossp" tc_version_is_at_least 3 && IUSE+=" doc gcj awt hardened multilib objc" + tc_version_is_at_least 3.3 && IUSE+=" pgo" 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++" @@ -240,7 +239,7 @@ S=$( gentoo_urls() { local devspace="HTTP~vapier/dist/URI HTTP~rhill/dist/URI HTTP~zorry/patches/gcc/URI HTTP~blueness/dist/URI - HTTP~tamiko/distfiles/URI" + HTTP~tamiko/distfiles/URI HTTP~slyfox/distfiles/URI" devspace=${devspace//HTTP/https:\/\/dev.gentoo.org\/} echo mirror://gentoo/$1 ${devspace//URI/$1} } @@ -379,9 +378,6 @@ toolchain_pkg_pretend() { "in your make.conf if you want to use this version." fi - [[ -z ${UCLIBC_VER} ]] && [[ ${CTARGET} == *-uclibc* ]] && \ - die "Sorry, this version does not support uClibc" - if ! use_if_iuse cxx ; then use_if_iuse go && ewarn 'Go requires a C++ compiler, disabled due to USE="-cxx"' use_if_iuse objc++ && ewarn 'Obj-C++ requires a C++ compiler, disabled due to USE="-cxx"' @@ -581,14 +577,14 @@ toolchain_src_prepare() { einfo "Fixing misc issues in configure files" for f in $(grep -l 'autoconf version 2.13' $(find "${S}" -name configure)) ; do ebegin " Updating ${f/${S}\/} [LANG]" - patch "${f}" "${GCC_FILESDIR}"/gcc-configure-LANG.patch >& "${T}"/configure-patch.log \ + patch "${f}" "${FILESDIR}"/gcc-configure-LANG.patch >& "${T}"/configure-patch.log \ || eerror "Please file a bug about this" eend $? done sed -i 's|A-Za-z0-9|[:alnum:]|g' "${S}"/gcc/*.awk #215828 # Prevent new texinfo from breaking old versions (see #198182, #464008) - tc_version_is_at_least 4.1 && epatch "${GCC_FILESDIR}"/gcc-configure-texinfo.patch + tc_version_is_at_least 4.1 && epatch "${FILESDIR}"/gcc-configure-texinfo.patch if [[ -x contrib/gcc_update ]] ; then einfo "Touching generated files" @@ -642,7 +638,15 @@ do_gcc_PIE_patches() { make_gcc_hard() { local gcc_hard_flags="" - # Gcc >= 6.X we can use configuration options to turn pie/ssp on as default + + # If we use gcc-6 or newer with pie enable to compile older gcc we need to pass -no-pie + # to stage1; bug 618908 + if ! tc_version_is_at_least 6.0 && [[ $(gcc-major-version) -ge 6 ]] ; then + einfo "Disabling PIE in stage1 (only) ..." + sed -i -e "/^STAGE1_LDFLAGS/ s/$/ -no-pie/" "${S}"/Makefile.in || die + fi + + # Gcc >= 6.X we can use configurations options to turn pie/ssp on as default if tc_version_is_at_least 6.0 ; then if use pie ; then einfo "Updating gcc to use automatic PIE building ..." @@ -651,7 +655,7 @@ make_gcc_hard() { einfo "Updating gcc to use automatic SSP building ..." fi if use hardened ; then - # Will add some optimizations by default. + # Will add some optimatizion as default. gcc_hard_flags+=" -DEXTRA_OPTIONS" # rebrand to make bug reports easier BRANDING_GCC_PKGVERSION=${BRANDING_GCC_PKGVERSION/Gentoo/Gentoo Hardened} @@ -1481,7 +1485,8 @@ gcc_do_filter_flags() { FFLAGS=${CFLAGS} FCFLAGS=${CFLAGS} - local VAR="CFLAGS_"${CTARGET//-/_} + # "hppa2.0-unknown-linux-gnu" -> hppa2_0_unknown_linux_gnu + local VAR="CFLAGS_"${CTARGET//[-.]/_} CXXFLAGS=${!VAR} fi @@ -1573,7 +1578,11 @@ gcc_do_make() { # resulting binaries natively ^^; GCC_MAKE_TARGET=${GCC_MAKE_TARGET-all} else - GCC_MAKE_TARGET=${GCC_MAKE_TARGET-bootstrap-lean} + if tc_version_is_at_least 3.3 && use pgo; then + GCC_MAKE_TARGET=${GCC_MAKE_TARGET-profiledbootstrap} + else + GCC_MAKE_TARGET=${GCC_MAKE_TARGET-bootstrap-lean} + fi fi # Older versions of GCC could not do profiledbootstrap in parallel due to @@ -1782,10 +1791,10 @@ toolchain_src_install() { # between binary and source package borks things .... if ! is_crosscompile ; then insinto "${DATAPATH#${EPREFIX}}" - newins "$(prefixify_ro "${GCC_FILESDIR}"/awk/fixlafiles.awk-no_gcc_la)" fixlafiles.awk || die + newins "$(prefixify_ro "${FILESDIR}"/awk/fixlafiles.awk-no_gcc_la)" fixlafiles.awk || die exeinto "${DATAPATH#${EPREFIX}}" - doexe "$(prefixify_ro "${GCC_FILESDIR}"/fix_libtool_files.sh)" || die - doexe "${GCC_FILESDIR}"/c{89,99} || die + doexe "$(prefixify_ro "${FILESDIR}"/fix_libtool_files.sh)" || die + doexe "${FILESDIR}"/c{89,99} || die fi # libstdc++.la: Delete as it doesn't add anything useful: g++ itself