| 1 | # Copyright 1999-2007 Gentoo Foundation |
1 | # Copyright 1999-2007 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.102 2010/09/11 17:12:20 vapier Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.103 2010/10/28 04:16:27 vapier Exp $ |
| 4 | |
4 | |
| 5 | # @ECLASS: toolchain-funcs.eclass |
5 | # @ECLASS: toolchain-funcs.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # Toolchain Ninjas <toolchain@gentoo.org> |
7 | # Toolchain Ninjas <toolchain@gentoo.org> |
| 8 | # @BLURB: functions to query common info about the toolchain |
8 | # @BLURB: functions to query common info about the toolchain |
| … | |
… | |
| 275 | m68*) echo m68k;; |
275 | m68*) echo m68k;; |
| 276 | mips*) echo mips;; |
276 | mips*) echo mips;; |
| 277 | nios2*) echo nios2;; |
277 | nios2*) echo nios2;; |
| 278 | nios*) echo nios;; |
278 | nios*) echo nios;; |
| 279 | powerpc*) |
279 | powerpc*) |
| 280 | # Starting with linux-2.6.15, the 'ppc' and 'ppc64' trees |
280 | # Starting with linux-2.6.15, the 'ppc' and 'ppc64' trees |
| 281 | # have been unified into simply 'powerpc', but until 2.6.16, |
281 | # have been unified into simply 'powerpc', but until 2.6.16, |
| 282 | # ppc32 is still using ARCH="ppc" as default |
282 | # ppc32 is still using ARCH="ppc" as default |
| 283 | if [[ $(KV_to_int ${KV}) -ge $(KV_to_int 2.6.16) ]] && [[ ${type} == "kern" ]] ; then |
283 | if [[ ${type} == "kern" ]] && [[ $(KV_to_int ${KV}) -ge $(KV_to_int 2.6.16) ]] ; then |
| 284 | echo powerpc |
284 | echo powerpc |
| 285 | elif [[ $(KV_to_int ${KV}) -eq $(KV_to_int 2.6.15) ]] && [[ ${type} == "kern" ]] ; then |
285 | elif [[ ${type} == "kern" ]] && [[ $(KV_to_int ${KV}) -eq $(KV_to_int 2.6.15) ]] ; then |
| 286 | if [[ ${host} == powerpc64* ]] || [[ ${PROFILE_ARCH} == "ppc64" ]] ; then |
286 | if [[ ${host} == powerpc64* ]] || [[ ${PROFILE_ARCH} == "ppc64" ]] ; then |
| 287 | echo powerpc |
287 | echo powerpc |
| 288 | else |
288 | else |
| 289 | echo ppc |
289 | echo ppc |
| 290 | fi |
290 | fi |
| 291 | elif [[ ${host} == powerpc64* ]] ; then |
291 | elif [[ ${host} == powerpc64* ]] ; then |
| 292 | echo ppc64 |
292 | echo ppc64 |
| 293 | elif [[ ${PROFILE_ARCH} == "ppc64" ]] ; then |
293 | elif [[ ${PROFILE_ARCH} == "ppc64" ]] ; then |
| 294 | ninj ppc64 ppc |
294 | ninj ppc64 ppc |
| 295 | else |
295 | else |
| 296 | echo ppc |
296 | echo ppc |
| 297 | fi |
297 | fi |
| 298 | ;; |
298 | ;; |
| 299 | s390*) echo s390;; |
299 | s390*) echo s390;; |
| 300 | sh64*) ninj sh64 sh;; |
300 | sh64*) ninj sh64 sh;; |
| 301 | sh*) echo sh;; |
301 | sh*) echo sh;; |
| 302 | sparc64*) ninj sparc64 sparc;; |
302 | sparc64*) ninj sparc64 sparc;; |
| 303 | sparc*) [[ ${PROFILE_ARCH} == "sparc64" ]] \ |
303 | sparc*) [[ ${PROFILE_ARCH} == "sparc64" ]] \ |