/[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.86 Revision 1.88
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.86 2009/02/25 00:25:51 kumba Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.88 2009/03/28 11:09: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
424 dosym "/${libdir}/${lib}" "/usr/${libdir}/${lib}" 424 dosym "/${libdir}/${lib}" "/usr/${libdir}/${lib}"
425 else 425 else
426 local tlib 426 local tlib
427 if ${auto} ; then 427 if ${auto} ; then
428 lib="lib${lib}${suffix}" 428 lib="lib${lib}${suffix}"
429 tlib=$(scanelf -qF'%S#F' "${D}"/usr/${libdir}/${lib})
429 mv "${D}"/usr/${libdir}/${lib}* "${D}"/${libdir}/ || die 430 mv "${D}"/usr/${libdir}/${lib}* "${D}"/${libdir}/ || die
430 tlib=$(scanelf -qF'%S#F' "${D}"/${libdir}/${lib}) 431 # some SONAMEs are funky: they encode a version before the .so
432 if [[ ${tlib} != ${lib}* ]] ; then
433 mv "${D}"/usr/${libdir}/${tlib}* "${D}"/${libdir}/ || die
434 fi
431 [[ -z ${tlib} ]] && die "unable to read SONAME from ${lib}" 435 [[ -z ${tlib} ]] && die "unable to read SONAME from ${lib}"
432 rm -f "${D}"/${libdir}/${lib} 436 rm -f "${D}"/${libdir}/${lib}
433 else 437 else
434 tlib=${lib} 438 tlib=${lib}
435 fi 439 fi
436 cat > "${D}/usr/${libdir}/${lib}" <<-END_LDSCRIPT 440 cat > "${D}/usr/${libdir}/${lib}" <<-END_LDSCRIPT
437 /* GNU ld script 441 /* GNU ld script
438 Since Gentoo has critical dynamic libraries 442 Since Gentoo has critical dynamic libraries in /lib, and the static versions
439 in /lib, and the static versions in /usr/lib, 443 in /usr/lib, we need to have a "fake" dynamic lib in /usr/lib, otherwise we
440 we need to have a "fake" dynamic lib in /usr/lib, 444 run into linking problems. This "fake" dynamic lib is a linker script that
441 otherwise we run into linking problems. 445 redirects the linker to the real lib. And yes, this works in the cross-
446 compiling scenario as the sysroot-ed linker will prepend the real path.
442 447
443 See bug http://bugs.gentoo.org/4411 for more info. 448 See bug http://bugs.gentoo.org/4411 for more info.
444 */ 449 */
445 ${output_format} 450 ${output_format}
446 GROUP ( /${libdir}/${tlib} ) 451 GROUP ( /${libdir}/${tlib} )

Legend:
Removed from v.1.86  
changed lines
  Added in v.1.88

  ViewVC Help
Powered by ViewVC 1.1.20