summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorJeremy Huddleston <eradicator@gentoo.org>2005-02-13 14:05:54 +0000
committerJeremy Huddleston <eradicator@gentoo.org>2005-02-13 14:05:54 +0000
commit860053e9349ab07ea7ebe429974bc9a9db41fc8c (patch)
treec367243337cfc23a4e8646b03c4acdcd41baee55 /eclass
parentwrong bug number again - should be 75532. Changelog amended (diff)
downloadgentoo-2-860053e9349ab07ea7ebe429974bc9a9db41fc8c.tar.gz
gentoo-2-860053e9349ab07ea7ebe429974bc9a9db41fc8c.tar.bz2
gentoo-2-860053e9349ab07ea7ebe429974bc9a9db41fc8c.zip
Cleanup orphaned modules in lib{32,64}.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/multilib.eclass15
-rw-r--r--eclass/python.eclass8
-rw-r--r--eclass/toolchain.eclass40
3 files changed, 42 insertions, 21 deletions
diff --git a/eclass/multilib.eclass b/eclass/multilib.eclass
index 5c90a373c277..643c877d6ac5 100644
--- a/eclass/multilib.eclass
+++ b/eclass/multilib.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/multilib.eclass,v 1.20 2005/02/10 23:13:11 eradicator Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/multilib.eclass,v 1.21 2005/02/13 14:05:54 eradicator Exp $
#
# Author: Jeremy Huddleston <eradicator@gentoo.org>
#
@@ -89,11 +89,14 @@ DESCRIPTION="Based on the ${ECLASS} eclass"
### END DOCUMENTATION ###
# Defaults:
-CFLAGS_default=""
-LDFLAGS_default=""
-CHOST_default="${CHOST}"
-LIBDIR_default="${CONF_LIBDIR:-lib}"
-CDEFINE_default="__unix__"
+export MULTILIB_ABIS=${MULTILIB_ABIS:-"default"}
+export DEFAULT_ABI=${DEFAULT_ABI:-"default"}
+export ABI=${ABI:-"default"}
+export CFLAGS_default=""
+export LDFLAGS_default=""
+export CHOST_default=${CHOST}
+export LIBDIR_default=${CONF_LIBDIR:-"lib"}
+export CDEFINE_default="__unix__"
# has_multilib_profile()
has_multilib_profile() {
diff --git a/eclass/python.eclass b/eclass/python.eclass
index 24dd3b9aa0b8..263931c96c04 100644
--- a/eclass/python.eclass
+++ b/eclass/python.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/python.eclass,v 1.14 2004/06/25 00:39:48 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.15 2005/02/13 14:05:54 eradicator Exp $
#
# Author: Alastair Tse <liquidx@gentoo.org>
#
@@ -13,7 +13,7 @@
# python_mod_exists() - Checks if a python module exists
# python_mod_compile() - Compiles a .py file to a .pyc/.pyo
# python_mod_optimize() - Generates .pyc/.pyo precompiled scripts
-# python_mod_cleanup() - Goes through /usr/lib/python* to remove
+# python_mod_cleanup() - Goes through /usr/lib*/python* to remove
# orphaned *.pyc *.pyo
# python_makesym() - Makes /usr/bin/python symlinks
@@ -180,7 +180,7 @@ python_mod_cleanup() {
SEARCH_PATH="${SEARCH_PATH} ${myroot}/${path#/}"
done
else
- for path in ${myroot}/usr/lib/python*/site-packages; do
+ for path in ${myroot}/usr/lib*/python*/site-packages; do
SEARCH_PATH="${SEARCH_PATH} ${path}"
done
fi
@@ -200,5 +200,3 @@ python_mod_cleanup() {
done
done
}
-
-
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 078c4d775d8a..298e31742f5a 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.107 2005/02/11 01:21:44 eradicator Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.108 2005/02/13 14:05:54 eradicator Exp $
HOMEPAGE="http://www.gnu.org/software/gcc/gcc.html"
LICENSE="GPL-2 LGPL-2.1"
@@ -52,18 +52,22 @@ if [[ ${CTARGET} = ${CHOST} ]] ; then
export CTARGET=${CATEGORY/cross-}
fi
fi
+
is_crosscompile() {
[[ ${CHOST} != ${CTARGET} ]]
}
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
@@ -720,6 +724,14 @@ 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() {
@@ -802,8 +814,17 @@ gcc_src_unpack() {
disgusting_gcc_multilib_HACK || die "multilib hack failed"
fi
- einfo "patching gcc version: ${BRANCH_UPDATE} (${release_version})"
- gcc_version_patch "${BRANCH_UPDATE} (${release_version})"
+ 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}"
# Misdesign in libstdc++ (Redhat)
cp -a ${S}/libstdc++-v3/config/cpu/i{4,3}86/atomicity.h
@@ -852,11 +873,11 @@ gcc-compiler-configure() {
# Add --with-abi flags to enable respective MIPS ABIs
case $(tc-arch) in
mips)
- if is_crosscompile; then
- confgcc="${confgcc} --with-abi=32 --with-abi=n32 --with-abi=n64"
+ if is_crosscompile && use_multilib; then
+ confgcc="${confgcc} --with-abi=32 --with-abi=n32 --with-abi=64"
else
use_multilib && confgcc="${confgcc} --with-abi=32"
- use n64 && confgcc="${confgcc} --with-abi=n64"
+ use n64 && confgcc="${confgcc} --with-abi=64"
use n32 && confgcc="${confgcc} --with-abi=n32"
fi
;;
@@ -1686,9 +1707,8 @@ do_gcc_config() {
gcc_version_patch() {
[[ -z $1 ]] && die "no arguments to gcc_version_patch"
- 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"
+ 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."
}
# The purpose of this DISGUSTING gcc multilib hack is to allow 64bit libs