summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/binutils-apple/Manifest12
-rw-r--r--sys-devel/binutils-apple/binutils-apple-6.3-r2.ebuild (renamed from sys-devel/binutils-apple/binutils-apple-6.3-r1.ebuild)2
-rw-r--r--sys-devel/binutils-apple/binutils-apple-7.0-r1.ebuild6
-rw-r--r--sys-devel/binutils-apple/binutils-apple-7.0.ebuild366
-rw-r--r--sys-devel/binutils-apple/binutils-apple-7.1-r1.ebuild6
-rw-r--r--sys-devel/binutils-apple/binutils-apple-7.1.ebuild366
-rw-r--r--sys-devel/binutils-apple/binutils-apple-7.2-r1.ebuild8
-rw-r--r--sys-devel/binutils-apple/binutils-apple-7.2.ebuild366
-rw-r--r--sys-devel/binutils-apple/binutils-apple-7.3.1.ebuild12
-rw-r--r--sys-devel/binutils-apple/binutils-apple-7.3.ebuild386
-rw-r--r--sys-devel/binutils-apple/binutils-apple-8.1.ebuild8
-rw-r--r--sys-devel/binutils-apple/binutils-apple-8.2.1-r1.ebuild4
-rw-r--r--sys-devel/binutils-apple/binutils-apple-8.2.1.ebuild334
13 files changed, 27 insertions, 1849 deletions
diff --git a/sys-devel/binutils-apple/Manifest b/sys-devel/binutils-apple/Manifest
index 4cb0acf9948c..a57a2e25a598 100644
--- a/sys-devel/binutils-apple/Manifest
+++ b/sys-devel/binutils-apple/Manifest
@@ -3,13 +3,10 @@ DIST binutils-apple-patches-3.2-r0.tar.bz2 4137 BLAKE2B 9cd7afbba5337cb9c395556b
DIST binutils-apple-patches-4.3-r1.tar.bz2 37363 BLAKE2B a5ad04d4bf746a864f03a25d052197ed9a6ecada1f34460f4e38bea8cd87dfe2cb6c7f99f2096acac2231cd1e0c13c53757854b07f729a7a0c5a162a908fbe83 SHA512 f5d64ad182891c3af971e6aabd3c0c1b717b6a1cb471632339cba61b41a998d15880d18de09aafa1c3d059e528c888d6e8b914025c79bc21897d90a6d0e2ebf5
DIST binutils-apple-patches-5.1-r2.tar.bz2 51642 BLAKE2B 1b44020a05e0a91cfe569273f1e3dc65afaeac4bcdb80a626bdcc1f30cf8fbba6cc7bb522ece93126d4035b2d309defefd17fe0cee5bcaadcc58c4fa0feb4827 SHA512 37ba0dcae6c10b54a07c6208f6893ab80b0de1bd1c2f677902f707c8290629f7671a481e256b57a18bf304b95e41e4d59519bc1c88f15de488c0ef7e142f5cd8
DIST binutils-apple-patches-6.1-r1.tar.bz2 42189 BLAKE2B 8505acaff6343b2f4dffe9c1dd78e360762f0ad78d39fbc0227265ed8b6768dba62c1a7d6784ca685934942e1a211c70275474001b066e3292c579fa0aa2f356 SHA512 be8ee5af5c8c9f9228cf6980f032aa101058ac1a414bec89401dbc4ff32ea96d6ebf96b7b79285fa1e7b4037a9ed68b285dbe59ff8e3d3e62bfc0145199e72f3
-DIST binutils-apple-patches-6.3-r1.tar.bz2 37951 BLAKE2B c6d189c7bf2fc66d2db4593a178330a5fbd337a77f5d572b8be89b34441786a3a7e800de0870ed6712609dc70ccdc45060f9eae597fc0fb3a27d476689b95d92 SHA512 07262f4cb621d7afa240c4d81f80eb1a2adf486b60eb480fe283235eac12167f8efa0a462bf9d0036226aa5e6a5382f9f74420ba3269bc260d0a48d0e4442578
-DIST binutils-apple-patches-7.0-r1.tar.bz2 43705 BLAKE2B 9a912d0f65ae54ea39f39d356b9b3f04f35cafc2883962ef3fbc74d7a10c5556b22345619a00eb067a6e0b6bdd9ed438fc14b8dc13e2ed7d6647b39a50728614 SHA512 a25570062628979e23d73ce9dfd0a9bbb4237fdac472a30f2ec564a9bc9afa7d91d8d8b5bf460d16344677f817b55154394608d74c937f0b1fc6dda64f538266
-DIST binutils-apple-patches-7.0-r2.tar.bz2 50934 BLAKE2B 1726dd7c80efe0542832c19a75fff0f84a487aa7ce9fd69d9bd4111d3b606b406bf757bddbf2914800d06eb8ccf5f5e9a0b0ecece291ac42a3c57e58062e38ea SHA512 c7c8f50fad0507228336b6144b8be3e70df07d64f1df617bfd9cd717a095c49cd9555c441cde7d24bbe2d179ab8763e4f6ab1074dd6c5532b80a1bbb4f13a244
-DIST binutils-apple-patches-7.2-r0.tar.bz2 2917 BLAKE2B 53bf5c5c8a21bcaa4df6b1fe290628d428976c0e502c7c0bb3e1c2f7c13881b4b437963004e1daa5aa32361a2b02826086b5bd9b022321065d425b6663b79445 SHA512 ca2fc2da88144fbf01f34f1664e6177105a5d1bff956e83f6c7cd530b8e80dcd59b0c921ad95d3c4554e02909bcd846d3a2a4535bf47569b343c85e765619821
-DIST binutils-apple-patches-7.3-r0.tar.bz2 44576 BLAKE2B a9f23fe66f9b3e25b8975c9148db996fb3133f70b11768fe400993c90d62b6da2c9704a99104c6921dfae5052b5e0d66bd1af02640df8166a957fef9a092d52a SHA512 6b092c586ac4c3a3c65229a7490f93b0f0d38348e5a2db4f73d6062c737007ee0a5b6bdb5948b7aac1d74d32442fa501ba92161a9ffe13151288432c6a706c43
-DIST binutils-apple-patches-7.3-r1.tar.bz2 44737 BLAKE2B 4ac5d3b50c04b1ab71dc1c266db8b44e9d34f12bcc8a53966232cb5a6999b2662f9891367a2e7f8ea4f0f014b19594c1adf8dd945a18419980bca729c1de302e SHA512 ce4b3a725e19cb632b0c101a32488ce09a8bb89aed08339d5518d834cb68c525b2e0c8b66564a945c077915e92cc6be3f7028c5baacb870b3ca9b9422b4fb0da
-DIST binutils-apple-patches-8.2-r0.tar.bz2 5771 BLAKE2B b562ea4dd9214bc66695dbdb2452c88b1885ae1e36904516ea664157cbf0b54421d80cd0df792fcc431a3e0b98e804488c651b3fa29b368445450d0d13a1502c SHA512 92d04396630a31b752a24845c27fe8da2e37eb176117c9b31193e8f48af7ade707cda4060289b848965310afd05b2f121c740b0e5baa56b79c5481273a88c84e
+DIST binutils-apple-patches-6.3-r2.tar.bz2 53029 BLAKE2B c2e7d773c00d3e6e13e01ee23a8aaf1986af31d2e1390a49ff3932bec45be916af56584a1d218412e2ed528bf55bd4de3942fa1ea3e4d113f841699172ab295c SHA512 bb165ceaebbb2545ac946c94bcc930ba52de452ea71c984d3d92a5b5105507de94752c3584cf05bd27ea288f5353e459c31e97f45553f2ad993249023f486a71
+DIST binutils-apple-patches-7.0-r3.tar.bz2 57504 BLAKE2B 2c894368141fa68c2b5ee85e05309233857afed89e81a89ff9739570397042e174921c9a174b026c61cf04d4bd09b84600a6acb8ac0ac6d55b59d37667ccc0a6 SHA512 4bfe2f1f29f3ca91c093af6b95d16cc315fe8098fb5fd0230458ac2575b34110c250d848b8d9a5425136069b5022d5005fa099489ba6534dd38d1c7049dce009
+DIST binutils-apple-patches-7.2-r1.tar.bz2 2924 BLAKE2B 167fb37e5cb4cae8fe6777dceb1085eee68ce601cf158a9b67d9f77113088c745551ef1500e1fb82e9e74a15bf010fc8e07728506879b5f8ee97fe10b93cea2f SHA512 1285ae5dfcac59e3f27312cfe53683df2f3f166a28ae60e78bc4d25fab6de2a8baf99a4e166638ea90b5823b9c9f0c5feb2a16265c7713fbfe81b5f43b524c54
+DIST binutils-apple-patches-7.3-r2.tar.bz2 44551 BLAKE2B 036cd2a2e4a66b046467f2984cce1c15f0d07c6b66aa6c8df3e07360943104aabe6f2555a0094973df71a5844496cb69d97a0ff13366043e02a01d8fbb0b0239 SHA512 219c26aeb54e89e23ab91706dda0803cf0c9f2a33acb5cc676db2d2ea33ad22af0661ea19450ad8f1f006f6c1703269fd95c98c52a7bcfa0c6491bc1cfb1a0ba
DIST binutils-apple-patches-8.2-r1.tar.bz2 10830 BLAKE2B 345db8619873e9e91b79c3fdc0685fc46f82366df0b6153c1a59fbe5c122622e799754397e980e8752ef01ef25bbac81bb8f0339e92168790211b1d9c03bef2d SHA512 e7ca8cbac75671846c044abcd5415cfcf5832ff71acd5a2799b643369b02f2f7148990398c51913a3758e589f9fbff875e333aadf568e2a8a2defeafaa2aca95
DIST cctools-750.tar.gz 1947990 BLAKE2B b0fe71ae6972bd2b21c1ecf7a699104c51519babf67bb5fc45e31ed1d17108e7627cb46b5f65d48c33dbec9e9032e703924e9a9a687ec19bd384a3cdea243a46 SHA512 298a447757d926b3d156aaf8be27ceadeb4242336b66cb0bee0fd2dc8bb4ad3f167758ff526e4bf3fe458cb72391f5dc38f9112171883fcf28d49a18d671296a
DIST cctools-822.tar.gz 2024412 BLAKE2B 6b58499a9dfc2a1b166ff428f1e263cd44e03c50cdc8f6e467cfee93bc2dc2a9c81bf7626479dce195b152f04217e2d3a427afac45484cba4c5f2bdfbb7e46f9 SHA512 8b02cc837d5e0520f35da445f25ba86b5042d5caa27b49a599e829ed89428cf78dbd1831bcf6c18301f941fbfb31ac2114e248041d98008a466e1574f4fe1586
@@ -34,7 +31,6 @@ DIST ld64-242.tar.gz 641597 BLAKE2B 09d241cbd24e98cf59cd4b25f2237fb518bbd6550d75
DIST ld64-253.3.tar.gz 671087 BLAKE2B 33d00185bdeb7eadc8c1f94d338ebe08c23b8944daeca794e1ee8e58528d6c9775eecf704b098a87bc0a3281b2e3dc9e634714923fea65cc22977b2cd89cfa1d SHA512 ce2c86f2f37ee37bd417315ba51815707b0ca6f24da06819fd1b2d0b4fe0762e45a08c3faf2c0c980e4913c9cbfbf6c8185f9a6810cfa1d9dad231b5bb276081
DIST ld64-253.6.tar.gz 671838 BLAKE2B e7b05c658896a799cfb6dd8d4d74ec16d9a2c39cdbdfac1e7d3f6b5ccd4722b343a9567dbd649e71e96742d6b2eae74ac951bada8899be51f152809c579c73e9 SHA512 40b29e273ed3d69e4f92593cadea831fd618452d3f05e30c0b836ffc05db61fd345cb2f6d63271563c786ecabd47f19f8369456cbe6422800117a53c654a98c6
DIST ld64-253.9.tar.gz 673388 BLAKE2B 65af4f3ddd49b15deecf824fd991d41e5223ff9c963a0ccc89862181353c52279897171d37a00939d6678f2260efa7f7852b9dfd71c2c7b4b00d3fa2dbd85a34 SHA512 a52b081295c19f28858f8ee47c05249bba3e15cc8bb6f7017d9f6dcf7509cdacef7a4b16b3940cd0b1f72b3b67efb503ab2e3801b31e50cda1d34c6bc8df8dcf
-DIST ld64-264.3.101.tar.gz 681491 BLAKE2B d924b8865924d7d2b55886221c0e8c6ed0b50c30167141531010fb43a8b05eacbd19358ea689458af3e34c348ee19f58bb9eabf6e6193b9d5e909c0daed3ed60 SHA512 ffa37af95f1a6e76829d0ac8badfd0236d93dc2f9988c7f4b88fe271b7b02a4b5553402a1e9a49feed9da4d04a50e2a2cacdb1bd4c04ecbef09d68b85a2e8a6a
DIST ld64-264.3.102.tar.gz 681509 BLAKE2B 4a0699ec761bd145b8034c8577ce9f843c9384fee5486855565d1d89858a445492d66aca2798a6e9c1bb4f59328680c05bcf1cd024d917c063e74d3549073ce0 SHA512 ec221de3624dcce3db694ec2d7b05f3c939cd1ba79c97437ba9f2d4e5d9c37369bb5df82cc37bc158bf5c4e2128cc2b96ca1a7477f98538850092bffa4601da0
DIST ld64-274.1.tar.gz 670493 BLAKE2B 00ab46b09f29c6143c5066ffb0a12017fb2268a5f205c41851a95bc38443aa5494ce81b793a6668bcd3a8abb0ba4215f0da372c413ae52e4ca1e437ad370f8e0 SHA512 ef5d6802f759e09aa2dfab7eb84e9cd2a57b28da3f150833cf1a922c395dd696e501b1bcb10385cbe995f4945fc6c99c2d2d8c50c42f369186bdc1ac3e30ad99
DIST ld64-274.2.tar.gz 671652 BLAKE2B f45bb65bbe65c7baff54dec633a49b8ea472a59a7978aa050b329132963b26e4a2b3ef3dd034b04247531a11a07de5135b3726a429165cbfcae50e06c09531f4 SHA512 7b4e17f199909450b697bf719564c6841d46f5116c48dd47ff483ae7ddfe2965db1b7c024ed8ebeeaf90cd983ed353b95f7f23c93c8971536977dc892e6d6a9d
diff --git a/sys-devel/binutils-apple/binutils-apple-6.3-r1.ebuild b/sys-devel/binutils-apple/binutils-apple-6.3-r2.ebuild
index cdeffebc6f3b..763bdb041109 100644
--- a/sys-devel/binutils-apple/binutils-apple-6.3-r1.ebuild
+++ b/sys-devel/binutils-apple/binutils-apple-6.3-r2.ebuild
@@ -20,7 +20,7 @@ SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz
https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-4.3-r1.tar.bz2
https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-5.1-r2.tar.bz2
https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-6.1-r1.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-6.3-r1.tar.bz2"
+ https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-6.3-r2.tar.bz2"
LICENSE="APSL-2"
KEYWORDS="~ppc-macos ~x64-macos ~x86-macos"
diff --git a/sys-devel/binutils-apple/binutils-apple-7.0-r1.ebuild b/sys-devel/binutils-apple/binutils-apple-7.0-r1.ebuild
index 039399257b2a..1d46085dfbc5 100644
--- a/sys-devel/binutils-apple/binutils-apple-7.0-r1.ebuild
+++ b/sys-devel/binutils-apple/binutils-apple-7.0-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
@@ -20,8 +20,8 @@ SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz
https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-4.3-r1.tar.bz2
https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-5.1-r2.tar.bz2
https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-6.1-r1.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-6.3-r1.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.0-r2.tar.bz2"
+ https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-6.3-r2.tar.bz2
+ https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.0-r3.tar.bz2"
LICENSE="APSL-2"
KEYWORDS="~ppc-macos ~x64-macos ~x86-macos"
diff --git a/sys-devel/binutils-apple/binutils-apple-7.0.ebuild b/sys-devel/binutils-apple/binutils-apple-7.0.ebuild
deleted file mode 100644
index 805b4d51e50a..000000000000
--- a/sys-devel/binutils-apple/binutils-apple-7.0.ebuild
+++ /dev/null
@@ -1,366 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-inherit eutils flag-o-matic toolchain-funcs
-
-LD64=ld64-253.3
-CCTOOLS_VERSION=877.5
-CCTOOLS=cctools-${CCTOOLS_VERSION}
-LIBUNWIND=libunwind-35.3
-DYLD=dyld-360.14
-
-DESCRIPTION="Darwin assembler as(1) and static linker ld(1), Xcode Tools ${PV}"
-HOMEPAGE="http://www.opensource.apple.com/darwinsource/"
-SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz
- http://www.opensource.apple.com/tarballs/cctools/${CCTOOLS}.tar.gz
- http://www.opensource.apple.com/tarballs/dyld/${DYLD}.tar.gz
- http://www.opensource.apple.com/tarballs/libunwind/${LIBUNWIND}.tar.gz
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-4.3-r1.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-5.1-r2.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-6.1-r1.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-6.3-r1.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.0-r1.tar.bz2"
-
-LICENSE="APSL-2"
-KEYWORDS="~ppc-macos ~x64-macos ~x86-macos"
-IUSE="test multitarget"
-
-# ld64 can now only be compiled using llvm and libc++ since it massivley uses
-# C++11 language fatures. *But additionally* the as driver now defaults to
-# calling clang as the assembler on many platforms. This can be disabled using
-# -Wa,-Q but since it's default we make llvm a static runtime dependency.
-
-# Also, llvm lto and disassembler interfaces are now widely used in cctools.
-# Since we cannot compile with gcc any more and every llvm since 3.4 has
-# provided those interfaces, we no longer support disabling them. That
-# indirectly makes xar a static runtime dependency.
-RDEPEND="sys-devel/binutils-config
- app-arch/xar
- sys-devel/llvm:*
- sys-libs/libcxx"
-DEPEND="${RDEPEND}
- test? ( >=dev-lang/perl-5.8.8 )"
-
-SLOT="7"
-
-S=${WORKDIR}
-
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-src_prepare() {
- if use multitarget ; then
- ewarn "You have enabled support for non-standard target architectures"
- ewarn "using USE=multitarget. This includes experimental support for"
- ewarn "ppc and ppc64 which is a community forward-port from the last"
- ewarn "version of ld64 to officially support PPC."
-
- if [[ ${CHOST} == powerpc*-darwin* ]] ; then
- ewarn "HERE BE DRAGONS! Your system seems to be PPC which means that"
- ewarn "the actual usability of your Gentoo programs will depend on the"
- ewarn "above-mentioned experimental PPC support in the linker. Be"
- ewarn "sure to keep a known-to-work version like ${PN}-3.2.6 around!"
- fi
- fi
-
- cd "${S}"/${LD64}/src
- cp "${S}"/ld64-136-compile_stubs.h ld/compile_stubs.h
- cp "${S}"/ld64-253.3-Makefile-2 Makefile
-
- epatch "${S}"/ld64-241.9-extraneous-includes.patch
- epatch "${S}"/ld64-241.9-osatomic.patch
- epatch "${S}"/ld64-236.3-crashreporter.patch
- epatch "${S}"/ld64-253.3-nosnapshots.patch
- epatch "${S}"/ld64-253.3-ppc.patch
- epatch "${S}"/ld64-236.3-constant-types-2.patch
- epatch "${S}"/ld64-241.9-register-names.patch
- epatch "${S}"/ld64-241.9-get-comm-align.patch
- epatch "${S}"/ld64-241.9-cc_md5.patch
- epatch "${S}"/ld64-253.3-make_pair.patch
- epatch "${S}"/ld64-253.3-delete-warning.patch
-
- # provide missing headers from libunwind and dyld
- mkdir -p include/{mach,mach-o/arm} || die
- # never present because it's private
- cp ../../${DYLD}/include/mach-o/dyld_priv.h include/mach-o || die
- # missing on <= 10.5
- cp ../../${LIBUNWIND}/include/libunwind.h include/ || die
- cp ../../${LIBUNWIND}/include/mach-o/compact_unwind_encoding.h include/mach-o || die
- # missing on <= 10.4
- cp ../../${DYLD}/include/mach-o/dyld_images.h include/mach-o || die
- cp ../../${CCTOOLS}/include/mach-o/loader.h include/mach-o || die
- # use copies from cctools because they're otherwise hidden in some SDK
- cp ../../${CCTOOLS}/include/mach-o/arm/reloc.h include/mach-o/arm || die
- # provide all required CPU_TYPEs on all platforms
- cp ../../${CCTOOLS}/include/mach/machine.h include/mach/machine.h
- # add alias for newer identifiers, because ld64 uses both but cctools
- # header only defines the older
- epatch "${S}"/ld64-236.3-missing-cputypes.patch
-
- # mimic OS X Leopard-style Availability.h macros for libunwind.h on
- # older systems
- [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 8 ]] && \
- echo "#define __OSX_AVAILABLE_STARTING(x,y) " > include/Availability.h
-
- local VER_STR="\"@(#)PROGRAM:ld PROJECT:${LD64} (Gentoo ${PN}-${PVR})\\n\""
- echo "char ldVersionString[] = ${VER_STR};" > version.cpp
-
- epatch "${S}"/ld64-123.2-debug-backtrace.patch
- if [[ ${CHOST} == powerpc*-darwin* ]] ; then
- epatch "${S}"/ld64-123.2-darwin8-no-mlong-branch-warning.patch
- epatch "${S}"/ld64-127.2-thread_state.patch
- fi
-
- cd "${S}"/${CCTOOLS}
- epatch "${S}"/${PN}-4.5-as.patch
- epatch "${S}"/${PN}-5.1-as-dir.patch
- epatch "${S}"/${PN}-5.1-ranlib.patch
- epatch "${S}"/${PN}-3.1.1-libtool-ranlib.patch
- epatch "${S}"/${PN}-3.1.1-no-headers.patch
- epatch "${S}"/${PN}-4.0-no-oss-dir.patch
- epatch "${S}"/cctools-839-intel-retf.patch
- epatch "${S}"/${PN}-5.1-extraneous-includes.patch
- #epatch "${S}"/${PN}-5.1-otool-stdc.patch
- epatch "${S}"/${PN}-5.1-constant-types.patch
- epatch "${S}"/${PN}-5.1-strnlen.patch
- epatch "${S}"/${PN}-5.1-ppc.patch
- epatch "${S}"/${PN}-5.1-thread-state-redefined.patch
- epatch "${S}"/${PN}-5.1-makefile-target-warning.patch
- epatch "${S}"/${PN}-7.0-lto-prefix.patch
- epatch "${S}"/${PN}-7.0-clang-as.patch
- cp ../${LD64}/src/other/prune_trie.h include/mach-o/ || die
-
- # do not build profileable libstuff to save compile time
- sed -i -e "/^all:/s, profile , ," libstuff/Makefile
-
- # cctools version is provided to make via RC_ProjectSourceVersion which
- # generates and compiles it as apple_version[] into libstuff. From
- # there it's picked up by the individual tools. Since
- # RC_ProjectSourceVersion is also used as library version, we can't
- # just append our local version info. So we hack the libstuff Makefile
- # to include our Gentoo version.
- sed -i -e "/cctools-.*(RC_ProjectSourceVersion).*OFILE_DIR/s,Version),Version) (Gentoo ${PN}-${PVR})," \
- libstuff/Makefile
-
- # 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;
-
- einfo "Deleted $c tests that were bound to fail"
-
- cd "${S}"
- ebegin "cleaning Makefiles from unwanted CFLAGS"
- find . -name "Makefile" -print0 | xargs -0 sed \
- -i \
- -e 's/ -g / /g' \
- -e 's/^G =.*$/G =/' \
- -e 's/^OFLAG =.*$/OFLAG =/' \
- -e 's/install -c -s/install/g'
- eend $?
-}
-
-src_configure() {
- export CTARGET=${CTARGET:-${CHOST}}
- if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
- 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
-
- # CPPFLAGS only affects ld64, cctools don't use 'em (which currently is
- # what we want)
- append-cppflags -DNDEBUG
-
- # Block API and thus snapshots supported on >= 10.6
- [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -ge 10 ]] && \
- append-cppflags -DSUPPORT_SNAPSHOTS
-
- CCTOOLS_OFLAG=
- if [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 8 ]] ; then
- # cctools expect to use UNIX03 struct member names.
- # This is default on > 10.4. Activate it on <= 10.4 by defining
- # __DARWIN_UNIX03 explicitly.
- CCTOOLS_OFLAG="-D__DARWIN_UNIX03=1"
- fi
-
- # if compiling with USE multitarget, extract all the known arches from
- # create_configure and pass them back to it
- creco=${LD64}/src/create_configure
- ARCHS_TO_SUPPORT=""
- if use multitarget ; then
- ARCHS_TO_SUPPORT="$(grep KNOWN_ARCHS= $creco | \
- cut -d\" -f2 | tr ',' ' ')"
- fi
-
- # Create configure.h for ld64 with SUPPORT_ARCH_<arch> defines in it.
- DERIVED_FILE_DIR=${LD64}/src \
- RC_SUPPORTED_ARCHS="$ARCHS_TO_SUPPORT" \
- $creco
-
- # do not depend on MachOFileAbstraction.hpp to define
- # SUPPORT_ARCH_arm_any because that's not included by every file where
- # our ppc/arm-optional patch uses it, ld.hpp in particular
- grep "SUPPORT_ARCH_armv[0-9]" ${LD64}/src/configure.h >/dev/null && \
- echo "#define SUPPORT_ARCH_arm_any 1" >> ${LD64}/src/configure.h
-}
-
-compile_ld64() {
- einfo "building ${LD64}"
- cd "${S}"/${LD64}/src
- emake || die "emake failed for ld64"
- use test && emake build_test
-}
-
-compile_cctools() {
- einfo "building ${CCTOOLS}"
- cd "${S}"/${CCTOOLS}
- # -j1 because it fails too often with weird errors
- # Suppress running dsymutil because it will warn about missing debug
- # info which is expected when compiling without -g as we normally do.
- # This might need some more thought if anyone ever wanted to build us
- # for debugging with Apple's tools.
- emake \
- LIB_PRUNETRIE="-L../../${LD64}/src -lprunetrie" \
- EFITOOLS= \
- COMMON_SUBDIRS='libstuff ar misc otool' \
- SUBDIRS_32= \
- LEGACY= \
- RC_ProjectSourceVersion=${CCTOOLS_VERSION} \
- RC_CFLAGS="${CFLAGS}" \
- OFLAG="${CCTOOLS_OFLAG}" \
- DSYMUTIL=": disabled: dsymutil" \
- -j1 \
- || die "emake failed for the cctools"
- cd "${S}"/${CCTOOLS}/as
- emake \
- BUILD_OBSOLETE_ARCH= \
- RC_ProjectSourceVersion=${CCTOOLS_VERSION} \
- RC_CFLAGS="-DASLIBEXECDIR=\"\\\"${EPREFIX}${LIBPATH}/\\\"\" -DCLANGDIR=\"\\\"${EPREFIX}/usr/bin/\\\"\" ${CFLAGS}" \
- OFLAG="${CCTOOLS_OFLAG}" \
- DSYMUTIL=": disabled: dsymutil" \
- || die "emake failed for as"
-}
-
-src_compile() {
- compile_ld64
- compile_cctools
-}
-
-install_ld64() {
- exeinto ${BINPATH}
- doexe "${S}"/${LD64}/src/{ld64,rebase,dyldinfo,unwinddump,ObjectDump}
- dosym ld64 ${BINPATH}/ld
- insinto ${DATAPATH}/man/man1
- doins "${S}"/${LD64}/doc/man/man1/{ld,ld64,rebase}.1
-}
-
-install_cctools() {
- cd "${S}"/${CCTOOLS}
- emake install_all_but_headers \
- EFITOOLS= \
- COMMON_SUBDIRS='ar misc otool' \
- SUBDIRS_32= \
- 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} \
- LOCLIBDIR=\"${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() {
- if ! [ "${EPREFIX}"/usr/bin/clang ] ; then
- einfo "Test suite only works properly with clang - please install"
- return
- fi
-
- einfo "Running unit tests"
- cd "${S}"/${LD64}/unit-tests/test-cases
- # provide the new ld as a symlink to clang so that -ccc-install-dir
- # will pick it up
- ln -sfn ../../src/ld64 ld
- # use our arch command because the System's will report i386 even for an
- # x86_64 prefix
- perl ../bin/make-recursive.pl \
- BUILT_PRODUCTS_DIR="${S}"/${LD64}/src \
- ARCH="$(arch)" \
- LD="${S}"/${LD64}/src/ld64 \
- CC="${CC} -ccc-install-dir $PWD" \
- CXX="${CXX} -ccc-install-dir $PWD" \
- OTOOL="${S}"/${CCTOOLS}/otool/otool.NEW \
- | 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/binutils-apple-7.1-r1.ebuild b/sys-devel/binutils-apple/binutils-apple-7.1-r1.ebuild
index 6ee67d9bd04f..9bf30b1f105c 100644
--- a/sys-devel/binutils-apple/binutils-apple-7.1-r1.ebuild
+++ b/sys-devel/binutils-apple/binutils-apple-7.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
@@ -20,8 +20,8 @@ SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz
https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-4.3-r1.tar.bz2
https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-5.1-r2.tar.bz2
https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-6.1-r1.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-6.3-r1.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.0-r2.tar.bz2"
+ https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-6.3-r2.tar.bz2
+ https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.0-r3.tar.bz2"
LICENSE="APSL-2"
KEYWORDS="~ppc-macos ~x64-macos ~x86-macos"
diff --git a/sys-devel/binutils-apple/binutils-apple-7.1.ebuild b/sys-devel/binutils-apple/binutils-apple-7.1.ebuild
deleted file mode 100644
index ed6be55fb9a3..000000000000
--- a/sys-devel/binutils-apple/binutils-apple-7.1.ebuild
+++ /dev/null
@@ -1,366 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-inherit eutils flag-o-matic toolchain-funcs
-
-LD64=ld64-253.6
-CCTOOLS_VERSION=877.7
-CCTOOLS=cctools-${CCTOOLS_VERSION}
-LIBUNWIND=libunwind-35.3
-DYLD=dyld-360.17
-
-DESCRIPTION="Darwin assembler as(1) and static linker ld(1), Xcode Tools ${PV}"
-HOMEPAGE="http://www.opensource.apple.com/darwinsource/"
-SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz
- http://www.opensource.apple.com/tarballs/cctools/${CCTOOLS}.tar.gz
- http://www.opensource.apple.com/tarballs/dyld/${DYLD}.tar.gz
- http://www.opensource.apple.com/tarballs/libunwind/${LIBUNWIND}.tar.gz
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-4.3-r1.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-5.1-r2.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-6.1-r1.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-6.3-r1.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.0-r1.tar.bz2"
-
-LICENSE="APSL-2"
-KEYWORDS="~ppc-macos ~x64-macos ~x86-macos"
-IUSE="test multitarget"
-
-# ld64 can now only be compiled using llvm and libc++ since it massivley uses
-# C++11 language fatures. *But additionally* the as driver now defaults to
-# calling clang as the assembler on many platforms. This can be disabled using
-# -Wa,-Q but since it's default we make llvm a static runtime dependency.
-
-# Also, llvm lto and disassembler interfaces are now widely used in cctools.
-# Since we cannot compile with gcc any more and every llvm since 3.4 has
-# provided those interfaces, we no longer support disabling them. That
-# indirectly makes xar a static runtime dependency.
-RDEPEND="sys-devel/binutils-config
- app-arch/xar
- sys-devel/llvm:*
- sys-libs/libcxx"
-DEPEND="${RDEPEND}
- test? ( >=dev-lang/perl-5.8.8 )"
-
-SLOT="7"
-
-S=${WORKDIR}
-
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-src_prepare() {
- if use multitarget ; then
- ewarn "You have enabled support for non-standard target architectures"
- ewarn "using USE=multitarget. This includes experimental support for"
- ewarn "ppc and ppc64 which is a community forward-port from the last"
- ewarn "version of ld64 to officially support PPC."
-
- if [[ ${CHOST} == powerpc*-darwin* ]] ; then
- ewarn "HERE BE DRAGONS! Your system seems to be PPC which means that"
- ewarn "the actual usability of your Gentoo programs will depend on the"
- ewarn "above-mentioned experimental PPC support in the linker. Be"
- ewarn "sure to keep a known-to-work version like ${PN}-3.2.6 around!"
- fi
- fi
-
- cd "${S}"/${LD64}/src
- cp "${S}"/ld64-136-compile_stubs.h ld/compile_stubs.h
- cp "${S}"/ld64-253.3-Makefile-2 Makefile
-
- epatch "${S}"/ld64-241.9-extraneous-includes.patch
- epatch "${S}"/ld64-241.9-osatomic.patch
- epatch "${S}"/ld64-236.3-crashreporter.patch
- epatch "${S}"/ld64-253.3-nosnapshots.patch
- epatch "${S}"/ld64-253.3-ppc.patch
- epatch "${S}"/ld64-236.3-constant-types-2.patch
- epatch "${S}"/ld64-241.9-register-names.patch
- epatch "${S}"/ld64-241.9-get-comm-align.patch
- epatch "${S}"/ld64-241.9-cc_md5.patch
- epatch "${S}"/ld64-253.3-make_pair.patch
- epatch "${S}"/ld64-253.3-delete-warning.patch
-
- # provide missing headers from libunwind and dyld
- mkdir -p include/{mach,mach-o/arm} || die
- # never present because it's private
- cp ../../${DYLD}/include/mach-o/dyld_priv.h include/mach-o || die
- # missing on <= 10.5
- cp ../../${LIBUNWIND}/include/libunwind.h include/ || die
- cp ../../${LIBUNWIND}/include/mach-o/compact_unwind_encoding.h include/mach-o || die
- # missing on <= 10.4
- cp ../../${DYLD}/include/mach-o/dyld_images.h include/mach-o || die
- cp ../../${CCTOOLS}/include/mach-o/loader.h include/mach-o || die
- # use copies from cctools because they're otherwise hidden in some SDK
- cp ../../${CCTOOLS}/include/mach-o/arm/reloc.h include/mach-o/arm || die
- # provide all required CPU_TYPEs on all platforms
- cp ../../${CCTOOLS}/include/mach/machine.h include/mach/machine.h
- # add alias for newer identifiers, because ld64 uses both but cctools
- # header only defines the older
- epatch "${S}"/ld64-236.3-missing-cputypes.patch
-
- # mimic OS X Leopard-style Availability.h macros for libunwind.h on
- # older systems
- [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 8 ]] && \
- echo "#define __OSX_AVAILABLE_STARTING(x,y) " > include/Availability.h
-
- local VER_STR="\"@(#)PROGRAM:ld PROJECT:${LD64} (Gentoo ${PN}-${PVR})\\n\""
- echo "char ldVersionString[] = ${VER_STR};" > version.cpp
-
- epatch "${S}"/ld64-123.2-debug-backtrace.patch
- if [[ ${CHOST} == powerpc*-darwin* ]] ; then
- epatch "${S}"/ld64-123.2-darwin8-no-mlong-branch-warning.patch
- epatch "${S}"/ld64-127.2-thread_state.patch
- fi
-
- cd "${S}"/${CCTOOLS}
- epatch "${S}"/${PN}-4.5-as.patch
- epatch "${S}"/${PN}-5.1-as-dir.patch
- epatch "${S}"/${PN}-5.1-ranlib.patch
- epatch "${S}"/${PN}-3.1.1-libtool-ranlib.patch
- epatch "${S}"/${PN}-3.1.1-no-headers.patch
- epatch "${S}"/${PN}-4.0-no-oss-dir.patch
- epatch "${S}"/cctools-839-intel-retf.patch
- epatch "${S}"/${PN}-5.1-extraneous-includes.patch
- #epatch "${S}"/${PN}-5.1-otool-stdc.patch
- epatch "${S}"/${PN}-5.1-constant-types.patch
- epatch "${S}"/${PN}-5.1-strnlen.patch
- epatch "${S}"/${PN}-5.1-ppc.patch
- epatch "${S}"/${PN}-5.1-thread-state-redefined.patch
- epatch "${S}"/${PN}-5.1-makefile-target-warning.patch
- epatch "${S}"/${PN}-7.0-lto-prefix.patch
- epatch "${S}"/${PN}-7.0-clang-as.patch
- cp ../${LD64}/src/other/prune_trie.h include/mach-o/ || die
-
- # do not build profileable libstuff to save compile time
- sed -i -e "/^all:/s, profile , ," libstuff/Makefile
-
- # cctools version is provided to make via RC_ProjectSourceVersion which
- # generates and compiles it as apple_version[] into libstuff. From
- # there it's picked up by the individual tools. Since
- # RC_ProjectSourceVersion is also used as library version, we can't
- # just append our local version info. So we hack the libstuff Makefile
- # to include our Gentoo version.
- sed -i -e "/cctools-.*(RC_ProjectSourceVersion).*OFILE_DIR/s,Version),Version) (Gentoo ${PN}-${PVR})," \
- libstuff/Makefile
-
- # 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;
-
- einfo "Deleted $c tests that were bound to fail"
-
- cd "${S}"
- ebegin "cleaning Makefiles from unwanted CFLAGS"
- find . -name "Makefile" -print0 | xargs -0 sed \
- -i \
- -e 's/ -g / /g' \
- -e 's/^G =.*$/G =/' \
- -e 's/^OFLAG =.*$/OFLAG =/' \
- -e 's/install -c -s/install/g'
- eend $?
-}
-
-src_configure() {
- # CPPFLAGS only affects ld64, cctools don't use 'em (which currently is
- # what we want)
- append-cppflags -DNDEBUG
-
- export CTARGET=${CTARGET:-${CHOST}}
- if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
- 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
-
- # Block API and thus snapshots supported on >= 10.6
- [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -ge 10 ]] && \
- append-cppflags -DSUPPORT_SNAPSHOTS
-
- CCTOOLS_OFLAG=
- if [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 8 ]] ; then
- # cctools expect to use UNIX03 struct member names.
- # This is default on > 10.4. Activate it on <= 10.4 by defining
- # __DARWIN_UNIX03 explicitly.
- CCTOOLS_OFLAG="-D__DARWIN_UNIX03=1"
- fi
-
- # if compiling with USE multitarget, extract all the known arches from
- # create_configure and pass them back to it
- creco=${LD64}/src/create_configure
- ARCHS_TO_SUPPORT=""
- if use multitarget ; then
- ARCHS_TO_SUPPORT="$(grep KNOWN_ARCHS= $creco | \
- cut -d\" -f2 | tr ',' ' ')"
- fi
-
- # Create configure.h for ld64 with SUPPORT_ARCH_<arch> defines in it.
- DERIVED_FILE_DIR=${LD64}/src \
- RC_SUPPORTED_ARCHS="$ARCHS_TO_SUPPORT" \
- $creco
-
- # do not depend on MachOFileAbstraction.hpp to define
- # SUPPORT_ARCH_arm_any because that's not included by every file where
- # our ppc/arm-optional patch uses it, ld.hpp in particular
- grep "SUPPORT_ARCH_armv[0-9]" ${LD64}/src/configure.h >/dev/null && \
- echo "#define SUPPORT_ARCH_arm_any 1" >> ${LD64}/src/configure.h
-}
-
-compile_ld64() {
- einfo "building ${LD64}"
- cd "${S}"/${LD64}/src
- emake || die "emake failed for ld64"
- use test && emake build_test
-}
-
-compile_cctools() {
- einfo "building ${CCTOOLS}"
- cd "${S}"/${CCTOOLS}
- # -j1 because it fails too often with weird errors
- # Suppress running dsymutil because it will warn about missing debug
- # info which is expected when compiling without -g as we normally do.
- # This might need some more thought if anyone ever wanted to build us
- # for debugging with Apple's tools.
- emake \
- LIB_PRUNETRIE="-L../../${LD64}/src -lprunetrie" \
- EFITOOLS= \
- COMMON_SUBDIRS='libstuff ar misc otool' \
- SUBDIRS_32= \
- LEGACY= \
- RC_ProjectSourceVersion=${CCTOOLS_VERSION} \
- RC_CFLAGS="${CFLAGS}" \
- OFLAG="${CCTOOLS_OFLAG}" \
- DSYMUTIL=": disabled: dsymutil" \
- -j1 \
- || die "emake failed for the cctools"
- cd "${S}"/${CCTOOLS}/as
- emake \
- BUILD_OBSOLETE_ARCH= \
- RC_ProjectSourceVersion=${CCTOOLS_VERSION} \
- RC_CFLAGS="-DASLIBEXECDIR=\"\\\"${EPREFIX}${LIBPATH}/\\\"\" -DCLANGDIR=\"\\\"${EPREFIX}/usr/bin/\\\"\" ${CFLAGS}" \
- OFLAG="${CCTOOLS_OFLAG}" \
- DSYMUTIL=": disabled: dsymutil" \
- || die "emake failed for as"
-}
-
-src_compile() {
- compile_ld64
- compile_cctools
-}
-
-install_ld64() {
- exeinto ${BINPATH}
- doexe "${S}"/${LD64}/src/{ld64,rebase,dyldinfo,unwinddump,ObjectDump}
- dosym ld64 ${BINPATH}/ld
- insinto ${DATAPATH}/man/man1
- doins "${S}"/${LD64}/doc/man/man1/{ld,ld64,rebase}.1
-}
-
-install_cctools() {
- cd "${S}"/${CCTOOLS}
- emake install_all_but_headers \
- EFITOOLS= \
- COMMON_SUBDIRS='ar misc otool' \
- SUBDIRS_32= \
- 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} \
- LOCLIBDIR=\"${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() {
- if ! [ "${EPREFIX}"/usr/bin/clang ] ; then
- einfo "Test suite only works properly with clang - please install"
- return
- fi
-
- einfo "Running unit tests"
- cd "${S}"/${LD64}/unit-tests/test-cases
- # provide the new ld as a symlink to clang so that -ccc-install-dir
- # will pick it up
- ln -sfn ../../src/ld64 ld
- # use our arch command because the System's will report i386 even for an
- # x86_64 prefix
- perl ../bin/make-recursive.pl \
- BUILT_PRODUCTS_DIR="${S}"/${LD64}/src \
- ARCH="$(arch)" \
- LD="${S}"/${LD64}/src/ld64 \
- CC="${CC} -ccc-install-dir $PWD" \
- CXX="${CXX} -ccc-install-dir $PWD" \
- OTOOL="${S}"/${CCTOOLS}/otool/otool.NEW \
- | 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/binutils-apple-7.2-r1.ebuild b/sys-devel/binutils-apple/binutils-apple-7.2-r1.ebuild
index 8cae70ffc663..7bf3b8b52ade 100644
--- a/sys-devel/binutils-apple/binutils-apple-7.2-r1.ebuild
+++ b/sys-devel/binutils-apple/binutils-apple-7.2-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
@@ -20,9 +20,9 @@ SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz
https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-4.3-r1.tar.bz2
https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-5.1-r2.tar.bz2
https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-6.1-r1.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-6.3-r1.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.0-r2.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.2-r0.tar.bz2"
+ https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-6.3-r2.tar.bz2
+ https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.0-r3.tar.bz2
+ https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.2-r1.tar.bz2"
LICENSE="APSL-2"
KEYWORDS="~ppc-macos ~x64-macos ~x86-macos"
diff --git a/sys-devel/binutils-apple/binutils-apple-7.2.ebuild b/sys-devel/binutils-apple/binutils-apple-7.2.ebuild
deleted file mode 100644
index 4f76f80df25a..000000000000
--- a/sys-devel/binutils-apple/binutils-apple-7.2.ebuild
+++ /dev/null
@@ -1,366 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-inherit eutils flag-o-matic toolchain-funcs
-
-LD64=ld64-253.9
-CCTOOLS_VERSION=877.8
-CCTOOLS=cctools-${CCTOOLS_VERSION}
-LIBUNWIND=libunwind-35.3
-DYLD=dyld-360.18
-
-DESCRIPTION="Darwin assembler as(1) and static linker ld(1), Xcode Tools ${PV}"
-HOMEPAGE="http://www.opensource.apple.com/darwinsource/"
-SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz
- http://www.opensource.apple.com/tarballs/cctools/${CCTOOLS}.tar.gz
- http://www.opensource.apple.com/tarballs/dyld/${DYLD}.tar.gz
- http://www.opensource.apple.com/tarballs/libunwind/${LIBUNWIND}.tar.gz
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-4.3-r1.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-5.1-r2.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-6.1-r1.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-6.3-r1.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.0-r1.tar.bz2"
-
-LICENSE="APSL-2"
-KEYWORDS="~ppc-macos ~x64-macos ~x86-macos"
-IUSE="test multitarget"
-
-# ld64 can now only be compiled using llvm and libc++ since it massivley uses
-# C++11 language fatures. *But additionally* the as driver now defaults to
-# calling clang as the assembler on many platforms. This can be disabled using
-# -Wa,-Q but since it's default we make llvm a static runtime dependency.
-
-# Also, llvm lto and disassembler interfaces are now widely used in cctools.
-# Since we cannot compile with gcc any more and every llvm since 3.4 has
-# provided those interfaces, we no longer support disabling them. That
-# indirectly makes xar a static runtime dependency.
-RDEPEND="sys-devel/binutils-config
- app-arch/xar
- sys-devel/llvm:*
- sys-libs/libcxx"
-DEPEND="${RDEPEND}
- test? ( >=dev-lang/perl-5.8.8 )"
-
-SLOT="7"
-
-S=${WORKDIR}
-
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-src_prepare() {
- if use multitarget ; then
- ewarn "You have enabled support for non-standard target architectures"
- ewarn "using USE=multitarget. This includes experimental support for"
- ewarn "ppc and ppc64 which is a community forward-port from the last"
- ewarn "version of ld64 to officially support PPC."
-
- if [[ ${CHOST} == powerpc*-darwin* ]] ; then
- ewarn "HERE BE DRAGONS! Your system seems to be PPC which means that"
- ewarn "the actual usability of your Gentoo programs will depend on the"
- ewarn "above-mentioned experimental PPC support in the linker. Be"
- ewarn "sure to keep a known-to-work version like ${PN}-3.2.6 around!"
- fi
- fi
-
- cd "${S}"/${LD64}/src
- cp "${S}"/ld64-136-compile_stubs.h ld/compile_stubs.h
- cp "${S}"/ld64-253.3-Makefile-2 Makefile
-
- epatch "${S}"/ld64-241.9-extraneous-includes.patch
- epatch "${S}"/ld64-241.9-osatomic.patch
- epatch "${S}"/ld64-236.3-crashreporter.patch
- epatch "${S}"/ld64-253.3-nosnapshots.patch
- epatch "${S}"/ld64-253.3-ppc.patch
- epatch "${S}"/ld64-236.3-constant-types-2.patch
- epatch "${S}"/ld64-241.9-register-names.patch
- epatch "${S}"/ld64-241.9-get-comm-align.patch
- epatch "${S}"/ld64-241.9-cc_md5.patch
- epatch "${S}"/ld64-253.3-make_pair.patch
- epatch "${S}"/ld64-253.3-delete-warning.patch
-
- # provide missing headers from libunwind and dyld
- mkdir -p include/{mach,mach-o/arm} || die
- # never present because it's private
- cp ../../${DYLD}/include/mach-o/dyld_priv.h include/mach-o || die
- # missing on <= 10.5
- cp ../../${LIBUNWIND}/include/libunwind.h include/ || die
- cp ../../${LIBUNWIND}/include/mach-o/compact_unwind_encoding.h include/mach-o || die
- # missing on <= 10.4
- cp ../../${DYLD}/include/mach-o/dyld_images.h include/mach-o || die
- cp ../../${CCTOOLS}/include/mach-o/loader.h include/mach-o || die
- # use copies from cctools because they're otherwise hidden in some SDK
- cp ../../${CCTOOLS}/include/mach-o/arm/reloc.h include/mach-o/arm || die
- # provide all required CPU_TYPEs on all platforms
- cp ../../${CCTOOLS}/include/mach/machine.h include/mach/machine.h
- # add alias for newer identifiers, because ld64 uses both but cctools
- # header only defines the older
- epatch "${S}"/ld64-236.3-missing-cputypes.patch
-
- # mimic OS X Leopard-style Availability.h macros for libunwind.h on
- # older systems
- [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 8 ]] && \
- echo "#define __OSX_AVAILABLE_STARTING(x,y) " > include/Availability.h
-
- local VER_STR="\"@(#)PROGRAM:ld PROJECT:${LD64} (Gentoo ${PN}-${PVR})\\n\""
- echo "char ldVersionString[] = ${VER_STR};" > version.cpp
-
- epatch "${S}"/ld64-123.2-debug-backtrace.patch
- if [[ ${CHOST} == powerpc*-darwin* ]] ; then
- epatch "${S}"/ld64-123.2-darwin8-no-mlong-branch-warning.patch
- epatch "${S}"/ld64-127.2-thread_state.patch
- fi
-
- cd "${S}"/${CCTOOLS}
- epatch "${S}"/${PN}-4.5-as.patch
- epatch "${S}"/${PN}-5.1-as-dir.patch
- epatch "${S}"/${PN}-5.1-ranlib.patch
- epatch "${S}"/${PN}-3.1.1-libtool-ranlib.patch
- epatch "${S}"/${PN}-3.1.1-no-headers.patch
- epatch "${S}"/${PN}-4.0-no-oss-dir.patch
- epatch "${S}"/cctools-839-intel-retf.patch
- epatch "${S}"/${PN}-5.1-extraneous-includes.patch
- #epatch "${S}"/${PN}-5.1-otool-stdc.patch
- epatch "${S}"/${PN}-5.1-constant-types.patch
- epatch "${S}"/${PN}-5.1-strnlen.patch
- epatch "${S}"/${PN}-5.1-ppc.patch
- epatch "${S}"/${PN}-5.1-thread-state-redefined.patch
- epatch "${S}"/${PN}-5.1-makefile-target-warning.patch
- epatch "${S}"/${PN}-7.0-lto-prefix.patch
- epatch "${S}"/${PN}-7.0-clang-as.patch
- cp ../${LD64}/src/other/prune_trie.h include/mach-o/ || die
-
- # do not build profileable libstuff to save compile time
- sed -i -e "/^all:/s, profile , ," libstuff/Makefile
-
- # cctools version is provided to make via RC_ProjectSourceVersion which
- # generates and compiles it as apple_version[] into libstuff. From
- # there it's picked up by the individual tools. Since
- # RC_ProjectSourceVersion is also used as library version, we can't
- # just append our local version info. So we hack the libstuff Makefile
- # to include our Gentoo version.
- sed -i -e "/cctools-.*(RC_ProjectSourceVersion).*OFILE_DIR/s,Version),Version) (Gentoo ${PN}-${PVR})," \
- libstuff/Makefile
-
- # 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;
-
- einfo "Deleted $c tests that were bound to fail"
-
- cd "${S}"
- ebegin "cleaning Makefiles from unwanted CFLAGS"
- find . -name "Makefile" -print0 | xargs -0 sed \
- -i \
- -e 's/ -g / /g' \
- -e 's/^G =.*$/G =/' \
- -e 's/^OFLAG =.*$/OFLAG =/' \
- -e 's/install -c -s/install/g'
- eend $?
-}
-
-src_configure() {
- # CPPFLAGS only affects ld64, cctools don't use 'em (which currently is
- # what we want)
- append-cppflags -DNDEBUG
-
- export CTARGET=${CTARGET:-${CHOST}}
- if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
- 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
-
- # Block API and thus snapshots supported on >= 10.6
- [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -ge 10 ]] && \
- append-cppflags -DSUPPORT_SNAPSHOTS
-
- CCTOOLS_OFLAG=
- if [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 8 ]] ; then
- # cctools expect to use UNIX03 struct member names.
- # This is default on > 10.4. Activate it on <= 10.4 by defining
- # __DARWIN_UNIX03 explicitly.
- CCTOOLS_OFLAG="-D__DARWIN_UNIX03=1"
- fi
-
- # if compiling with USE multitarget, extract all the known arches from
- # create_configure and pass them back to it
- creco=${LD64}/src/create_configure
- ARCHS_TO_SUPPORT=""
- if use multitarget ; then
- ARCHS_TO_SUPPORT="$(grep KNOWN_ARCHS= $creco | \
- cut -d\" -f2 | tr ',' ' ')"
- fi
-
- # Create configure.h for ld64 with SUPPORT_ARCH_<arch> defines in it.
- DERIVED_FILE_DIR=${LD64}/src \
- RC_SUPPORTED_ARCHS="$ARCHS_TO_SUPPORT" \
- $creco
-
- # do not depend on MachOFileAbstraction.hpp to define
- # SUPPORT_ARCH_arm_any because that's not included by every file where
- # our ppc/arm-optional patch uses it, ld.hpp in particular
- grep "SUPPORT_ARCH_armv[0-9]" ${LD64}/src/configure.h >/dev/null && \
- echo "#define SUPPORT_ARCH_arm_any 1" >> ${LD64}/src/configure.h
-}
-
-compile_ld64() {
- einfo "building ${LD64}"
- cd "${S}"/${LD64}/src
- emake || die "emake failed for ld64"
- use test && emake build_test
-}
-
-compile_cctools() {
- einfo "building ${CCTOOLS}"
- cd "${S}"/${CCTOOLS}
- # -j1 because it fails too often with weird errors
- # Suppress running dsymutil because it will warn about missing debug
- # info which is expected when compiling without -g as we normally do.
- # This might need some more thought if anyone ever wanted to build us
- # for debugging with Apple's tools.
- emake \
- LIB_PRUNETRIE="-L../../${LD64}/src -lprunetrie" \
- EFITOOLS= \
- COMMON_SUBDIRS='libstuff ar misc otool' \
- SUBDIRS_32= \
- LEGACY= \
- RC_ProjectSourceVersion=${CCTOOLS_VERSION} \
- RC_CFLAGS="${CFLAGS}" \
- OFLAG="${CCTOOLS_OFLAG}" \
- DSYMUTIL=": disabled: dsymutil" \
- -j1 \
- || die "emake failed for the cctools"
- cd "${S}"/${CCTOOLS}/as
- emake \
- BUILD_OBSOLETE_ARCH= \
- RC_ProjectSourceVersion=${CCTOOLS_VERSION} \
- RC_CFLAGS="-DASLIBEXECDIR=\"\\\"${EPREFIX}${LIBPATH}/\\\"\" -DCLANGDIR=\"\\\"${EPREFIX}/usr/bin/\\\"\" ${CFLAGS}" \
- OFLAG="${CCTOOLS_OFLAG}" \
- DSYMUTIL=": disabled: dsymutil" \
- || die "emake failed for as"
-}
-
-src_compile() {
- compile_ld64
- compile_cctools
-}
-
-install_ld64() {
- exeinto ${BINPATH}
- doexe "${S}"/${LD64}/src/{ld64,rebase,dyldinfo,unwinddump,ObjectDump}
- dosym ld64 ${BINPATH}/ld
- insinto ${DATAPATH}/man/man1
- doins "${S}"/${LD64}/doc/man/man1/{ld,ld64,rebase}.1
-}
-
-install_cctools() {
- cd "${S}"/${CCTOOLS}
- emake install_all_but_headers \
- EFITOOLS= \
- COMMON_SUBDIRS='ar misc otool' \
- SUBDIRS_32= \
- 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} \
- LOCLIBDIR=\"${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() {
- if ! [ "${EPREFIX}"/usr/bin/clang ] ; then
- einfo "Test suite only works properly with clang - please install"
- return
- fi
-
- einfo "Running unit tests"
- cd "${S}"/${LD64}/unit-tests/test-cases
- # provide the new ld as a symlink to clang so that -ccc-install-dir
- # will pick it up
- ln -sfn ../../src/ld64 ld
- # use our arch command because the System's will report i386 even for an
- # x86_64 prefix
- perl ../bin/make-recursive.pl \
- BUILT_PRODUCTS_DIR="${S}"/${LD64}/src \
- ARCH="$(arch)" \
- LD="${S}"/${LD64}/src/ld64 \
- CC="${CC} -ccc-install-dir $PWD" \
- CXX="${CXX} -ccc-install-dir $PWD" \
- OTOOL="${S}"/${CCTOOLS}/otool/otool.NEW \
- | 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/binutils-apple-7.3.1.ebuild b/sys-devel/binutils-apple/binutils-apple-7.3.1.ebuild
index 1fc16db7730a..78efc1276def 100644
--- a/sys-devel/binutils-apple/binutils-apple-7.3.1.ebuild
+++ b/sys-devel/binutils-apple/binutils-apple-7.3.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
@@ -20,10 +20,10 @@ SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz
https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-4.3-r1.tar.bz2
https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-5.1-r2.tar.bz2
https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-6.1-r1.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-6.3-r1.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.0-r2.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.2-r0.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.3-r1.tar.bz2"
+ https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-6.3-r2.tar.bz2
+ https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.0-r3.tar.bz2
+ https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.2-r1.tar.bz2
+ https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.3-r2.tar.bz2"
LICENSE="APSL-2"
KEYWORDS="~ppc-macos ~x64-macos ~x86-macos"
@@ -70,7 +70,7 @@ src_prepare() {
epatch "${S}"/ld64-241.9-osatomic.patch
epatch "${S}"/ld64-236.3-crashreporter.patch
epatch "${S}"/ld64-264.3.101-nosnapshots.patch
- epatch "${S}"/ld64-264.3.101-ppc.patch
+ epatch "${S}"/ld64-264.3.102-ppc.patch
epatch "${S}"/ld64-264.3.101-constant-types.patch
epatch "${S}"/ld64-241.9-register-names.patch
epatch "${S}"/ld64-241.9-get-comm-align.patch
diff --git a/sys-devel/binutils-apple/binutils-apple-7.3.ebuild b/sys-devel/binutils-apple/binutils-apple-7.3.ebuild
deleted file mode 100644
index 853dba37052f..000000000000
--- a/sys-devel/binutils-apple/binutils-apple-7.3.ebuild
+++ /dev/null
@@ -1,386 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-inherit eutils flag-o-matic toolchain-funcs
-
-LD64=ld64-264.3.101
-CCTOOLS_VERSION=886
-CCTOOLS=cctools-${CCTOOLS_VERSION}
-LIBUNWIND=libunwind-35.3
-DYLD=dyld-360.18
-
-DESCRIPTION="Darwin assembler as(1) and static linker ld(1), Xcode Tools ${PV}"
-HOMEPAGE="http://www.opensource.apple.com/darwinsource/"
-SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz
- http://www.opensource.apple.com/tarballs/cctools/${CCTOOLS}.tar.gz
- http://www.opensource.apple.com/tarballs/dyld/${DYLD}.tar.gz
- http://www.opensource.apple.com/tarballs/libunwind/${LIBUNWIND}.tar.gz
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-4.3-r1.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-5.1-r2.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-6.1-r1.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-6.3-r1.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.0-r2.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.2-r0.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.3-r0.tar.bz2"
-
-LICENSE="APSL-2"
-KEYWORDS="~ppc-macos ~x64-macos ~x86-macos"
-IUSE="lto test multitarget"
-
-# ld64 can now only be compiled using llvm and libc++ since it massivley uses
-# C++11 language fatures. *But additionally* the as driver now defaults to
-# calling clang as the assembler on many platforms. This can be disabled using
-# -Wa,-Q but since it's default we make llvm a static runtime dependency.
-RDEPEND="sys-devel/binutils-config
- lto? ( app-arch/xar )
- sys-devel/llvm:*
- sys-libs/libcxx"
-DEPEND="${RDEPEND}
- test? ( >=dev-lang/perl-5.8.8 )"
-
-SLOT="7"
-
-S=${WORKDIR}
-
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-src_prepare() {
- if use multitarget ; then
- ewarn "You have enabled support for non-standard target architectures"
- ewarn "using USE=multitarget. This includes experimental support for"
- ewarn "ppc and ppc64 which is a community forward-port from the last"
- ewarn "version of ld64 to officially support PPC."
-
- if [[ ${CHOST} == powerpc*-darwin* ]] ; then
- ewarn "HERE BE DRAGONS! Your system seems to be PPC which means that"
- ewarn "the actual usability of your Gentoo programs will depend on the"
- ewarn "above-mentioned experimental PPC support in the linker. Be"
- ewarn "sure to keep a known-to-work version like ${PN}-3.2.6 around!"
- fi
- fi
-
- cd "${S}"/${LD64}/src
- cp "${S}"/ld64-136-compile_stubs.h ld/compile_stubs.h
- cp "${S}"/ld64-264.3.101-Makefile Makefile
-
- epatch "${S}"/ld64-264.3.101-nolto.patch
- epatch "${S}"/ld64-241.9-extraneous-includes.patch
- epatch "${S}"/ld64-241.9-osatomic.patch
- epatch "${S}"/ld64-236.3-crashreporter.patch
- epatch "${S}"/ld64-264.3.101-nosnapshots.patch
- epatch "${S}"/ld64-264.3.101-ppc.patch
- epatch "${S}"/ld64-264.3.101-constant-types.patch
- epatch "${S}"/ld64-241.9-register-names.patch
- epatch "${S}"/ld64-241.9-get-comm-align.patch
- epatch "${S}"/ld64-241.9-cc_md5.patch
-
- # provide missing headers from libunwind and dyld
- mkdir -p include/{mach,mach-o/arm} || die
- # never present because it's private
- cp ../../${DYLD}/include/mach-o/dyld_priv.h include/mach-o || die
- # missing on <= 10.5
- cp ../../${LIBUNWIND}/include/libunwind.h include/ || die
- cp ../../${LIBUNWIND}/include/mach-o/compact_unwind_encoding.h include/mach-o || die
- # missing on <= 10.4
- cp ../../${DYLD}/include/mach-o/dyld_images.h include/mach-o || die
- cp ../../${CCTOOLS}/include/mach-o/loader.h include/mach-o || die
- # use copies from cctools because they're otherwise hidden in some SDK
- cp ../../${CCTOOLS}/include/mach-o/arm/reloc.h include/mach-o/arm || die
- # provide all required CPU_TYPEs on all platforms
- cp ../../${CCTOOLS}/include/mach/machine.h include/mach/machine.h
- # add alias for newer identifiers, because ld64 uses both but cctools
- # header only defines the older
- epatch "${S}"/ld64-236.3-missing-cputypes.patch
-
- # mimic OS X Leopard-style Availability.h macros for libunwind.h on
- # older systems
- [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 8 ]] && \
- echo "#define __OSX_AVAILABLE_STARTING(x,y) " > include/Availability.h
-
- local VER_STR="\"@(#)PROGRAM:ld PROJECT:${LD64} (Gentoo ${PN}-${PVR})\\n\""
- echo "char ldVersionString[] = ${VER_STR};" > version.cpp
-
- epatch "${S}"/ld64-123.2-debug-backtrace.patch
- if [[ ${CHOST} == powerpc*-darwin* ]] ; then
- epatch "${S}"/ld64-123.2-darwin8-no-mlong-branch-warning.patch
- epatch "${S}"/ld64-127.2-thread_state.patch
- fi
-
- cd "${S}"/${CCTOOLS}
- epatch "${S}"/${PN}-4.5-as.patch
- epatch "${S}"/${PN}-5.1-as-dir.patch
- epatch "${S}"/${PN}-5.1-ranlib.patch
- epatch "${S}"/${PN}-3.1.1-libtool-ranlib.patch
- epatch "${S}"/${PN}-3.1.1-no-headers.patch
- epatch "${S}"/${PN}-4.0-no-oss-dir.patch
- epatch "${S}"/cctools-839-intel-retf.patch
- epatch "${S}"/${PN}-5.1-extraneous-includes.patch
- #epatch "${S}"/${PN}-5.1-otool-stdc.patch
- epatch "${S}"/${PN}-5.1-constant-types.patch
- epatch "${S}"/${PN}-5.1-strnlen.patch
- epatch "${S}"/${PN}-5.1-ppc.patch
- epatch "${S}"/${PN}-5.1-thread-state-redefined.patch
- epatch "${S}"/${PN}-7.3-make-j.patch
- epatch "${S}"/${PN}-7.0-lto-prefix-2.patch
- epatch "${S}"/${PN}-7.0-clang-as.patch
- epatch "${S}"/${PN}-7.3-nolto.patch
- epatch "${S}"/${PN}-7.3-nollvm.patch
- epatch "${S}"/${PN}-7.3-no-developertools-dir.patch
- cp ../${LD64}/src/other/prune_trie.h include/mach-o/ || die
-
- # do not build profileable libstuff to save compile time
- sed -i -e "/^all:/s, profile , ," libstuff/Makefile
-
- # cctools version is provided to make via RC_ProjectSourceVersion which
- # generates and compiles it as apple_version[] into libstuff. From
- # there it's picked up by the individual tools. Since
- # RC_ProjectSourceVersion is also used as library version, we can't
- # just append our local version info. So we hack the libstuff Makefile
- # to include our Gentoo version.
- sed -i -e "/cctools-.*(RC_ProjectSourceVersion).*OFILE_DIR/s,Version),Version) (Gentoo ${PN}-${PVR})," \
- libstuff/Makefile
-
- # 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;
-
- einfo "Deleted $c tests that were bound to fail"
-
- cd "${S}"
- ebegin "cleaning Makefiles from unwanted CFLAGS"
- find . -name "Makefile" -print0 | xargs -0 sed \
- -i \
- -e 's/ -g / /g' \
- -e 's/^G =.*$/G =/' \
- -e 's/^OFLAG =.*$/OFLAG =/' \
- -e 's/install -c -s/install/g'
- eend $?
-}
-
-src_configure() {
- ENABLE_LTO=0
- use lto && ENABLE_LTO=1
-
- export CTARGET=${CTARGET:-${CHOST}}
- if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
- 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
-
- # CPPFLAGS only affects ld64, cctools don't use 'em (which currently is
- # what we want)
- append-cppflags -DNDEBUG
-
- # Block API and thus snapshots supported on >= 10.6
- [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -ge 10 ]] && \
- append-cppflags -DSUPPORT_SNAPSHOTS
-
- CCTOOLS_OFLAG=
- if [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 8 ]] ; then
- # cctools expect to use UNIX03 struct member names.
- # This is default on > 10.4. Activate it on <= 10.4 by defining
- # __DARWIN_UNIX03 explicitly.
- CCTOOLS_OFLAG="-D__DARWIN_UNIX03=1"
- fi
-
- # if compiling with USE multitarget, extract all the known arches from
- # create_configure and pass them back to it
- creco=${LD64}/src/create_configure
- ARCHS_TO_SUPPORT=""
- if use multitarget ; then
- ARCHS_TO_SUPPORT="$(grep KNOWN_ARCHS= $creco | \
- cut -d\" -f2 | tr ',' ' ')"
- fi
-
- # Create configure.h for ld64 with SUPPORT_ARCH_<arch> defines in it.
- DERIVED_FILE_DIR=${LD64}/src \
- RC_SUPPORTED_ARCHS="$ARCHS_TO_SUPPORT" \
- $creco
-
- # do not depend on MachOFileAbstraction.hpp to define
- # SUPPORT_ARCH_arm_any because that's not included by every file where
- # our ppc/arm-optional patch uses it, ld.hpp in particular
- grep "SUPPORT_ARCH_armv[0-9]" ${LD64}/src/configure.h >/dev/null && \
- echo "#define SUPPORT_ARCH_arm_any 1" >> ${LD64}/src/configure.h
-}
-
-compile_ld64() {
- einfo "building ${LD64}"
- cd "${S}"/${LD64}/src
- emake \
- LTO=${ENABLE_LTO} \
- || die "emake failed for ld64"
- use test && emake build_test
-}
-
-compile_cctools() {
- einfo "building ${CCTOOLS}"
- cd "${S}"/${CCTOOLS}
- # Suppress running dsymutil because it will warn about missing debug
- # info which is expected when compiling without -g as we normally do.
- # This might need some more thought if anyone ever wanted to build us
- # for debugging with Apple's tools.
- emake \
- LIB_PRUNETRIE="-L../../${LD64}/src -lprunetrie" \
- EFITOOLS= \
- LTO="${ENABLE_LTO}" \
- LTO_LIBDIR=../../../lib \
- COMMON_SUBDIRS='libstuff ar misc otool' \
- SUBDIRS_32= \
- LEGACY= \
- RC_ProjectSourceVersion=${CCTOOLS_VERSION} \
- RC_CFLAGS="${CFLAGS}" \
- OFLAG="${CCTOOLS_OFLAG}" \
- DSYMUTIL=": disabled: dsymutil" \
- || die "emake failed for the cctools"
- cd "${S}"/${CCTOOLS}/as
- emake \
- BUILD_OBSOLETE_ARCH= \
- RC_ProjectSourceVersion=${CCTOOLS_VERSION} \
- RC_CFLAGS="-DASLIBEXECDIR=\"\\\"${EPREFIX}${LIBPATH}/\\\"\" -DCLANGDIR=\"\\\"${EPREFIX}/usr/bin/\\\"\" ${CFLAGS}" \
- OFLAG="${CCTOOLS_OFLAG}" \
- DSYMUTIL=": disabled: dsymutil" \
- || die "emake failed for as"
-}
-
-src_compile() {
- compile_ld64
- compile_cctools
-}
-
-install_ld64() {
- exeinto ${BINPATH}
- doexe "${S}"/${LD64}/src/{ld64,rebase,dyldinfo,unwinddump,ObjectDump}
- dosym ld64 ${BINPATH}/ld
- insinto ${DATAPATH}/man/man1
- doins "${S}"/${LD64}/doc/man/man1/{ld,ld64,rebase}.1
-}
-
-install_cctools() {
- cd "${S}"/${CCTOOLS}
- emake install_all_but_headers \
- EFITOOLS= \
- COMMON_SUBDIRS='ar misc otool' \
- SUBDIRS_32= \
- 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} \
- LOCLIBDIR=\"${EPREFIX}\"${LIBPATH}
-
- # upstream is starting to replace classic binutils with llvm-integrated
- # ones. nm and size are now symlinks to llvm-{nm,size} while the classic
- # version is preserved as {nm,size}-classic. (BTW: otool is a symlink to
- # otool-classic for now but a wrapper llvm-otool that is calling
- # llvm-objdump is present already.)
- # Since our binutils do not live in the same directory as the llvm
- # installation, we have to rewrite the symlinks to the llvm tools.
- # This also means, that these tools still appear to be versioned via
- # binutils-config but actually always run the currently installed llvm
- # tool.
- for tool in nm size ; do
- # ${EPREFIX}/usr/x86_64-apple-darwin15/binutils-bin/7.3/$tool
- # -> ${EPREFIX}/bin/llvm-$tool
- ln -sfn ../../../bin/llvm-$tool "${D}/${EPREFIX}/${BINPATH}/$tool"
- done
-
- 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() {
- if ! [ "${EPREFIX}"/usr/bin/clang ] ; then
- einfo "Test suite only works properly with clang - please install"
- return
- fi
-
- einfo "Running unit tests"
- cd "${S}"/${LD64}/unit-tests/test-cases
- # provide the new ld as a symlink to clang so that -ccc-install-dir
- # will pick it up
- ln -sfn ../../src/ld64 ld
- # use our arch command because the System's will report i386 even for an
- # x86_64 prefix
- perl ../bin/make-recursive.pl \
- BUILT_PRODUCTS_DIR="${S}"/${LD64}/src \
- ARCH="$(arch)" \
- LD="${S}"/${LD64}/src/ld64 \
- CC="${CC} -ccc-install-dir $PWD" \
- CXX="${CXX} -ccc-install-dir $PWD" \
- OTOOL="${S}"/${CCTOOLS}/otool/otool.NEW \
- | 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/binutils-apple-8.1.ebuild b/sys-devel/binutils-apple/binutils-apple-8.1.ebuild
index 32405f72fca1..69ff01d148f8 100644
--- a/sys-devel/binutils-apple/binutils-apple-8.1.ebuild
+++ b/sys-devel/binutils-apple/binutils-apple-8.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
@@ -17,9 +17,9 @@ SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz
http://www.opensource.apple.com/tarballs/dyld/${DYLD}.tar.gz
https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-4.3-r1.tar.bz2
https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-5.1-r2.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.0-r2.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.3-r1.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-8.2-r0.tar.bz2"
+ https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.0-r3.tar.bz2
+ https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.3-r2.tar.bz2
+ https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-8.2-r1.tar.bz2"
LICENSE="APSL-2"
KEYWORDS="~x64-macos ~x86-macos"
diff --git a/sys-devel/binutils-apple/binutils-apple-8.2.1-r1.ebuild b/sys-devel/binutils-apple/binutils-apple-8.2.1-r1.ebuild
index 781aff39edf2..c664dedee156 100644
--- a/sys-devel/binutils-apple/binutils-apple-8.2.1-r1.ebuild
+++ b/sys-devel/binutils-apple/binutils-apple-8.2.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
@@ -17,7 +17,7 @@ SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz
http://www.opensource.apple.com/tarballs/dyld/${DYLD}.tar.gz
https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-4.3-r1.tar.bz2
https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-5.1-r2.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.3-r1.tar.bz2
+ https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.3-r2.tar.bz2
https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-8.2-r1.tar.bz2"
LICENSE="APSL-2"
diff --git a/sys-devel/binutils-apple/binutils-apple-8.2.1.ebuild b/sys-devel/binutils-apple/binutils-apple-8.2.1.ebuild
deleted file mode 100644
index 11fae8119966..000000000000
--- a/sys-devel/binutils-apple/binutils-apple-8.2.1.ebuild
+++ /dev/null
@@ -1,334 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-inherit eutils flag-o-matic toolchain-funcs
-
-LD64=ld64-274.2
-CCTOOLS_VERSION=895
-CCTOOLS=cctools-${CCTOOLS_VERSION}
-DYLD=dyld-421.2
-
-DESCRIPTION="Darwin assembler as(1) and static linker ld(1), Xcode Tools ${PV}"
-HOMEPAGE="http://www.opensource.apple.com/darwinsource/"
-SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz
- http://www.opensource.apple.com/tarballs/cctools/${CCTOOLS}.tar.gz
- http://www.opensource.apple.com/tarballs/dyld/${DYLD}.tar.gz
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-4.3-r1.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-5.1-r2.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.0-r2.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.3-r1.tar.bz2
- https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-8.2-r0.tar.bz2"
-
-LICENSE="APSL-2"
-KEYWORDS="~x64-macos ~x86-macos"
-IUSE="lto tapi classic test"
-
-# ld64 can now only be compiled using llvm and libc++ since it massively uses
-# C++11 language features. *But additionally* the as driver now defaults to
-# calling clang as the assembler on many platforms. This can be disabled using
-# -Wa,-Q but since it's default we make llvm a static runtime dependency.
-RDEPEND="sys-devel/binutils-config
- lto? ( app-arch/xar )
- tapi? ( sys-libs/tapi )
- sys-devel/llvm:*
- sys-libs/libcxx"
-DEPEND="${RDEPEND}
- test? ( >=dev-lang/perl-5.8.8 )"
-
-SLOT="8"
-
-S=${WORKDIR}
-
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-src_prepare() {
- cd "${S}"/${LD64}/src
- cp "${S}"/ld64-136-compile_stubs.h ld/compile_stubs.h
- cp "${S}"/ld64-274.1-Makefile Makefile
-
- epatch "${S}"/ld64-274.1-nolto.patch
- epatch "${S}"/ld64-236.3-crashreporter.patch
- epatch "${S}"/ld64-264.3.102-bitcode-case.patch
- epatch "${S}"/ld64-274.1-unknown-fixup.patch
- epatch "${S}"/ld64-274.1-notapi.patch
-
- # workound llvm-3.9.{0,1} issue
- # https://bugs.gentoo.org/show_bug.cgi?id=603580
- # https://groups.google.com/forum/#!topic/llvm-dev/JY6nuKE__sU
- # http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160829/169553.html
- sed -i -e '/COMPILE_TIME_ASSERT/d' ld/parsers/libunwind/*.hpp || die
-
- # provide missing headers from libunwind and dyld
- mkdir -p include/{mach,mach-o/arm} || die
- # never present because it's private
- cp ../../${DYLD}/include/mach-o/dyld_priv.h include/mach-o || die
- # use copies from cctools because they're otherwise hidden in some SDK
- cp ../../${CCTOOLS}/include/mach-o/arm/reloc.h include/mach-o/arm || die
- # provide all required CPU_TYPEs on all platforms
- cp ../../${CCTOOLS}/include/mach/machine.h include/mach/machine.h
- # add alias for newer identifiers, because ld64 uses both but cctools
- # header only defines the older
- epatch "${S}"/ld64-236.3-missing-cputypes.patch
-
- local VER_STR="\"@(#)PROGRAM:ld PROJECT:${LD64} (Gentoo ${PN}-${PVR})\\n\""
- echo "char ldVersionString[] = ${VER_STR};" > version.cpp
-
- epatch "${S}"/ld64-123.2-debug-backtrace.patch
-
- cd "${S}"/${CCTOOLS}
- epatch "${S}"/${PN}-4.5-as.patch
- epatch "${S}"/${PN}-5.1-as-dir.patch
- epatch "${S}"/${PN}-5.1-ranlib.patch
- epatch "${S}"/${PN}-3.1.1-libtool-ranlib.patch
- epatch "${S}"/${PN}-3.1.1-no-headers.patch
- epatch "${S}"/${PN}-4.0-no-oss-dir.patch
- epatch "${S}"/cctools-839-intel-retf.patch
- epatch "${S}"/${PN}-5.1-extraneous-includes.patch
- epatch "${S}"/${PN}-5.1-strnlen.patch
- epatch "${S}"/${PN}-7.3-make-j.patch
- epatch "${S}"/${PN}-7.0-lto-prefix-2.patch
- epatch "${S}"/${PN}-7.0-clang-as.patch
- epatch "${S}"/${PN}-8.1-nolto.patch
- epatch "${S}"/${PN}-7.3-nollvm.patch
- epatch "${S}"/${PN}-7.3-no-developertools-dir.patch
- epatch "${S}"/${PN}-8.1-llvm-tools.patch
- cp ../${LD64}/src/other/prune_trie.h include/mach-o/ || die
-
- # do not build profileable libstuff to save compile time
- sed -i -e "/^all:/s, profile , ," libstuff/Makefile
-
- # cctools version is provided to make via RC_ProjectSourceVersion which
- # generates and compiles it as apple_version[] into libstuff. From
- # there it's picked up by the individual tools. Since
- # RC_ProjectSourceVersion is also used as library version, we can't
- # just append our local version info. So we hack the libstuff Makefile
- # to include our Gentoo version.
- sed -i -e "/cctools-.*(RC_ProjectSourceVersion).*OFILE_DIR/s,Version),Version) (Gentoo ${PN}-${PVR})," \
- libstuff/Makefile
-
- eapply_user
-
- # 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;
-
- einfo "Deleted $c tests that were bound to fail"
-
- cd "${S}"
- ebegin "cleaning Makefiles from unwanted CFLAGS"
- find . -name "Makefile" -print0 | xargs -0 sed \
- -i \
- -e 's/ -g / /g' \
- -e 's/^G =.*$/G =/' \
- -e 's/^OFLAG =.*$/OFLAG =/' \
- -e 's/install -c -s/install/g'
- eend $?
-}
-
-src_configure() {
- ENABLE_LTO=0
- use lto && ENABLE_LTO=1
-
- export CTARGET=${CTARGET:-${CHOST}}
- if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
- 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
-
- # CPPFLAGS only affects ld64, cctools don't use 'em (which currently is
- # what we want)
- append-cppflags -DNDEBUG
-
- # Create configure.h for ld64 with SUPPORT_ARCH_<arch> defines in it.
- DERIVED_FILE_DIR=${LD64}/src \
- ${LD64}/src/create_configure
-}
-
-compile_ld64() {
- einfo "building ${LD64}"
- cd "${S}"/${LD64}/src
- emake \
- LTO=${ENABLE_LTO} \
- TAPI=$(use tapi && echo 1 || echo 0) \
- || die "emake failed for ld64"
- use test && emake build_test
-}
-
-compile_cctools() {
- einfo "building ${CCTOOLS}"
- cd "${S}"/${CCTOOLS}
- # Suppress running dsymutil because it will warn about missing debug
- # info which is expected when compiling without -g as we normally do.
- # This might need some more thought if anyone ever wanted to build us
- # for debugging with Apple's tools.
- emake \
- LIB_PRUNETRIE="-L../../${LD64}/src -lprunetrie" \
- EFITOOLS= \
- LTO="${ENABLE_LTO}" \
- LTO_LIBDIR=../../../lib \
- COMMON_SUBDIRS='libstuff ar misc otool' \
- SUBDIRS_32= \
- LEGACY= \
- RC_ProjectSourceVersion=${CCTOOLS_VERSION} \
- RC_CFLAGS="${CFLAGS}" \
- OFLAG="${CCTOOLS_OFLAG}" \
- DSYMUTIL=": disabled: dsymutil" \
- || die "emake failed for the cctools"
- cd "${S}"/${CCTOOLS}/as
- emake \
- BUILD_OBSOLETE_ARCH= \
- RC_ProjectSourceVersion=${CCTOOLS_VERSION} \
- RC_CFLAGS="-DASLIBEXECDIR=\"\\\"${EPREFIX}${LIBPATH}/\\\"\" -DCLANGDIR=\"\\\"${EPREFIX}/usr/bin/\\\"\" ${CFLAGS}" \
- OFLAG="${CCTOOLS_OFLAG}" \
- DSYMUTIL=": disabled: dsymutil" \
- || die "emake failed for as"
-}
-
-src_compile() {
- compile_ld64
- compile_cctools
-}
-
-install_ld64() {
- exeinto ${BINPATH}
- doexe "${S}"/${LD64}/src/{ld64,rebase,dyldinfo,unwinddump,ObjectDump}
- dosym ld64 ${BINPATH}/ld
- insinto ${DATAPATH}/man/man1
- doins "${S}"/${LD64}/doc/man/man1/{ld,ld64,rebase}.1
-}
-
-install_cctools() {
- cd "${S}"/${CCTOOLS}
- emake install_all_but_headers \
- EFITOOLS= \
- COMMON_SUBDIRS='ar misc otool' \
- SUBDIRS_32= \
- 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} \
- LOCLIBDIR=\"${EPREFIX}\"${LIBPATH}
-
- # upstream is starting to replace classic binutils with llvm-integrated
- # ones. nm and size are now symlinks to llvm-{nm,size} while the classic
- # version is preserved as {nm,size}-classic.
- # Since our binutils do not live in the same directory as the llvm
- # installation, we have to rewrite the symlinks to the llvm tools.
- # This also means, that these tools still appear to be versioned via
- # binutils-config but actually always run the currently installed llvm
- # tool.
- budir=${D}/${EPREFIX}/${BINPATH}
- for tool in nm size ; do
- # ${EPREFIX}/usr/x86_64-apple-darwin15/binutils-bin/7.3/$tool
- # -> ${EPREFIX}/bin/llvm-$tool
- use classic && \
- ln -sfn ${tool}-classic "${budir}/${tool}" || \
- ln -sfn ../../../bin/llvm-${tool} "${budir}/${tool}"
- done
-
- # Also, otool is now based on llvm-objdump. But a small wrapper installed
- # as llvm-otool remains, providing command line compatibility.
- use classic && \
- ln -sfn otool-classic "${budir}/otool" || \
- ln -sfn llvm-otool "${budir}/otool"
-
- 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() {
- if ! [ "${EPREFIX}"/usr/bin/clang ] ; then
- einfo "Test suite only works properly with clang - please install"
- return
- fi
-
- einfo "Running unit tests"
- cd "${S}"/${LD64}/unit-tests/test-cases
- # provide the new ld as a symlink to clang so that -ccc-install-dir
- # will pick it up
- ln -sfn ../../src/ld64 ld
- # use our arch command because the System's will report i386 even for an
- # x86_64 prefix
- perl ../bin/make-recursive.pl \
- BUILT_PRODUCTS_DIR="${S}"/${LD64}/src \
- ARCH="$(arch)" \
- LD="${S}"/${LD64}/src/ld64 \
- CC="${CC} -ccc-install-dir $PWD" \
- CXX="${CXX} -ccc-install-dir $PWD" \
- OTOOL="${S}"/${CCTOOLS}/otool/otool.NEW \
- | 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}
-}