diff options
author | Ryan Hill <rhill@gentoo.org> | 2014-05-15 05:18:33 +0000 |
---|---|---|
committer | Ryan Hill <rhill@gentoo.org> | 2014-05-15 05:18:33 +0000 |
commit | 5b442f3e2f97bc4a6feb0e49d653acbd854e3fa6 (patch) | |
tree | 30c5842cb3c004545541e77880e444da524a649c /eclass | |
parent | bump; drop py2.6 add py3 pypy support, rm old (diff) | |
download | historical-5b442f3e2f97bc4a6feb0e49d653acbd854e3fa6.tar.gz historical-5b442f3e2f97bc4a6feb0e49d653acbd854e3fa6.tar.bz2 historical-5b442f3e2f97bc4a6feb0e49d653acbd854e3fa6.zip |
Allow parallel profiledbootstrap in newer versions (bug #508878 by Eric F.
Garioud). Clean up a bit.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ChangeLog | 6 | ||||
-rw-r--r-- | eclass/toolchain.eclass | 23 |
2 files changed, 16 insertions, 13 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index 1505b5bbe04a..d1de650e308a 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for eclass directory # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1253 2014/05/15 03:18:47 grknight Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1254 2014/05/15 05:18:33 rhill Exp $ + + 15 May 2014; Ryan Hill <rhill@gentoo.org> toolchain.eclass: + Allow parallel profiledbootstrap in newer versions (bug #508878 by Eric F. + Garioud). Clean up a bit. 14 May 2014; Brian Evans <grknight@gentoo.org> mysql-cmake.eclass, mysql-v2.eclass: diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 6151de351219..d970e174a505 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.624 2014/03/16 18:38:37 rhill Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.625 2014/05/15 05:18:33 rhill Exp $ # Maintainer: Toolchain Ninjas <toolchain@gentoo.org> @@ -1472,20 +1472,19 @@ toolchain_src_compile() { [[ ! -x /usr/bin/perl ]] \ && find "${WORKDIR}"/build -name '*.[17]' | xargs touch - einfo "Compiling ${PN} ..." gcc_do_make ${GCC_MAKE_TARGET} } gcc_do_make() { # This function accepts one optional argument, the make target to be used. # If omitted, gcc_do_make will try to guess whether it should use all, - # profiledbootstrap, or bootstrap-lean depending on CTARGET and arch. An - # example of how to use this function: + # or bootstrap-lean depending on CTARGET and arch. + # An example of how to use this function: # # gcc_do_make all-target-libstdc++-v3 - # - # Set make target to $1 if passed + [[ -n ${1} ]] && GCC_MAKE_TARGET=${1} + # default target if is_crosscompile || tc-is-cross-compiler ; then # 3 stage bootstrapping doesnt quite work when you cant run the @@ -1495,13 +1494,11 @@ gcc_do_make() { GCC_MAKE_TARGET=${GCC_MAKE_TARGET-bootstrap-lean} fi - # the gcc docs state that parallel make isnt supported for the - # profiledbootstrap target, as collisions in profile collecting may occur. + # Older versions of GCC could not do profiledbootstrap in parallel due to + # collisions with profiling info. # boundschecking also seems to introduce parallel build issues. - if [[ ${GCC_MAKE_TARGET} == "profiledbootstrap" ]] || - use_if_iuse boundschecking - then - export MAKEOPTS="${MAKEOPTS} -j1" + if [[ ${GCC_MAKE_TARGET} == "profiledbootstrap" ]] || use_if_iuse boundschecking ; then + ! tc_version_is_at_least 4.6 && export MAKEOPTS="${MAKEOPTS} -j1" fi if [[ ${GCC_MAKE_TARGET} == "all" ]] ; then @@ -1522,6 +1519,8 @@ gcc_do_make() { BOOT_CFLAGS=${BOOT_CFLAGS-"$(get_abi_CFLAGS ${TARGET_DEFAULT_ABI}) ${CFLAGS}"} fi + einfo "Compiling ${PN} (${GCC_MAKE_TARGET})..." + pushd "${WORKDIR}"/build >/dev/null emake \ |