summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--eclass/eutils.eclass3
-rw-r--r--eclass/linux-info.eclass15
-rw-r--r--eclass/toolchain-funcs.eclass8
3 files changed, 13 insertions, 13 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass
index 0320c9a7db8b..c10e3bd23b22 100644
--- a/eclass/eutils.eclass
+++ b/eclass/eutils.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/eutils.eclass,v 1.141 2005/01/12 00:21:53 eradicator Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.142 2005/01/23 20:47:42 eradicator Exp $
#
# Author: Martin Schlemmer <azarah@gentoo.org>
#
@@ -1494,6 +1494,7 @@ set_arch_to_kernel() {
amd64) export ARCH="x86_64";;
hppa) export ARCH="parisc";;
mips) export ARCH="mips";;
+ sparc) export ARCH="$(tc-arch-kernel)";; # Yeah this is ugly, but it's even WORSE if you don't do this. linux-info.eclass's set_arch_to_kernel is fixed, but won't get used over this one!
*) export ARCH="${ARCH}";;
esac
}
diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
index 0d61c4750ff5..36445919d0bc 100644
--- a/eclass/linux-info.eclass
+++ b/eclass/linux-info.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/linux-info.eclass,v 1.19 2005/01/18 21:38:59 johnm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/linux-info.eclass,v 1.20 2005/01/23 20:47:42 eradicator Exp $
#
# Description: This eclass is used as a central eclass for accessing kernel
# related information for sources already installed.
@@ -53,6 +53,8 @@ ECLASS=linux-info
INHERITED="$INHERITED $ECLASS"
EXPORT_FUNCTIONS pkg_setup
+inherit toolchain-funcs
+
# Overwritable environment Var's
# ---------------------------------------
KERNEL_DIR="${KERNEL_DIR:-/usr/src/linux}"
@@ -69,19 +71,12 @@ esac
# Pulled from eutils as it might be more useful only being here since
# very few ebuilds which dont use this eclass will ever ever use these functions
set_arch_to_kernel() {
- export PORTAGE_ARCH="${ARCH}"
- case ${ARCH} in
- x86) export ARCH="i386";;
- amd64) export ARCH="x86_64";;
- hppa) export ARCH="parisc";;
- mips) export ARCH="mips";;
- *) export ARCH="${ARCH}";;
- esac
+ export ARCH="$(tc-arch-kernel)"
}
# set's ARCH back to what portage expects
set_arch_to_portage() {
- export ARCH="${PORTAGE_ARCH}"
+ export ARCH="$(tc-arch)"
}
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index d4993f55d3da..06c934a92dd9 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.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-funcs.eclass,v 1.26 2005/01/16 10:31:59 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.27 2005/01/23 20:47:42 eradicator Exp $
#
# Author: Toolchain Ninjas <ninjas@gentoo.org>
#
@@ -106,7 +106,11 @@ ninj() { [[ ${type} == "kern" ]] && echo $1 || echo $2 ; }
powerpc64*) echo ppc64;;
powerpc*) echo ppc;;
sparc64*) ninj sparc64 sparc;;
- sparc*) echo sparc;;
+ sparc*) if [[ "${PROFILE_ARCH}" == "sparc64" ]]; then
+ ninj sparc64 sparc
+ else
+ echo sparc
+ fi;;
s390*) echo s390;;
sh64*) ninj sh64 sh;;
sh*) echo sh;;