diff options
author | Fabian Groffen <grobian@gentoo.org> | 2006-09-24 07:20:33 +0000 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2006-09-24 07:20:33 +0000 |
commit | d89d98275a83848c6c59ad0d7dd07dfd50a68182 (patch) | |
tree | 8ef0becfd30b665cd6a3370e8d3e2b7973a7b834 /eclass | |
parent | Fix broken build on gcc 4.1 (#148864). (diff) | |
download | gentoo-2-d89d98275a83848c6c59ad0d7dd07dfd50a68182.tar.gz gentoo-2-d89d98275a83848c6c59ad0d7dd07dfd50a68182.tar.bz2 gentoo-2-d89d98275a83848c6c59ad0d7dd07dfd50a68182.zip |
The Darwin linker doesn't understand GNU ld scripts, instead it has no
problems with symlinks.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/toolchain-funcs.eclass | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass index 70ee3b9bafe4..8f8a3ac7c9e7 100644 --- a/eclass/toolchain-funcs.eclass +++ b/eclass/toolchain-funcs.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.60 2006/08/19 13:52:02 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.61 2006/09/24 07:20:33 grobian Exp $ # # Author: Toolchain Ninjas <toolchain@gentoo.org> # @@ -275,18 +275,25 @@ _tc_gen_usr_ldscript() { [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )" for lib in "$@" ; do - cat > "${D}/usr/${libdir}/${lib}" <<-END_LDSCRIPT - /* GNU ld script - Since Gentoo has critical dynamic libraries - in /lib, and the static versions in /usr/lib, - we need to have a "fake" dynamic lib in /usr/lib, - otherwise we run into linking problems. + if [[ ${USERLAND} == "Darwin" ]]; + then + ewarn "Not creating fake dynamic library for $lib on Darwin," + ewarn "making a symlink instead." + dosym "/${libdir}/${lib}" "/usr/${libdir}/${lib}" + else + cat > "${D}/usr/${libdir}/${lib}" <<-END_LDSCRIPT + /* GNU ld script + Since Gentoo has critical dynamic libraries + in /lib, and the static versions in /usr/lib, + we need to have a "fake" dynamic lib in /usr/lib, + otherwise we run into linking problems. - See bug http://bugs.gentoo.org/4411 for more info. - */ - ${output_format} - GROUP ( /${libdir}/${lib} ) - END_LDSCRIPT + See bug http://bugs.gentoo.org/4411 for more info. + */ + ${output_format} + GROUP ( /${libdir}/${lib} ) + END_LDSCRIPT + fi fperms a+x "/usr/${libdir}/${lib}" || die "could not change perms on ${lib}" done } |