1 | # Copyright 1999-2005 Gentoo Foundation |
1 | # Copyright 1999-2005 Gentoo Foundation |
2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.30 2005/02/13 21:17:24 eradicator Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.31 2005/03/02 19:07:07 vapier Exp $ |
4 | # |
4 | # |
5 | # Author: Toolchain Ninjas <ninjas@gentoo.org> |
5 | # Author: Toolchain Ninjas <ninjas@gentoo.org> |
6 | # |
6 | # |
7 | # This eclass contains (or should) functions to get common info |
7 | # This eclass contains (or should) functions to get common info |
8 | # about the toolchain (libc/compiler/binutils/etc...) |
8 | # about the toolchain (libc/compiler/binutils/etc...) |
… | |
… | |
124 | tc-ninja_magic_to_arch portage $@ |
124 | tc-ninja_magic_to_arch portage $@ |
125 | } |
125 | } |
126 | tc-endian() { |
126 | tc-endian() { |
127 | local host=$1 |
127 | local host=$1 |
128 | [[ -z ${host} ]] && host=${CTARGET:-${CHOST}} |
128 | [[ -z ${host} ]] && host=${CTARGET:-${CHOST}} |
|
|
129 | host=${host%%-*} |
129 | |
130 | |
130 | case ${host} in |
131 | case ${host} in |
131 | alpha*) echo big;; |
132 | alpha*) echo big;; |
132 | x86_64*) echo little;; |
133 | x86_64*) echo little;; |
133 | arm*eb-*) echo big;; |
134 | arm*b*) echo big;; |
134 | arm*) echo little;; |
135 | arm*) echo little;; |
135 | hppa*) echo big;; |
136 | hppa*) echo big;; |
136 | ia64*) echo little;; |
137 | ia64*) echo little;; |
137 | m68*) echo big;; |
138 | m68*) echo big;; |
138 | mips*el-*) echo little;; |
139 | mips*l*) echo little;; |
139 | mips*) echo big;; |
140 | mips*) echo big;; |
140 | powerpc*) echo big;; |
141 | powerpc*) echo big;; |
141 | sparc*) echo big;; |
142 | sparc*) echo big;; |
142 | s390*) echo big;; |
143 | s390*) echo big;; |
143 | sh*el-) echo little;; |
|
|
144 | sh*) echo big;; |
144 | sh*b*) echo big;; |
|
|
145 | sh*) echo little;; |
145 | i?86*) echo little;; |
146 | i?86*) echo little;; |
146 | *) echo wtf;; |
147 | *) echo wtf;; |
147 | esac |
148 | esac |
148 | } |
149 | } |
149 | |
150 | |