summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2017-02-26 20:06:04 +0100
committerFabian Groffen <grobian@gentoo.org>2017-02-26 20:06:16 +0100
commitef835654905c7fea9a55359ad930385cff248e22 (patch)
tree8d8fda2898295b66088b4dd92ecbdad706b939ce
parentsys-libs/tapi: initial ebuild by Michael Weiser, bug #609436 (diff)
downloadgentoo-ef835654905c7fea9a55359ad930385cff248e22.tar.gz
gentoo-ef835654905c7fea9a55359ad930385cff248e22.tar.bz2
gentoo-ef835654905c7fea9a55359ad930385cff248e22.zip
sys-devel/binutils-apple: version bumps for Xcode 8.1 and 8.2.1 by Michael Weiser, bug #609436
Package-Manager: Portage-2.3.3, Repoman-2.3.1
-rw-r--r--sys-devel/binutils-apple/Manifest5
-rw-r--r--sys-devel/binutils-apple/binutils-apple-8.1.ebuild334
-rw-r--r--sys-devel/binutils-apple/binutils-apple-8.2.1.ebuild334
-rw-r--r--sys-devel/binutils-apple/metadata.xml3
4 files changed, 676 insertions, 0 deletions
diff --git a/sys-devel/binutils-apple/Manifest b/sys-devel/binutils-apple/Manifest
index 9ec34163fc4..c8daa0501d6 100644
--- a/sys-devel/binutils-apple/Manifest
+++ b/sys-devel/binutils-apple/Manifest
@@ -7,6 +7,7 @@ DIST binutils-apple-patches-7.0-r2.tar.bz2 50934 SHA256 5be8cf3ed268bb413ffd05af
DIST binutils-apple-patches-7.2-r0.tar.bz2 2917 SHA256 8fa3c64c840aefb71c32fc0294ce6c2b0cf058a5e7f624d736dac6b8c1f44287 SHA512 ca2fc2da88144fbf01f34f1664e6177105a5d1bff956e83f6c7cd530b8e80dcd59b0c921ad95d3c4554e02909bcd846d3a2a4535bf47569b343c85e765619821 WHIRLPOOL 9ba63b8407f6015dd8cca48bea474c375cf90047a138fac8aef800622a780bfcc98910cc46781aea72a2b9803e7cd86c3ea35cfe9fa33bba8813499cc8b91c2c
DIST binutils-apple-patches-7.3-r0.tar.bz2 44576 SHA256 18a9484b53225004ccd37d34d0e208e3a716f73831f4a433be211f233d855fb1 SHA512 6b092c586ac4c3a3c65229a7490f93b0f0d38348e5a2db4f73d6062c737007ee0a5b6bdb5948b7aac1d74d32442fa501ba92161a9ffe13151288432c6a706c43 WHIRLPOOL ef159c24cd1e53538f73aac805e06d14775f82921b1e8a10919981dbec0017d0c70ada0e80ea6135cca5551ccfb38f229df666bcb2e692880d6a23d380d39801
DIST binutils-apple-patches-7.3-r1.tar.bz2 44737 SHA256 215da3068451640cf25dbe7beb0c8d704a6fbc6d3d988675ae17b9ebbd9d1ee2 SHA512 ce4b3a725e19cb632b0c101a32488ce09a8bb89aed08339d5518d834cb68c525b2e0c8b66564a945c077915e92cc6be3f7028c5baacb870b3ca9b9422b4fb0da WHIRLPOOL 1c8a2b251e385eff5de435f9c72c8244329f55de5a61549371214ddab1cfe687491571d68d0a2c7cee4da2529f24005d1d0a7429daa5c6a1ef3a68ea8af0da20
+DIST binutils-apple-patches-8.2-r0.tar.bz2 5771 SHA256 839dba0eb6314e15bfa43b50479359adfc695c8b65b6c7176abc0983c41c6dbb SHA512 92d04396630a31b752a24845c27fe8da2e37eb176117c9b31193e8f48af7ade707cda4060289b848965310afd05b2f121c740b0e5baa56b79c5481273a88c84e WHIRLPOOL 5706ab6aee04670b4fbbf5cca62109c3f69beba834729280dc636d8c5c4017f321d0402db080032219ccf025899a9bf1daf48a7ac6805faf01e10ed6faf73242
DIST cctools-822.tar.gz 2024412 SHA256 dfaa9bdbd023524d47429674f64d2d5ea393123dabf90868be0aa17f61f45289 SHA512 8b02cc837d5e0520f35da445f25ba86b5042d5caa27b49a599e829ed89428cf78dbd1831bcf6c18301f941fbfb31ac2114e248041d98008a466e1574f4fe1586 WHIRLPOOL 81191ab46e8a9e47e4267146f978438ff64314b0363296b973a02f361918a5cd69057753a1b40766b93d3d4a3ed10585a27f6da2953992a406be61d1dcc1d06c
DIST cctools-855.tar.gz 1699635 SHA256 751748ddf32c8ea84c175f32792721fa44424dad6acbf163f84f41e9617dbc58 SHA512 50f5d015ce807aa5ca274dd2deea810b8b375110e60b5e334ca4b2170526b738ea5f86a5436caebbdb748badc3b89601d0f450f5b867d8393c89e336a3db4b3f WHIRLPOOL fa493a29e32583f60c3553794bbb6d01a7b5ef797d8e8ba8161c9cbf237906ebbfaff560366da2d5b852bfcbdd55e874c00edf5b3169b16b357a54fcf3c07c4c
DIST cctools-862.tar.gz 1702345 SHA256 1bf29f620b91c901ad3116b47738ab5076c1aed75d13869cd3bc7f067b4aaadb SHA512 faa401c1dc55bfb9cd2a9a9cc7bc9d473ee63b019607967c8b0da325514d6a1f7b1f52404370bcc018e86d30d75a4b01183f49b793f577110663efe43871360a WHIRLPOOL 371307f3264361f5e2e48d83177aff1a8f435cf2bdc1f4998cc5780c5b3760048a29a7620d2390db8f0c9378cd2f3b2f130b6aca9d402e3d428c4f4d353db097
@@ -15,11 +16,13 @@ DIST cctools-877.5.tar.gz 1717664 SHA256 5e7525c86581d9dead8a8508a9e824101765d05
DIST cctools-877.7.tar.gz 1720523 SHA256 c3809b7604a27db0c0b418fcccd5cad49f002e2a750ec611f92f806521f7ed9e SHA512 5c381fe8b85d1254f660eb3c3510d9e0a49792ae5bb0e69a4dfb5a18e7f1706ee1411589f20583a9d7f12126ef616f66f1ad5c1c4ff405f66b52759c0a4272b5 WHIRLPOOL 2c8e85fd33f183bd074abf90237301eff252ca05aa48a59aea713d263b10e0710d261a5ac01185e9a17d1a391fa025fb91d60df0f3b426140defdbd5536e4bbb
DIST cctools-877.8.tar.gz 1720708 SHA256 88be2788adf461f1d8278324b0078f6003b2328b6f95a54b16ec6ed1ba651dc2 SHA512 3f75fbe4eacd89f2e6372a3167ed197e2b8bda9faa10fe6bce0cf9d3d3eca536f0af5fc4ce1e4bc6a24eb68db36f5d0b1d0bc3f9807e285e67cfaa2d336d81ef WHIRLPOOL eea67bacd8037b19ba3efcc2fecfcc74ec3e785ce92628fdeccbeca6e17dee4d1926719a02ca7f68fc2045f9b37571cb044cc29a3a8fe6a5bd704a3446f44945
DIST cctools-886.tar.gz 1731850 SHA256 f3a4fa7dad4a54d862b1d9f48e3dfb25fc532c9cf46a041cf8134694328a8878 SHA512 49f14e165da3a9fcf16614a810b8a2a68907348bd27a60b268b330e416a0bc070fb6445e1e6b80d849026bd6ce7de4459623ab86168e2d63bb492d1ba6680c5b WHIRLPOOL 91a09d3c773f0aede36de548310879a1ad4158f39e9d4d91b4e1a9460d31acdcab5c658113381742512861c6281661dea7fd8273d7146ac6838088d1435ebe2f
+DIST cctools-895.tar.gz 1716126 SHA256 ce66034fa35117f9ae76bbb7dd72d8068c405778fa42e877e8a13237a10c5cb7 SHA512 4ef9db870385cc2c4263bcbe42ff0de80386771f5acbc7082a1818ecd6b8d7bb1bfa02a7fcfecd3e7281481aeaaac4c331359aca3564bfe7a4c7dea1e0d06126 WHIRLPOOL 36f6814cfe25fd5e257720560db18ceaed7cc5504f9fcb20cd00f48e9295797067d1538fd172406b7c68d771df1059d46261b33fc4fb293afe8b28a7580e90c4
DIST dyld-195.6.tar.gz 412518 SHA256 69296e9b4192bdac778ea899fffc18b02be62b51b5e8474b4cf85ae5f2b08aa4 SHA512 58a9ea27efc02e66f9d99bfa250af1d90326385385431e5279386bbd9ab53366bf7e8236543296908b7214c33523c8f60098a6298a7393b3180e2a6bce18e7c5 WHIRLPOOL e37b11d3996559f8a1843577a5fa42f96e4d42419f205276600f0ed79fcd2490da1f8a77eecf29f111b3db62a65e8e9cd77a154e3b389d633a7ac1525273b9b5
DIST dyld-353.2.1.tar.gz 510036 SHA256 051089e284c5a4d671b21b73866abd01d54e5ea1912cadf3a9b916890fb31540 SHA512 a9488620499f682e245b55b7e0e4ec02fc0bcf03bd8a70d4a4ee0ba762067ade2f41c188990c101727476d41c19368b4cc89cccf2df40231da1c777742c7391f WHIRLPOOL 3164746ed8c866df993f08e405e7e329db427af8eeded681d5fb88031ef2c025363d5bfb647e9315738024adf9f48efacf49226f86f27def584ec7f538da292e
DIST dyld-360.14.tar.gz 518873 SHA256 c4e011241d75e3fac4dbdfc0049ccf26fb939fea6c0256b6f16036b2e4690c6e SHA512 cfe536ea1f0ad8fbc2846417289e3e36704bf69388e083e0ece0ffa6eeee501e7e9b2ba47eed7be0e5120b5cc72f33b2fc0d2d39ba7a16beaf98db94dfb4ae40 WHIRLPOOL 6ed42fa38f60a84deab0bc9b128f5de232df487613726978be29783ede7eee9b5899472a984d50f44a20c87c1772aeede9b81706000fa66713df34d6e956c88e
DIST dyld-360.17.tar.gz 518876 SHA256 e137f54d5f7af7512e2e2337248caa0580743db212471de71fd45d3e3e92c68d SHA512 aae2a0ea1f4130de51aa920ce1affa579993b3b58a7d398ec998c0d7ac4919907ba4e508b9bfc15080b1f4f4cf15e4615bc416b6ec32b52a4b5d8fbbad1dc9ab WHIRLPOOL 2c3cc5fe0063b0a6ad1cc77e5ae1204e8bcd23ba732ad775910fe6340a5d908b77d2623fb7fa4eccff20e0e2176405d8d6734b7d60dbba61ccfc58f37009aca7
DIST dyld-360.18.tar.gz 518957 SHA256 a5bec8c2e3bded111aec7e447b35c110038e822f95e11e55b9a4d331fbaeff08 SHA512 1299bd2dd5cd663917ec4a03ed0f875e0bf07d6680d3d095af12f4b11960c02a52e361bde27ff88843f80832fc6d36654e2556ee0a3ca2259fcded5b568ab2f9 WHIRLPOOL 5b42ea6de3f08b7e0fbad7ea9df512c74fd4bceecf859683297d0cb8998d642ea3a0597ef488dcbf42a75064a07a528baf63c957d36174fddff34d6e6c7502d8
+DIST dyld-421.2.tar.gz 625173 SHA256 e922c4e78af8f7af14dd158f1db986f8eb260403e7a0dc67fa35279d2cfdceb7 SHA512 75f2fb840da980d44649aa3e045f50c4e37d4403fbdb1e2e5f1a85bf6d8859e1130053c3806f7ef992fdfc6573f7f18146263c690144bdd3df31452c6bdd8bd8 WHIRLPOOL cf7093f68ecaf41db2bd8ed5d456183007e5b87b1296f182ffa007464c65248188127c60e2f937faa6fdaba771b9995673bedf22e9b81826c74cf1c50d39360e
DIST ld64-128.2.tar.gz 494361 SHA256 96a912464e2d4d3d7cdaab0744003b0fa93d139f203c82867f659ee94b4ae9f7 SHA512 f50a3c396e6f4fddc685bb3f59f9a260bd2f47060535d24259b2b411e4f759e48daa35819da682ad9bceaa1b9a1981eb34716387d988cdc4b7eec9ab2169726e WHIRLPOOL 78dec40124ae11c80483b362860b01c833fcaff67bae6b6cb3b72371daffdf3be809186f5daca4bb6ace77441cb43168939eb60eedf9f8c05ae3ec644c2a0502
DIST ld64-236.3.tar.gz 624400 SHA256 8ef36729b643201081ab45ebd8586ede8f9968bc17614b679a940faa82875ca6 SHA512 e103fc5efd4d4161c7dc55b1ad53aebd455cfcd72de7873ebfdf5ba896b7b0da9c9aeb12e1e1a76425768ac1dc85d864a4ce33b5b841ba115eeab96a2e2965aa WHIRLPOOL d122e325518860c810b9efde7016ebecb6b59c56bb40ae1f041a840be764a5d9b90c7db1922fd9037c18f4caae7ace0d395591ffb3db704c87b92837ef997a17
DIST ld64-241.9.tar.gz 639944 SHA256 3594e87c626c3b5abab6470cac6f27b367f1efcee60eb3d0f6b6d4ecf9b24230 SHA512 6958e7064f4fd8b47501225fc4cbc6292e5da63d7f4103ad79add177ef7382c8de3c732f14d19a9c11356b8070f578392383caccc3795e2ab8ef7b7ddbde88da WHIRLPOOL 5b07a336efde52b00b2601866907513517593a113583f05a9c45b98b4d6f394d87add887a7e44a95f462b6c2b5617ce497376b94a523e5cdf0f69d4d10ef3407
@@ -29,5 +32,7 @@ DIST ld64-253.6.tar.gz 671838 SHA256 7fbae5e88ac1420480de8a495dcd3b876d399278bfc
DIST ld64-253.9.tar.gz 673388 SHA256 8fa3a1b65f665824ac129c02e2fab8926a06e503ec277ea32cd8bc27c8de11c3 SHA512 a52b081295c19f28858f8ee47c05249bba3e15cc8bb6f7017d9f6dcf7509cdacef7a4b16b3940cd0b1f72b3b67efb503ab2e3801b31e50cda1d34c6bc8df8dcf WHIRLPOOL 07e850984d2ff24637a64d76860799136e63af56dc2740f8d1e1bd3311ae3f33eac902e7850f94555407002d0d16f44d4a276470f54e60a0633169b884b7dfc1
DIST ld64-264.3.101.tar.gz 681491 SHA256 2882f0c104334bdba8eb64cd3a9f9059ceca4d4e0c08473506a926d53c9ef218 SHA512 ffa37af95f1a6e76829d0ac8badfd0236d93dc2f9988c7f4b88fe271b7b02a4b5553402a1e9a49feed9da4d04a50e2a2cacdb1bd4c04ecbef09d68b85a2e8a6a WHIRLPOOL cdc466a24fdbc2bf3756d73f89f91d26fec21d8004a2e77804e2b678a9da08afe83bb5aa9fb4548496feb3d9180c3d2521a8d5329b875ed76d4e3a0ea231d5be
DIST ld64-264.3.102.tar.gz 681509 SHA256 307f73678a3e5c9ed4d1bcf77da7399d84efac32916c5df6cd477c3b5c36f953 SHA512 ec221de3624dcce3db694ec2d7b05f3c939cd1ba79c97437ba9f2d4e5d9c37369bb5df82cc37bc158bf5c4e2128cc2b96ca1a7477f98538850092bffa4601da0 WHIRLPOOL 509774429d498c4a070a54798715776eddf2b8ef70a99dd4250d60144efa2d4a6a324914112556435709beb614172dd45b860f3963b0da9a0825cb0756bcd719
+DIST ld64-274.1.tar.gz 670493 SHA256 6cbe886717de833789fa562ec4889ebf9136ae5f7573d17d39836d3f5755b7ab SHA512 ef5d6802f759e09aa2dfab7eb84e9cd2a57b28da3f150833cf1a922c395dd696e501b1bcb10385cbe995f4945fc6c99c2d2d8c50c42f369186bdc1ac3e30ad99 WHIRLPOOL 5b98613419f304cca05d7e626a33a93b08e991cbdf5a9b76891656e8b5757937e930bdc047ceb60a345a11ee195c641af5d2ec7b3d731530050be160c82d6a93
+DIST ld64-274.2.tar.gz 671652 SHA256 175d89c419e99d49a7a5f7e4196d3cef4c9e19cc17a425c332e86df6b516f7d7 SHA512 7b4e17f199909450b697bf719564c6841d46f5116c48dd47ff483ae7ddfe2965db1b7c024ed8ebeeaf90cd983ed353b95f7f23c93c8971536977dc892e6d6a9d WHIRLPOOL 30f935d1f49769a851871f6fc4d7210409122d910651835c3568c0fb22111bdc4c2419413a5808aa95dc6a840f856eefe7c5a3d8215470cf8f1b4b4432c40494
DIST libunwind-30.tar.gz 82811 SHA256 6ac97d18cc2b05e6de1269bf5af03b81948bd2200dae827527f3dc618b82bd41 SHA512 57106eafa1516791b4e0db2de6c6336bc0c1cbd8bf098a6d3a809fafa457802c95a7aeae9137f4ca5922a3018dfd8f597907ea4187b0afbbf267500eae00041f WHIRLPOOL c3caf5ba593cffa2f0a9cdb256f518524e9500eaf0a013c4973dc9881b16efa0c388e70407bbed1fd331f100af2da01ddeee12d33b3afc1213d69c32ab5e1d0b
DIST libunwind-35.3.tar.gz 90002 SHA256 2bcc95553a44fa3edca41993ccfac65ba267830cb37c85dca760b34094722e56 SHA512 b7d9a86ef24f1fe9ca14517471e03a910219a229af9f0d4cf94435115971360640451107ba20c93fb1aab788f8b6eb5ed580ee08fdaa990b9fa43e9ae360c6b4 WHIRLPOOL 838912e46031b3a6796bfe854f0244991ce5bc3b59b95855224c9e84639e57b69f541b7993658360721423533dca75037248ea90f5e274b332f27319fdd85a9a
diff --git a/sys-devel/binutils-apple/binutils-apple-8.1.ebuild b/sys-devel/binutils-apple/binutils-apple-8.1.ebuild
new file mode 100644
index 00000000000..28a8fad6e3c
--- /dev/null
+++ b/sys-devel/binutils-apple/binutils-apple-8.1.ebuild
@@ -0,0 +1,334 @@
+# Copyright 1999-2017 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.1
+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
+ http://dev.gentoo.org/~grobian/distfiles/${PN}-patches-4.3-r1.tar.bz2
+ http://dev.gentoo.org/~grobian/distfiles/${PN}-patches-5.1-r2.tar.bz2
+ http://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.0-r2.tar.bz2
+ http://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.3-r1.tar.bz2
+ http://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}
+}
diff --git a/sys-devel/binutils-apple/binutils-apple-8.2.1.ebuild b/sys-devel/binutils-apple/binutils-apple-8.2.1.ebuild
new file mode 100644
index 00000000000..fda2218b308
--- /dev/null
+++ b/sys-devel/binutils-apple/binutils-apple-8.2.1.ebuild
@@ -0,0 +1,334 @@
+# Copyright 1999-2017 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
+ http://dev.gentoo.org/~grobian/distfiles/${PN}-patches-4.3-r1.tar.bz2
+ http://dev.gentoo.org/~grobian/distfiles/${PN}-patches-5.1-r2.tar.bz2
+ http://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.0-r2.tar.bz2
+ http://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.3-r1.tar.bz2
+ http://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}
+}
diff --git a/sys-devel/binutils-apple/metadata.xml b/sys-devel/binutils-apple/metadata.xml
index 2b36ce133ec..b6fa3676524 100644
--- a/sys-devel/binutils-apple/metadata.xml
+++ b/sys-devel/binutils-apple/metadata.xml
@@ -11,5 +11,8 @@
<flag name="multitarget">Compile for non-standard target
architectures (ppc and ppc64) -- experimental, Gentoo
only</flag>
+ <flag name="classic">Use nm, otool, etc. from this ebuild
+ instead of llvm-based tools</flag>
+ <flag name="tapi">Build against <pkg>sys-libs/tapi</pkg></flag>
</use>
</pkgmetadata>