diff options
author | Fabian Groffen <grobian@gentoo.org> | 2009-09-05 17:22:41 +0000 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2009-09-05 17:22:41 +0000 |
commit | 3f0117f653a9e74bfff6a202153eaf8c47ed2d33 (patch) | |
tree | 40deb39efc2cf5c5cc1c2ef2578e6241e525f9bf /sys-devel/binutils-apple | |
parent | ia64/sparc stable wrt #277645 (diff) | |
download | historical-3f0117f653a9e74bfff6a202153eaf8c47ed2d33.tar.gz historical-3f0117f653a9e74bfff6a202153eaf8c47ed2d33.tar.bz2 historical-3f0117f653a9e74bfff6a202153eaf8c47ed2d33.zip |
Bump to version from Snow Leopard/Developer Tools 3.2, highly broken, hence masked
Package-Manager: portage-2.2.00.14200-prefix/cvs/SunOS i386
Diffstat (limited to 'sys-devel/binutils-apple')
-rw-r--r-- | sys-devel/binutils-apple/ChangeLog | 9 | ||||
-rw-r--r-- | sys-devel/binutils-apple/Manifest | 6 | ||||
-rw-r--r-- | sys-devel/binutils-apple/binutils-apple-3.2.ebuild | 253 | ||||
-rw-r--r-- | sys-devel/binutils-apple/files/binutils-apple-3.2-ld64-Makefile | 29 |
4 files changed, 295 insertions, 2 deletions
diff --git a/sys-devel/binutils-apple/ChangeLog b/sys-devel/binutils-apple/ChangeLog index 6a519aa82f67..0b81c0af3950 100644 --- a/sys-devel/binutils-apple/ChangeLog +++ b/sys-devel/binutils-apple/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-devel/binutils-apple # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-apple/ChangeLog,v 1.1 2009/06/21 10:06:52 grobian Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-apple/ChangeLog,v 1.2 2009/09/05 17:22:41 grobian Exp $ + +*binutils-apple-3.2 (05 Sep 2009) + + 05 Sep 2009; Fabian Groffen <grobian@gentoo.org> + +binutils-apple-3.2.ebuild, +files/binutils-apple-3.2-ld64-Makefile: + Bump to version from Snow Leopard/Developer Tools 3.2, highly broken, + hence masked *binutils-apple-3.1.2-r1 (01 Jun 2009) diff --git a/sys-devel/binutils-apple/Manifest b/sys-devel/binutils-apple/Manifest index 3ae16e8a359f..88d906d985bc 100644 --- a/sys-devel/binutils-apple/Manifest +++ b/sys-devel/binutils-apple/Manifest @@ -9,13 +9,17 @@ AUX binutils-apple-3.1.1-no-oss-dir.patch 654 RMD160 29d59f2759936a9ae43b9db04dc AUX binutils-apple-3.1.1-ranlib.patch 2108 RMD160 f7e501cf5aa1bf53e8171d77a1c0946566672c6c SHA1 3e6e43b5e55c3877361c19123263d0f12b0d7aa2 SHA256 bb30d92834c4b1e9faf98fe529ab4624b26e2a26aecee256ed6f1b588ed00129 AUX binutils-apple-3.1.1-testsuite.patch 3951 RMD160 60763dc51f0bc28b8df43ae8b794af4a473a1598 SHA1 36405e9a154dbc053a8c20af7df6f10f45711cca SHA256 7fdaaf23d642bea0817e664925a4f362cec8f1ce7fdf81fc70f246956ab9a4d3 AUX binutils-apple-3.1.2-as-Makefile.patch 308 RMD160 043f9f5fc0eeedd7c1f61520ba39d943b827e573 SHA1 dfe1c9d8078aeb28f20737610fc71487fb4f23ae SHA256 032256cbc31d7097f1af351b5ec6aebc7663c715bbc44efa131e54081ec28d8b +AUX binutils-apple-3.2-ld64-Makefile 760 RMD160 da9f2930915d75d51bab3a58417a3ddc59a24bc4 SHA1 f4e0735ed11f3b277d88cf5300efab9e4ac03dda SHA256 990d24770f2e9ef985ad0f8d9f56c0fb1a0798b102418d29810918447a5ec92e DIST binutils-apple-LP64-patches-1.tar.bz2 10235 RMD160 754e956a9b8b9ecdf1bde5115bad0eb85545292e SHA1 e863f222e2f3eb5134de661987c7e5b58abaa710 SHA256 a107459f3914d57524e51ec4cb5e800f6715d40003514c79add0b5b4521cf809 DIST cctools-698.1.tar.gz 2318018 RMD160 898c7b46869d4989c115420912fdd8d96ae923d3 SHA1 11cb788151365fb365f7bf4a9083c3fcc6fa88f7 SHA256 383f1c0c78a2b3efdfdf7ce01adb7e2f8ee9985164dba6ab1c0fae800a211cec DIST cctools-698.tar.gz 2318613 RMD160 6e044c684936172d048e0790d087bb96e47ecb20 SHA1 9016e64d064b99e16ad71c79f2337dd0fc281b1b SHA256 c7a02ebab31fb3ecc18299e85620913ea3729750114d01a50f6e404ff405dc71 +DIST cctools-750.tar.gz 1947953 RMD160 4b4074a93d071fc56f5b9ebd972c6a175bb9904e SHA1 20dd28b6e41e6ca367a6f457f6b465a0e4fbae3c SHA256 188855640da114e37e4ddd4824ff6cdc1ea89dfb6c90a23905c9ca315342f356 DIST ld64-85.2.1.tar.gz 598524 RMD160 42c80bd4ad6e9f96a757245e6a2b95084c009ff1 SHA1 31a7debf4c407c32b8bd1a51a4b4a7ae68dc8b85 SHA256 4bcbcbdfd62efdc46c51700b8f5dae2cbd1638e9e50f649d5c7f242d32fca804 DIST ld64-85.2.2.tar.gz 298144 RMD160 f7f897666a072e07f1888beca5b22fdd75fa1b61 SHA1 33c655bd7cbfecd70807dbde428615fb0947f31b SHA256 01ab6f6f1ce91203722c5cd56666ffa81da0eafe8beee1490a383811d56d86aa +DIST ld64-95.2.12.tar.gz 401104 RMD160 35de89aa1d31d100bd952829df4316e640c03cb4 SHA1 eea384a5ed3b5a994cc24e076c74ad20e6f8b68a SHA256 5a5ea02bd81d74f4f773403bebe34950acf4830fb7fee0d466305276f869097c EBUILD binutils-apple-3.1.1.ebuild 5139 RMD160 1aa3272f9f0a69ba4b96c0ab709ed2036c2f1347 SHA1 c2ddd091fd86aa2a7773ce4315ebe0f605598cf5 SHA256 4c37f58802891a442ef802f7af9e23c9696f915bfc7e58ca50073cc3ec856564 EBUILD binutils-apple-3.1.2-r1.ebuild 6275 RMD160 99163efe1a0ac14d5469671587d2f34a95948f19 SHA1 30e65ed73823e2ece0b079fc7e053ecf617c1abb SHA256 88f5cc1fa2d0d2c74c5a12c947170e5ed69c58eb783c1dd5cc00454b93cc4081 EBUILD binutils-apple-3.1.2.ebuild 5292 RMD160 3e4d5a4656c059419e00ba4ebbe2a32856b4311d SHA1 5e70b910353a7cdb220dba94848dee4f9233ec37 SHA256 0a6b6200919e93caf3e2bfe5ae3cc3b591d8925a72bf043b1594d3706817ef7e -MISC ChangeLog 3027 RMD160 41ae7ea8eae38e25b7350da591fbd14c7167565f SHA1 0484ee71385fd235097ded41f2eed9f825820724 SHA256 c012617752b29e804bf93426f906e51b06ffc4ecee5cd33da594d04ba7f034a3 +EBUILD binutils-apple-3.2.ebuild 6520 RMD160 c0acaa7151306ef086810b8ecc2b37cc460cc6b6 SHA1 78a62d060c22921c36fb5b3fc5551fea191ac0b4 SHA256 2fe749a003c64a3edc88e1ff4d7d36fef78ef137021aebb55c1c951db83a8796 +MISC ChangeLog 3272 RMD160 285a76d3c94fd1d25f3902c5951071434f88dda2 SHA1 9e830b52c500150a704c4822d789f57c7764a491 SHA256 0c9be32c64c2b53c144835a4756edf42651f9aa239d71b9f944577ffcf6f6eee MISC metadata.xml 158 RMD160 61ad495b84df949a636009d30b8c3af6d267e469 SHA1 cacd49ab85e7648a81e5dd4791ef9598090ee63d SHA256 6a21555efc71392966785841abafc9b2984d97d75ad574d654db6adc8674b1bd diff --git a/sys-devel/binutils-apple/binutils-apple-3.2.ebuild b/sys-devel/binutils-apple/binutils-apple-3.2.ebuild new file mode 100644 index 000000000000..a028b7149a19 --- /dev/null +++ b/sys-devel/binutils-apple/binutils-apple-3.2.ebuild @@ -0,0 +1,253 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-apple/binutils-apple-3.2.ebuild,v 1.1 2009/09/05 17:22:41 grobian Exp $ + +inherit eutils flag-o-matic toolchain-funcs + +RESTRICT="test" # the test suite will test what's installed. + +LD64=ld64-95.2.12 +CCTOOLS=cctools-750 +LP64PATCHES=binutils-apple-LP64-patches-1 + +DESCRIPTION="Darwin assembler as(1) and static linker ld(1), Xcode Tools 3.2" +HOMEPAGE="http://www.opensource.apple.com/darwinsource/" +SRC_URI="http://www.gentoo.org/~grobian/distfiles/${LD64}.tar.gz + http://www.gentoo.org/~grobian/distfiles/${CCTOOLS}.tar.gz + http://www.gentoo.org/~grobian/distfiles/${LP64PATCHES}.tar.bz2" + +LICENSE="APSL-2" +KEYWORDS="~ppc-macos ~x64-macos ~x86-macos" +IUSE="test" +SLOT="0" + +DEPEND="sys-devel/binutils-config + test? ( >=dev-lang/perl-5.8.8 )" +RDEPEND="${DEPEND}" + +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then + export CTARGET=${CATEGORY/cross-} + fi +fi +is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } + +if is_cross ; then + SLOT="${CTARGET}" +else + SLOT="0" +fi + +LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV} +INCPATH=${LIBPATH}/include +DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV} +if is_cross ; then + BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${PV} +else + BINPATH=/usr/${CTARGET}/binutils-bin/${PV} +fi + +S=${WORKDIR} + +unpack_ld64() { + cd "${S}"/${LD64} + cp "${FILESDIR}"/${P}-ld64-Makefile Makefile + ln -s ../${CCTOOLS}/include +# todo: copy compact_unwind_encoding.h + + cd src + + local VER_STR="\"@(#)PROGRAM:ld PROJECT:${LD64} (Gentoo ${PN}-${PVR})\\n\"" + sed -i \ + -e '/^#define LTO_SUPPORT 1/s:1:0:' \ + other/ObjectDump.cpp || die + echo '#undef LTO_SUPPORT' > configure.h + echo '' > linker_opts + echo "char ldVersionString[] = ${VER_STR};" > version.cpp + + # clean up test suite + cd "${S}"/${LD64}/unit-tests/test-cases + local c + + # we don't have llvm + ((++c)); rm -rf llvm-integration; + + # we don't have dtrace + ((++c)); rm -rf dtrace-static-probes-coalescing; + ((++c)); rm -rf dtrace-static-probes; + + # a file is missing + ((++c)); rm -rf eh-coalescing-r + + # we don't do universal binaries + ((++c)); rm -rf blank-stubs; + + # looks like a problem with apple's result-filter.pl + ((++c)); rm -rf implicit-common3; + ((++c)); rm -rf order_file-ans; + + # TODO no idea what goes wrong here + ((++c)); rm -rf dwarf-debug-notes; + + elog "Deleted $c tests that were bound to fail" +} + +src_unpack() { + unpack ${A} + unpack_ld64 + + # needed to compile trie support + cp "${S}"/${LD64}/src/other/prune_trie.h \ + "${S}"/${CCTOOLS}/include/mach-o + + cd "${S}"/${CCTOOLS} + epatch "${FILESDIR}"/${PN}-3.1.1-as.patch + epatch "${FILESDIR}"/${PN}-3.1.1-as-dir.patch + epatch "${FILESDIR}"/${PN}-3.1.1-ranlib.patch + epatch "${FILESDIR}"/${PN}-3.1.1-libtool-ranlib.patch + epatch "${FILESDIR}"/${PN}-3.1.1-nmedit.patch + #epatch "${FILESDIR}"/${PN}-3.1.1-no-efi-man.patch + epatch "${FILESDIR}"/${PN}-3.1.1-no-headers.patch + epatch "${FILESDIR}"/${PN}-3.1.1-no-oss-dir.patch + #epatch "${FILESDIR}"/${PN}-3.1.2-as-Makefile.patch +# epatch "${WORKDIR}"/LP64/cctools/*.patch + cd "${S}"/${LD64} + epatch "${FILESDIR}"/${PN}-3.1.1-testsuite.patch +# epatch "${WORKDIR}"/LP64/ld64/*.patch + + cd "${S}" + ebegin "cleaning Makefiles from unwanted CFLAGS" + find . -name "Makefile" -print0 | xargs -0 sed \ + -i \ + -e 's/ -g / /g' \ + -e 's/^OFLAG =.*$/OFLAG =/' \ + -e 's/install -c -s/install/g' + eend $? +# ebegin "patching for LP64 mode" +# ebegin " replacing SWAP_LONG() with SWAP_INT()" +# find . -name "*.c" -print0 | xargs -0 sed \ +# -i \ +# -e 's/SWAP_LONG((long)/SWAP_INT((int)/g' \ +# -e 's/SWAP_LONG(/SWAP_INT(/g' +# eend $? +# ebegin " replacing sizeof(long) with sizeof(int)" +# find . -name "*.c" -print0 | xargs -0 sed \ +# -i \ +# -e 's/sizeof(long)/sizeof(int)/g' \ +# -e 's/sizeof(unsigned long)/sizeof(unsigned int)/g' \ +# && sed -i \ +# -e '/long long \*/!s/long \*/int */g' \ +# ${CCTOOLS}/misc/{strip,lipo}.* +# eend $? + + # -pg is used and the two are incompatible + filter-flags -fomit-frame-pointer +} + +compile_ld64() { + cd "${S}"/${LD64}/src + # 'struct linkedit_data_command' is defined in mach-o/loader.h on leopard, + # but not on tiger. + [[ ${CHOST} == *-apple-darwin8 ]] && \ + append-flags -isystem "${S}"/${CCTOOLS}/include/ + emake || die "emake failed for ld64" + use test && emake build_test +} + +compile_cctools() { + cd "${S}"/${CCTOOLS} + emake \ + LTO= \ + EFITOOLS= \ + COMMON_SUBDIRS='libstuff ar misc otool' \ + RC_CFLAGS="${CFLAGS}" OFLAG="${CFLAGS}" \ + || die "emake failed for the cctools" + cd "${S}"/${CCTOOLS}/as + emake \ + BUILD_OBSOLETE_ARCH= \ + RC_CFLAGS="-DASLIBEXECDIR=\"\\\"${EPREFIX}${LIBPATH}/\\\"\" ${CFLAGS}" \ + || die "emake failed for as" +} + +src_compile() { + compile_ld64 + compile_cctools +} + +install_ld64() { + exeinto ${BINPATH} + doexe "${S}"/${LD64}/src/{ld64,rebase} + dosym ld64 ${BINPATH}/ld + insinto ${DATAPATH}/man/man1 + doins "${S}"/${LD64}/doc/man/man1/{ld,ld64,rebase}.1 +} + +install_cctools() { + local ED=${ED-${D}} + + cd "${S}"/${CCTOOLS} + emake install_all_but_headers \ + EFITOOLS= \ + COMMON_SUBDIRS='ar misc otool' \ + DSTROOT=\"${D}\" \ + BINDIR=\"${EPREFIX}\"${BINPATH} \ + LOCBINDIR=\"${EPREFIX}\"${BINPATH} \ + USRBINDIR=\"${EPREFIX}\"${BINPATH} \ + LOCLIBDIR=\"${EPREFIX}\"${LIBPATH} \ + MANDIR=\"${EPREFIX}\"${DATAPATH}/man/ + cd "${S}"/${CCTOOLS}/as + emake install \ + BUILD_OBSOLETE_ARCH= \ + DSTROOT=\"${D}\" \ + USRBINDIR=\"${EPREFIX}\"${BINPATH} \ + LIBDIR=\"${EPREFIX}\"${LIBPATH} + + cd "${ED}"${BINPATH} + insinto ${DATAPATH}/man/man1 + local skips manpage + # ar brings an up-to-date manpage with it + skips=( ar ) + for bin in *; do + for skip in ${skips[@]}; do + if [[ ${bin} == ${skip} ]]; then + continue 2; + fi + done + manpage=${S}/${CCTOOLS}/man/${bin}.1 + if [[ -f "${manpage}" ]]; then + doins "${manpage}" + fi + done + insinto ${DATAPATH}/man/man5 + doins "${S}"/${CCTOOLS}/man/*.5 +} + +src_test() { + einfo "Running unit tests" + cd "${S}"/${LD64}/unit-tests/test-cases + # need host arch, since GNU arch doesn't do what Apple's does + tc-export CC CXX + perl ../bin/make-recursive.pl \ + ARCH="$(/usr/bin/arch)" \ + RELEASEDIR="${S}"/${LD64}/src \ + | perl ../bin/result-filter.pl +} + +src_install() { + install_ld64 + install_cctools + + cd "${S}" + insinto /etc/env.d/binutils + cat <<-EOF > env.d + TARGET="${CHOST}" + VER="${PV}" + FAKE_TARGETS="${CHOST}" + EOF + newins env.d ${CHOST}-${PV} +} + +pkg_postinst() { + binutils-config ${CHOST}-${PV} +} diff --git a/sys-devel/binutils-apple/files/binutils-apple-3.2-ld64-Makefile b/sys-devel/binutils-apple/files/binutils-apple-3.2-ld64-Makefile new file mode 100644 index 000000000000..976299a1d430 --- /dev/null +++ b/sys-devel/binutils-apple/files/binutils-apple-3.2-ld64-Makefile @@ -0,0 +1,29 @@ +AR = ar +CXX = g++ +INCS = -Iinclude -Isrc/abstraction -Isrc/ld +CXXFLAGS = $(INCS) +LDFLAGS = + +all: machocheck rebase unwinddump dyldinfo ObjectDump ld + +libprunetrie.a: src/other/PruneTrie.o src/other/prune_trie.h + $(AR) -r -c libprunetrie.a src/other/PruneTrie.o + +ld: libprunetrie.a src/ld/ld.o src/ld/Options.o src/ld/debugline.o + $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ + +rebase: src/other/rebase.o + $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ + +dyldinfo: src/other/dyldinfo.o + $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ + +unwinddump: src/other/unwinddump.o + $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ + +ObjectDump: src/other/ObjectDump.o src/ld/debugline.o + $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ + +machocheck: src/other/machochecker.o + $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ + |