summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2014-06-22 07:01:37 +0000
committerMichał Górny <mgorny@gentoo.org>2014-06-22 07:01:37 +0000
commit3a4c50daf03eb4f9856080ea0867bcd319888e4c (patch)
tree151e0de8137f5159174d6cc5fd5733d2a63f9676 /eclass
parentVersion bump. (diff)
downloadgentoo-2-3a4c50daf03eb4f9856080ea0867bcd319888e4c.tar.gz
gentoo-2-3a4c50daf03eb4f9856080ea0867bcd319888e4c.tar.bz2
gentoo-2-3a4c50daf03eb4f9856080ea0867bcd319888e4c.zip
Set LD{,CXX}SHARED properly for Darwin, reported by Fabian Groffen on bug #513664.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog6
-rw-r--r--eclass/distutils-r1.eclass12
2 files changed, 14 insertions, 4 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index d8f3d7d6f3a9..ec4f83ec2691 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for eclass directory
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1296 2014/06/20 11:40:28 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1297 2014/06/22 07:01:37 mgorny Exp $
+
+ 22 Jun 2014; Michał Górny <mgorny@gentoo.org> distutils-r1.eclass:
+ Set LD{,CXX}SHARED properly for Darwin, reported by Fabian Groffen on bug
+ #513664.
20 Jun 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
Fix typo in submodule fetching, reported by Hans Vercammen.
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 11d29a4d1b35..e5a5cd4e9460 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/distutils-r1.eclass,v 1.98 2014/06/21 08:14:18 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/distutils-r1.eclass,v 1.99 2014/06/22 07:01:37 mgorny Exp $
# @ECLASS: distutils-r1
# @MAINTAINER:
@@ -600,8 +600,14 @@ distutils-r1_run_phase() {
local -x AR=${AR} CC=${CC} CPP=${CPP} CXX=${CXX}
tc-export AR CC CPP CXX
- # XXX: portability for -shared? -- YES!
- [[ ${CHOST} == *-darwin* ]] || local -x LDSHARED="${CC} -shared" LDCXXSHARED="${CXX} -shared"
+ # How to build Python modules in different worlds...
+ local ldopts
+ case "${CHOST}" in
+ *-darwin*) ldopts='-bundle -undefined dynamic_lookup';;
+ *) ldopts='-shared';;
+ esac
+
+ local -x LDSHARED="${CC} ${ldopts}" LDCXXSHARED="${CXX} ${ldopts}"
"${@}"