From 4857887e827fa51747047190d031928b58084151 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 6 Jun 2005 04:40:54 +0000 Subject: allow gcc-config to be run even when cross-compiling so when you go from gcc-stage1 (C-only) to gcc-stage2 (C/C++) the system gets updated properly #93361 --- eclass/toolchain.eclass | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 3ac89c917ef1..21bcb721c7d3 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.164 2005/06/06 03:59:50 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.165 2005/06/06 04:40:54 vapier Exp $ HOMEPAGE="http://www.gnu.org/software/gcc/gcc.html" LICENSE="GPL-2 LGPL-2.1" @@ -1855,18 +1855,13 @@ should_we_gcc_config() { use bootstrap && return 0 use build && return 0 - # If we're cross-compiling, only run gcc-config the first time - if is_crosscompile; then - return $([[ ! -e ${ROOT}/etc/env.d/gcc/config-${CTARGET} ]]) - fi - # if the current config is invalid, we definitely want a new one - env -i gcc-config -c >&/dev/null || return 0 + env -i gcc-config -c ${CTARGET} >&/dev/null || return 0 # if the previously selected config has the same major.minor (branch) as # the version we are installing, then it will probably be uninstalled # for being in the same SLOT, make sure we run gcc-config. - local curr_config_ver=$(env -i gcc-config -c | awk -F - '{ print $5 }') + local curr_config_ver=$(env -i gcc-config -c ${CTARGET} | awk -F - '{ print $5 }') local curr_branch_ver=$(get_version_component_range 1-2 ${curr_config_ver}) # If we're using multislot, just run gcc-config if we're installing -- cgit v1.2.3-65-gdbad