diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-01-13 04:57:06 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-01-13 04:57:06 +0000 |
commit | 27e85df3e7231f72935a7307d03a03e8caa1a7ef (patch) | |
tree | 31d2e0845cd06fd5c59bceb6ae7aa5860f4cc625 /eclass/toolchain.eclass | |
parent | Fixed to use apache-module.eclass correctly (Manifest recommit) (diff) | |
download | gentoo-2-27e85df3e7231f72935a7307d03a03e8caa1a7ef.tar.gz gentoo-2-27e85df3e7231f72935a7307d03a03e8caa1a7ef.tar.bz2 gentoo-2-27e85df3e7231f72935a7307d03a03e8caa1a7ef.zip |
cross-compile / gcc-config logic update
Diffstat (limited to 'eclass/toolchain.eclass')
-rw-r--r-- | eclass/toolchain.eclass | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index deb82904d753..16e57de8e736 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.76 2005/01/12 19:37:49 eradicator Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.77 2005/01/13 04:57:06 vapier Exp $ HOMEPAGE="http://www.gnu.org/software/gcc/gcc.html" LICENSE="GPL-2 LGPL-2.1" @@ -673,7 +673,7 @@ gcc-compiler-pkg_postinst() { should_we_gcc_config && do_gcc_config # Update libtool linker scripts to reference new gcc version ... - if [ "${ROOT}" = "/" ] && \ + if [[ ${ROOT} == "/" ]] && \ [ -f "${WORKDIR}/.oldgccversion" -o -f "${WORKDIR}/.oldgccchost" ] then local OLD_GCC_VERSION= @@ -1671,15 +1671,19 @@ do_gcc_PIE_patches() { } should_we_gcc_config() { - # we only want to switch compilers if installing to / and we're not - # building a cross-compiler. - ! [ "${ROOT}" == "/" -a "${CHOST}" == "${CTARGET}" ] && return 1 + # we only want to switch compilers if installing to / + [ ${ROOT} == "/" ] || return 1 # we always want to run gcc-config if we're bootstrapping, otherwise # we might get stuck with the c-only stage1 compiler use bootstrap && return 0 use build && return 0 + # If we're cross-compiling, only run gcc-config the first time + if [[ ${CHOST} != ${CTARGET} ]] ; then + return $([[ ! -e ${ROOT}/etc/env.d/gcc/config-${CTARGET} ]]) + fi + # if the current config is invalid, we definately want a new one [ "$(gcc-config -L | grep -v ^\ )" == "no-config" ] && return 0 |