From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1LqN7K-0002fi-GA for garchives@archives.gentoo.org; Sun, 05 Apr 2009 07:50:11 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 96FD3E0516; Sun, 5 Apr 2009 07:50:09 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 4527EE050C for ; Sun, 5 Apr 2009 07:50:09 +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 E366565279 for ; Sun, 5 Apr 2009 07:50:08 +0000 (UTC) Received: from grobian by stork.gentoo.org with local (Exim 4.69) (envelope-from ) id 1LqN7I-0005P5-58 for gentoo-commits@lists.gentoo.org; Sun, 05 Apr 2009 07:50:08 +0000 From: "Fabian Groffen (grobian)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, grobian@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: grobian X-VCS-Committer-Name: Fabian Groffen Content-Type: text/plain; charset=utf8 Message-Id: Sender: Fabian Groffen Date: Sun, 05 Apr 2009 07:50:08 +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: 70a12610-8e2c-427f-9484-cdb628427340 X-Archives-Hash: 1f7abe49d38e109c13106ebe07b4a5aa grobian 09/04/05 07:50:08 Modified: toolchain-funcs.eclass Log: Revert 1.89 of toolchain-funcs.eclass, I should have reviewed it much b= etter, and even worse it cases bugs like #264940 Revision Changes Path 1.90 eclass/toolchain-funcs.eclass file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-f= uncs.eclass?rev=3D1.90&view=3Dmarkup plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-f= uncs.eclass?rev=3D1.90&content-type=3Dtext/plain diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-f= uncs.eclass?r1=3D1.89&r2=3D1.90 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.89 retrieving revision 1.90 diff -u -r1.89 -r1.90 --- toolchain-funcs.eclass 4 Apr 2009 17:17:56 -0000 1.89 +++ toolchain-funcs.eclass 5 Apr 2009 07:50:08 -0000 1.90 @@ -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.89 = 2009/04/04 17:17:56 grobian Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.90 = 2009/04/05 07:50:08 grobian Exp $ =20 # @ECLASS: toolchain-funcs.eclass # @MAINTAINER: @@ -165,43 +165,6 @@ [[ -z ${host} ]] && host=3D${CTARGET:-${CHOST}} =20 case ${host} in - powerpc-apple-darwin*) - echo ppc-macos;; - powerpc64-apple-darwin*) - echo ppc64-macos;; - i?86-apple-darwin*) - echo x86-macos;; - x86_64-apple-darwin*) - echo x64-macos;; - sparc-sun-solaris*) - echo sparc-solaris;; - sparcv9-sun-solaris*) - echo sparc64-solaris;; - i?86-pc-solaris*) - echo x86-solaris;; - x86_64-pc-solaris*) - echo x64-solaris;; - powerpc-ibm-aix*) - echo ppc-aix;; - mips-sgi-irix*) - echo mips-irix;; - ia64-hp-hpux*) - echo ia64-hpux;; - i?86-pc-freebsd*) - echo x86-freebsd;; - x86_64-pc-freebsd*) - echo x64-freebsd;; - i?86-pc-netbsd*) - echo x86-netbsd;; - i?86-pc-interix*) - echo x86-interix;; - i?86-pc-winnt*) - echo x86-winnt;; - i*-pc-freebsd*) - echo x86-freebsd;; - x86_64-pc-freebsd*) - echo x64-freebsd;; - alpha*) echo alpha;; arm*) echo arm;; avr*) ninj avr32 avr;; @@ -455,60 +418,11 @@ [[ -n ${output_format} ]] && output_format=3D"OUTPUT_FORMAT ( ${output_= format} )" =20 for lib in "$@" ; do - - # Ensure /lib/${lib} exists to avoid dangling scripts/symlinks. - # This especially is for AIX where $(get_libname) can return ".a", - # so /lib/${lib} might be moved to /usr/lib/${lib} (by accident). - [[ -r "${ED}"/${libdir}/${lib} ]] || continue - - case ${CHOST} in - *-darwin*) - # Mach-O files have an id, which is like a soname, it tells how - # another object linking against this lib should reference it. - # Since we moved the lib from usr/lib into lib this reference is - # wrong. Hence, we update it here. We don't configure with - # libdir=3D/lib because that messes up libtool files. - # Make sure we don't lose the specific version, so just modify the - # existing install_name - install_name=3D$(otool -DX "${ED}"/${libdir}/${lib}) - [[ -z ${install_name} ]] && die "No install name found for ${ED}/${li= bdir}/${lib}" - install_name_tool \ - -id "${EPREFIX}"/${libdir}/${install_name##*/} \ - "${ED}"/${libdir}/${lib} - # Now as we don't use GNU binutils and our linker doesn't - # understand linker scripts, just create a symlink. - pushd "${ED}/usr/${libdir}" > /dev/null - ln -snf "../../${libdir}/${lib}" "${lib}" - popd > /dev/null - ;; - *-aix*|*-irix*|*-hpux*) - # we don't have GNU binutils on these platforms, so we symlink - # instead, which seems to work fine. Keep it relative, otherwise - # we break some QA checks in Portage - pushd "${ED}/usr/${libdir}" > /dev/null - ln -snf "../../${libdir}/${lib}" "${lib}" - popd > /dev/null - ;; - *-interix*|*-winnt*) - # on interix, the linker scripts would work fine in _most_ - # situations. if a library links to such a linker script the - # absolute path to the correct library is inserted into the binary, - # which is wrong, since anybody linking _without_ libtool will miss - # some dependencies, since the stupid linker cannot find libraries - # hardcoded with absolute paths (as opposed to the loader, which - # seems to be able to do this). - # this has been seen while building shared-mime-info which needs - # libxml2, but links without libtool (and does not add libz to the - # command line by itself). - pushd "${ED}/usr/${libdir}" > /dev/null - ln -snf "../../${libdir}/${lib}" "${lib}" - popd > /dev/null - ;; - *-mint*) - # do nothing - return - ;; - *)=09 + if [[ ${USERLAND} =3D=3D "Darwin" ]] ; then + ewarn "Not creating fake dynamic library for $lib on Darwin;" + ewarn "making a symlink instead." + dosym "/${libdir}/${lib}" "/usr/${libdir}/${lib}" + else local tlib if ${auto} ; then lib=3D"lib${lib}${suffix}" @@ -536,93 +450,7 @@ ${output_format} GROUP ( /${libdir}/${tlib} ) END_LDSCRIPT - ;; - esac - fperms a+x "/usr/${libdir}/${lib}" || die "could not change perms on $= {lib}" - done -} - -# This function is for AIX only. -# -# Showing a sample IMO is the best description: -# -# First, AIX has its own /usr/lib/libiconv.a containing 'shr.o' and 'shr= 4.o'. -# Both of them are shared-objects packed into an archive, thus /usr/lib/= libiconv.a -# is a shared library (!), even it is called lib*.a. -# This is the default layout on aix for shared libraries. -# Read the ld(1) manpage for more information. -# -# But now, we want to install GNU libiconv (sys-libs/libiconv) both as -# shared and static library. -# AIX (since 4.3) can create shared libraries if '-brtl' or '-G' linker = flags -# are used. -# -# Now assume we have GNU tar installed while GNU libiconv was not. -# This tar now has a runtime dependency on "libiconv.a(shr4.o)". -# With our ld-wrapper (from sys-devel/binutils-config) we add EPREFIX/us= r/lib -# as linker path, thus it is recorded as loader path into the binary. -# -# When having libiconv.a (the static GNU libiconv) in prefix, the loader= finds -# that one and claims that it does not contain an 'shr4.o' object file: -# -# Could not load program tar: -# Dependent module EPREFIX/usr/lib/libiconv.a(shr4.o) could no= t be loaded. -# Member shr4.o is not found in archive -# -# According to gcc's "host/target specific installation notes" for *-ibm= -aix* [1], -# we can extract that 'shr4.o' from /usr/lib/libiconv.a, mark it as -# non-linkable, and include it in our new static library. -# -# [1] http://gcc.gnu.org/install/specific.html#x-ibm-aix -# -# usage: -# keep_aix_runtime_object -# keep_aix_runtime_object "/usr/lib/libiconv.a "/usr/lib/libiconv.a(shr4= .o,...)" -keep_aix_runtime_objects() { - [[ ${CHOST} =3D=3D *-*-aix* ]] || return 0 - - local target=3D$1 - shift - local sources=3D"$@" - - # strip possible ${ED} prefixes - target=3D${target##/} - target=3D${target#${D##/}} - target=3D${target#${EPREFIX##/}} - target=3D${target##/} - - if ! $(tc-getAR) -t "${ED}${target}" &>/dev/null; then - if [[ -e ${ED}${target} ]]; then - ewarn "${target} is not an archive." + fperms a+x "/usr/${libdir}/${lib}" || die "could not change perms on = ${lib}" fi - return 0 - fi - - local tmpdir=3D${TMP}/keep_aix_runtime_object-$$ - mkdir ${tmpdir} || die - - local origdir=3D$(pwd) - local s - for s in ${sources}; do - local sourcelib sourceobjs so - # format of $s: "/usr/lib/libiconv.a(shr4.o,shr.o)" - sourcelib=3D${s%%(*} - sourceobjs=3D${s#*(} - sourceobjs=3D${sourceobjs%)} - sourceobjs=3D${sourceobjs//,/ } - cd ${tmpdir} || die - for so in ${sourceobjs}; do - ebegin "keeping aix runtime object '${sourcelib}(${so})' in '${EPREFI= X}/${target}'" - if ! $(tc-getAR) -x "${sourcelib}" ${so}; then - eend 1 - continue - fi - chmod +w ${so} && - $(tc-getSTRIP) -e ${so} && - $(tc-getAR) -q "${ED}${target}" ${so} && - eend 0 || - eend 1 - done done - cd "${origdir}" }