From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1LRxSU-0008OB-2n for garchives@archives.gentoo.org; Tue, 27 Jan 2009 23:35:06 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 643BBE0481; Tue, 27 Jan 2009 23:35:05 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 20440E0481 for ; Tue, 27 Jan 2009 23:35:05 +0000 (UTC) Received: from stork.gentoo.org (stork.gentoo.org [64.127.104.133]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id 9AC4664702 for ; Tue, 27 Jan 2009 23:35:04 +0000 (UTC) Received: from vapier by stork.gentoo.org with local (Exim 4.69) (envelope-from ) id 1LRxSS-00038j-C9 for gentoo-commits@lists.gentoo.org; Tue, 27 Jan 2009 23:35:04 +0000 From: "Mike Frysinger (vapier)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, vapier@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass X-VCS-Repository: gentoo-x86 X-VCS-Files: toolchain-funcs.eclass X-VCS-Directories: eclass X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger Content-Type: text/plain; charset=utf8 Message-Id: Sender: Mike Frysinger Date: Tue, 27 Jan 2009 23:35:04 +0000 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: ddb3f178-a9d8-4a4c-9e44-6a40cc3aee11 X-Archives-Hash: ca3b93153d224752a66700aed3e0acbd vapier 09/01/27 23:35:04 Modified: toolchain-funcs.eclass Log: first cut at a more automated method for ldscript installation Revision Changes Path 1.85 eclass/toolchain-funcs.eclass file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-f= uncs.eclass?rev=3D1.85&view=3Dmarkup plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-f= uncs.eclass?rev=3D1.85&content-type=3Dtext/plain diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-f= uncs.eclass?r1=3D1.84&r2=3D1.85 Index: toolchain-funcs.eclass =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v retrieving revision 1.84 retrieving revision 1.85 diff -u -r1.84 -r1.85 --- toolchain-funcs.eclass 8 Jan 2009 11:06:10 -0000 1.84 +++ toolchain-funcs.eclass 27 Jan 2009 23:35:04 -0000 1.85 @@ -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.84 = 2009/01/08 11:06:10 gengor Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.85 = 2009/01/27 23:35:04 vapier Exp $ =20 # @ECLASS: toolchain-funcs.eclass # @MAINTAINER: @@ -384,7 +384,7 @@ =20 =20 # @FUNCTION: gen_usr_ldscript -# @USAGE: +# @USAGE: [-a] # @DESCRIPTION: # This function generate linker scripts in /usr/lib for dynamic # libs in /lib. This is to fix linking problems when you have @@ -398,10 +398,16 @@ # the library (libfoo.so), as ldconfig should usually update it # correctly to point to the latest version of the library present. gen_usr_ldscript() { - local lib libdir=3D$(get_libdir) output_format=3D"" + local lib libdir=3D$(get_libdir) output_format=3D"" auto=3Dfalse suffix= =3D$(get_libname) # Just make sure it exists dodir /usr/${libdir} =20 + if [[ $1 =3D=3D "-a" ]] ; then + auto=3Dtrue + shift + dodir /${libdir} + fi + # OUTPUT_FORMAT gives hints to the linker as to what binary format # is referenced ... makes multilib saner output_format=3D$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 |= sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p') @@ -413,6 +419,16 @@ ewarn "making a symlink instead." dosym "/${libdir}/${lib}" "/usr/${libdir}/${lib}" else + local tlib + if ${auto} ; then + lib=3D"lib${lib}${suffix}" + mv "${D}"/usr/${libdir}/${lib}* "${D}"/${libdir}/ || die + tlib=3D$(scanelf -qF'%S#F' "${D}"/${libdir}/${lib}) + [[ -z ${tlib} ]] && die "unable to read SONAME from ${lib}" + rm -f "${D}"/${libdir}/${lib} + else + tlib=3D${lib} + fi cat > "${D}/usr/${libdir}/${lib}" <<-END_LDSCRIPT /* GNU ld script Since Gentoo has critical dynamic libraries @@ -423,9 +439,9 @@ See bug http://bugs.gentoo.org/4411 for more info. */ ${output_format} - GROUP ( /${libdir}/${lib} ) + GROUP ( /${libdir}/${tlib} ) END_LDSCRIPT + fperms a+x "/usr/${libdir}/${lib}" || die "could not change perms on = ${lib}" fi - fperms a+x "/usr/${libdir}/${lib}" || die "could not change perms on $= {lib}" done }