diff options
author | Fabian Groffen <grobian@gentoo.org> | 2015-02-28 10:53:58 +0000 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2015-02-28 10:53:58 +0000 |
commit | bca82628e2d4c2885b88f4fc7eb0d895595e1669 (patch) | |
tree | 5fb0052e75886b2c279d49f3433928adc4cd37ff /sys-libs/csu/csu-85.ebuild | |
parent | Fix depend rules in make which break due to unbundling of htslib, #541134; us... (diff) | |
download | gentoo-2-bca82628e2d4c2885b88f4fc7eb0d895595e1669.tar.gz gentoo-2-bca82628e2d4c2885b88f4fc7eb0d895595e1669.tar.bz2 gentoo-2-bca82628e2d4c2885b88f4fc7eb0d895595e1669.zip |
Let the compiler determine if Availability.h is available for a more reliable result, bug #539964
(Portage version: 2.2.14-prefix/cvs/SunOS i386, signed Manifest commit with key 0x5F75F607C5C74E89)
Diffstat (limited to 'sys-libs/csu/csu-85.ebuild')
-rw-r--r-- | sys-libs/csu/csu-85.ebuild | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/sys-libs/csu/csu-85.ebuild b/sys-libs/csu/csu-85.ebuild index fec699cdf02d..052e22dd7b3b 100644 --- a/sys-libs/csu/csu-85.ebuild +++ b/sys-libs/csu/csu-85.ebuild @@ -1,10 +1,10 @@ # Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/csu/csu-85.ebuild,v 1.1 2015/02/03 21:04:09 grobian Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/csu/csu-85.ebuild,v 1.2 2015/02/28 10:53:58 grobian Exp $ EAPI=5 -inherit eutils +inherit toolchain-funcs eutils DESCRIPTION="Darwin Csu (crt1.o) - Mac OS X 10.10 version" HOMEPAGE="http://www.opensource.apple.com/" @@ -25,19 +25,18 @@ src_prepare() { -e '/^CC = /d' \ Makefile || die - if [[ ${CHOST##*-darwin} -le 8 ]] ; then - # Availability.h missing - epatch "${FILESDIR}"/${P}-darwin8.patch - - if [[ ${CHOST} == powerpc* ]] ; then - # *must not* be compiled with -Os on PPC because that - # will optimize out - # _pointer_to__darwin_gcc3_preregister_frame_info which - # causes linker errors for large programs because the - # jump to ___darwin_gcc3_preregister_frame_info gets to - # be more than 16MB away - sed -i -e "s, -Os , -O ,g" Makefile || die - fi + # deal with Availability.h missing + echo "#include <Availability.h>" | $(tc-getCC) -o - -c -x c - >& /dev/null \ + || epatch "${FILESDIR}"/${P}-darwin8.patch + + if [[ ${CHOST} == powerpc* ]] ; then + # *must not* be compiled with -Os on PPC because that + # will optimize out + # _pointer_to__darwin_gcc3_preregister_frame_info which + # causes linker errors for large programs because the + # jump to ___darwin_gcc3_preregister_frame_info gets to + # be more than 16MB away + sed -i -e "s, -Os , -O ,g" Makefile || die fi } |