/[gentoo-x86]/eclass/toolchain-funcs.eclass
Gentoo

Diff of /eclass/toolchain-funcs.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.113 Revision 1.118
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2012 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.113 2012/07/21 16:11:01 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.118 2012/09/27 19:34:28 axs 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
15 15
16if [[ ${___ECLASS_ONCE_TOOLCHAIN_FUNCS} != "recur -_+^+_- spank" ]] ; then 16if [[ ${___ECLASS_ONCE_TOOLCHAIN_FUNCS} != "recur -_+^+_- spank" ]] ; then
17___ECLASS_ONCE_TOOLCHAIN_FUNCS="recur -_+^+_- spank" 17___ECLASS_ONCE_TOOLCHAIN_FUNCS="recur -_+^+_- spank"
18 18
19inherit multilib 19inherit multilib
20
21DESCRIPTION="Based on the ${ECLASS} eclass"
22 20
23# tc-getPROG <VAR [search vars]> <default> [tuple] 21# tc-getPROG <VAR [search vars]> <default> [tuple]
24_tc-getPROG() { 22_tc-getPROG() {
25 local tuple=$1 23 local tuple=$1
26 local v var vars=$2 24 local v var vars=$2
357 355
358 local type=$1 356 local type=$1
359 local host=$2 357 local host=$2
360 [[ -z ${host} ]] && host=${CTARGET:-${CHOST}} 358 [[ -z ${host} ]] && host=${CTARGET:-${CHOST}}
361 359
360 local KV=${KV:-${KV_FULL}}
361 [[ -z ${KV} ]] && die "toolchain-funcs.eclass: Kernel version could not be determined, please inherit kernel-2 or linux-info"
362
362 case ${host} in 363 case ${host} in
364 aarch64*) ninj aarch64 arm;;
363 alpha*) echo alpha;; 365 alpha*) echo alpha;;
364 arm*) echo arm;; 366 arm*) echo arm;;
365 avr*) ninj avr32 avr;; 367 avr*) ninj avr32 avr;;
366 bfin*) ninj blackfin bfin;; 368 bfin*) ninj blackfin bfin;;
367 cris*) echo cris;; 369 cris*) echo cris;;
444 local host=$1 446 local host=$1
445 [[ -z ${host} ]] && host=${CTARGET:-${CHOST}} 447 [[ -z ${host} ]] && host=${CTARGET:-${CHOST}}
446 host=${host%%-*} 448 host=${host%%-*}
447 449
448 case ${host} in 450 case ${host} in
451 aarch64*be) echo big;;
452 aarch64) echo little;;
449 alpha*) echo big;; 453 alpha*) echo big;;
450 arm*b*) echo big;; 454 arm*b*) echo big;;
451 arm*) echo little;; 455 arm*) echo little;;
452 cris*) echo little;; 456 cris*) echo little;;
453 hppa*) echo big;; 457 hppa*) echo big;;
613 tc-is-static-only && return 617 tc-is-static-only && return
614 618
615 # Eventually we'd like to get rid of this func completely #417451 619 # Eventually we'd like to get rid of this func completely #417451
616 case ${CTARGET:-${CHOST}} in 620 case ${CTARGET:-${CHOST}} in
617 *-darwin*) ;; 621 *-darwin*) ;;
622 *linux*|*-freebsd*|*-openbsd*|*-netbsd*)
618 *linux*) use prefix && return 0 ;; 623 use prefix && return 0 ;;
619 *) return 0 ;; 624 *) return 0 ;;
620 esac 625 esac
621 626
622 # Just make sure it exists 627 # Just make sure it exists
623 dodir /usr/${libdir} 628 dodir /usr/${libdir}
683 # understand linker scripts, just create a symlink. 688 # understand linker scripts, just create a symlink.
684 pushd "${ED}/usr/${libdir}" > /dev/null 689 pushd "${ED}/usr/${libdir}" > /dev/null
685 ln -snf "../../${libdir}/${tlib}" "${lib}" 690 ln -snf "../../${libdir}/${tlib}" "${lib}"
686 popd > /dev/null 691 popd > /dev/null
687 ;; 692 ;;
688 *linux*) 693 *)
689 if ${auto} ; then 694 if ${auto} ; then
690 tlib=$(scanelf -qF'%S#F' "${ED}"/usr/${libdir}/${lib}) 695 tlib=$(scanelf -qF'%S#F' "${ED}"/usr/${libdir}/${lib})
691 [[ -z ${tlib} ]] && die "unable to read SONAME from ${lib}" 696 [[ -z ${tlib} ]] && die "unable to read SONAME from ${lib}"
692 mv "${ED}"/usr/${libdir}/${lib}* "${ED}"/${libdir}/ || die 697 mv "${ED}"/usr/${libdir}/${lib}* "${ED}"/${libdir}/ || die
693 # some SONAMEs are funky: they encode a version before the .so 698 # some SONAMEs are funky: they encode a version before the .so

Legend:
Removed from v.1.113  
changed lines
  Added in v.1.118

  ViewVC Help
Powered by ViewVC 1.1.20