summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorJeremy Huddleston <eradicator@gentoo.org>2005-02-11 01:19:26 +0000
committerJeremy Huddleston <eradicator@gentoo.org>2005-02-11 01:19:26 +0000
commitd97d577f7ff971acad06dc8ddce63fc5c06eab38 (patch)
tree0d97378b3dd0cfa5b6fc3bae37e9f54358522fb3 /eclass
parentCleanup multilib header code so it works when making a cross-compile toolchain. (diff)
downloadgentoo-2-d97d577f7ff971acad06dc8ddce63fc5c06eab38.tar.gz
gentoo-2-d97d577f7ff971acad06dc8ddce63fc5c06eab38.tar.bz2
gentoo-2-d97d577f7ff971acad06dc8ddce63fc5c06eab38.zip
Fix use_multilib to return false when making a cross-compile toolchain for CTARGET=mips-* or sparc-*
Diffstat (limited to 'eclass')
-rw-r--r--eclass/toolchain.eclass55
1 files changed, 8 insertions, 47 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 056f07d9ad79..52ddf0953f24 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.105 2005/02/11 01:17:36 eradicator Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.106 2005/02/11 01:19:26 eradicator Exp $
HOMEPAGE="http://www.gnu.org/software/gcc/gcc.html"
LICENSE="GPL-2 LGPL-2.1"
@@ -58,15 +58,12 @@ is_crosscompile() {
GCC_RELEASE_VER=$(get_version_component_range 1-3)
GCC_BRANCH_VER=$(get_version_component_range 1-2)
+GCC_CONFIG_VER=${GCC_RELEASE_VER}
GCCMAJOR=$(get_version_component_range 1)
GCCMINOR=$(get_version_component_range 2)
GCCMICRO=$(get_version_component_range 3)
[[ -z ${BRANCH_UPDATE} ]] && BRANCH_UPDATE=$(get_version_component_range 4)
-# According to gcc/c-cppbuiltin.c, GCC_CONFIG_VER MUST match this regex.
-# ([^0-9]*-)?[0-9]+[.][0-9]+([.][0-9]+)?([- ].*)?
-GCC_CONFIG_VER=${GCC_CONFIG_VER:-"$(replace_version_separator 3 '-')"}
-
GCC_MANPAGE_VERSION=${GCC_MANPAGE_VERSION:-${GCC_RELEASE_VER}}
# Pre-release support
@@ -723,14 +720,6 @@ gcc-compiler_pkg_postinst() {
einfo "If you have issues with packages unable to locate libstdc++.la,"
einfo "then try running 'fix_libtool_files.sh' on the old gcc versions."
echo
-
- # If our gcc-config version doesn't like '-' in it's version string,
- # tell our users that gcc-config will yell at them, but it's all good.
- if ! has_version '>=sys-devel/gcc-config-1.3.10-r1' && [[ ${GCC_CONFIG_VER/-/} != ${GCC_CONFIG_VER} ]]; then
- ewarn "Your version of gcc-config will issue about having an invalid profile"
- ewarn "when switching to this profile. It is safe to ignore this warning,"
- ewarn "and this problem has been corrected in >=sys-devel/gcc-config-1.3.10-r1."
- fi
}
gcc-compiler_pkg_prerm() {
@@ -813,17 +802,8 @@ gcc_src_unpack() {
disgusting_gcc_multilib_HACK || die "multilib hack failed"
fi
- local version_string="${GCC_CONFIG_VER}"
-
- # Backwards support... add the BRANCH_UPDATE for 3.3.5-r1 and 3.4.3-r1
- # which set it directly rather than using ${PV}
- if [ "${PVR}" = "3.3.5-r1" -o "${PVR}" = "3.4.3-r1" ]; then
- version_string="${version_string} ${BRANCH_UPDATE}"
- fi
-
- version_string="${version_string} (${release_version})"
- einfo "patching gcc version: ${version_string}"
- gcc_version_patch "${version_string}"
+ einfo "patching gcc version: ${BRANCH_UPDATE} (${release_version})"
+ gcc_version_patch "${BRANCH_UPDATE} (${release_version})"
# Misdesign in libstdc++ (Redhat)
cp -a ${S}/libstdc++-v3/config/cpu/i{4,3}86/atomicity.h
@@ -1706,8 +1686,9 @@ do_gcc_config() {
gcc_version_patch() {
[[ -z $1 ]] && die "no arguments to gcc_version_patch"
- sed -i -e "s~\(const char version_string\[\] = \"\).*\(\".*\)~\1$1\2~" \
- -e 's~http:\/\/gcc\.gnu\.org\/bugs\.html~http:\/\/bugs\.gentoo\.org\/~' ${S}/gcc/version.c || die "failed to update version.c with Gentoo branding."
+ sed -i -e 's~\(const char version_string\[\] = ".....\).*\(".*\)~\1 @GENTOO@\2~' ${S}/gcc/version.c || die "failed to add @GENTOO@"
+ sed -i -e "s:@GENTOO@:$1:g" ${S}/gcc/version.c || die "failed to patch version"
+ sed -i -e 's~http:\/\/gcc\.gnu\.org\/bugs\.html~http:\/\/bugs\.gentoo\.org\/~' ${S}/gcc/version.c || die "failed to update bugzilla URL"
}
# The purpose of this DISGUSTING gcc multilib hack is to allow 64bit libs
@@ -1749,27 +1730,7 @@ fix_libtool_libdir_paths() {
use_multilib() {
case $(tc-arch) in
- sparc)
- case ${CTARGET} in
- sparc64*)
- is_crosscompile || has_multilib_profile || use multilib
- ;;
- *)
- false
- ;;
- esac
- ;;
- mips)
- case ${CTARGET} in
- mips64*)
- is_crosscompile || has_multilib_profile || use multilib
- ;;
- *)
- false
- ;;
- esac
- ;;
- amd64|ppc64)
+ amd64|mips|sparc|ppc64)
is_crosscompile || has_multilib_profile || use multilib
;;
*)