summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2007-07-11 04:06:29 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2007-07-11 04:06:29 +0000
commit6eb39a5494bf628020f68ec770786b9ca2d50c33 (patch)
tree7953f8a05502184dcdb0cf2f8a8868075ff6e0d9 /eclass
parentprune unused versions (diff)
downloadgentoo-2-6eb39a5494bf628020f68ec770786b9ca2d50c33.tar.gz
gentoo-2-6eb39a5494bf628020f68ec770786b9ca2d50c33.tar.bz2
gentoo-2-6eb39a5494bf628020f68ec770786b9ca2d50c33.zip
Resurrect tc-endian as I need it to control some testcases.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/toolchain-funcs.eclass27
1 files changed, 26 insertions, 1 deletions
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index 2a2945239e80..8c20cd9ebd96 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.70 2007/06/16 07:11:43 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.71 2007/07/11 04:06:29 robbat2 Exp $
#
# Maintainer: Toolchain Ninjas <toolchain@gentoo.org>
#
@@ -172,6 +172,31 @@ tc-arch-kernel() {
tc-arch() {
tc-ninja_magic_to_arch portage $@
}
+tc-endian() {
+ local host=$1
+ [[ -z ${host} ]] && host=${CTARGET:-${CHOST}}
+ host=${host%%-*}
+
+ case ${host} in
+ alpha*) echo big;;
+ arm*b*) echo big;;
+ arm*) echo little;;
+ cris*) echo little;;
+ hppa*) echo big;;
+ i?86*) echo little;;
+ ia64*) echo little;;
+ m68*) echo big;;
+ mips*l*) echo little;;
+ mips*) echo big;;
+ powerpc*) echo big;;
+ s390*) echo big;;
+ sh*b*) echo big;;
+ sh*) echo little;;
+ sparc*) echo big;;
+ x86_64*) echo little;;
+ *) echo wtf;;
+ esac
+}
# Returns the version as by `$CC -dumpversion`
gcc-fullversion() {