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 | 0933553e3023ebef03dac192c4286f248ff5deac (patch) | |
tree | 8d43ab7ce7475d811db0c7d97772bad9097c4823 /eclass | |
parent | Fix broken build on gcc 4.1 (#148864). (diff) | |
download | historical-0933553e3023ebef03dac192c4286f248ff5deac.tar.gz historical-0933553e3023ebef03dac192c4286f248ff5deac.tar.bz2 historical-0933553e3023ebef03dac192c4286f248ff5deac.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 } |