Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-apple/
Date: Tue, 22 Dec 2020 20:25:44
Message-Id: 1608668735.ace9e06a9ab778a21babb5988e83f9fe3b1554f8.grobian@gentoo
1 commit: ace9e06a9ab778a21babb5988e83f9fe3b1554f8
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 22 20:17:02 2020 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 22 20:25:35 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ace9e06a
7
8 sys-devel/binutils-apple: cleanup overshadowed versions
9
10 Package-Manager: Portage-3.0.9, Repoman-3.0.2
11 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
12
13 sys-devel/binutils-apple/Manifest | 31 --
14 sys-devel/binutils-apple/binutils-apple-3.2.ebuild | 239 -------------
15 .../binutils-apple/binutils-apple-4.3-r2.ebuild | 337 ------------------
16 .../binutils-apple/binutils-apple-5.1-r1.ebuild | 384 --------------------
17 .../binutils-apple/binutils-apple-6.1-r1.ebuild | 385 --------------------
18 .../binutils-apple/binutils-apple-6.3-r2.ebuild | 386 --------------------
19 .../binutils-apple/binutils-apple-7.0-r1.ebuild | 369 -------------------
20 .../binutils-apple/binutils-apple-7.1-r1.ebuild | 369 -------------------
21 .../binutils-apple/binutils-apple-7.2-r1.ebuild | 370 -------------------
22 .../binutils-apple/binutils-apple-7.3.1.ebuild | 393 ---------------------
23 sys-devel/binutils-apple/binutils-apple-8.1.ebuild | 334 -----------------
24 sys-devel/binutils-apple/metadata.xml | 4 -
25 12 files changed, 3601 deletions(-)
26
27 diff --git a/sys-devel/binutils-apple/Manifest b/sys-devel/binutils-apple/Manifest
28 index 98b29403dd5..647103f352b 100644
29 --- a/sys-devel/binutils-apple/Manifest
30 +++ b/sys-devel/binutils-apple/Manifest
31 @@ -1,48 +1,17 @@
32 -DIST binutils-apple-LP64-patches-1.tar.bz2 10235 BLAKE2B 3352170bcfe73c574217597233ca58c7d6ebeedf9dfe9da1399953dfe1a0c87fc26e9ba8864620ddd67c6f38e48aeb6950737637605f0b860eb4a0d246f3aff7 SHA512 5632d4033c39e47de3ec275d02100ed53408a63122fe722c26dda1b02275c397524b113e51e1334d3235fc7f0a3bb8e53d4ccc1c2e40f24c6129282846da22e1
33 DIST binutils-apple-patches-11.3-r1.tar.bz2 9041 BLAKE2B c881117e19e119173dd8c126859f8ebab5ff4024697c9650b8ba145c021aa6e251086d3678d80fec2672e78637a5beca795b71ae871692e832ba4e69a7a8e04c SHA512 eda63cd89f67674556dc75de719cd318f534544db50165d4faac454f67c557c9944e7e024c4443e640f987ed8c8826ccd578427743a86d7220c2ba90ed2206d4
34 -DIST binutils-apple-patches-3.2-r0.tar.bz2 4137 BLAKE2B 9cd7afbba5337cb9c395556b2691e4acd73ee323d643da4335f6465ccc29b06f889d01fb42c7778576607bfdb859e2df38d3ebf82d4bf7f0971079da6985f237 SHA512 5381a93d61c39993cdb294ecb238016e26cdfe283fae553f75ddc6662812709301d5208c770ac0992d1dfab92e4802c660e6fb4336ad891335ab716d3b042805
35 DIST binutils-apple-patches-3.2.6-r0.tar.bz2 3500 BLAKE2B f10dcf71400ea5d4bf7efb8ad906240765cfb56743274b3e1684eeb4273a35171aa4202d475920cff2c5c39e89f9bd1d7e5b0d38ba6c2b4705b0a592ba47e063 SHA512 4ccb8ebd49ac8eac4dbd0c1f24ee1836f216efd2e9e15b13072cbc76d8f83fbf4f1f6b3b60736bf5d5482af3e49ec1eaedfce8dd0ce1e949f915faf9c92ee0ea
36 DIST binutils-apple-patches-4.3-r1.tar.bz2 37363 BLAKE2B a5ad04d4bf746a864f03a25d052197ed9a6ecada1f34460f4e38bea8cd87dfe2cb6c7f99f2096acac2231cd1e0c13c53757854b07f729a7a0c5a162a908fbe83 SHA512 f5d64ad182891c3af971e6aabd3c0c1b717b6a1cb471632339cba61b41a998d15880d18de09aafa1c3d059e528c888d6e8b914025c79bc21897d90a6d0e2ebf5
37 DIST binutils-apple-patches-5.1-r2.tar.bz2 51642 BLAKE2B 1b44020a05e0a91cfe569273f1e3dc65afaeac4bcdb80a626bdcc1f30cf8fbba6cc7bb522ece93126d4035b2d309defefd17fe0cee5bcaadcc58c4fa0feb4827 SHA512 37ba0dcae6c10b54a07c6208f6893ab80b0de1bd1c2f677902f707c8290629f7671a481e256b57a18bf304b95e41e4d59519bc1c88f15de488c0ef7e142f5cd8
38 -DIST binutils-apple-patches-6.1-r1.tar.bz2 42189 BLAKE2B 8505acaff6343b2f4dffe9c1dd78e360762f0ad78d39fbc0227265ed8b6768dba62c1a7d6784ca685934942e1a211c70275474001b066e3292c579fa0aa2f356 SHA512 be8ee5af5c8c9f9228cf6980f032aa101058ac1a414bec89401dbc4ff32ea96d6ebf96b7b79285fa1e7b4037a9ed68b285dbe59ff8e3d3e62bfc0145199e72f3
39 -DIST binutils-apple-patches-6.3-r2.tar.bz2 53029 BLAKE2B c2e7d773c00d3e6e13e01ee23a8aaf1986af31d2e1390a49ff3932bec45be916af56584a1d218412e2ed528bf55bd4de3942fa1ea3e4d113f841699172ab295c SHA512 bb165ceaebbb2545ac946c94bcc930ba52de452ea71c984d3d92a5b5105507de94752c3584cf05bd27ea288f5353e459c31e97f45553f2ad993249023f486a71
40 -DIST binutils-apple-patches-7.0-r3.tar.bz2 57504 BLAKE2B 2c894368141fa68c2b5ee85e05309233857afed89e81a89ff9739570397042e174921c9a174b026c61cf04d4bd09b84600a6acb8ac0ac6d55b59d37667ccc0a6 SHA512 4bfe2f1f29f3ca91c093af6b95d16cc315fe8098fb5fd0230458ac2575b34110c250d848b8d9a5425136069b5022d5005fa099489ba6534dd38d1c7049dce009
41 -DIST binutils-apple-patches-7.2-r1.tar.bz2 2924 BLAKE2B 167fb37e5cb4cae8fe6777dceb1085eee68ce601cf158a9b67d9f77113088c745551ef1500e1fb82e9e74a15bf010fc8e07728506879b5f8ee97fe10b93cea2f SHA512 1285ae5dfcac59e3f27312cfe53683df2f3f166a28ae60e78bc4d25fab6de2a8baf99a4e166638ea90b5823b9c9f0c5feb2a16265c7713fbfe81b5f43b524c54
42 DIST binutils-apple-patches-7.3-r2.tar.bz2 44551 BLAKE2B 036cd2a2e4a66b046467f2984cce1c15f0d07c6b66aa6c8df3e07360943104aabe6f2555a0094973df71a5844496cb69d97a0ff13366043e02a01d8fbb0b0239 SHA512 219c26aeb54e89e23ab91706dda0803cf0c9f2a33acb5cc676db2d2ea33ad22af0661ea19450ad8f1f006f6c1703269fd95c98c52a7bcfa0c6491bc1cfb1a0ba
43 DIST binutils-apple-patches-8.2-r1.tar.bz2 10830 BLAKE2B 345db8619873e9e91b79c3fdc0685fc46f82366df0b6153c1a59fbe5c122622e799754397e980e8752ef01ef25bbac81bb8f0339e92168790211b1d9c03bef2d SHA512 e7ca8cbac75671846c044abcd5415cfcf5832ff71acd5a2799b643369b02f2f7148990398c51913a3758e589f9fbff875e333aadf568e2a8a2defeafaa2aca95
44 -DIST cctools-750.tar.gz 1947990 BLAKE2B b0fe71ae6972bd2b21c1ecf7a699104c51519babf67bb5fc45e31ed1d17108e7627cb46b5f65d48c33dbec9e9032e703924e9a9a687ec19bd384a3cdea243a46 SHA512 298a447757d926b3d156aaf8be27ceadeb4242336b66cb0bee0fd2dc8bb4ad3f167758ff526e4bf3fe458cb72391f5dc38f9112171883fcf28d49a18d671296a
45 DIST cctools-795.tar.gz 1993795 BLAKE2B dc0915f8647eecba5352e34dfc5752b679df39ead9a4734c49955a824d2cc127308eed46a614665dfe08a9d3036eb37f587e1b765a7df727facc42a33befacb0 SHA512 5a34a73dc71d3574a357f6b0f26a48a99dd0995d62695b309cdfe85c4960934b410455b1ba6bdbc9a4e32106bb45b35555604975d2a80ad1be21f5d4eac69254
46 -DIST cctools-822.tar.gz 2024412 BLAKE2B 6b58499a9dfc2a1b166ff428f1e263cd44e03c50cdc8f6e467cfee93bc2dc2a9c81bf7626479dce195b152f04217e2d3a427afac45484cba4c5f2bdfbb7e46f9 SHA512 8b02cc837d5e0520f35da445f25ba86b5042d5caa27b49a599e829ed89428cf78dbd1831bcf6c18301f941fbfb31ac2114e248041d98008a466e1574f4fe1586
47 -DIST cctools-855.tar.gz 1699635 BLAKE2B 4d98cf2bbced6894083dc2733a35cf9a4c47f71172fe98265a8f047218cc90276085919129553e3a1ea0658416eebf3b7cf0908bd32ac1a224480554257999ee SHA512 50f5d015ce807aa5ca274dd2deea810b8b375110e60b5e334ca4b2170526b738ea5f86a5436caebbdb748badc3b89601d0f450f5b867d8393c89e336a3db4b3f
48 -DIST cctools-862.tar.gz 1702345 BLAKE2B de84058aa78824562b0eabf93a29badaba0908a7140336a281a6ea46a9b09d893433a908c299e8de866a76e0eeb98b730570958fc8fac559ccc6e35f5138b121 SHA512 faa401c1dc55bfb9cd2a9a9cc7bc9d473ee63b019607967c8b0da325514d6a1f7b1f52404370bcc018e86d30d75a4b01183f49b793f577110663efe43871360a
49 -DIST cctools-870.tar.gz 1702965 BLAKE2B c0e6ebe33ce283d1c89d52df0a6d99c7065131e215532ad5e080d22e9e4742a146a9d448043f3b9ef8cf36ff971fe52c30fe0097b2a0ae5a9a6bce271232af46 SHA512 8cd16350bc2eea576e3922f44de3d15cfcf492a5561215a3a9160f2045284a2fd0fa28e030686868bae8619993fc8901649d7576c56d86a423f9955b27f65138
50 -DIST cctools-877.5.tar.gz 1717664 BLAKE2B 36f64578c23689e1e056500a6368854d5c80f49984d7b910d0b347042ecdcbb613e47ab83191d07ab6daa9bc12c567fc7f5aa5d97b817f80f96bb95bec4c24f1 SHA512 cec8520450c3b1ffe77bd841ad6b8f6b0d28657e7c39ae1525bfe7ec1460c0f4bb394da316e6ed5b08cb5df26b757b9d94a9923cc7eaf9b14315d045ea891062
51 -DIST cctools-877.7.tar.gz 1720523 BLAKE2B 78e4d387b34504a001a5dac2db5f791fcbeae7f1fc859b794e9262464dd2a6ad088dde07e47918d1b6fb3e6aff2b9c2ca495113135abce89945f4d1d75f252a1 SHA512 5c381fe8b85d1254f660eb3c3510d9e0a49792ae5bb0e69a4dfb5a18e7f1706ee1411589f20583a9d7f12126ef616f66f1ad5c1c4ff405f66b52759c0a4272b5
52 -DIST cctools-877.8.tar.gz 1720708 BLAKE2B 97bce69d7c88a917ad1351635b4bd0ebd3273f7a62b10dd3d58a0df7e1de2e05dc3fa04b014dff6966e77b85e264d1be181ac4d5dafc069c72c79d803393176a SHA512 3f75fbe4eacd89f2e6372a3167ed197e2b8bda9faa10fe6bce0cf9d3d3eca536f0af5fc4ce1e4bc6a24eb68db36f5d0b1d0bc3f9807e285e67cfaa2d336d81ef
53 -DIST cctools-886.tar.gz 1731850 BLAKE2B c206ad8c94fa3d132726db8cbc60ed09b6f1f7aa8118a99b1e7ed350323c11b729d68c912ba7648cf900cc2a26cbff12a03072afe92efe09c8974be280448731 SHA512 49f14e165da3a9fcf16614a810b8a2a68907348bd27a60b268b330e416a0bc070fb6445e1e6b80d849026bd6ce7de4459623ab86168e2d63bb492d1ba6680c5b
54 DIST cctools-895.tar.gz 1716126 BLAKE2B 9706a6b243518693888e5e21dfe8d83b217380b47db621a7f1b35105eb72fb8997353ff85133224b0856f6b6ec710f54a4fe79076d9e228f89c98b6f517de309 SHA512 4ef9db870385cc2c4263bcbe42ff0de80386771f5acbc7082a1818ecd6b8d7bb1bfa02a7fcfecd3e7281481aeaaac4c331359aca3564bfe7a4c7dea1e0d06126
55 DIST cctools-949.0.1.tar.gz 1968671 BLAKE2B b38fbae5d2ec011a94c2e4ec299c1ecd173f2c2516664cf925b06aaa078e234b59068158ea29dfcbf763ca98c73bc1806a507fbbe49a8d4d0a2fd4e602f401ce SHA512 13c493a48852c980d2829d28616c18640ad5ebfe6acd55143c4c948665e0b65377a459560667074fdac5e69bb6360fea13d988303c49fd3dd4a58e9b5c54ebcb
56 DIST darwin-xtools-8.2.1-r100.tar.gz 2934997 BLAKE2B d0324d47d3aa0afd0007fbbd16c74e046c643c645744cc7ef0535eeed275c2d61763a1c6708b3a0a796f0fc83e62b5e5fe907c62553b439bea750353cfac2f73 SHA512 7000bca61b1dc63d1d08a9bcf104dace4376c2656af0faddc28a7d6c3718dbe54713da96136091a2024a644eaf90758714d1e4eb3cfeec2df0e412d847f59c30
57 DIST dyld-132.13.tar.gz 342690 BLAKE2B 011418ba5b91a28bb7c5f8188af2fac5478bad53581396b7c1c4623a854a8f0d5ecb92d023246157830ed2db83bbf28e23225a255188e2d07eeb6c933814bda6 SHA512 2c9d50fc32868b696d88730eb6ea6afa9bb9f56883cc2ea4f1d41f370f311b7487a29ce0eff6761e1eeb086a18e2513953989d8d5d3ef1043bb662e86baadd3f
58 -DIST dyld-195.6.tar.gz 412518 BLAKE2B f525aac0020baa69c5d7c42a7027b0d2fdef9fa3c2e5d3831101989eab20f2eb7932c99355ca34e6e0b988b9808013739d452592e0b8832e1306cc6027cc5d0f SHA512 58a9ea27efc02e66f9d99bfa250af1d90326385385431e5279386bbd9ab53366bf7e8236543296908b7214c33523c8f60098a6298a7393b3180e2a6bce18e7c5
59 -DIST dyld-353.2.1.tar.gz 510036 BLAKE2B 6f355bcb87d6136d3c29b2766146303ecf092fb407296a0a93412598276ea88c4f826da75d20cc5d3e2bfac750a62c413b117ee95dd710eac83b647786fb109b SHA512 a9488620499f682e245b55b7e0e4ec02fc0bcf03bd8a70d4a4ee0ba762067ade2f41c188990c101727476d41c19368b4cc89cccf2df40231da1c777742c7391f
60 -DIST dyld-360.14.tar.gz 518873 BLAKE2B ebf651a8880ef337ed5ee7d5d7b9d2da77fed481f4a01c52dbc81e1192138a423bafc89b49417d1edf36167c59600a6ef63d60c2f3e080d4f77b19405e5b0755 SHA512 cfe536ea1f0ad8fbc2846417289e3e36704bf69388e083e0ece0ffa6eeee501e7e9b2ba47eed7be0e5120b5cc72f33b2fc0d2d39ba7a16beaf98db94dfb4ae40
61 -DIST dyld-360.17.tar.gz 518876 BLAKE2B f627c7628b0956fef040a526116d27db14010eb0769394c9130d5b0d24d0d03a471d1c44e9533a34b1832f542a98432f2045b309a85dff4e0c1756f7bc1b0fb4 SHA512 aae2a0ea1f4130de51aa920ce1affa579993b3b58a7d398ec998c0d7ac4919907ba4e508b9bfc15080b1f4f4cf15e4615bc416b6ec32b52a4b5d8fbbad1dc9ab
62 -DIST dyld-360.18.tar.gz 518957 BLAKE2B 536954a681a18d55f9dba6e4ec2bce116dea84f80769c57518b50b3187625a7384bb77afe3d8b24c456da3ab4d8206f1ddfdbd008e4674dc1f5e9574ca09596f SHA512 1299bd2dd5cd663917ec4a03ed0f875e0bf07d6680d3d095af12f4b11960c02a52e361bde27ff88843f80832fc6d36654e2556ee0a3ca2259fcded5b568ab2f9
63 DIST dyld-421.2.tar.gz 625173 BLAKE2B 8f8325314861ae2ea10fbe78c74c7199b547973ac61a8e9cb76fb874a0e53395ea31c04e489f85ac7cfdb5715ae5051679453de75eb195e313113e7bbbc70340 SHA512 75f2fb840da980d44649aa3e045f50c4e37d4403fbdb1e2e5f1a85bf6d8859e1130053c3806f7ef992fdfc6573f7f18146263c690144bdd3df31452c6bdd8bd8
64 DIST dyld-551.4.tar.gz 832297 BLAKE2B e65c5b2ed90af6ec94f1295efc984404af99f0e5dc666bfc854379f13fd2e98b8048fae84b7bc8864fe27112abf12f741a33cc404b18ae7c88b7abd6a1d9e3c6 SHA512 896281c4b2330c92ed538af58f1b60906ed0a9ffa3099a5e8ef9a15b7ed974259bf546fd2ab7562739f2c8cf1fdfb44ea0ea7567092c77f2ea2cab377da064b0
65 -DIST ld64-128.2.tar.gz 494361 BLAKE2B 787d145edafe56a134ead84ae376842d9994608a771d0512a6f56738e170c2498a031c77c895da79b30efa309986c8cd624f5f09cd9784f63c7b2d2e0334e0d9 SHA512 f50a3c396e6f4fddc685bb3f59f9a260bd2f47060535d24259b2b411e4f759e48daa35819da682ad9bceaa1b9a1981eb34716387d988cdc4b7eec9ab2169726e
66 -DIST ld64-236.3.tar.gz 624400 BLAKE2B 37c074093c312fc9720564aa9702d6007bd44252a1282c4c67e0c1b75f6f4aeaf5b6278df3d5ed5f5baee948c547a462476dfe5eabb665612e4d31d57f26a286 SHA512 e103fc5efd4d4161c7dc55b1ad53aebd455cfcd72de7873ebfdf5ba896b7b0da9c9aeb12e1e1a76425768ac1dc85d864a4ce33b5b841ba115eeab96a2e2965aa
67 -DIST ld64-241.9.tar.gz 639944 BLAKE2B 1aa58dbb4e42b8314421bb10867aacd6cdece7a5983ed88571349e97366b61c1de175769b2d9f7b04495f2f306406f8a6fe785548f74dd39f419f321ec24d93b SHA512 6958e7064f4fd8b47501225fc4cbc6292e5da63d7f4103ad79add177ef7382c8de3c732f14d19a9c11356b8070f578392383caccc3795e2ab8ef7b7ddbde88da
68 -DIST ld64-242.tar.gz 641597 BLAKE2B 09d241cbd24e98cf59cd4b25f2237fb518bbd6550d753812ea24ab7f1acdec0082319507e92b77362f61d599eef8c8abfec48dc2c87678454ced3b42fce917c2 SHA512 bde2eee69ada7f81d5e97762c371661f304372d5461da4bd843c76d0abcab518193fa71b917850af2022e586a756a3624a0ad28debfa8de6777e3c255d83dd34
69 -DIST ld64-253.3.tar.gz 671087 BLAKE2B 33d00185bdeb7eadc8c1f94d338ebe08c23b8944daeca794e1ee8e58528d6c9775eecf704b098a87bc0a3281b2e3dc9e634714923fea65cc22977b2cd89cfa1d SHA512 ce2c86f2f37ee37bd417315ba51815707b0ca6f24da06819fd1b2d0b4fe0762e45a08c3faf2c0c980e4913c9cbfbf6c8185f9a6810cfa1d9dad231b5bb276081
70 -DIST ld64-253.6.tar.gz 671838 BLAKE2B e7b05c658896a799cfb6dd8d4d74ec16d9a2c39cdbdfac1e7d3f6b5ccd4722b343a9567dbd649e71e96742d6b2eae74ac951bada8899be51f152809c579c73e9 SHA512 40b29e273ed3d69e4f92593cadea831fd618452d3f05e30c0b836ffc05db61fd345cb2f6d63271563c786ecabd47f19f8369456cbe6422800117a53c654a98c6
71 -DIST ld64-253.9.tar.gz 673388 BLAKE2B 65af4f3ddd49b15deecf824fd991d41e5223ff9c963a0ccc89862181353c52279897171d37a00939d6678f2260efa7f7852b9dfd71c2c7b4b00d3fa2dbd85a34 SHA512 a52b081295c19f28858f8ee47c05249bba3e15cc8bb6f7017d9f6dcf7509cdacef7a4b16b3940cd0b1f72b3b67efb503ab2e3801b31e50cda1d34c6bc8df8dcf
72 -DIST ld64-264.3.102.tar.gz 681509 BLAKE2B 4a0699ec761bd145b8034c8577ce9f843c9384fee5486855565d1d89858a445492d66aca2798a6e9c1bb4f59328680c05bcf1cd024d917c063e74d3549073ce0 SHA512 ec221de3624dcce3db694ec2d7b05f3c939cd1ba79c97437ba9f2d4e5d9c37369bb5df82cc37bc158bf5c4e2128cc2b96ca1a7477f98538850092bffa4601da0
73 -DIST ld64-274.1.tar.gz 670493 BLAKE2B 00ab46b09f29c6143c5066ffb0a12017fb2268a5f205c41851a95bc38443aa5494ce81b793a6668bcd3a8abb0ba4215f0da372c413ae52e4ca1e437ad370f8e0 SHA512 ef5d6802f759e09aa2dfab7eb84e9cd2a57b28da3f150833cf1a922c395dd696e501b1bcb10385cbe995f4945fc6c99c2d2d8c50c42f369186bdc1ac3e30ad99
74 DIST ld64-274.2.tar.gz 671652 BLAKE2B f45bb65bbe65c7baff54dec633a49b8ea472a59a7978aa050b329132963b26e4a2b3ef3dd034b04247531a11a07de5135b3726a429165cbfcae50e06c09531f4 SHA512 7b4e17f199909450b697bf719564c6841d46f5116c48dd47ff483ae7ddfe2965db1b7c024ed8ebeeaf90cd983ed353b95f7f23c93c8971536977dc892e6d6a9d
75 DIST ld64-530.tar.gz 744871 BLAKE2B 8117160ffe55c02b463559a52fcbd109629d6e2b4707f36391ec2151785cc1ab5be911129397af7bea05f06b2c718bc345a1e3b6b0838dae943f4083612af38f SHA512 0197ec05f9fbaf9e1902bb6e0819d0562573a433e0445809f1020e76126d3af57222a8e9e187fce793a5b581f825b48bfb5ec5cca9ae3eb77758cbc7f20e9e20
76 -DIST ld64-85.2.1.tar.gz 598524 BLAKE2B 92cb3c763cc067e2ee6c4fec910f078cc69daca2a328a74ebc988908b1655138873b69bfb0c19b284f0aedb678e99de3866d4f13460cb3427985704093dca37a SHA512 b5ffaffc43e74f22688fecd9fb3023a59160cf051f9412f34e6b0acf1c4f9d43ba641e199d8d6b1c6cf3bbbbf117645988fd879ded1fec8be056b6941fe79999
77 DIST ld64-97.17.tar.gz 421947 BLAKE2B 56820ef28490f2e0181d6e36b87506c6f00ae5759afe304a063fb6bd1904ace566ef4aa69ff0d235d65968af547a1a5735cb23bcefa990f418740188d399b637 SHA512 841774a1a7c0e2f661ac7e66703f7578d8f11274897ffa15f8c49daf290a23465763f264a4dae99f15754891f44c425c0d327652112007b499bc8f755a7fc9d6
78 DIST libunwind-30.tar.gz 82811 BLAKE2B 26993d6afa6930931c01b579326964a66832ed7a6ffa26eff10016c8d6d175d3b671753cf8700dcdbae7f0a9c01b16e9cbd3c9fe86697608f1f08a8eceb64782 SHA512 57106eafa1516791b4e0db2de6c6336bc0c1cbd8bf098a6d3a809fafa457802c95a7aeae9137f4ca5922a3018dfd8f597907ea4187b0afbbf267500eae00041f
79 -DIST libunwind-35.3.tar.gz 90002 BLAKE2B d63ab0ae6e66a6f35ec17de9713d3bf4853cd80af218e868762b20dd8a44d42cd9ff8fce1d8c46fca4759144726bbf248a02a5dede5a94a2b75d3b45ddb7d018 SHA512 b7d9a86ef24f1fe9ca14517471e03a910219a229af9f0d4cf94435115971360640451107ba20c93fb1aab788f8b6eb5ed580ee08fdaa990b9fa43e9ae360c6b4
80
81 diff --git a/sys-devel/binutils-apple/binutils-apple-3.2.ebuild b/sys-devel/binutils-apple/binutils-apple-3.2.ebuild
82 deleted file mode 100644
83 index 4ccf5b257b9..00000000000
84 --- a/sys-devel/binutils-apple/binutils-apple-3.2.ebuild
85 +++ /dev/null
86 @@ -1,239 +0,0 @@
87 -# Copyright 1999-2019 Gentoo Authors
88 -# Distributed under the terms of the GNU General Public License v2
89 -
90 -EAPI="6"
91 -
92 -inherit eutils flag-o-matic toolchain-funcs
93 -
94 -RESTRICT="test" # the test suite will test what's installed.
95 -
96 -# LD64=ld64-95.2.12 # can't compile this one, missing libunwind/* includes
97 -# http://lists.apple.com/archives/Darwin-dev/2009/Sep/msg00025.html
98 -LD64=ld64-85.2.1 # from 3.1.2
99 -CCTOOLS=cctools-750
100 -LP64PATCHES=binutils-apple-LP64-patches-1
101 -
102 -DESCRIPTION="Darwin assembler as(1) and static linker ld(1), Xcode Tools 3.2"
103 -HOMEPAGE="http://www.opensource.apple.com/"
104 -SRC_URI="https://opensource.apple.com/tarballs/ld64/${LD64}.tar.gz
105 - https://opensource.apple.com/tarballs/cctools/${CCTOOLS}.tar.gz
106 - https://dev.gentoo.org/~grobian/distfiles/${LP64PATCHES}.tar.bz2
107 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-3.2-r0.tar.bz2"
108 -
109 -LICENSE="APSL-2"
110 -KEYWORDS="~ppc-macos ~x64-macos ~x86-macos"
111 -IUSE="test"
112 -
113 -RDEPEND="sys-devel/binutils-config"
114 -DEPEND="${RDEPEND}
115 - test? ( >=dev-lang/perl-5.8.8 )"
116 -
117 -SLOT="3"
118 -
119 -S=${WORKDIR}
120 -
121 -is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
122 -
123 -prepare_ld64() {
124 - cd "${S}"/${LD64}/src
125 - cp "${WORKDIR}"/Makefile . || die
126 -
127 - local VER_STR="\"@(#)PROGRAM:ld PROJECT:${LD64} (Gentoo ${PN}-${PVR})\\n\""
128 - sed -i \
129 - -e '/^#define LTO_SUPPORT 1/s:1:0:' \
130 - ObjectDump.cpp || die
131 - echo '#undef LTO_SUPPORT' > configure.h
132 - echo '' > linker_opts
133 - echo "char ldVersionString[] = ${VER_STR};" > version.cpp
134 -
135 - # clean up test suite
136 - cd "${S}"/${LD64}/unit-tests/test-cases
137 - local c
138 -
139 - # we don't have llvm
140 - ((++c)); rm -rf llvm-integration;
141 -
142 - # we don't have dtrace
143 - ((++c)); rm -rf dtrace-static-probes-coalescing;
144 - ((++c)); rm -rf dtrace-static-probes;
145 -
146 - # a file is missing
147 - ((++c)); rm -rf eh-coalescing-r
148 -
149 - # we don't do universal binaries
150 - ((++c)); rm -rf blank-stubs;
151 -
152 - # looks like a problem with apple's result-filter.pl
153 - ((++c)); rm -rf implicit-common3;
154 - ((++c)); rm -rf order_file-ans;
155 -
156 - # TODO no idea what goes wrong here
157 - ((++c)); rm -rf dwarf-debug-notes;
158 -
159 - elog "Deleted $c tests that were bound to fail"
160 -}
161 -
162 -src_prepare() {
163 - prepare_ld64
164 -
165 - cd "${S}"/${CCTOOLS}
166 - epatch "${WORKDIR}"/${PN}-3.1.1-as.patch
167 - epatch "${WORKDIR}"/${PN}-3.1.1-as-dir.patch
168 - epatch "${WORKDIR}"/${PN}-3.1.1-ranlib.patch
169 - epatch "${WORKDIR}"/${PN}-3.1.1-libtool-ranlib.patch
170 - epatch "${WORKDIR}"/${PN}-3.1.1-nmedit.patch
171 - epatch "${WORKDIR}"/${PN}-3.1.1-no-headers.patch
172 - epatch "${WORKDIR}"/${PN}-3.1.1-no-oss-dir.patch
173 -
174 - cd "${S}"/${LD64}
175 - epatch "${WORKDIR}"/${PN}-3.1.1-testsuite.patch
176 - epatch "${WORKDIR}"/LP64/ld64/*.patch
177 -
178 - cd "${S}"
179 - ebegin "cleaning Makefiles from unwanted CFLAGS"
180 - find . -name "Makefile" -print0 | xargs -0 sed \
181 - -i \
182 - -e 's/ -g / /g' \
183 - -e 's/^OFLAG =.*$/OFLAG =/' \
184 - -e 's/install -c -s/install/g'
185 - eend $?
186 -
187 - # -pg is used and the two are incompatible
188 - filter-flags -fomit-frame-pointer
189 -
190 - eapply_user
191 -}
192 -
193 -src_configure() {
194 - export CTARGET=${CTARGET:-${CHOST}}
195 - if [[ ${CTARGET} == ${CHOST} ]] ; then
196 - if [[ ${CATEGORY} == cross-* ]] ; then
197 - export CTARGET=${CATEGORY#cross-}
198 - fi
199 - fi
200 -
201 - LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
202 - INCPATH=${LIBPATH}/include
203 - DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
204 - if is_cross ; then
205 - BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${PV}
206 - else
207 - BINPATH=/usr/${CTARGET}/binutils-bin/${PV}
208 - fi
209 -
210 - if tc-is-gcc && [[ $(gcc-fullversion) != 4.2.1 ]] ; then
211 - # force gcc-apple
212 - CC=${CTARGET}-gcc-4.2.1
213 - CXX=${CTARGET}-g++-4.2.1
214 - fi
215 -}
216 -
217 -compile_ld64() {
218 - cd "${S}"/${LD64}/src
219 - # 'struct linkedit_data_command' is defined in mach-o/loader.h on leopard,
220 - # but not on tiger.
221 - [[ ${CHOST} == *-apple-darwin8 ]] && \
222 - append-flags -isystem "${S}"/${CCTOOLS}/include/
223 - emake
224 - use test && emake build_test
225 -}
226 -
227 -compile_cctools() {
228 - cd "${S}"/${CCTOOLS}
229 - emake \
230 - LTO= \
231 - TRIE= \
232 - EFITOOLS= \
233 - COMMON_SUBDIRS='libstuff ar misc otool' \
234 - SUBDIRS_32= \
235 - RC_CFLAGS="${CFLAGS}" OFLAG="${CFLAGS}"
236 -
237 - cd "${S}"/${CCTOOLS}/as
238 - emake \
239 - BUILD_OBSOLETE_ARCH= \
240 - RC_CFLAGS="-DASLIBEXECDIR=\"\\\"${EPREFIX}${LIBPATH}/\\\"\" ${CFLAGS}"
241 -}
242 -
243 -src_compile() {
244 - tc-export CC CXX
245 - compile_cctools
246 - compile_ld64
247 -}
248 -
249 -install_ld64() {
250 - exeinto ${BINPATH}
251 - doexe "${S}"/${LD64}/src/{ld64,rebase}
252 - dosym ld64 ${BINPATH}/ld
253 - insinto ${DATAPATH}/man/man1
254 - doins "${S}"/${LD64}/doc/man/man1/{ld,ld64,rebase}.1
255 -}
256 -
257 -install_cctools() {
258 - cd "${S}"/${CCTOOLS}
259 - emake install_all_but_headers \
260 - EFITOOLS= \
261 - COMMON_SUBDIRS='ar misc otool' \
262 - SUBDIRS_32= \
263 - RC_CFLAGS="${CFLAGS}" OFLAG="${CFLAGS}" \
264 - DSTROOT=\"${D}\" \
265 - BINDIR=\"${EPREFIX}\"${BINPATH} \
266 - LOCBINDIR=\"${EPREFIX}\"${BINPATH} \
267 - USRBINDIR=\"${EPREFIX}\"${BINPATH} \
268 - LOCLIBDIR=\"${EPREFIX}\"${LIBPATH} \
269 - MANDIR=\"${EPREFIX}\"${DATAPATH}/man/
270 - cd "${S}"/${CCTOOLS}/as
271 - emake install \
272 - BUILD_OBSOLETE_ARCH= \
273 - DSTROOT=\"${D}\" \
274 - USRBINDIR=\"${EPREFIX}\"${BINPATH} \
275 - LIBDIR=\"${EPREFIX}\"${LIBPATH} \
276 - LOCLIBDIR=\"${EPREFIX}\"${LIBPATH}
277 -
278 - cd "${ED}"${BINPATH}
279 - insinto ${DATAPATH}/man/man1
280 - local skips manpage
281 - # ar brings an up-to-date manpage with it
282 - skips=( ar )
283 - for bin in *; do
284 - for skip in ${skips[@]}; do
285 - if [[ ${bin} == ${skip} ]]; then
286 - continue 2;
287 - fi
288 - done
289 - manpage=${S}/${CCTOOLS}/man/${bin}.1
290 - if [[ -f "${manpage}" ]]; then
291 - doins "${manpage}"
292 - fi
293 - done
294 - insinto ${DATAPATH}/man/man5
295 - doins "${S}"/${CCTOOLS}/man/*.5
296 -}
297 -
298 -src_test() {
299 - einfo "Running unit tests"
300 - cd "${S}"/${LD64}/unit-tests/test-cases
301 - # need host arch, since GNU arch doesn't do what Apple's does
302 - tc-export CC CXX
303 - perl ../bin/make-recursive.pl \
304 - ARCH="$(/usr/bin/arch)" \
305 - RELEASEDIR="${S}"/${LD64}/src \
306 - | perl ../bin/result-filter.pl
307 -}
308 -
309 -src_install() {
310 - install_ld64
311 - install_cctools
312 -
313 - cd "${S}"
314 - insinto /etc/env.d/binutils
315 - cat <<-EOF > env.d
316 - TARGET="${CHOST}"
317 - VER="${PV}"
318 - FAKE_TARGETS="${CHOST}"
319 - EOF
320 - newins env.d ${CHOST}-${PV}
321 -}
322 -
323 -pkg_postinst() {
324 - binutils-config ${CHOST}-${PV}
325 -}
326
327 diff --git a/sys-devel/binutils-apple/binutils-apple-4.3-r2.ebuild b/sys-devel/binutils-apple/binutils-apple-4.3-r2.ebuild
328 deleted file mode 100644
329 index b3cf69bdae4..00000000000
330 --- a/sys-devel/binutils-apple/binutils-apple-4.3-r2.ebuild
331 +++ /dev/null
332 @@ -1,337 +0,0 @@
333 -# Copyright 1999-2019 Gentoo Authors
334 -# Distributed under the terms of the GNU General Public License v2
335 -
336 -EAPI="5"
337 -
338 -inherit eutils flag-o-matic toolchain-funcs
339 -
340 -LD64=ld64-128.2
341 -CCTOOLS_VERSION=822
342 -CCTOOLS=cctools-${CCTOOLS_VERSION}
343 -CCTOOLS_HEADERS=cctools-855
344 -LIBUNWIND=libunwind-30
345 -DYLD=dyld-195.6
346 -
347 -DESCRIPTION="Darwin assembler as(1) and static linker ld(1), Xcode Tools ${PV}"
348 -HOMEPAGE="http://www.opensource.apple.com/"
349 -SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz
350 - http://www.opensource.apple.com/tarballs/cctools/${CCTOOLS}.tar.gz
351 - http://www.opensource.apple.com/tarballs/cctools/${CCTOOLS_HEADERS}.tar.gz
352 - http://www.opensource.apple.com/tarballs/libunwind/${LIBUNWIND}.tar.gz
353 - http://www.opensource.apple.com/tarballs/dyld/${DYLD}.tar.gz
354 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-4.3-r1.tar.bz2"
355 -
356 -LICENSE="APSL-2"
357 -KEYWORDS="~ppc-macos ~x64-macos ~x86-macos"
358 -IUSE="lto test multitarget"
359 -RESTRICT="!test? ( test )"
360 -
361 -RDEPEND="sys-devel/binutils-config
362 - lto? ( sys-devel/llvm:* )"
363 -DEPEND="${RDEPEND}
364 - test? ( >=dev-lang/perl-5.8.8 )
365 - || ( >=sys-devel/gcc-apple-4.2.1 sys-devel/llvm:* )"
366 -
367 -SLOT="4"
368 -
369 -S=${WORKDIR}
370 -
371 -is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
372 -
373 -src_prepare() {
374 - if use multitarget ; then
375 - ewarn "You have enabled support for non-standard target architectures"
376 - ewarn "using USE=multitarget. This includes experimental support for"
377 - ewarn "ppc and ppc64 which is a community forward-port from the last"
378 - ewarn "version of ld64 to officially support PPC."
379 -
380 - if [[ ${CHOST} == powerpc*-darwin* ]] ; then
381 - ewarn "HERE BE DRAGONS! Your system seems to be PPC which means that"
382 - ewarn "the actual usability of your Gentoo programs will depend on the"
383 - ewarn "above-mentioned experimental PPC support in the linker. Be"
384 - ewarn "sure to keep a known-to-work version like ${PN}-3.2.6 around!"
385 - fi
386 - fi
387 -
388 - cd "${S}"/${LD64}/src
389 - cp "${S}"/ld64-128.2-Makefile-3 Makefile
390 - epatch "${S}"/ld64-127.2-lto.patch
391 - epatch "${S}"/ld64-128.2-stdlib.patch
392 - epatch "${S}"/ld64-241.9-register-names.patch
393 - epatch "${S}"/ld64-241.9-get-comm-align.patch
394 - epatch "${S}"/ld64-241.9-cc_md5.patch
395 - epatch "${S}"/ld64-128.2-1010.patch
396 - epatch "${S}"/ld64-128.2-ppc.patch
397 -
398 - # We used to use our own copy of lto.h, which doesn't require llvm
399 - # build-env. Current versions of llvm provide
400 - # $EPREFIX/usr/include/llvm-c/lto.h as well as
401 - # $EPREFIX/usr/lib/libLTO.{so,dylib}, so we just use these.
402 -
403 - # provide missing headers from libunwind and dyld
404 - mkdir -p include/{mach,mach-o/arm} || die
405 - # never present because it's private
406 - cp ../../${DYLD}/include/mach-o/dyld_priv.h include/mach-o || die
407 - # missing on <= 10.5
408 - cp ../../${LIBUNWIND}/include/libunwind.h include/ || die
409 - cp ../../${LIBUNWIND}/include/mach-o/compact_unwind_encoding.h include/mach-o || die
410 - # missing on <= 10.4
411 - cp ../../${DYLD}/include/mach-o/dyld_images.h include/mach-o || die
412 - cp ../../${CCTOOLS}/include/mach-o/loader.h include/mach-o || die
413 - # use copies from cctools because they're otherwise hidden in some SDK
414 - cp ../../${CCTOOLS}/include/mach-o/arm/reloc.h include/mach-o/arm || die
415 - # provide all required CPU_TYPEs on all platforms
416 - cp ../../${CCTOOLS}/include/mach/machine.h include/mach/machine.h
417 - # add alias for newer identifiers, because ld64 uses both but cctools
418 - # header only defines the older
419 - epatch "${S}"/ld64-236.3-missing-cputypes.patch
420 -
421 - # mimic OS X Leopard-style Availability.h macros for libunwind.h on
422 - # older systems
423 - [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 8 ]] && \
424 - echo "#define __OSX_AVAILABLE_STARTING(x,y) " > include/Availability.h
425 -
426 - local VER_STR="\"@(#)PROGRAM:ld PROJECT:${LD64} (Gentoo ${PN}-${PVR})\\n\""
427 - echo "char ldVersionString[] = ${VER_STR};" > version.cpp
428 -
429 - epatch "${S}"/ld64-123.2-debug-backtrace.patch
430 - if [[ ${CHOST} == powerpc*-darwin* ]] ; then
431 - epatch "${S}"/ld64-123.2-darwin8-no-mlong-branch-warning.patch
432 - epatch "${S}"/ld64-127.2-thread_state.patch
433 - fi
434 -
435 - cd "${S}"/${CCTOOLS}
436 - epatch "${S}"/${PN}-4.0-as.patch
437 - epatch "${S}"/${PN}-4.2-as-dir.patch
438 - epatch "${S}"/${PN}-3.2.3-ranlib.patch
439 - epatch "${S}"/${PN}-3.1.1-libtool-ranlib.patch
440 - epatch "${S}"/${PN}-3.1.1-nmedit.patch
441 - epatch "${S}"/${PN}-3.1.1-no-headers.patch
442 - epatch "${S}"/${PN}-4.0-no-oss-dir.patch
443 - epatch "${S}"/${PN}-4.2-lto.patch
444 - epatch "${S}"/${PN}-5.1-extraneous-includes.patch
445 - epatch "${S}"/${PN}-5.1-thread-state-redefined.patch
446 - epatch "${S}"/${PN}-4.3-makefile-target-warning.patch
447 - epatch "${S}"/${PN}-4.3-lto-prefix.patch
448 - cp ../${LD64}/src/other/prune_trie.h include/mach-o/ || die
449 - # __darwin_i386_float_state missing on <= 10.4
450 - cp -a ../${CCTOOLS_HEADERS}/include/mach/i386 include/mach
451 -
452 - # do not build profileable libstuff to save compile time
453 - sed -i -e "/^all:/s, profile , ," libstuff/Makefile
454 -
455 - # cctools version is provided to make via RC_ProjectSourceVersion which
456 - # generates and compiles it as apple_version[] into libstuff. From
457 - # there it's picked up by the individual tools. Since
458 - # RC_ProjectSourceVersion is also used as library version, we can't
459 - # just append our local version info. So we hack the libstuff Makefile
460 - # to include our Gentoo version.
461 - sed -i -e "/cctools-.*(RC_ProjectSourceVersion).*OFILE_DIR/s,Version),Version) (Gentoo ${PN}-${PVR})," \
462 - libstuff/Makefile
463 -
464 - # clean up test suite
465 - cd "${S}"/${LD64}/unit-tests/test-cases
466 - local c
467 -
468 - # we don't have llvm
469 - ((++c)); rm -rf llvm-integration;
470 -
471 - # we don't have dtrace
472 - ((++c)); rm -rf dtrace-static-probes-coalescing;
473 - ((++c)); rm -rf dtrace-static-probes;
474 -
475 - # a file is missing
476 - ((++c)); rm -rf eh-coalescing-r
477 -
478 - # we don't do universal binaries
479 - ((++c)); rm -rf blank-stubs;
480 -
481 - # looks like a problem with apple's result-filter.pl
482 - ((++c)); rm -rf implicit-common3;
483 - ((++c)); rm -rf order_file-ans;
484 -
485 - # TODO no idea what goes wrong here
486 - ((++c)); rm -rf dwarf-debug-notes;
487 -
488 - einfo "Deleted $c tests that were bound to fail"
489 -
490 - cd "${S}"
491 - ebegin "cleaning Makefiles from unwanted CFLAGS"
492 - find . -name "Makefile" -print0 | xargs -0 sed \
493 - -i \
494 - -e 's/ -g / /g' \
495 - -e 's/^G =.*$/G =/' \
496 - -e 's/^OFLAG =.*$/OFLAG =/' \
497 - -e 's/install -c -s/install/g'
498 - eend $?
499 -}
500 -
501 -src_configure() {
502 - ENABLE_LTO=0
503 - use lto && ENABLE_LTO=1
504 -
505 - export CTARGET=${CTARGET:-${CHOST}}
506 - if [[ ${CTARGET} == ${CHOST} ]] ; then
507 - if [[ ${CATEGORY} == cross-* ]] ; then
508 - export CTARGET=${CATEGORY#cross-}
509 - fi
510 - fi
511 -
512 - LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
513 - INCPATH=${LIBPATH}/include
514 - DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
515 - if is_cross ; then
516 - BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${PV}
517 - else
518 - BINPATH=/usr/${CTARGET}/binutils-bin/${PV}
519 - fi
520 -
521 - # CPPFLAGS only affects ld64, cctools don't use 'em (which currently is
522 - # what we want)
523 - append-cppflags -DNDEBUG
524 -
525 - CCTOOLS_OFLAG=
526 - if [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 8 ]] ; then
527 - # cctools expect to use UNIX03 struct member names.
528 - # This is default on > 10.4. Activate it on <= 10.4 by defining
529 - # __DARWIN_UNIX03 explicitly.
530 - CCTOOLS_OFLAG="-D__DARWIN_UNIX03=1"
531 - fi
532 -
533 - cat <<EOF > ${LD64}/src/configure.h
534 -#define DEFAULT_MACOSX_MIN_VERSION "${MACOSX_DEPLOYMENT_TARGET}"
535 -#define SUPPORT_ARCH_arm_any 1
536 -EOF
537 -
538 - use multitarget && cat <<EOF >> ${LD64}/src/configure.h
539 -#define SUPPORT_ARCH_ppc 1
540 -EOF
541 -#define SUPPORT_ARCH_ppc64 1
542 -}
543 -
544 -compile_ld64() {
545 - einfo "building ${LD64}"
546 - cd "${S}"/${LD64}/src
547 - emake \
548 - LTO=${ENABLE_LTO}
549 -
550 - use test && emake build_test
551 -}
552 -
553 -compile_cctools() {
554 - einfo "building ${CCTOOLS}"
555 - cd "${S}"/${CCTOOLS}
556 - # -j1 because it fails too often with weird errors
557 - emake \
558 - LIB_PRUNETRIE="-L../../${LD64}/src -lprunetrie" \
559 - EFITOOLS= \
560 - ENABLE_LTO="${ENABLE_LTO}" \
561 - COMMON_SUBDIRS='libstuff ar misc otool' \
562 - SUBDIRS_32= \
563 - LEGACY= \
564 - RC_ProjectSourceVersion=${CCTOOLS_VERSION} \
565 - RC_CFLAGS="${CFLAGS}" \
566 - OFLAG="${CCTOOLS_OFLAG}" \
567 - -j1
568 -
569 - cd "${S}"/${CCTOOLS}/as
570 - emake \
571 - BUILD_OBSOLETE_ARCH= \
572 - RC_ProjectSourceVersion=${CCTOOLS_VERSION} \
573 - RC_CFLAGS="-DASLIBEXECDIR=\"\\\"${EPREFIX}${LIBPATH}/\\\"\" ${CFLAGS}" \
574 - OFLAG="${CCTOOLS_OFLAG}"
575 -}
576 -
577 -src_compile() {
578 - compile_ld64
579 - compile_cctools
580 -}
581 -
582 -install_ld64() {
583 - exeinto ${BINPATH}
584 - doexe "${S}"/${LD64}/src/{ld64,rebase,dyldinfo,unwinddump,ObjectDump}
585 - dosym ld64 ${BINPATH}/ld
586 - insinto ${DATAPATH}/man/man1
587 - doins "${S}"/${LD64}/doc/man/man1/{ld,ld64,rebase}.1
588 -}
589 -
590 -install_cctools() {
591 - cd "${S}"/${CCTOOLS}
592 - emake install_all_but_headers \
593 - EFITOOLS= \
594 - COMMON_SUBDIRS='ar misc otool' \
595 - SUBDIRS_32= \
596 - DSTROOT=\"${D}\" \
597 - BINDIR=\"${EPREFIX}\"${BINPATH} \
598 - LOCBINDIR=\"${EPREFIX}\"${BINPATH} \
599 - USRBINDIR=\"${EPREFIX}\"${BINPATH} \
600 - LOCLIBDIR=\"${EPREFIX}\"${LIBPATH} \
601 - MANDIR=\"${EPREFIX}\"${DATAPATH}/man/
602 - cd "${S}"/${CCTOOLS}/as
603 - emake install \
604 - BUILD_OBSOLETE_ARCH= \
605 - DSTROOT=\"${D}\" \
606 - USRBINDIR=\"${EPREFIX}\"${BINPATH} \
607 - LIBDIR=\"${EPREFIX}\"${LIBPATH} \
608 - LOCLIBDIR=\"${EPREFIX}\"${LIBPATH}
609 -
610 - cd "${ED}"${BINPATH}
611 - insinto ${DATAPATH}/man/man1
612 - local skips manpage
613 - # ar brings an up-to-date manpage with it
614 - skips=( ar )
615 - for bin in *; do
616 - for skip in ${skips[@]}; do
617 - if [[ ${bin} == ${skip} ]]; then
618 - continue 2;
619 - fi
620 - done
621 - manpage=${S}/${CCTOOLS}/man/${bin}.1
622 - if [[ -f "${manpage}" ]]; then
623 - doins "${manpage}"
624 - fi
625 - done
626 - insinto ${DATAPATH}/man/man5
627 - doins "${S}"/${CCTOOLS}/man/*.5
628 -}
629 -
630 -src_test() {
631 - if ! [ "${EPREFIX}"/usr/bin/clang ] ; then
632 - einfo "Test suite only works properly with clang - please install"
633 - return
634 - fi
635 -
636 - einfo "Running unit tests"
637 - cd "${S}"/${LD64}/unit-tests/test-cases
638 - # provide the new ld as a symlink to clang so that -ccc-install-dir
639 - # will pick it up
640 - ln -sfn ../../src/ld64 ld
641 - # use our arch command because the System's will report i386 even for an
642 - # x86_64 prefix
643 - perl ../bin/make-recursive.pl \
644 - BUILT_PRODUCTS_DIR="${S}"/${LD64}/src \
645 - ARCH="$(arch)" \
646 - LD="${S}"/${LD64}/src/ld64 \
647 - CC="clang -ccc-install-dir $PWD" \
648 - CXX="clang++ -ccc-install-dir $PWD" \
649 - OTOOL="${S}"/${CCTOOLS}/otool/otool.NEW \
650 - | perl ../bin/result-filter.pl
651 -}
652 -
653 -src_install() {
654 - install_ld64
655 - install_cctools
656 -
657 - cd "${S}"
658 - insinto /etc/env.d/binutils
659 - cat <<-EOF > env.d
660 - TARGET="${CHOST}"
661 - VER="${PV}"
662 - FAKE_TARGETS="${CHOST}"
663 - EOF
664 - newins env.d ${CHOST}-${PV}
665 -}
666 -
667 -pkg_postinst() {
668 - binutils-config ${CHOST}-${PV}
669 -}
670
671 diff --git a/sys-devel/binutils-apple/binutils-apple-5.1-r1.ebuild b/sys-devel/binutils-apple/binutils-apple-5.1-r1.ebuild
672 deleted file mode 100644
673 index 73ec964cbef..00000000000
674 --- a/sys-devel/binutils-apple/binutils-apple-5.1-r1.ebuild
675 +++ /dev/null
676 @@ -1,384 +0,0 @@
677 -# Copyright 1999-2019 Gentoo Authors
678 -# Distributed under the terms of the GNU General Public License v2
679 -
680 -EAPI="5"
681 -
682 -inherit eutils flag-o-matic toolchain-funcs
683 -
684 -LD64=ld64-236.3
685 -CCTOOLS_VERSION=855
686 -CCTOOLS=cctools-${CCTOOLS_VERSION}
687 -LIBUNWIND=libunwind-35.3
688 -DYLD=dyld-353.2.1
689 -
690 -DESCRIPTION="Darwin assembler as(1) and static linker ld(1), Xcode Tools ${PV}"
691 -HOMEPAGE="http://www.opensource.apple.com/"
692 -SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz
693 - http://www.opensource.apple.com/tarballs/cctools/${CCTOOLS}.tar.gz
694 - http://www.opensource.apple.com/tarballs/dyld/${DYLD}.tar.gz
695 - http://www.opensource.apple.com/tarballs/libunwind/${LIBUNWIND}.tar.gz
696 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-4.3-r1.tar.bz2
697 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-5.1-r2.tar.bz2"
698 -
699 -LICENSE="APSL-2"
700 -KEYWORDS="~ppc-macos ~x64-macos ~x86-macos"
701 -IUSE="lto test libcxx multitarget"
702 -RESTRICT="!test? ( test )"
703 -
704 -RDEPEND="sys-devel/binutils-config
705 - lto? ( sys-devel/llvm:* )
706 - libcxx? ( sys-libs/libcxx )"
707 -DEPEND="${RDEPEND}
708 - test? ( >=dev-lang/perl-5.8.8 )
709 - || ( >=sys-devel/gcc-apple-4.2.1 sys-devel/llvm:* )
710 - libcxx? ( sys-devel/llvm:* )"
711 -
712 -SLOT="5"
713 -
714 -S=${WORKDIR}
715 -
716 -is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
717 -
718 -src_prepare() {
719 - if use multitarget ; then
720 - ewarn "You have enabled support for non-standard target architectures"
721 - ewarn "using USE=multitarget. This includes experimental support for"
722 - ewarn "ppc and ppc64 which is a community forward-port from the last"
723 - ewarn "version of ld64 to officially support PPC."
724 -
725 - if [[ ${CHOST} == powerpc*-darwin* ]] ; then
726 - ewarn "HERE BE DRAGONS! Your system seems to be PPC which means that"
727 - ewarn "the actual usability of your Gentoo programs will depend on the"
728 - ewarn "above-mentioned experimental PPC support in the linker. Be"
729 - ewarn "sure to keep a known-to-work version like ${PN}-3.2.6 around!"
730 - fi
731 - fi
732 -
733 - cd "${S}"/${LD64}/src
734 - cp "${S}"/ld64-136-compile_stubs.h ld/compile_stubs.h
735 - cp "${S}"/ld64-236.3-Makefile-2 Makefile
736 -
737 - epatch "${S}"/ld64-236.3-nolto.patch
738 - epatch "${S}"/ld64-241.9-extraneous-includes.patch
739 - epatch "${S}"/ld64-241.9-osatomic.patch
740 - epatch "${S}"/ld64-236.3-arm64-fixup.patch
741 - epatch "${S}"/ld64-241.9-arm64-cputype.patch
742 - epatch "${S}"/ld64-236.3-crashreporter.patch
743 - epatch "${S}"/ld64-236.3-nosnapshots.patch
744 - epatch "${S}"/ld64-236.3-ppc.patch
745 - epatch "${S}"/ld64-236.3-constant-types-2.patch
746 - epatch "${S}"/ld64-236.3-gcc-2.patch
747 - epatch "${S}"/ld64-241.9-register-names.patch
748 - epatch "${S}"/ld64-241.9-get-comm-align.patch
749 - epatch "${S}"/ld64-241.9-cc_md5.patch
750 - epatch "${S}"/ld64-253.3-delete-warning.patch
751 -
752 - # We used to use our own copy of lto.h, which doesn't require llvm
753 - # build-env. Current versions of llvm provide
754 - # $EPREFIX/usr/include/llvm-c/lto.h as well as
755 - # $EPREFIX/usr/lib/libLTO.{so,dylib}, so we just use these.
756 -
757 - # provide missing headers from libunwind and dyld
758 - mkdir -p include/{mach,mach-o/arm} || die
759 - # never present because it's private
760 - cp ../../${DYLD}/include/mach-o/dyld_priv.h include/mach-o || die
761 - # missing on <= 10.5
762 - cp ../../${LIBUNWIND}/include/libunwind.h include/ || die
763 - cp ../../${LIBUNWIND}/include/mach-o/compact_unwind_encoding.h include/mach-o || die
764 - # missing on <= 10.4
765 - cp ../../${DYLD}/include/mach-o/dyld_images.h include/mach-o || die
766 - cp ../../${CCTOOLS}/include/mach-o/loader.h include/mach-o || die
767 - # use copies from cctools because they're otherwise hidden in some SDK
768 - cp ../../${CCTOOLS}/include/mach-o/arm/reloc.h include/mach-o/arm || die
769 - # provide all required CPU_TYPEs on all platforms
770 - cp ../../${CCTOOLS}/include/mach/machine.h include/mach/machine.h
771 - # add alias for newer identifiers, because ld64 uses both but cctools
772 - # header only defines the older
773 - epatch "${S}"/ld64-236.3-missing-cputypes.patch
774 -
775 - # mimic OS X Leopard-style Availability.h macros for libunwind.h on
776 - # older systems
777 - [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 8 ]] && \
778 - echo "#define __OSX_AVAILABLE_STARTING(x,y) " > include/Availability.h
779 -
780 - local VER_STR="\"@(#)PROGRAM:ld PROJECT:${LD64} (Gentoo ${PN}-${PVR})\\n\""
781 - echo "char ldVersionString[] = ${VER_STR};" > version.cpp
782 -
783 - epatch "${S}"/ld64-123.2-debug-backtrace.patch
784 - if [[ ${CHOST} == powerpc*-darwin* ]] ; then
785 - epatch "${S}"/ld64-123.2-darwin8-no-mlong-branch-warning.patch
786 - epatch "${S}"/ld64-127.2-thread_state.patch
787 - fi
788 -
789 - cd "${S}"/${CCTOOLS}
790 - epatch "${S}"/${PN}-4.5-as.patch
791 - epatch "${S}"/${PN}-5.1-as-dir.patch
792 - epatch "${S}"/${PN}-5.1-ranlib.patch
793 - epatch "${S}"/${PN}-3.1.1-libtool-ranlib.patch
794 - epatch "${S}"/${PN}-3.1.1-no-headers.patch
795 - epatch "${S}"/${PN}-4.0-no-oss-dir.patch
796 - epatch "${S}"/${PN}-5.1-nolto.patch
797 - epatch "${S}"/cctools-839-intel-retf.patch
798 - epatch "${S}"/${PN}-5.1-extraneous-includes.patch
799 - epatch "${S}"/${PN}-5.1-otool-stdc.patch
800 - epatch "${S}"/${PN}-5.1-constant-types.patch
801 - epatch "${S}"/${PN}-5.1-strnlen.patch
802 - epatch "${S}"/${PN}-5.1-ppc.patch
803 - epatch "${S}"/${PN}-5.1-thread-state-redefined.patch
804 - epatch "${S}"/${PN}-5.1-makefile-target-warning.patch
805 - epatch "${S}"/${PN}-5.1-lto-prefix.patch
806 - cp ../${LD64}/src/other/prune_trie.h include/mach-o/ || die
807 -
808 - # do not build profileable libstuff to save compile time
809 - sed -i -e "/^all:/s, profile , ," libstuff/Makefile
810 -
811 - # cctools version is provided to make via RC_ProjectSourceVersion which
812 - # generates and compiles it as apple_version[] into libstuff. From
813 - # there it's picked up by the individual tools. Since
814 - # RC_ProjectSourceVersion is also used as library version, we can't
815 - # just append our local version info. So we hack the libstuff Makefile
816 - # to include our Gentoo version.
817 - sed -i -e "/cctools-.*(RC_ProjectSourceVersion).*OFILE_DIR/s,Version),Version) (Gentoo ${PN}-${PVR})," \
818 - libstuff/Makefile
819 -
820 - # clean up test suite
821 - cd "${S}"/${LD64}/unit-tests/test-cases
822 - local c
823 -
824 - # we don't have llvm
825 - ((++c)); rm -rf llvm-integration;
826 -
827 - # we don't have dtrace
828 - ((++c)); rm -rf dtrace-static-probes-coalescing;
829 - ((++c)); rm -rf dtrace-static-probes;
830 -
831 - # a file is missing
832 - ((++c)); rm -rf eh-coalescing-r
833 -
834 - # we don't do universal binaries
835 - ((++c)); rm -rf blank-stubs;
836 -
837 - # looks like a problem with apple's result-filter.pl
838 - ((++c)); rm -rf implicit-common3;
839 - ((++c)); rm -rf order_file-ans;
840 -
841 - # TODO no idea what goes wrong here
842 - ((++c)); rm -rf dwarf-debug-notes;
843 -
844 - einfo "Deleted $c tests that were bound to fail"
845 -
846 - cd "${S}"
847 - ebegin "cleaning Makefiles from unwanted CFLAGS"
848 - find . -name "Makefile" -print0 | xargs -0 sed \
849 - -i \
850 - -e 's/ -g / /g' \
851 - -e 's/^G =.*$/G =/' \
852 - -e 's/^OFLAG =.*$/OFLAG =/' \
853 - -e 's/install -c -s/install/g'
854 - eend $?
855 -}
856 -
857 -src_configure() {
858 - ENABLE_LTO=0
859 - use lto && ENABLE_LTO=1
860 -
861 - export CTARGET=${CTARGET:-${CHOST}}
862 - if [[ ${CTARGET} == ${CHOST} ]] ; then
863 - if [[ ${CATEGORY} == cross-* ]] ; then
864 - export CTARGET=${CATEGORY#cross-}
865 - fi
866 - fi
867 -
868 - LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
869 - INCPATH=${LIBPATH}/include
870 - DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
871 - if is_cross ; then
872 - BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${PV}
873 - else
874 - BINPATH=/usr/${CTARGET}/binutils-bin/${PV}
875 - fi
876 -
877 - if [ "${CXX/*clang*/yes}" = "yes" ] ; then
878 - if use libcxx ; then
879 - append-cxxflags -stdlib=libc++
880 - CXXLIB=-stdlib=libc++
881 - else
882 - # force libstdc++ for systems where libc++ is default (OS X 10.9+?)
883 - append-cxxflags -stdlib=libstdc++
884 - CXXLIB=-stdlib=libstdc++
885 - fi
886 - else
887 - use libcxx && \
888 - ewarn "libcxx only available with clang and your C++ compiler ($CXX) does not seem to be clang"
889 - fi
890 -
891 - # CPPFLAGS only affects ld64, cctools don't use 'em (which currently is
892 - # what we want)
893 - append-cppflags -DNDEBUG
894 -
895 - # Block API and thus snapshots supported on >= 10.6
896 - [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -ge 10 ]] && \
897 - append-cppflags -DSUPPORT_SNAPSHOTS
898 -
899 - CCTOOLS_OFLAG=
900 - if [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 8 ]] ; then
901 - # cctools expect to use UNIX03 struct member names.
902 - # This is default on > 10.4. Activate it on <= 10.4 by defining
903 - # __DARWIN_UNIX03 explicitly.
904 - CCTOOLS_OFLAG="-D__DARWIN_UNIX03=1"
905 - fi
906 -
907 - # if compiling with USE multitarget, extract all the known arches from
908 - # create_configure and pass them back to it
909 - creco=${LD64}/src/create_configure
910 - ARCHS_TO_SUPPORT=""
911 - if use multitarget ; then
912 - ARCHS_TO_SUPPORT="$(grep KNOWN_ARCHS= $creco | \
913 - cut -d\" -f2 | tr ',' ' ')"
914 - fi
915 -
916 - # Create configure.h for ld64 with SUPPORT_ARCH_<arch> defines in it.
917 - DERIVED_FILE_DIR=${LD64}/src \
918 - RC_SUPPORTED_ARCHS="$ARCHS_TO_SUPPORT" \
919 - $creco
920 -
921 - # do not depend on MachOFileAbstraction.hpp to define
922 - # SUPPORT_ARCH_arm_any because that's not included by every file where
923 - # our ppc/arm-optional patch uses it, ld.hpp in particular
924 - grep "SUPPORT_ARCH_armv[0-9]" ${LD64}/src/configure.h >/dev/null && \
925 - echo "#define SUPPORT_ARCH_arm_any 1" >> ${LD64}/src/configure.h
926 -}
927 -
928 -compile_ld64() {
929 - einfo "building ${LD64}"
930 - cd "${S}"/${LD64}/src
931 - emake \
932 - LTO=${ENABLE_LTO}
933 -
934 - use test && emake build_test
935 -}
936 -
937 -compile_cctools() {
938 - einfo "building ${CCTOOLS}"
939 - cd "${S}"/${CCTOOLS}
940 - # -j1 because it fails too often with weird errors
941 - # Suppress running dsymutil because it will warn about missing debug
942 - # info which is expected when compiling without -g as we normally do.
943 - # This might need some more thought if anyone ever wanted to build us
944 - # for debugging with Apple's tools.
945 - emake \
946 - LIB_PRUNETRIE="-L../../${LD64}/src -lprunetrie" \
947 - EFITOOLS= \
948 - ENABLE_LTO=${ENABLE_LTO} \
949 - COMMON_SUBDIRS='libstuff ar misc otool' \
950 - SUBDIRS_32= \
951 - LEGACY= \
952 - RC_ProjectSourceVersion=${CCTOOLS_VERSION} \
953 - RC_CFLAGS="${CFLAGS}" \
954 - OFLAG="${CCTOOLS_OFLAG}" \
955 - CXXLIB="${CXXLIB}" \
956 - DSYMUTIL=": disabled: dsymutil" \
957 - -j1
958 -
959 - cd "${S}"/${CCTOOLS}/as
960 - emake \
961 - BUILD_OBSOLETE_ARCH= \
962 - RC_ProjectSourceVersion=${CCTOOLS_VERSION} \
963 - RC_CFLAGS="-DASLIBEXECDIR=\"\\\"${EPREFIX}${LIBPATH}/\\\"\" ${CFLAGS}" \
964 - OFLAG="${CCTOOLS_OFLAG}" \
965 - DSYMUTIL=": disabled: dsymutil"
966 -}
967 -
968 -src_compile() {
969 - compile_ld64
970 - compile_cctools
971 -}
972 -
973 -install_ld64() {
974 - exeinto ${BINPATH}
975 - doexe "${S}"/${LD64}/src/{ld64,rebase,dyldinfo,unwinddump,ObjectDump}
976 - dosym ld64 ${BINPATH}/ld
977 - insinto ${DATAPATH}/man/man1
978 - doins "${S}"/${LD64}/doc/man/man1/{ld,ld64,rebase}.1
979 -}
980 -
981 -install_cctools() {
982 - cd "${S}"/${CCTOOLS}
983 - emake install_all_but_headers \
984 - EFITOOLS= \
985 - COMMON_SUBDIRS='ar misc otool' \
986 - SUBDIRS_32= \
987 - DSTROOT=\"${D}\" \
988 - BINDIR=\"${EPREFIX}\"${BINPATH} \
989 - LOCBINDIR=\"${EPREFIX}\"${BINPATH} \
990 - USRBINDIR=\"${EPREFIX}\"${BINPATH} \
991 - LOCLIBDIR=\"${EPREFIX}\"${LIBPATH} \
992 - MANDIR=\"${EPREFIX}\"${DATAPATH}/man/
993 - cd "${S}"/${CCTOOLS}/as
994 - emake install \
995 - BUILD_OBSOLETE_ARCH= \
996 - DSTROOT=\"${D}\" \
997 - USRBINDIR=\"${EPREFIX}\"${BINPATH} \
998 - LIBDIR=\"${EPREFIX}\"${LIBPATH} \
999 - LOCLIBDIR=\"${EPREFIX}\"${LIBPATH}
1000 -
1001 - cd "${ED}"${BINPATH}
1002 - insinto ${DATAPATH}/man/man1
1003 - local skips manpage
1004 - # ar brings an up-to-date manpage with it
1005 - skips=( ar )
1006 - for bin in *; do
1007 - for skip in ${skips[@]}; do
1008 - if [[ ${bin} == ${skip} ]]; then
1009 - continue 2;
1010 - fi
1011 - done
1012 - manpage=${S}/${CCTOOLS}/man/${bin}.1
1013 - if [[ -f "${manpage}" ]]; then
1014 - doins "${manpage}"
1015 - fi
1016 - done
1017 - insinto ${DATAPATH}/man/man5
1018 - doins "${S}"/${CCTOOLS}/man/*.5
1019 -}
1020 -
1021 -src_test() {
1022 - if ! [ "${EPREFIX}"/usr/bin/clang ] ; then
1023 - einfo "Test suite only works properly with clang - please install"
1024 - return
1025 - fi
1026 -
1027 - einfo "Running unit tests"
1028 - cd "${S}"/${LD64}/unit-tests/test-cases
1029 - # provide the new ld as a symlink to clang so that -ccc-install-dir
1030 - # will pick it up
1031 - ln -sfn ../../src/ld64 ld
1032 - # use our arch command because the System's will report i386 even for an
1033 - # x86_64 prefix
1034 - perl ../bin/make-recursive.pl \
1035 - BUILT_PRODUCTS_DIR="${S}"/${LD64}/src \
1036 - ARCH="$(arch)" \
1037 - LD="${S}"/${LD64}/src/ld64 \
1038 - CC="clang -ccc-install-dir $PWD" \
1039 - CXX="clang++ -ccc-install-dir $PWD" \
1040 - OTOOL="${S}"/${CCTOOLS}/otool/otool.NEW \
1041 - | perl ../bin/result-filter.pl
1042 -}
1043 -
1044 -src_install() {
1045 - install_ld64
1046 - install_cctools
1047 -
1048 - cd "${S}"
1049 - insinto /etc/env.d/binutils
1050 - cat <<-EOF > env.d
1051 - TARGET="${CHOST}"
1052 - VER="${PV}"
1053 - FAKE_TARGETS="${CHOST}"
1054 - EOF
1055 - newins env.d ${CHOST}-${PV}
1056 -}
1057 -
1058 -pkg_postinst() {
1059 - binutils-config ${CHOST}-${PV}
1060 -}
1061
1062 diff --git a/sys-devel/binutils-apple/binutils-apple-6.1-r1.ebuild b/sys-devel/binutils-apple/binutils-apple-6.1-r1.ebuild
1063 deleted file mode 100644
1064 index 041d9a329ad..00000000000
1065 --- a/sys-devel/binutils-apple/binutils-apple-6.1-r1.ebuild
1066 +++ /dev/null
1067 @@ -1,385 +0,0 @@
1068 -# Copyright 1999-2019 Gentoo Authors
1069 -# Distributed under the terms of the GNU General Public License v2
1070 -
1071 -EAPI="5"
1072 -
1073 -inherit eutils flag-o-matic toolchain-funcs
1074 -
1075 -LD64=ld64-241.9
1076 -CCTOOLS_VERSION=862
1077 -CCTOOLS=cctools-${CCTOOLS_VERSION}
1078 -LIBUNWIND=libunwind-35.3
1079 -DYLD=dyld-353.2.1
1080 -
1081 -DESCRIPTION="Darwin assembler as(1) and static linker ld(1), Xcode Tools ${PV}"
1082 -HOMEPAGE="http://www.opensource.apple.com/"
1083 -SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz
1084 - http://www.opensource.apple.com/tarballs/cctools/${CCTOOLS}.tar.gz
1085 - http://www.opensource.apple.com/tarballs/dyld/${DYLD}.tar.gz
1086 - http://www.opensource.apple.com/tarballs/libunwind/${LIBUNWIND}.tar.gz
1087 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-4.3-r1.tar.bz2
1088 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-5.1-r2.tar.bz2
1089 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-6.1-r1.tar.bz2"
1090 -
1091 -LICENSE="APSL-2"
1092 -KEYWORDS="~ppc-macos ~x64-macos ~x86-macos"
1093 -IUSE="lto test libcxx multitarget"
1094 -RESTRICT="!test? ( test )"
1095 -
1096 -RDEPEND="sys-devel/binutils-config
1097 - lto? ( sys-devel/llvm:* )
1098 - libcxx? ( sys-libs/libcxx )"
1099 -DEPEND="${RDEPEND}
1100 - test? ( >=dev-lang/perl-5.8.8 )
1101 - || ( >=sys-devel/gcc-apple-4.2.1 sys-devel/llvm:* )
1102 - libcxx? ( sys-devel/llvm:* )"
1103 -
1104 -SLOT="6"
1105 -
1106 -S=${WORKDIR}
1107 -
1108 -is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
1109 -
1110 -src_prepare() {
1111 - if use multitarget ; then
1112 - ewarn "You have enabled support for non-standard target architectures"
1113 - ewarn "using USE=multitarget. This includes experimental support for"
1114 - ewarn "ppc and ppc64 which is a community forward-port from the last"
1115 - ewarn "version of ld64 to officially support PPC."
1116 -
1117 - if [[ ${CHOST} == powerpc*-darwin* ]] ; then
1118 - ewarn "HERE BE DRAGONS! Your system seems to be PPC which means that"
1119 - ewarn "the actual usability of your Gentoo programs will depend on the"
1120 - ewarn "above-mentioned experimental PPC support in the linker. Be"
1121 - ewarn "sure to keep a known-to-work version like ${PN}-3.2.6 around!"
1122 - fi
1123 - fi
1124 -
1125 - cd "${S}"/${LD64}/src
1126 - cp "${S}"/ld64-136-compile_stubs.h ld/compile_stubs.h
1127 - cp "${S}"/ld64-236.3-Makefile-2 Makefile
1128 -
1129 - epatch "${S}"/ld64-236.3-nolto.patch
1130 - epatch "${S}"/ld64-241.9-extraneous-includes.patch
1131 - epatch "${S}"/ld64-241.9-osatomic.patch
1132 - epatch "${S}"/ld64-241.9-arm64-cputype.patch
1133 - epatch "${S}"/ld64-236.3-crashreporter.patch
1134 - epatch "${S}"/ld64-241.9-nosnapshots.patch
1135 - epatch "${S}"/ld64-241.9-ppc.patch
1136 - epatch "${S}"/ld64-236.3-constant-types-2.patch
1137 - epatch "${S}"/ld64-241.9-gcc-2.patch
1138 - epatch "${S}"/ld64-241.9-register-names.patch
1139 - epatch "${S}"/ld64-241.9-get-comm-align.patch
1140 - epatch "${S}"/ld64-241.9-cc_md5.patch
1141 - epatch "${S}"/ld64-241.9-lto-noremarks.patch
1142 - epatch "${S}"/ld64-253.3-delete-warning.patch
1143 -
1144 - # We used to use our own copy of lto.h, which doesn't require llvm
1145 - # build-env. Current versions of llvm provide
1146 - # $EPREFIX/usr/include/llvm-c/lto.h as well as
1147 - # $EPREFIX/usr/lib/libLTO.{so,dylib}, so we just use these.
1148 -
1149 - # provide missing headers from libunwind and dyld
1150 - mkdir -p include/{mach,mach-o/arm} || die
1151 - # never present because it's private
1152 - cp ../../${DYLD}/include/mach-o/dyld_priv.h include/mach-o || die
1153 - # missing on <= 10.5
1154 - cp ../../${LIBUNWIND}/include/libunwind.h include/ || die
1155 - cp ../../${LIBUNWIND}/include/mach-o/compact_unwind_encoding.h include/mach-o || die
1156 - # missing on <= 10.4
1157 - cp ../../${DYLD}/include/mach-o/dyld_images.h include/mach-o || die
1158 - cp ../../${CCTOOLS}/include/mach-o/loader.h include/mach-o || die
1159 - # use copies from cctools because they're otherwise hidden in some SDK
1160 - cp ../../${CCTOOLS}/include/mach-o/arm/reloc.h include/mach-o/arm || die
1161 - # provide all required CPU_TYPEs on all platforms
1162 - cp ../../${CCTOOLS}/include/mach/machine.h include/mach/machine.h
1163 - # add alias for newer identifiers, because ld64 uses both but cctools
1164 - # header only defines the older
1165 - epatch "${S}"/ld64-236.3-missing-cputypes.patch
1166 -
1167 - # mimic OS X Leopard-style Availability.h macros for libunwind.h on
1168 - # older systems
1169 - [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 8 ]] && \
1170 - echo "#define __OSX_AVAILABLE_STARTING(x,y) " > include/Availability.h
1171 -
1172 - local VER_STR="\"@(#)PROGRAM:ld PROJECT:${LD64} (Gentoo ${PN}-${PVR})\\n\""
1173 - echo "char ldVersionString[] = ${VER_STR};" > version.cpp
1174 -
1175 - epatch "${S}"/ld64-123.2-debug-backtrace.patch
1176 - if [[ ${CHOST} == powerpc*-darwin* ]] ; then
1177 - epatch "${S}"/ld64-123.2-darwin8-no-mlong-branch-warning.patch
1178 - epatch "${S}"/ld64-127.2-thread_state.patch
1179 - fi
1180 -
1181 - cd "${S}"/${CCTOOLS}
1182 - epatch "${S}"/${PN}-4.5-as.patch
1183 - epatch "${S}"/${PN}-5.1-as-dir.patch
1184 - epatch "${S}"/${PN}-5.1-ranlib.patch
1185 - epatch "${S}"/${PN}-3.1.1-libtool-ranlib.patch
1186 - epatch "${S}"/${PN}-3.1.1-no-headers.patch
1187 - epatch "${S}"/${PN}-4.0-no-oss-dir.patch
1188 - epatch "${S}"/${PN}-5.1-nolto.patch
1189 - epatch "${S}"/cctools-839-intel-retf.patch
1190 - epatch "${S}"/${PN}-5.1-extraneous-includes.patch
1191 - epatch "${S}"/${PN}-5.1-otool-stdc.patch
1192 - epatch "${S}"/${PN}-5.1-constant-types.patch
1193 - epatch "${S}"/${PN}-5.1-strnlen.patch
1194 - epatch "${S}"/${PN}-5.1-ppc.patch
1195 - epatch "${S}"/${PN}-5.1-thread-state-redefined.patch
1196 - epatch "${S}"/${PN}-5.1-makefile-target-warning.patch
1197 - epatch "${S}"/${PN}-6.3-lto-prefix.patch
1198 - cp ../${LD64}/src/other/prune_trie.h include/mach-o/ || die
1199 -
1200 - # do not build profileable libstuff to save compile time
1201 - sed -i -e "/^all:/s, profile , ," libstuff/Makefile
1202 -
1203 - # cctools version is provided to make via RC_ProjectSourceVersion which
1204 - # generates and compiles it as apple_version[] into libstuff. From
1205 - # there it's picked up by the individual tools. Since
1206 - # RC_ProjectSourceVersion is also used as library version, we can't
1207 - # just append our local version info. So we hack the libstuff Makefile
1208 - # to include our Gentoo version.
1209 - sed -i -e "/cctools-.*(RC_ProjectSourceVersion).*OFILE_DIR/s,Version),Version) (Gentoo ${PN}-${PVR})," \
1210 - libstuff/Makefile
1211 -
1212 - # clean up test suite
1213 - cd "${S}"/${LD64}/unit-tests/test-cases
1214 - local c
1215 -
1216 - # we don't have llvm
1217 - ((++c)); rm -rf llvm-integration;
1218 -
1219 - # we don't have dtrace
1220 - ((++c)); rm -rf dtrace-static-probes-coalescing;
1221 - ((++c)); rm -rf dtrace-static-probes;
1222 -
1223 - # a file is missing
1224 - ((++c)); rm -rf eh-coalescing-r
1225 -
1226 - # we don't do universal binaries
1227 - ((++c)); rm -rf blank-stubs;
1228 -
1229 - # looks like a problem with apple's result-filter.pl
1230 - ((++c)); rm -rf implicit-common3;
1231 - ((++c)); rm -rf order_file-ans;
1232 -
1233 - # TODO no idea what goes wrong here
1234 - ((++c)); rm -rf dwarf-debug-notes;
1235 -
1236 - einfo "Deleted $c tests that were bound to fail"
1237 -
1238 - cd "${S}"
1239 - ebegin "cleaning Makefiles from unwanted CFLAGS"
1240 - find . -name "Makefile" -print0 | xargs -0 sed \
1241 - -i \
1242 - -e 's/ -g / /g' \
1243 - -e 's/^G =.*$/G =/' \
1244 - -e 's/^OFLAG =.*$/OFLAG =/' \
1245 - -e 's/install -c -s/install/g'
1246 - eend $?
1247 -}
1248 -
1249 -src_configure() {
1250 - ENABLE_LTO=0
1251 - use lto && ENABLE_LTO=1
1252 -
1253 - export CTARGET=${CTARGET:-${CHOST}}
1254 - if [[ ${CTARGET} == ${CHOST} ]] ; then
1255 - if [[ ${CATEGORY} == cross-* ]] ; then
1256 - export CTARGET=${CATEGORY#cross-}
1257 - fi
1258 - fi
1259 -
1260 - LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
1261 - INCPATH=${LIBPATH}/include
1262 - DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
1263 - if is_cross ; then
1264 - BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${PV}
1265 - else
1266 - BINPATH=/usr/${CTARGET}/binutils-bin/${PV}
1267 - fi
1268 -
1269 - if [ "${CXX/*clang*/yes}" = "yes" ] ; then
1270 - if use libcxx ; then
1271 - append-cxxflags -stdlib=libc++
1272 - CXXLIB=-stdlib=libc++
1273 - else
1274 - # force libstdc++ for systems where libc++ is default (OS X 10.9+?)
1275 - append-cxxflags -stdlib=libstdc++
1276 - CXXLIB=-stdlib=libstdc++
1277 - fi
1278 - else
1279 - use libcxx && \
1280 - ewarn "libcxx only available with clang and your C++ compiler ($CXX) does not seem to be clang"
1281 - fi
1282 -
1283 - # CPPFLAGS only affects ld64, cctools don't use 'em (which currently is
1284 - # what we want)
1285 - append-cppflags -DNDEBUG
1286 -
1287 - # Block API and thus snapshots supported on >= 10.6
1288 - [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -ge 10 ]] && \
1289 - append-cppflags -DSUPPORT_SNAPSHOTS
1290 -
1291 - CCTOOLS_OFLAG=
1292 - if [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 8 ]] ; then
1293 - # cctools expect to use UNIX03 struct member names.
1294 - # This is default on > 10.4. Activate it on <= 10.4 by defining
1295 - # __DARWIN_UNIX03 explicitly.
1296 - CCTOOLS_OFLAG="-D__DARWIN_UNIX03=1"
1297 - fi
1298 -
1299 - # if compiling with USE multitarget, extract all the known arches from
1300 - # create_configure and pass them back to it
1301 - creco=${LD64}/src/create_configure
1302 - ARCHS_TO_SUPPORT=""
1303 - if use multitarget ; then
1304 - ARCHS_TO_SUPPORT="$(grep KNOWN_ARCHS= $creco | \
1305 - cut -d\" -f2 | tr ',' ' ')"
1306 - fi
1307 -
1308 - # Create configure.h for ld64 with SUPPORT_ARCH_<arch> defines in it.
1309 - DERIVED_FILE_DIR=${LD64}/src \
1310 - RC_SUPPORTED_ARCHS="$ARCHS_TO_SUPPORT" \
1311 - $creco
1312 -
1313 - # do not depend on MachOFileAbstraction.hpp to define
1314 - # SUPPORT_ARCH_arm_any because that's not included by every file where
1315 - # our ppc/arm-optional patch uses it, ld.hpp in particular
1316 - grep "SUPPORT_ARCH_armv[0-9]" ${LD64}/src/configure.h >/dev/null && \
1317 - echo "#define SUPPORT_ARCH_arm_any 1" >> ${LD64}/src/configure.h
1318 -}
1319 -
1320 -compile_ld64() {
1321 - einfo "building ${LD64}"
1322 - cd "${S}"/${LD64}/src
1323 - emake \
1324 - LTO=${ENABLE_LTO}
1325 -
1326 - use test && emake build_test
1327 -}
1328 -
1329 -compile_cctools() {
1330 - einfo "building ${CCTOOLS}"
1331 - cd "${S}"/${CCTOOLS}
1332 - # -j1 because it fails too often with weird errors
1333 - # Suppress running dsymutil because it will warn about missing debug
1334 - # info which is expected when compiling without -g as we normally do.
1335 - # This might need some more thought if anyone ever wanted to build us
1336 - # for debugging with Apple's tools.
1337 - emake \
1338 - LIB_PRUNETRIE="-L../../${LD64}/src -lprunetrie" \
1339 - EFITOOLS= \
1340 - ENABLE_LTO=${ENABLE_LTO} \
1341 - COMMON_SUBDIRS='libstuff ar misc otool' \
1342 - SUBDIRS_32= \
1343 - LEGACY= \
1344 - RC_ProjectSourceVersion=${CCTOOLS_VERSION} \
1345 - RC_CFLAGS="${CFLAGS}" \
1346 - OFLAG="${CCTOOLS_OFLAG}" \
1347 - CXXLIB="${CXXLIB}" \
1348 - DSYMUTIL=": disabled: dsymutil" \
1349 - -j1
1350 -
1351 - cd "${S}"/${CCTOOLS}/as
1352 - emake \
1353 - BUILD_OBSOLETE_ARCH= \
1354 - RC_ProjectSourceVersion=${CCTOOLS_VERSION} \
1355 - RC_CFLAGS="-DASLIBEXECDIR=\"\\\"${EPREFIX}${LIBPATH}/\\\"\" ${CFLAGS}" \
1356 - OFLAG="${CCTOOLS_OFLAG}" \
1357 - DSYMUTIL=": disabled: dsymutil"
1358 -}
1359 -
1360 -src_compile() {
1361 - compile_ld64
1362 - compile_cctools
1363 -}
1364 -
1365 -install_ld64() {
1366 - exeinto ${BINPATH}
1367 - doexe "${S}"/${LD64}/src/{ld64,rebase,dyldinfo,unwinddump,ObjectDump}
1368 - dosym ld64 ${BINPATH}/ld
1369 - insinto ${DATAPATH}/man/man1
1370 - doins "${S}"/${LD64}/doc/man/man1/{ld,ld64,rebase}.1
1371 -}
1372 -
1373 -install_cctools() {
1374 - cd "${S}"/${CCTOOLS}
1375 - emake install_all_but_headers \
1376 - EFITOOLS= \
1377 - COMMON_SUBDIRS='ar misc otool' \
1378 - SUBDIRS_32= \
1379 - DSTROOT=\"${D}\" \
1380 - BINDIR=\"${EPREFIX}\"${BINPATH} \
1381 - LOCBINDIR=\"${EPREFIX}\"${BINPATH} \
1382 - USRBINDIR=\"${EPREFIX}\"${BINPATH} \
1383 - LOCLIBDIR=\"${EPREFIX}\"${LIBPATH} \
1384 - MANDIR=\"${EPREFIX}\"${DATAPATH}/man/
1385 - cd "${S}"/${CCTOOLS}/as
1386 - emake install \
1387 - BUILD_OBSOLETE_ARCH= \
1388 - DSTROOT=\"${D}\" \
1389 - USRBINDIR=\"${EPREFIX}\"${BINPATH} \
1390 - LIBDIR=\"${EPREFIX}\"${LIBPATH} \
1391 - LOCLIBDIR=\"${EPREFIX}\"${LIBPATH}
1392 -
1393 - cd "${ED}"${BINPATH}
1394 - insinto ${DATAPATH}/man/man1
1395 - local skips manpage
1396 - # ar brings an up-to-date manpage with it
1397 - skips=( ar )
1398 - for bin in *; do
1399 - for skip in ${skips[@]}; do
1400 - if [[ ${bin} == ${skip} ]]; then
1401 - continue 2;
1402 - fi
1403 - done
1404 - manpage=${S}/${CCTOOLS}/man/${bin}.1
1405 - if [[ -f "${manpage}" ]]; then
1406 - doins "${manpage}"
1407 - fi
1408 - done
1409 - insinto ${DATAPATH}/man/man5
1410 - doins "${S}"/${CCTOOLS}/man/*.5
1411 -}
1412 -
1413 -src_test() {
1414 - if ! [ "${EPREFIX}"/usr/bin/clang ] ; then
1415 - einfo "Test suite only works properly with clang - please install"
1416 - return
1417 - fi
1418 -
1419 - einfo "Running unit tests"
1420 - cd "${S}"/${LD64}/unit-tests/test-cases
1421 - # provide the new ld as a symlink to clang so that -ccc-install-dir
1422 - # will pick it up
1423 - ln -sfn ../../src/ld64 ld
1424 - # use our arch command because the System's will report i386 even for an
1425 - # x86_64 prefix
1426 - perl ../bin/make-recursive.pl \
1427 - BUILT_PRODUCTS_DIR="${S}"/${LD64}/src \
1428 - ARCH="$(arch)" \
1429 - LD="${S}"/${LD64}/src/ld64 \
1430 - CC="clang -ccc-install-dir $PWD" \
1431 - CXX="clang++ -ccc-install-dir $PWD" \
1432 - OTOOL="${S}"/${CCTOOLS}/otool/otool.NEW \
1433 - | perl ../bin/result-filter.pl
1434 -}
1435 -
1436 -src_install() {
1437 - install_ld64
1438 - install_cctools
1439 -
1440 - cd "${S}"
1441 - insinto /etc/env.d/binutils
1442 - cat <<-EOF > env.d
1443 - TARGET="${CHOST}"
1444 - VER="${PV}"
1445 - FAKE_TARGETS="${CHOST}"
1446 - EOF
1447 - newins env.d ${CHOST}-${PV}
1448 -}
1449 -
1450 -pkg_postinst() {
1451 - binutils-config ${CHOST}-${PV}
1452 -}
1453
1454 diff --git a/sys-devel/binutils-apple/binutils-apple-6.3-r2.ebuild b/sys-devel/binutils-apple/binutils-apple-6.3-r2.ebuild
1455 deleted file mode 100644
1456 index b3af64fe16d..00000000000
1457 --- a/sys-devel/binutils-apple/binutils-apple-6.3-r2.ebuild
1458 +++ /dev/null
1459 @@ -1,386 +0,0 @@
1460 -# Copyright 1999-2019 Gentoo Authors
1461 -# Distributed under the terms of the GNU General Public License v2
1462 -
1463 -EAPI="5"
1464 -
1465 -inherit eutils flag-o-matic toolchain-funcs
1466 -
1467 -LD64=ld64-242
1468 -CCTOOLS_VERSION=870
1469 -CCTOOLS=cctools-${CCTOOLS_VERSION}
1470 -LIBUNWIND=libunwind-35.3
1471 -DYLD=dyld-353.2.1
1472 -
1473 -DESCRIPTION="Darwin assembler as(1) and static linker ld(1), Xcode Tools ${PV}"
1474 -HOMEPAGE="http://www.opensource.apple.com/"
1475 -SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz
1476 - http://www.opensource.apple.com/tarballs/cctools/${CCTOOLS}.tar.gz
1477 - http://www.opensource.apple.com/tarballs/dyld/${DYLD}.tar.gz
1478 - http://www.opensource.apple.com/tarballs/libunwind/${LIBUNWIND}.tar.gz
1479 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-4.3-r1.tar.bz2
1480 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-5.1-r2.tar.bz2
1481 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-6.1-r1.tar.bz2
1482 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-6.3-r2.tar.bz2"
1483 -
1484 -LICENSE="APSL-2"
1485 -KEYWORDS="~ppc-macos ~x64-macos ~x86-macos"
1486 -IUSE="lto test libcxx multitarget"
1487 -RESTRICT="!test? ( test )"
1488 -
1489 -RDEPEND="sys-devel/binutils-config
1490 - lto? ( sys-devel/llvm:* )
1491 - libcxx? ( sys-libs/libcxx )"
1492 -DEPEND="${RDEPEND}
1493 - test? ( >=dev-lang/perl-5.8.8 )
1494 - || ( >=sys-devel/gcc-apple-4.2.1 sys-devel/llvm:* )
1495 - libcxx? ( sys-devel/llvm:* )"
1496 -
1497 -SLOT="6"
1498 -
1499 -S=${WORKDIR}
1500 -
1501 -is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
1502 -
1503 -src_prepare() {
1504 - if use multitarget ; then
1505 - ewarn "You have enabled support for non-standard target architectures"
1506 - ewarn "using USE=multitarget. This includes experimental support for"
1507 - ewarn "ppc and ppc64 which is a community forward-port from the last"
1508 - ewarn "version of ld64 to officially support PPC."
1509 -
1510 - if [[ ${CHOST} == powerpc*-darwin* ]] ; then
1511 - ewarn "HERE BE DRAGONS! Your system seems to be PPC which means that"
1512 - ewarn "the actual usability of your Gentoo programs will depend on the"
1513 - ewarn "above-mentioned experimental PPC support in the linker. Be"
1514 - ewarn "sure to keep a known-to-work version like ${PN}-3.2.6 around!"
1515 - fi
1516 - fi
1517 -
1518 - cd "${S}"/${LD64}/src
1519 - cp "${S}"/ld64-136-compile_stubs.h ld/compile_stubs.h
1520 - cp "${S}"/ld64-236.3-Makefile-2 Makefile
1521 -
1522 - epatch "${S}"/ld64-236.3-nolto.patch
1523 - epatch "${S}"/ld64-241.9-extraneous-includes.patch
1524 - epatch "${S}"/ld64-241.9-osatomic.patch
1525 - epatch "${S}"/ld64-236.3-crashreporter.patch
1526 - epatch "${S}"/ld64-241.9-nosnapshots.patch
1527 - epatch "${S}"/ld64-242-ppc.patch
1528 - epatch "${S}"/ld64-236.3-constant-types-2.patch
1529 - epatch "${S}"/ld64-242-gcc-2.patch
1530 - epatch "${S}"/ld64-241.9-register-names.patch
1531 - epatch "${S}"/ld64-241.9-get-comm-align.patch
1532 - epatch "${S}"/ld64-241.9-cc_md5.patch
1533 - epatch "${S}"/ld64-253.3-delete-warning.patch
1534 -
1535 - # provide missing headers from libunwind and dyld
1536 - mkdir -p include/{mach,mach-o/arm} || die
1537 - # never present because it's private
1538 - cp ../../${DYLD}/include/mach-o/dyld_priv.h include/mach-o || die
1539 - # missing on <= 10.5
1540 - cp ../../${LIBUNWIND}/include/libunwind.h include/ || die
1541 - cp ../../${LIBUNWIND}/include/mach-o/compact_unwind_encoding.h include/mach-o || die
1542 - # missing on <= 10.4
1543 - cp ../../${DYLD}/include/mach-o/dyld_images.h include/mach-o || die
1544 - cp ../../${CCTOOLS}/include/mach-o/loader.h include/mach-o || die
1545 - # use copies from cctools because they're otherwise hidden in some SDK
1546 - cp ../../${CCTOOLS}/include/mach-o/arm/reloc.h include/mach-o/arm || die
1547 - # provide all required CPU_TYPEs on all platforms
1548 - cp ../../${CCTOOLS}/include/mach/machine.h include/mach/machine.h
1549 - # add alias for newer identifiers, because ld64 uses both but cctools
1550 - # header only defines the older
1551 - epatch "${S}"/ld64-236.3-missing-cputypes.patch
1552 -
1553 - # mimic OS X Leopard-style Availability.h macros for libunwind.h on
1554 - # older systems
1555 - [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 8 ]] && \
1556 - echo "#define __OSX_AVAILABLE_STARTING(x,y) " > include/Availability.h
1557 -
1558 - local VER_STR="\"@(#)PROGRAM:ld PROJECT:${LD64} (Gentoo ${PN}-${PVR})\\n\""
1559 - echo "char ldVersionString[] = ${VER_STR};" > version.cpp
1560 -
1561 - epatch "${S}"/ld64-123.2-debug-backtrace.patch
1562 - if [[ ${CHOST} == powerpc*-darwin* ]] ; then
1563 - epatch "${S}"/ld64-123.2-darwin8-no-mlong-branch-warning.patch
1564 - epatch "${S}"/ld64-127.2-thread_state.patch
1565 - fi
1566 -
1567 - cd "${S}"/${CCTOOLS}
1568 - epatch "${S}"/${PN}-4.5-as.patch
1569 - epatch "${S}"/${PN}-5.1-as-dir.patch
1570 - epatch "${S}"/${PN}-5.1-ranlib.patch
1571 - epatch "${S}"/${PN}-3.1.1-libtool-ranlib.patch
1572 - epatch "${S}"/${PN}-3.1.1-no-headers.patch
1573 - epatch "${S}"/${PN}-4.0-no-oss-dir.patch
1574 - epatch "${S}"/cctools-839-intel-retf.patch
1575 - epatch "${S}"/${PN}-5.1-extraneous-includes.patch
1576 - epatch "${S}"/${PN}-5.1-otool-stdc.patch
1577 - epatch "${S}"/${PN}-5.1-constant-types.patch
1578 - epatch "${S}"/${PN}-5.1-strnlen.patch
1579 - epatch "${S}"/${PN}-5.1-ppc.patch
1580 - epatch "${S}"/${PN}-5.1-thread-state-redefined.patch
1581 - epatch "${S}"/${PN}-5.1-makefile-target-warning.patch
1582 - epatch "${S}"/${PN}-6.3-lto-prefix.patch
1583 - cp ../${LD64}/src/other/prune_trie.h include/mach-o/ || die
1584 -
1585 - # do not build profileable libstuff to save compile time
1586 - sed -i -e "/^all:/s, profile , ," libstuff/Makefile
1587 -
1588 - # cctools version is provided to make via RC_ProjectSourceVersion which
1589 - # generates and compiles it as apple_version[] into libstuff. From
1590 - # there it's picked up by the individual tools. Since
1591 - # RC_ProjectSourceVersion is also used as library version, we can't
1592 - # just append our local version info. So we hack the libstuff Makefile
1593 - # to include our Gentoo version.
1594 - sed -i -e "/cctools-.*(RC_ProjectSourceVersion).*OFILE_DIR/s,Version),Version) (Gentoo ${PN}-${PVR})," \
1595 - libstuff/Makefile
1596 -
1597 - # clean up test suite
1598 - cd "${S}"/${LD64}/unit-tests/test-cases
1599 - local c
1600 -
1601 - # we don't have llvm
1602 - ((++c)); rm -rf llvm-integration;
1603 -
1604 - # we don't have dtrace
1605 - ((++c)); rm -rf dtrace-static-probes-coalescing;
1606 - ((++c)); rm -rf dtrace-static-probes;
1607 -
1608 - # a file is missing
1609 - ((++c)); rm -rf eh-coalescing-r
1610 -
1611 - # we don't do universal binaries
1612 - ((++c)); rm -rf blank-stubs;
1613 -
1614 - # looks like a problem with apple's result-filter.pl
1615 - ((++c)); rm -rf implicit-common3;
1616 - ((++c)); rm -rf order_file-ans;
1617 -
1618 - # TODO no idea what goes wrong here
1619 - ((++c)); rm -rf dwarf-debug-notes;
1620 -
1621 - einfo "Deleted $c tests that were bound to fail"
1622 -
1623 - cd "${S}"
1624 - ebegin "cleaning Makefiles from unwanted CFLAGS"
1625 - find . -name "Makefile" -print0 | xargs -0 sed \
1626 - -i \
1627 - -e 's/ -g / /g' \
1628 - -e 's/^G =.*$/G =/' \
1629 - -e 's/^OFLAG =.*$/OFLAG =/' \
1630 - -e 's/install -c -s/install/g'
1631 - eend $?
1632 -}
1633 -
1634 -src_configure() {
1635 - ENABLE_LTO=0
1636 - use lto && ENABLE_LTO=1
1637 -
1638 - export CTARGET=${CTARGET:-${CHOST}}
1639 - if [[ ${CTARGET} == ${CHOST} ]] ; then
1640 - if [[ ${CATEGORY} == cross-* ]] ; then
1641 - export CTARGET=${CATEGORY#cross-}
1642 - fi
1643 - fi
1644 -
1645 - LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
1646 - INCPATH=${LIBPATH}/include
1647 - DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
1648 - if is_cross ; then
1649 - BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${PV}
1650 - else
1651 - BINPATH=/usr/${CTARGET}/binutils-bin/${PV}
1652 - fi
1653 -
1654 - if [[ ${CXX} == *clang* ]] ; then
1655 - if use libcxx ; then
1656 - append-cxxflags -stdlib=libc++
1657 - CXXLIB=-stdlib=libc++
1658 - else
1659 - # force libstdc++ for systems where libc++ is default (OS X 10.9+?)
1660 - append-cxxflags -stdlib=libstdc++
1661 - CXXLIB=-stdlib=libstdc++
1662 - fi
1663 - else
1664 - use libcxx && \
1665 - ewarn "libcxx only available with clang and your C++ compiler ($CXX) does not seem to be clang"
1666 -
1667 - # force gcc-apple, FSF gcc doesn't grok this code
1668 - export CC=${CTARGET}-gcc-4.2.1
1669 - export CXX=${CTARGET}-g++-4.2.1
1670 - fi
1671 -
1672 - # CPPFLAGS only affects ld64, cctools don't use 'em (which currently is
1673 - # what we want)
1674 - append-cppflags -DNDEBUG
1675 -
1676 - # Block API and thus snapshots supported on >= 10.6
1677 - [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -ge 10 ]] && \
1678 - append-cppflags -DSUPPORT_SNAPSHOTS
1679 -
1680 - CCTOOLS_OFLAG=
1681 - if [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 8 ]] ; then
1682 - # cctools expect to use UNIX03 struct member names.
1683 - # This is default on > 10.4. Activate it on <= 10.4 by defining
1684 - # __DARWIN_UNIX03 explicitly.
1685 - CCTOOLS_OFLAG="-D__DARWIN_UNIX03=1"
1686 - fi
1687 -
1688 - # if compiling with USE multitarget, extract all the known arches from
1689 - # create_configure and pass them back to it
1690 - creco=${LD64}/src/create_configure
1691 - ARCHS_TO_SUPPORT=""
1692 - if use multitarget ; then
1693 - ARCHS_TO_SUPPORT="$(grep KNOWN_ARCHS= $creco | \
1694 - cut -d\" -f2 | tr ',' ' ')"
1695 - elif use ppc-macos ; then
1696 - ARCHS_TO_SUPPORT="ppc ppc750 ppc7400 ppc7450 ppc970 ppc64 $(\
1697 - grep RC_SUPPORTED_ARCHS= $creco | cut -d\" -f2)"
1698 - fi
1699 -
1700 - # Create configure.h for ld64 with SUPPORT_ARCH_<arch> defines in it.
1701 - einfo "building support for: ${ARCHS_TO_SUPPORT}"
1702 - DERIVED_FILE_DIR=${LD64}/src \
1703 - RC_SUPPORTED_ARCHS="$ARCHS_TO_SUPPORT" \
1704 - $creco
1705 -
1706 - # do not depend on MachOFileAbstraction.hpp to define
1707 - # SUPPORT_ARCH_arm_any because that's not included by every file where
1708 - # our ppc/arm-optional patch uses it, ld.hpp in particular
1709 - grep "SUPPORT_ARCH_armv[0-9]" ${LD64}/src/configure.h >/dev/null && \
1710 - echo "#define SUPPORT_ARCH_arm_any 1" >> ${LD64}/src/configure.h
1711 -}
1712 -
1713 -compile_ld64() {
1714 - einfo "building ${LD64}"
1715 - cd "${S}"/${LD64}/src
1716 - emake \
1717 - LTO=${ENABLE_LTO}
1718 -
1719 - use test && emake build_test
1720 -}
1721 -
1722 -compile_cctools() {
1723 - einfo "building ${CCTOOLS}"
1724 - cd "${S}"/${CCTOOLS}
1725 - # -j1 because it fails too often with weird errors
1726 - # Suppress running dsymutil because it will warn about missing debug
1727 - # info which is expected when compiling without -g as we normally do.
1728 - # This might need some more thought if anyone ever wanted to build us
1729 - # for debugging with Apple's tools.
1730 - emake \
1731 - LIB_PRUNETRIE="-L../../${LD64}/src -lprunetrie" \
1732 - EFITOOLS= \
1733 - ENABLE_LTO="${ENABLE_LTO}" \
1734 - COMMON_SUBDIRS='libstuff ar misc otool' \
1735 - SUBDIRS_32= \
1736 - LEGACY= \
1737 - RC_ProjectSourceVersion=${CCTOOLS_VERSION} \
1738 - RC_CFLAGS="${CFLAGS}" \
1739 - OFLAG="${CCTOOLS_OFLAG}" \
1740 - CXXLIB="${CXXLIB}" \
1741 - DSYMUTIL=": disabled: dsymutil" \
1742 - -j1
1743 -
1744 - cd "${S}"/${CCTOOLS}/as
1745 - emake \
1746 - BUILD_OBSOLETE_ARCH= \
1747 - RC_ProjectSourceVersion=${CCTOOLS_VERSION} \
1748 - RC_CFLAGS="-DASLIBEXECDIR=\"\\\"${EPREFIX}${LIBPATH}/\\\"\" ${CFLAGS}" \
1749 - OFLAG="${CCTOOLS_OFLAG}" \
1750 - DSYMUTIL=": disabled: dsymutil"
1751 -}
1752 -
1753 -src_compile() {
1754 - compile_ld64
1755 - compile_cctools
1756 -}
1757 -
1758 -install_ld64() {
1759 - exeinto ${BINPATH}
1760 - doexe "${S}"/${LD64}/src/{ld64,rebase,dyldinfo,unwinddump,ObjectDump}
1761 - dosym ld64 ${BINPATH}/ld
1762 - insinto ${DATAPATH}/man/man1
1763 - doins "${S}"/${LD64}/doc/man/man1/{ld,ld64,rebase}.1
1764 -}
1765 -
1766 -install_cctools() {
1767 - cd "${S}"/${CCTOOLS}
1768 - emake install_all_but_headers \
1769 - EFITOOLS= \
1770 - COMMON_SUBDIRS='ar misc otool' \
1771 - SUBDIRS_32= \
1772 - DSTROOT=\"${D}\" \
1773 - BINDIR=\"${EPREFIX}\"${BINPATH} \
1774 - LOCBINDIR=\"${EPREFIX}\"${BINPATH} \
1775 - USRBINDIR=\"${EPREFIX}\"${BINPATH} \
1776 - LOCLIBDIR=\"${EPREFIX}\"${LIBPATH} \
1777 - MANDIR=\"${EPREFIX}\"${DATAPATH}/man/
1778 - cd "${S}"/${CCTOOLS}/as
1779 - emake install \
1780 - BUILD_OBSOLETE_ARCH= \
1781 - DSTROOT=\"${D}\" \
1782 - USRBINDIR=\"${EPREFIX}\"${BINPATH} \
1783 - LIBDIR=\"${EPREFIX}\"${LIBPATH} \
1784 - LOCLIBDIR=\"${EPREFIX}\"${LIBPATH}
1785 -
1786 - cd "${ED}"${BINPATH}
1787 - insinto ${DATAPATH}/man/man1
1788 - local skips manpage
1789 - # ar brings an up-to-date manpage with it
1790 - skips=( ar )
1791 - for bin in *; do
1792 - for skip in ${skips[@]}; do
1793 - if [[ ${bin} == ${skip} ]]; then
1794 - continue 2;
1795 - fi
1796 - done
1797 - manpage=${S}/${CCTOOLS}/man/${bin}.1
1798 - if [[ -f "${manpage}" ]]; then
1799 - doins "${manpage}"
1800 - fi
1801 - done
1802 - insinto ${DATAPATH}/man/man5
1803 - doins "${S}"/${CCTOOLS}/man/*.5
1804 -}
1805 -
1806 -src_test() {
1807 - if ! [ "${EPREFIX}"/usr/bin/clang ] ; then
1808 - einfo "Test suite only works properly with clang - please install"
1809 - return
1810 - fi
1811 -
1812 - einfo "Running unit tests"
1813 - cd "${S}"/${LD64}/unit-tests/test-cases
1814 - # provide the new ld as a symlink to clang so that -ccc-install-dir
1815 - # will pick it up
1816 - ln -sfn ../../src/ld64 ld
1817 - # use our arch command because the System's will report i386 even for an
1818 - # x86_64 prefix
1819 - perl ../bin/make-recursive.pl \
1820 - BUILT_PRODUCTS_DIR="${S}"/${LD64}/src \
1821 - ARCH="$(arch)" \
1822 - LD="${S}"/${LD64}/src/ld64 \
1823 - CC="clang -ccc-install-dir $PWD" \
1824 - CXX="clang++ -ccc-install-dir $PWD" \
1825 - OTOOL="${S}"/${CCTOOLS}/otool/otool.NEW \
1826 - | perl ../bin/result-filter.pl
1827 -}
1828 -
1829 -src_install() {
1830 - install_ld64
1831 - install_cctools
1832 -
1833 - cd "${S}"
1834 - insinto /etc/env.d/binutils
1835 - cat <<-EOF > env.d
1836 - TARGET="${CHOST}"
1837 - VER="${PV}"
1838 - FAKE_TARGETS="${CHOST}"
1839 - EOF
1840 - newins env.d ${CHOST}-${PV}
1841 -}
1842 -
1843 -pkg_postinst() {
1844 - binutils-config ${CHOST}-${PV}
1845 -}
1846
1847 diff --git a/sys-devel/binutils-apple/binutils-apple-7.0-r1.ebuild b/sys-devel/binutils-apple/binutils-apple-7.0-r1.ebuild
1848 deleted file mode 100644
1849 index 7607b1e4624..00000000000
1850 --- a/sys-devel/binutils-apple/binutils-apple-7.0-r1.ebuild
1851 +++ /dev/null
1852 @@ -1,369 +0,0 @@
1853 -# Copyright 1999-2019 Gentoo Authors
1854 -# Distributed under the terms of the GNU General Public License v2
1855 -
1856 -EAPI="5"
1857 -
1858 -inherit eutils flag-o-matic toolchain-funcs
1859 -
1860 -LD64=ld64-253.3
1861 -CCTOOLS_VERSION=877.5
1862 -CCTOOLS=cctools-${CCTOOLS_VERSION}
1863 -LIBUNWIND=libunwind-35.3
1864 -DYLD=dyld-360.14
1865 -
1866 -DESCRIPTION="Darwin assembler as(1) and static linker ld(1), Xcode Tools ${PV}"
1867 -HOMEPAGE="http://www.opensource.apple.com/"
1868 -SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz
1869 - http://www.opensource.apple.com/tarballs/cctools/${CCTOOLS}.tar.gz
1870 - http://www.opensource.apple.com/tarballs/dyld/${DYLD}.tar.gz
1871 - http://www.opensource.apple.com/tarballs/libunwind/${LIBUNWIND}.tar.gz
1872 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-4.3-r1.tar.bz2
1873 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-5.1-r2.tar.bz2
1874 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-6.1-r1.tar.bz2
1875 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-6.3-r2.tar.bz2
1876 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.0-r3.tar.bz2"
1877 -
1878 -LICENSE="APSL-2"
1879 -KEYWORDS="~ppc-macos ~x64-macos ~x86-macos"
1880 -IUSE="lto test multitarget"
1881 -RESTRICT="!test? ( test )"
1882 -
1883 -# ld64 can now only be compiled using llvm and libc++ since it massivley uses
1884 -# C++11 language fatures. *But additionally* the as driver now defaults to
1885 -# calling clang as the assembler on many platforms. This can be disabled using
1886 -# -Wa,-Q but since it's default we make llvm a static runtime dependency.
1887 -RDEPEND="sys-devel/binutils-config
1888 - lto? ( app-arch/xar )
1889 - sys-devel/llvm:*
1890 - sys-libs/libcxx"
1891 -DEPEND="${RDEPEND}
1892 - test? ( >=dev-lang/perl-5.8.8 )"
1893 -
1894 -SLOT="7"
1895 -
1896 -S=${WORKDIR}
1897 -
1898 -is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
1899 -
1900 -src_prepare() {
1901 - if use multitarget ; then
1902 - ewarn "You have enabled support for non-standard target architectures"
1903 - ewarn "using USE=multitarget. This includes experimental support for"
1904 - ewarn "ppc and ppc64 which is a community forward-port from the last"
1905 - ewarn "version of ld64 to officially support PPC."
1906 -
1907 - if [[ ${CHOST} == powerpc*-darwin* ]] ; then
1908 - ewarn "HERE BE DRAGONS! Your system seems to be PPC which means that"
1909 - ewarn "the actual usability of your Gentoo programs will depend on the"
1910 - ewarn "above-mentioned experimental PPC support in the linker. Be"
1911 - ewarn "sure to keep a known-to-work version like ${PN}-3.2.6 around!"
1912 - fi
1913 - fi
1914 -
1915 - cd "${S}"/${LD64}/src
1916 - cp "${S}"/ld64-136-compile_stubs.h ld/compile_stubs.h
1917 - cp "${S}"/ld64-253.3-Makefile-3 Makefile
1918 -
1919 - epatch "${S}"/ld64-253.3-nolto.patch
1920 - epatch "${S}"/ld64-241.9-extraneous-includes.patch
1921 - epatch "${S}"/ld64-241.9-osatomic.patch
1922 - epatch "${S}"/ld64-236.3-crashreporter.patch
1923 - epatch "${S}"/ld64-253.3-nosnapshots.patch
1924 - epatch "${S}"/ld64-253.3-ppc.patch
1925 - epatch "${S}"/ld64-236.3-constant-types-2.patch
1926 - epatch "${S}"/ld64-241.9-register-names.patch
1927 - epatch "${S}"/ld64-241.9-get-comm-align.patch
1928 - epatch "${S}"/ld64-241.9-cc_md5.patch
1929 - epatch "${S}"/ld64-253.3-make_pair.patch
1930 - epatch "${S}"/ld64-253.3-delete-warning.patch
1931 -
1932 - # provide missing headers from libunwind and dyld
1933 - mkdir -p include/{mach,mach-o/arm} || die
1934 - # never present because it's private
1935 - cp ../../${DYLD}/include/mach-o/dyld_priv.h include/mach-o || die
1936 - # missing on <= 10.5
1937 - cp ../../${LIBUNWIND}/include/libunwind.h include/ || die
1938 - cp ../../${LIBUNWIND}/include/mach-o/compact_unwind_encoding.h include/mach-o || die
1939 - # missing on <= 10.4
1940 - cp ../../${DYLD}/include/mach-o/dyld_images.h include/mach-o || die
1941 - cp ../../${CCTOOLS}/include/mach-o/loader.h include/mach-o || die
1942 - # use copies from cctools because they're otherwise hidden in some SDK
1943 - cp ../../${CCTOOLS}/include/mach-o/arm/reloc.h include/mach-o/arm || die
1944 - # provide all required CPU_TYPEs on all platforms
1945 - cp ../../${CCTOOLS}/include/mach/machine.h include/mach/machine.h
1946 - # add alias for newer identifiers, because ld64 uses both but cctools
1947 - # header only defines the older
1948 - epatch "${S}"/ld64-236.3-missing-cputypes.patch
1949 -
1950 - # mimic OS X Leopard-style Availability.h macros for libunwind.h on
1951 - # older systems
1952 - [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 8 ]] && \
1953 - echo "#define __OSX_AVAILABLE_STARTING(x,y) " > include/Availability.h
1954 -
1955 - local VER_STR="\"@(#)PROGRAM:ld PROJECT:${LD64} (Gentoo ${PN}-${PVR})\\n\""
1956 - echo "char ldVersionString[] = ${VER_STR};" > version.cpp
1957 -
1958 - epatch "${S}"/ld64-123.2-debug-backtrace.patch
1959 - if [[ ${CHOST} == powerpc*-darwin* ]] ; then
1960 - epatch "${S}"/ld64-123.2-darwin8-no-mlong-branch-warning.patch
1961 - epatch "${S}"/ld64-127.2-thread_state.patch
1962 - fi
1963 -
1964 - cd "${S}"/${CCTOOLS}
1965 - epatch "${S}"/${PN}-4.5-as.patch
1966 - epatch "${S}"/${PN}-5.1-as-dir.patch
1967 - epatch "${S}"/${PN}-5.1-ranlib.patch
1968 - epatch "${S}"/${PN}-3.1.1-libtool-ranlib.patch
1969 - epatch "${S}"/${PN}-3.1.1-no-headers.patch
1970 - epatch "${S}"/${PN}-4.0-no-oss-dir.patch
1971 - epatch "${S}"/cctools-839-intel-retf.patch
1972 - epatch "${S}"/${PN}-5.1-extraneous-includes.patch
1973 - #epatch "${S}"/${PN}-5.1-otool-stdc.patch
1974 - epatch "${S}"/${PN}-5.1-constant-types.patch
1975 - epatch "${S}"/${PN}-5.1-strnlen.patch
1976 - epatch "${S}"/${PN}-5.1-ppc.patch
1977 - epatch "${S}"/${PN}-5.1-thread-state-redefined.patch
1978 - epatch "${S}"/${PN}-7.0-make-j.patch
1979 - epatch "${S}"/${PN}-7.0-lto-prefix-2.patch
1980 - epatch "${S}"/${PN}-7.0-clang-as.patch
1981 - epatch "${S}"/${PN}-7.0-nolto.patch
1982 - epatch "${S}"/${PN}-7.0-nollvm.patch
1983 - cp ../${LD64}/src/other/prune_trie.h include/mach-o/ || die
1984 -
1985 - # do not build profileable libstuff to save compile time
1986 - sed -i -e "/^all:/s, profile , ," libstuff/Makefile
1987 -
1988 - # cctools version is provided to make via RC_ProjectSourceVersion which
1989 - # generates and compiles it as apple_version[] into libstuff. From
1990 - # there it's picked up by the individual tools. Since
1991 - # RC_ProjectSourceVersion is also used as library version, we can't
1992 - # just append our local version info. So we hack the libstuff Makefile
1993 - # to include our Gentoo version.
1994 - sed -i -e "/cctools-.*(RC_ProjectSourceVersion).*OFILE_DIR/s,Version),Version) (Gentoo ${PN}-${PVR})," \
1995 - libstuff/Makefile
1996 -
1997 - # clean up test suite
1998 - cd "${S}"/${LD64}/unit-tests/test-cases
1999 - local c
2000 -
2001 - # we don't have llvm
2002 - ((++c)); rm -rf llvm-integration;
2003 -
2004 - # we don't have dtrace
2005 - ((++c)); rm -rf dtrace-static-probes-coalescing;
2006 - ((++c)); rm -rf dtrace-static-probes;
2007 -
2008 - # a file is missing
2009 - ((++c)); rm -rf eh-coalescing-r
2010 -
2011 - # we don't do universal binaries
2012 - ((++c)); rm -rf blank-stubs;
2013 -
2014 - # looks like a problem with apple's result-filter.pl
2015 - ((++c)); rm -rf implicit-common3;
2016 - ((++c)); rm -rf order_file-ans;
2017 -
2018 - # TODO no idea what goes wrong here
2019 - ((++c)); rm -rf dwarf-debug-notes;
2020 -
2021 - einfo "Deleted $c tests that were bound to fail"
2022 -
2023 - cd "${S}"
2024 - ebegin "cleaning Makefiles from unwanted CFLAGS"
2025 - find . -name "Makefile" -print0 | xargs -0 sed \
2026 - -i \
2027 - -e 's/ -g / /g' \
2028 - -e 's/^G =.*$/G =/' \
2029 - -e 's/^OFLAG =.*$/OFLAG =/' \
2030 - -e 's/install -c -s/install/g'
2031 - eend $?
2032 -}
2033 -
2034 -src_configure() {
2035 - ENABLE_LTO=0
2036 - use lto && ENABLE_LTO=1
2037 -
2038 - export CTARGET=${CTARGET:-${CHOST}}
2039 - if [[ ${CTARGET} == ${CHOST} ]] ; then
2040 - if [[ ${CATEGORY} == cross-* ]] ; then
2041 - export CTARGET=${CATEGORY#cross-}
2042 - fi
2043 - fi
2044 -
2045 - LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
2046 - INCPATH=${LIBPATH}/include
2047 - DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
2048 - if is_cross ; then
2049 - BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${PV}
2050 - else
2051 - BINPATH=/usr/${CTARGET}/binutils-bin/${PV}
2052 - fi
2053 -
2054 - # CPPFLAGS only affects ld64, cctools don't use 'em (which currently is
2055 - # what we want)
2056 - append-cppflags -DNDEBUG
2057 -
2058 - # Block API and thus snapshots supported on >= 10.6
2059 - [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -ge 10 ]] && \
2060 - append-cppflags -DSUPPORT_SNAPSHOTS
2061 -
2062 - CCTOOLS_OFLAG=
2063 - if [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 8 ]] ; then
2064 - # cctools expect to use UNIX03 struct member names.
2065 - # This is default on > 10.4. Activate it on <= 10.4 by defining
2066 - # __DARWIN_UNIX03 explicitly.
2067 - CCTOOLS_OFLAG="-D__DARWIN_UNIX03=1"
2068 - fi
2069 -
2070 - # if compiling with USE multitarget, extract all the known arches from
2071 - # create_configure and pass them back to it
2072 - creco=${LD64}/src/create_configure
2073 - ARCHS_TO_SUPPORT=""
2074 - if use multitarget ; then
2075 - ARCHS_TO_SUPPORT="$(grep KNOWN_ARCHS= $creco | \
2076 - cut -d\" -f2 | tr ',' ' ')"
2077 - fi
2078 -
2079 - # Create configure.h for ld64 with SUPPORT_ARCH_<arch> defines in it.
2080 - DERIVED_FILE_DIR=${LD64}/src \
2081 - RC_SUPPORTED_ARCHS="$ARCHS_TO_SUPPORT" \
2082 - $creco
2083 -
2084 - # do not depend on MachOFileAbstraction.hpp to define
2085 - # SUPPORT_ARCH_arm_any because that's not included by every file where
2086 - # our ppc/arm-optional patch uses it, ld.hpp in particular
2087 - grep "SUPPORT_ARCH_armv[0-9]" ${LD64}/src/configure.h >/dev/null && \
2088 - echo "#define SUPPORT_ARCH_arm_any 1" >> ${LD64}/src/configure.h
2089 -}
2090 -
2091 -compile_ld64() {
2092 - einfo "building ${LD64}"
2093 - cd "${S}"/${LD64}/src
2094 - emake \
2095 - LTO=${ENABLE_LTO}
2096 -
2097 - use test && emake build_test
2098 -}
2099 -
2100 -compile_cctools() {
2101 - einfo "building ${CCTOOLS}"
2102 - cd "${S}"/${CCTOOLS}
2103 - # Suppress running dsymutil because it will warn about missing debug
2104 - # info which is expected when compiling without -g as we normally do.
2105 - # This might need some more thought if anyone ever wanted to build us
2106 - # for debugging with Apple's tools.
2107 - emake \
2108 - LIB_PRUNETRIE="-L../../${LD64}/src -lprunetrie" \
2109 - EFITOOLS= \
2110 - LTO="${ENABLE_LTO}" \
2111 - LTO_LIBDIR=../../../lib \
2112 - COMMON_SUBDIRS='libstuff ar misc otool' \
2113 - SUBDIRS_32= \
2114 - LEGACY= \
2115 - RC_ProjectSourceVersion=${CCTOOLS_VERSION} \
2116 - RC_CFLAGS="${CFLAGS}" \
2117 - OFLAG="${CCTOOLS_OFLAG}" \
2118 - DSYMUTIL=": disabled: dsymutil"
2119 -
2120 - cd "${S}"/${CCTOOLS}/as
2121 - emake \
2122 - BUILD_OBSOLETE_ARCH= \
2123 - RC_ProjectSourceVersion=${CCTOOLS_VERSION} \
2124 - RC_CFLAGS="-DASLIBEXECDIR=\"\\\"${EPREFIX}${LIBPATH}/\\\"\" -DCLANGDIR=\"\\\"${EPREFIX}/usr/bin/\\\"\" ${CFLAGS}" \
2125 - OFLAG="${CCTOOLS_OFLAG}" \
2126 - DSYMUTIL=": disabled: dsymutil"
2127 -}
2128 -
2129 -src_compile() {
2130 - compile_ld64
2131 - compile_cctools
2132 -}
2133 -
2134 -install_ld64() {
2135 - exeinto ${BINPATH}
2136 - doexe "${S}"/${LD64}/src/{ld64,rebase,dyldinfo,unwinddump,ObjectDump}
2137 - dosym ld64 ${BINPATH}/ld
2138 - insinto ${DATAPATH}/man/man1
2139 - doins "${S}"/${LD64}/doc/man/man1/{ld,ld64,rebase}.1
2140 -}
2141 -
2142 -install_cctools() {
2143 - cd "${S}"/${CCTOOLS}
2144 - emake install_all_but_headers \
2145 - EFITOOLS= \
2146 - COMMON_SUBDIRS='ar misc otool' \
2147 - SUBDIRS_32= \
2148 - DSTROOT=\"${D}\" \
2149 - BINDIR=\"${EPREFIX}\"${BINPATH} \
2150 - LOCBINDIR=\"${EPREFIX}\"${BINPATH} \
2151 - USRBINDIR=\"${EPREFIX}\"${BINPATH} \
2152 - LOCLIBDIR=\"${EPREFIX}\"${LIBPATH} \
2153 - MANDIR=\"${EPREFIX}\"${DATAPATH}/man/
2154 - cd "${S}"/${CCTOOLS}/as
2155 - emake install \
2156 - BUILD_OBSOLETE_ARCH= \
2157 - DSTROOT=\"${D}\" \
2158 - USRBINDIR=\"${EPREFIX}\"${BINPATH} \
2159 - LIBDIR=\"${EPREFIX}\"${LIBPATH} \
2160 - LOCLIBDIR=\"${EPREFIX}\"${LIBPATH}
2161 -
2162 - cd "${ED}"${BINPATH}
2163 - insinto ${DATAPATH}/man/man1
2164 - local skips manpage
2165 - # ar brings an up-to-date manpage with it
2166 - skips=( ar )
2167 - for bin in *; do
2168 - for skip in ${skips[@]}; do
2169 - if [[ ${bin} == ${skip} ]]; then
2170 - continue 2;
2171 - fi
2172 - done
2173 - manpage=${S}/${CCTOOLS}/man/${bin}.1
2174 - if [[ -f "${manpage}" ]]; then
2175 - doins "${manpage}"
2176 - fi
2177 - done
2178 - insinto ${DATAPATH}/man/man5
2179 - doins "${S}"/${CCTOOLS}/man/*.5
2180 -}
2181 -
2182 -src_test() {
2183 - if ! [ "${EPREFIX}"/usr/bin/clang ] ; then
2184 - einfo "Test suite only works properly with clang - please install"
2185 - return
2186 - fi
2187 -
2188 - einfo "Running unit tests"
2189 - cd "${S}"/${LD64}/unit-tests/test-cases
2190 - # provide the new ld as a symlink to clang so that -ccc-install-dir
2191 - # will pick it up
2192 - ln -sfn ../../src/ld64 ld
2193 - # use our arch command because the System's will report i386 even for an
2194 - # x86_64 prefix
2195 - perl ../bin/make-recursive.pl \
2196 - BUILT_PRODUCTS_DIR="${S}"/${LD64}/src \
2197 - ARCH="$(arch)" \
2198 - LD="${S}"/${LD64}/src/ld64 \
2199 - CC="${CC} -ccc-install-dir $PWD" \
2200 - CXX="${CXX} -ccc-install-dir $PWD" \
2201 - OTOOL="${S}"/${CCTOOLS}/otool/otool.NEW \
2202 - | perl ../bin/result-filter.pl
2203 -}
2204 -
2205 -src_install() {
2206 - install_ld64
2207 - install_cctools
2208 -
2209 - cd "${S}"
2210 - insinto /etc/env.d/binutils
2211 - cat <<-EOF > env.d
2212 - TARGET="${CHOST}"
2213 - VER="${PV}"
2214 - FAKE_TARGETS="${CHOST}"
2215 - EOF
2216 - newins env.d ${CHOST}-${PV}
2217 -}
2218 -
2219 -pkg_postinst() {
2220 - binutils-config ${CHOST}-${PV}
2221 -}
2222
2223 diff --git a/sys-devel/binutils-apple/binutils-apple-7.1-r1.ebuild b/sys-devel/binutils-apple/binutils-apple-7.1-r1.ebuild
2224 deleted file mode 100644
2225 index 46382b1d678..00000000000
2226 --- a/sys-devel/binutils-apple/binutils-apple-7.1-r1.ebuild
2227 +++ /dev/null
2228 @@ -1,369 +0,0 @@
2229 -# Copyright 1999-2019 Gentoo Authors
2230 -# Distributed under the terms of the GNU General Public License v2
2231 -
2232 -EAPI="5"
2233 -
2234 -inherit eutils flag-o-matic toolchain-funcs
2235 -
2236 -LD64=ld64-253.6
2237 -CCTOOLS_VERSION=877.7
2238 -CCTOOLS=cctools-${CCTOOLS_VERSION}
2239 -LIBUNWIND=libunwind-35.3
2240 -DYLD=dyld-360.17
2241 -
2242 -DESCRIPTION="Darwin assembler as(1) and static linker ld(1), Xcode Tools ${PV}"
2243 -HOMEPAGE="http://www.opensource.apple.com/"
2244 -SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz
2245 - http://www.opensource.apple.com/tarballs/cctools/${CCTOOLS}.tar.gz
2246 - http://www.opensource.apple.com/tarballs/dyld/${DYLD}.tar.gz
2247 - http://www.opensource.apple.com/tarballs/libunwind/${LIBUNWIND}.tar.gz
2248 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-4.3-r1.tar.bz2
2249 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-5.1-r2.tar.bz2
2250 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-6.1-r1.tar.bz2
2251 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-6.3-r2.tar.bz2
2252 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.0-r3.tar.bz2"
2253 -
2254 -LICENSE="APSL-2"
2255 -KEYWORDS="~ppc-macos ~x64-macos ~x86-macos"
2256 -IUSE="lto test multitarget"
2257 -RESTRICT="!test? ( test )"
2258 -
2259 -# ld64 can now only be compiled using llvm and libc++ since it massivley uses
2260 -# C++11 language fatures. *But additionally* the as driver now defaults to
2261 -# calling clang as the assembler on many platforms. This can be disabled using
2262 -# -Wa,-Q but since it's default we make llvm a static runtime dependency.
2263 -RDEPEND="sys-devel/binutils-config
2264 - lto? ( app-arch/xar )
2265 - sys-devel/llvm:*
2266 - sys-libs/libcxx"
2267 -DEPEND="${RDEPEND}
2268 - test? ( >=dev-lang/perl-5.8.8 )"
2269 -
2270 -SLOT="7"
2271 -
2272 -S=${WORKDIR}
2273 -
2274 -is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
2275 -
2276 -src_prepare() {
2277 - if use multitarget ; then
2278 - ewarn "You have enabled support for non-standard target architectures"
2279 - ewarn "using USE=multitarget. This includes experimental support for"
2280 - ewarn "ppc and ppc64 which is a community forward-port from the last"
2281 - ewarn "version of ld64 to officially support PPC."
2282 -
2283 - if [[ ${CHOST} == powerpc*-darwin* ]] ; then
2284 - ewarn "HERE BE DRAGONS! Your system seems to be PPC which means that"
2285 - ewarn "the actual usability of your Gentoo programs will depend on the"
2286 - ewarn "above-mentioned experimental PPC support in the linker. Be"
2287 - ewarn "sure to keep a known-to-work version like ${PN}-3.2.6 around!"
2288 - fi
2289 - fi
2290 -
2291 - cd "${S}"/${LD64}/src
2292 - cp "${S}"/ld64-136-compile_stubs.h ld/compile_stubs.h
2293 - cp "${S}"/ld64-253.3-Makefile-3 Makefile
2294 -
2295 - epatch "${S}"/ld64-253.3-nolto.patch
2296 - epatch "${S}"/ld64-241.9-extraneous-includes.patch
2297 - epatch "${S}"/ld64-241.9-osatomic.patch
2298 - epatch "${S}"/ld64-236.3-crashreporter.patch
2299 - epatch "${S}"/ld64-253.3-nosnapshots.patch
2300 - epatch "${S}"/ld64-253.3-ppc.patch
2301 - epatch "${S}"/ld64-236.3-constant-types-2.patch
2302 - epatch "${S}"/ld64-241.9-register-names.patch
2303 - epatch "${S}"/ld64-241.9-get-comm-align.patch
2304 - epatch "${S}"/ld64-241.9-cc_md5.patch
2305 - epatch "${S}"/ld64-253.3-make_pair.patch
2306 - epatch "${S}"/ld64-253.3-delete-warning.patch
2307 -
2308 - # provide missing headers from libunwind and dyld
2309 - mkdir -p include/{mach,mach-o/arm} || die
2310 - # never present because it's private
2311 - cp ../../${DYLD}/include/mach-o/dyld_priv.h include/mach-o || die
2312 - # missing on <= 10.5
2313 - cp ../../${LIBUNWIND}/include/libunwind.h include/ || die
2314 - cp ../../${LIBUNWIND}/include/mach-o/compact_unwind_encoding.h include/mach-o || die
2315 - # missing on <= 10.4
2316 - cp ../../${DYLD}/include/mach-o/dyld_images.h include/mach-o || die
2317 - cp ../../${CCTOOLS}/include/mach-o/loader.h include/mach-o || die
2318 - # use copies from cctools because they're otherwise hidden in some SDK
2319 - cp ../../${CCTOOLS}/include/mach-o/arm/reloc.h include/mach-o/arm || die
2320 - # provide all required CPU_TYPEs on all platforms
2321 - cp ../../${CCTOOLS}/include/mach/machine.h include/mach/machine.h
2322 - # add alias for newer identifiers, because ld64 uses both but cctools
2323 - # header only defines the older
2324 - epatch "${S}"/ld64-236.3-missing-cputypes.patch
2325 -
2326 - # mimic OS X Leopard-style Availability.h macros for libunwind.h on
2327 - # older systems
2328 - [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 8 ]] && \
2329 - echo "#define __OSX_AVAILABLE_STARTING(x,y) " > include/Availability.h
2330 -
2331 - local VER_STR="\"@(#)PROGRAM:ld PROJECT:${LD64} (Gentoo ${PN}-${PVR})\\n\""
2332 - echo "char ldVersionString[] = ${VER_STR};" > version.cpp
2333 -
2334 - epatch "${S}"/ld64-123.2-debug-backtrace.patch
2335 - if [[ ${CHOST} == powerpc*-darwin* ]] ; then
2336 - epatch "${S}"/ld64-123.2-darwin8-no-mlong-branch-warning.patch
2337 - epatch "${S}"/ld64-127.2-thread_state.patch
2338 - fi
2339 -
2340 - cd "${S}"/${CCTOOLS}
2341 - epatch "${S}"/${PN}-4.5-as.patch
2342 - epatch "${S}"/${PN}-5.1-as-dir.patch
2343 - epatch "${S}"/${PN}-5.1-ranlib.patch
2344 - epatch "${S}"/${PN}-3.1.1-libtool-ranlib.patch
2345 - epatch "${S}"/${PN}-3.1.1-no-headers.patch
2346 - epatch "${S}"/${PN}-4.0-no-oss-dir.patch
2347 - epatch "${S}"/cctools-839-intel-retf.patch
2348 - epatch "${S}"/${PN}-5.1-extraneous-includes.patch
2349 - #epatch "${S}"/${PN}-5.1-otool-stdc.patch
2350 - epatch "${S}"/${PN}-5.1-constant-types.patch
2351 - epatch "${S}"/${PN}-5.1-strnlen.patch
2352 - epatch "${S}"/${PN}-5.1-ppc.patch
2353 - epatch "${S}"/${PN}-5.1-thread-state-redefined.patch
2354 - epatch "${S}"/${PN}-7.0-make-j.patch
2355 - epatch "${S}"/${PN}-7.0-lto-prefix-2.patch
2356 - epatch "${S}"/${PN}-7.0-clang-as.patch
2357 - epatch "${S}"/${PN}-7.0-nolto.patch
2358 - epatch "${S}"/${PN}-7.0-nollvm.patch
2359 - cp ../${LD64}/src/other/prune_trie.h include/mach-o/ || die
2360 -
2361 - # do not build profileable libstuff to save compile time
2362 - sed -i -e "/^all:/s, profile , ," libstuff/Makefile
2363 -
2364 - # cctools version is provided to make via RC_ProjectSourceVersion which
2365 - # generates and compiles it as apple_version[] into libstuff. From
2366 - # there it's picked up by the individual tools. Since
2367 - # RC_ProjectSourceVersion is also used as library version, we can't
2368 - # just append our local version info. So we hack the libstuff Makefile
2369 - # to include our Gentoo version.
2370 - sed -i -e "/cctools-.*(RC_ProjectSourceVersion).*OFILE_DIR/s,Version),Version) (Gentoo ${PN}-${PVR})," \
2371 - libstuff/Makefile
2372 -
2373 - # clean up test suite
2374 - cd "${S}"/${LD64}/unit-tests/test-cases
2375 - local c
2376 -
2377 - # we don't have llvm
2378 - ((++c)); rm -rf llvm-integration;
2379 -
2380 - # we don't have dtrace
2381 - ((++c)); rm -rf dtrace-static-probes-coalescing;
2382 - ((++c)); rm -rf dtrace-static-probes;
2383 -
2384 - # a file is missing
2385 - ((++c)); rm -rf eh-coalescing-r
2386 -
2387 - # we don't do universal binaries
2388 - ((++c)); rm -rf blank-stubs;
2389 -
2390 - # looks like a problem with apple's result-filter.pl
2391 - ((++c)); rm -rf implicit-common3;
2392 - ((++c)); rm -rf order_file-ans;
2393 -
2394 - # TODO no idea what goes wrong here
2395 - ((++c)); rm -rf dwarf-debug-notes;
2396 -
2397 - einfo "Deleted $c tests that were bound to fail"
2398 -
2399 - cd "${S}"
2400 - ebegin "cleaning Makefiles from unwanted CFLAGS"
2401 - find . -name "Makefile" -print0 | xargs -0 sed \
2402 - -i \
2403 - -e 's/ -g / /g' \
2404 - -e 's/^G =.*$/G =/' \
2405 - -e 's/^OFLAG =.*$/OFLAG =/' \
2406 - -e 's/install -c -s/install/g'
2407 - eend $?
2408 -}
2409 -
2410 -src_configure() {
2411 - ENABLE_LTO=0
2412 - use lto && ENABLE_LTO=1
2413 -
2414 - export CTARGET=${CTARGET:-${CHOST}}
2415 - if [[ ${CTARGET} == ${CHOST} ]] ; then
2416 - if [[ ${CATEGORY} == cross-* ]] ; then
2417 - export CTARGET=${CATEGORY#cross-}
2418 - fi
2419 - fi
2420 -
2421 - LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
2422 - INCPATH=${LIBPATH}/include
2423 - DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
2424 - if is_cross ; then
2425 - BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${PV}
2426 - else
2427 - BINPATH=/usr/${CTARGET}/binutils-bin/${PV}
2428 - fi
2429 -
2430 - # CPPFLAGS only affects ld64, cctools don't use 'em (which currently is
2431 - # what we want)
2432 - append-cppflags -DNDEBUG
2433 -
2434 - # Block API and thus snapshots supported on >= 10.6
2435 - [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -ge 10 ]] && \
2436 - append-cppflags -DSUPPORT_SNAPSHOTS
2437 -
2438 - CCTOOLS_OFLAG=
2439 - if [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 8 ]] ; then
2440 - # cctools expect to use UNIX03 struct member names.
2441 - # This is default on > 10.4. Activate it on <= 10.4 by defining
2442 - # __DARWIN_UNIX03 explicitly.
2443 - CCTOOLS_OFLAG="-D__DARWIN_UNIX03=1"
2444 - fi
2445 -
2446 - # if compiling with USE multitarget, extract all the known arches from
2447 - # create_configure and pass them back to it
2448 - creco=${LD64}/src/create_configure
2449 - ARCHS_TO_SUPPORT=""
2450 - if use multitarget ; then
2451 - ARCHS_TO_SUPPORT="$(grep KNOWN_ARCHS= $creco | \
2452 - cut -d\" -f2 | tr ',' ' ')"
2453 - fi
2454 -
2455 - # Create configure.h for ld64 with SUPPORT_ARCH_<arch> defines in it.
2456 - DERIVED_FILE_DIR=${LD64}/src \
2457 - RC_SUPPORTED_ARCHS="$ARCHS_TO_SUPPORT" \
2458 - $creco
2459 -
2460 - # do not depend on MachOFileAbstraction.hpp to define
2461 - # SUPPORT_ARCH_arm_any because that's not included by every file where
2462 - # our ppc/arm-optional patch uses it, ld.hpp in particular
2463 - grep "SUPPORT_ARCH_armv[0-9]" ${LD64}/src/configure.h >/dev/null && \
2464 - echo "#define SUPPORT_ARCH_arm_any 1" >> ${LD64}/src/configure.h
2465 -}
2466 -
2467 -compile_ld64() {
2468 - einfo "building ${LD64}"
2469 - cd "${S}"/${LD64}/src
2470 - emake \
2471 - LTO=${ENABLE_LTO}
2472 -
2473 - use test && emake build_test
2474 -}
2475 -
2476 -compile_cctools() {
2477 - einfo "building ${CCTOOLS}"
2478 - cd "${S}"/${CCTOOLS}
2479 - # Suppress running dsymutil because it will warn about missing debug
2480 - # info which is expected when compiling without -g as we normally do.
2481 - # This might need some more thought if anyone ever wanted to build us
2482 - # for debugging with Apple's tools.
2483 - emake \
2484 - LIB_PRUNETRIE="-L../../${LD64}/src -lprunetrie" \
2485 - EFITOOLS= \
2486 - LTO="${ENABLE_LTO}" \
2487 - LTO_LIBDIR=../../../lib \
2488 - COMMON_SUBDIRS='libstuff ar misc otool' \
2489 - SUBDIRS_32= \
2490 - LEGACY= \
2491 - RC_ProjectSourceVersion=${CCTOOLS_VERSION} \
2492 - RC_CFLAGS="${CFLAGS}" \
2493 - OFLAG="${CCTOOLS_OFLAG}" \
2494 - DSYMUTIL=": disabled: dsymutil"
2495 -
2496 - cd "${S}"/${CCTOOLS}/as
2497 - emake \
2498 - BUILD_OBSOLETE_ARCH= \
2499 - RC_ProjectSourceVersion=${CCTOOLS_VERSION} \
2500 - RC_CFLAGS="-DASLIBEXECDIR=\"\\\"${EPREFIX}${LIBPATH}/\\\"\" -DCLANGDIR=\"\\\"${EPREFIX}/usr/bin/\\\"\" ${CFLAGS}" \
2501 - OFLAG="${CCTOOLS_OFLAG}" \
2502 - DSYMUTIL=": disabled: dsymutil"
2503 -}
2504 -
2505 -src_compile() {
2506 - compile_ld64
2507 - compile_cctools
2508 -}
2509 -
2510 -install_ld64() {
2511 - exeinto ${BINPATH}
2512 - doexe "${S}"/${LD64}/src/{ld64,rebase,dyldinfo,unwinddump,ObjectDump}
2513 - dosym ld64 ${BINPATH}/ld
2514 - insinto ${DATAPATH}/man/man1
2515 - doins "${S}"/${LD64}/doc/man/man1/{ld,ld64,rebase}.1
2516 -}
2517 -
2518 -install_cctools() {
2519 - cd "${S}"/${CCTOOLS}
2520 - emake install_all_but_headers \
2521 - EFITOOLS= \
2522 - COMMON_SUBDIRS='ar misc otool' \
2523 - SUBDIRS_32= \
2524 - DSTROOT=\"${D}\" \
2525 - BINDIR=\"${EPREFIX}\"${BINPATH} \
2526 - LOCBINDIR=\"${EPREFIX}\"${BINPATH} \
2527 - USRBINDIR=\"${EPREFIX}\"${BINPATH} \
2528 - LOCLIBDIR=\"${EPREFIX}\"${LIBPATH} \
2529 - MANDIR=\"${EPREFIX}\"${DATAPATH}/man/
2530 - cd "${S}"/${CCTOOLS}/as
2531 - emake install \
2532 - BUILD_OBSOLETE_ARCH= \
2533 - DSTROOT=\"${D}\" \
2534 - USRBINDIR=\"${EPREFIX}\"${BINPATH} \
2535 - LIBDIR=\"${EPREFIX}\"${LIBPATH} \
2536 - LOCLIBDIR=\"${EPREFIX}\"${LIBPATH}
2537 -
2538 - cd "${ED}"${BINPATH}
2539 - insinto ${DATAPATH}/man/man1
2540 - local skips manpage
2541 - # ar brings an up-to-date manpage with it
2542 - skips=( ar )
2543 - for bin in *; do
2544 - for skip in ${skips[@]}; do
2545 - if [[ ${bin} == ${skip} ]]; then
2546 - continue 2;
2547 - fi
2548 - done
2549 - manpage=${S}/${CCTOOLS}/man/${bin}.1
2550 - if [[ -f "${manpage}" ]]; then
2551 - doins "${manpage}"
2552 - fi
2553 - done
2554 - insinto ${DATAPATH}/man/man5
2555 - doins "${S}"/${CCTOOLS}/man/*.5
2556 -}
2557 -
2558 -src_test() {
2559 - if ! [ "${EPREFIX}"/usr/bin/clang ] ; then
2560 - einfo "Test suite only works properly with clang - please install"
2561 - return
2562 - fi
2563 -
2564 - einfo "Running unit tests"
2565 - cd "${S}"/${LD64}/unit-tests/test-cases
2566 - # provide the new ld as a symlink to clang so that -ccc-install-dir
2567 - # will pick it up
2568 - ln -sfn ../../src/ld64 ld
2569 - # use our arch command because the System's will report i386 even for an
2570 - # x86_64 prefix
2571 - perl ../bin/make-recursive.pl \
2572 - BUILT_PRODUCTS_DIR="${S}"/${LD64}/src \
2573 - ARCH="$(arch)" \
2574 - LD="${S}"/${LD64}/src/ld64 \
2575 - CC="${CC} -ccc-install-dir $PWD" \
2576 - CXX="${CXX} -ccc-install-dir $PWD" \
2577 - OTOOL="${S}"/${CCTOOLS}/otool/otool.NEW \
2578 - | perl ../bin/result-filter.pl
2579 -}
2580 -
2581 -src_install() {
2582 - install_ld64
2583 - install_cctools
2584 -
2585 - cd "${S}"
2586 - insinto /etc/env.d/binutils
2587 - cat <<-EOF > env.d
2588 - TARGET="${CHOST}"
2589 - VER="${PV}"
2590 - FAKE_TARGETS="${CHOST}"
2591 - EOF
2592 - newins env.d ${CHOST}-${PV}
2593 -}
2594 -
2595 -pkg_postinst() {
2596 - binutils-config ${CHOST}-${PV}
2597 -}
2598
2599 diff --git a/sys-devel/binutils-apple/binutils-apple-7.2-r1.ebuild b/sys-devel/binutils-apple/binutils-apple-7.2-r1.ebuild
2600 deleted file mode 100644
2601 index e7e593598c9..00000000000
2602 --- a/sys-devel/binutils-apple/binutils-apple-7.2-r1.ebuild
2603 +++ /dev/null
2604 @@ -1,370 +0,0 @@
2605 -# Copyright 1999-2019 Gentoo Authors
2606 -# Distributed under the terms of the GNU General Public License v2
2607 -
2608 -EAPI="5"
2609 -
2610 -inherit eutils flag-o-matic toolchain-funcs
2611 -
2612 -LD64=ld64-253.9
2613 -CCTOOLS_VERSION=877.8
2614 -CCTOOLS=cctools-${CCTOOLS_VERSION}
2615 -LIBUNWIND=libunwind-35.3
2616 -DYLD=dyld-360.18
2617 -
2618 -DESCRIPTION="Darwin assembler as(1) and static linker ld(1), Xcode Tools ${PV}"
2619 -HOMEPAGE="http://www.opensource.apple.com/"
2620 -SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz
2621 - http://www.opensource.apple.com/tarballs/cctools/${CCTOOLS}.tar.gz
2622 - http://www.opensource.apple.com/tarballs/dyld/${DYLD}.tar.gz
2623 - http://www.opensource.apple.com/tarballs/libunwind/${LIBUNWIND}.tar.gz
2624 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-4.3-r1.tar.bz2
2625 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-5.1-r2.tar.bz2
2626 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-6.1-r1.tar.bz2
2627 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-6.3-r2.tar.bz2
2628 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.0-r3.tar.bz2
2629 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.2-r1.tar.bz2"
2630 -
2631 -LICENSE="APSL-2"
2632 -KEYWORDS="~ppc-macos ~x64-macos ~x86-macos"
2633 -IUSE="lto test multitarget"
2634 -RESTRICT="!test? ( test )"
2635 -
2636 -# ld64 can now only be compiled using llvm and libc++ since it massivley uses
2637 -# C++11 language fatures. *But additionally* the as driver now defaults to
2638 -# calling clang as the assembler on many platforms. This can be disabled using
2639 -# -Wa,-Q but since it's default we make llvm a static runtime dependency.
2640 -RDEPEND="sys-devel/binutils-config
2641 - lto? ( app-arch/xar )
2642 - sys-devel/llvm:*
2643 - sys-libs/libcxx"
2644 -DEPEND="${RDEPEND}
2645 - test? ( >=dev-lang/perl-5.8.8 )"
2646 -
2647 -SLOT="7"
2648 -
2649 -S=${WORKDIR}
2650 -
2651 -is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
2652 -
2653 -src_prepare() {
2654 - if use multitarget ; then
2655 - ewarn "You have enabled support for non-standard target architectures"
2656 - ewarn "using USE=multitarget. This includes experimental support for"
2657 - ewarn "ppc and ppc64 which is a community forward-port from the last"
2658 - ewarn "version of ld64 to officially support PPC."
2659 -
2660 - if [[ ${CHOST} == powerpc*-darwin* ]] ; then
2661 - ewarn "HERE BE DRAGONS! Your system seems to be PPC which means that"
2662 - ewarn "the actual usability of your Gentoo programs will depend on the"
2663 - ewarn "above-mentioned experimental PPC support in the linker. Be"
2664 - ewarn "sure to keep a known-to-work version like ${PN}-3.2.6 around!"
2665 - fi
2666 - fi
2667 -
2668 - cd "${S}"/${LD64}/src
2669 - cp "${S}"/ld64-136-compile_stubs.h ld/compile_stubs.h
2670 - cp "${S}"/ld64-253.3-Makefile-3 Makefile
2671 -
2672 - epatch "${S}"/ld64-253.9-nolto.patch
2673 - epatch "${S}"/ld64-241.9-extraneous-includes.patch
2674 - epatch "${S}"/ld64-241.9-osatomic.patch
2675 - epatch "${S}"/ld64-236.3-crashreporter.patch
2676 - epatch "${S}"/ld64-253.3-nosnapshots.patch
2677 - epatch "${S}"/ld64-253.3-ppc.patch
2678 - epatch "${S}"/ld64-236.3-constant-types-2.patch
2679 - epatch "${S}"/ld64-241.9-register-names.patch
2680 - epatch "${S}"/ld64-241.9-get-comm-align.patch
2681 - epatch "${S}"/ld64-241.9-cc_md5.patch
2682 - epatch "${S}"/ld64-253.3-make_pair.patch
2683 - epatch "${S}"/ld64-253.3-delete-warning.patch
2684 -
2685 - # provide missing headers from libunwind and dyld
2686 - mkdir -p include/{mach,mach-o/arm} || die
2687 - # never present because it's private
2688 - cp ../../${DYLD}/include/mach-o/dyld_priv.h include/mach-o || die
2689 - # missing on <= 10.5
2690 - cp ../../${LIBUNWIND}/include/libunwind.h include/ || die
2691 - cp ../../${LIBUNWIND}/include/mach-o/compact_unwind_encoding.h include/mach-o || die
2692 - # missing on <= 10.4
2693 - cp ../../${DYLD}/include/mach-o/dyld_images.h include/mach-o || die
2694 - cp ../../${CCTOOLS}/include/mach-o/loader.h include/mach-o || die
2695 - # use copies from cctools because they're otherwise hidden in some SDK
2696 - cp ../../${CCTOOLS}/include/mach-o/arm/reloc.h include/mach-o/arm || die
2697 - # provide all required CPU_TYPEs on all platforms
2698 - cp ../../${CCTOOLS}/include/mach/machine.h include/mach/machine.h
2699 - # add alias for newer identifiers, because ld64 uses both but cctools
2700 - # header only defines the older
2701 - epatch "${S}"/ld64-236.3-missing-cputypes.patch
2702 -
2703 - # mimic OS X Leopard-style Availability.h macros for libunwind.h on
2704 - # older systems
2705 - [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 8 ]] && \
2706 - echo "#define __OSX_AVAILABLE_STARTING(x,y) " > include/Availability.h
2707 -
2708 - local VER_STR="\"@(#)PROGRAM:ld PROJECT:${LD64} (Gentoo ${PN}-${PVR})\\n\""
2709 - echo "char ldVersionString[] = ${VER_STR};" > version.cpp
2710 -
2711 - epatch "${S}"/ld64-123.2-debug-backtrace.patch
2712 - if [[ ${CHOST} == powerpc*-darwin* ]] ; then
2713 - epatch "${S}"/ld64-123.2-darwin8-no-mlong-branch-warning.patch
2714 - epatch "${S}"/ld64-127.2-thread_state.patch
2715 - fi
2716 -
2717 - cd "${S}"/${CCTOOLS}
2718 - epatch "${S}"/${PN}-4.5-as.patch
2719 - epatch "${S}"/${PN}-5.1-as-dir.patch
2720 - epatch "${S}"/${PN}-5.1-ranlib.patch
2721 - epatch "${S}"/${PN}-3.1.1-libtool-ranlib.patch
2722 - epatch "${S}"/${PN}-3.1.1-no-headers.patch
2723 - epatch "${S}"/${PN}-4.0-no-oss-dir.patch
2724 - epatch "${S}"/cctools-839-intel-retf.patch
2725 - epatch "${S}"/${PN}-5.1-extraneous-includes.patch
2726 - #epatch "${S}"/${PN}-5.1-otool-stdc.patch
2727 - epatch "${S}"/${PN}-5.1-constant-types.patch
2728 - epatch "${S}"/${PN}-5.1-strnlen.patch
2729 - epatch "${S}"/${PN}-5.1-ppc.patch
2730 - epatch "${S}"/${PN}-5.1-thread-state-redefined.patch
2731 - epatch "${S}"/${PN}-7.0-make-j.patch
2732 - epatch "${S}"/${PN}-7.0-lto-prefix-2.patch
2733 - epatch "${S}"/${PN}-7.0-clang-as.patch
2734 - epatch "${S}"/${PN}-7.0-nolto.patch
2735 - epatch "${S}"/${PN}-7.0-nollvm.patch
2736 - cp ../${LD64}/src/other/prune_trie.h include/mach-o/ || die
2737 -
2738 - # do not build profileable libstuff to save compile time
2739 - sed -i -e "/^all:/s, profile , ," libstuff/Makefile
2740 -
2741 - # cctools version is provided to make via RC_ProjectSourceVersion which
2742 - # generates and compiles it as apple_version[] into libstuff. From
2743 - # there it's picked up by the individual tools. Since
2744 - # RC_ProjectSourceVersion is also used as library version, we can't
2745 - # just append our local version info. So we hack the libstuff Makefile
2746 - # to include our Gentoo version.
2747 - sed -i -e "/cctools-.*(RC_ProjectSourceVersion).*OFILE_DIR/s,Version),Version) (Gentoo ${PN}-${PVR})," \
2748 - libstuff/Makefile
2749 -
2750 - # clean up test suite
2751 - cd "${S}"/${LD64}/unit-tests/test-cases
2752 - local c
2753 -
2754 - # we don't have llvm
2755 - ((++c)); rm -rf llvm-integration;
2756 -
2757 - # we don't have dtrace
2758 - ((++c)); rm -rf dtrace-static-probes-coalescing;
2759 - ((++c)); rm -rf dtrace-static-probes;
2760 -
2761 - # a file is missing
2762 - ((++c)); rm -rf eh-coalescing-r
2763 -
2764 - # we don't do universal binaries
2765 - ((++c)); rm -rf blank-stubs;
2766 -
2767 - # looks like a problem with apple's result-filter.pl
2768 - ((++c)); rm -rf implicit-common3;
2769 - ((++c)); rm -rf order_file-ans;
2770 -
2771 - # TODO no idea what goes wrong here
2772 - ((++c)); rm -rf dwarf-debug-notes;
2773 -
2774 - einfo "Deleted $c tests that were bound to fail"
2775 -
2776 - cd "${S}"
2777 - ebegin "cleaning Makefiles from unwanted CFLAGS"
2778 - find . -name "Makefile" -print0 | xargs -0 sed \
2779 - -i \
2780 - -e 's/ -g / /g' \
2781 - -e 's/^G =.*$/G =/' \
2782 - -e 's/^OFLAG =.*$/OFLAG =/' \
2783 - -e 's/install -c -s/install/g'
2784 - eend $?
2785 -}
2786 -
2787 -src_configure() {
2788 - ENABLE_LTO=0
2789 - use lto && ENABLE_LTO=1
2790 -
2791 - export CTARGET=${CTARGET:-${CHOST}}
2792 - if [[ ${CTARGET} == ${CHOST} ]] ; then
2793 - if [[ ${CATEGORY} == cross-* ]] ; then
2794 - export CTARGET=${CATEGORY#cross-}
2795 - fi
2796 - fi
2797 -
2798 - LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
2799 - INCPATH=${LIBPATH}/include
2800 - DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
2801 - if is_cross ; then
2802 - BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${PV}
2803 - else
2804 - BINPATH=/usr/${CTARGET}/binutils-bin/${PV}
2805 - fi
2806 -
2807 - # CPPFLAGS only affects ld64, cctools don't use 'em (which currently is
2808 - # what we want)
2809 - append-cppflags -DNDEBUG
2810 -
2811 - # Block API and thus snapshots supported on >= 10.6
2812 - [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -ge 10 ]] && \
2813 - append-cppflags -DSUPPORT_SNAPSHOTS
2814 -
2815 - CCTOOLS_OFLAG=
2816 - if [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 8 ]] ; then
2817 - # cctools expect to use UNIX03 struct member names.
2818 - # This is default on > 10.4. Activate it on <= 10.4 by defining
2819 - # __DARWIN_UNIX03 explicitly.
2820 - CCTOOLS_OFLAG="-D__DARWIN_UNIX03=1"
2821 - fi
2822 -
2823 - # if compiling with USE multitarget, extract all the known arches from
2824 - # create_configure and pass them back to it
2825 - creco=${LD64}/src/create_configure
2826 - ARCHS_TO_SUPPORT=""
2827 - if use multitarget ; then
2828 - ARCHS_TO_SUPPORT="$(grep KNOWN_ARCHS= $creco | \
2829 - cut -d\" -f2 | tr ',' ' ')"
2830 - fi
2831 -
2832 - # Create configure.h for ld64 with SUPPORT_ARCH_<arch> defines in it.
2833 - DERIVED_FILE_DIR=${LD64}/src \
2834 - RC_SUPPORTED_ARCHS="$ARCHS_TO_SUPPORT" \
2835 - $creco
2836 -
2837 - # do not depend on MachOFileAbstraction.hpp to define
2838 - # SUPPORT_ARCH_arm_any because that's not included by every file where
2839 - # our ppc/arm-optional patch uses it, ld.hpp in particular
2840 - grep "SUPPORT_ARCH_armv[0-9]" ${LD64}/src/configure.h >/dev/null && \
2841 - echo "#define SUPPORT_ARCH_arm_any 1" >> ${LD64}/src/configure.h
2842 -}
2843 -
2844 -compile_ld64() {
2845 - einfo "building ${LD64}"
2846 - cd "${S}"/${LD64}/src
2847 - emake \
2848 - LTO=${ENABLE_LTO}
2849 -
2850 - use test && emake build_test
2851 -}
2852 -
2853 -compile_cctools() {
2854 - einfo "building ${CCTOOLS}"
2855 - cd "${S}"/${CCTOOLS}
2856 - # Suppress running dsymutil because it will warn about missing debug
2857 - # info which is expected when compiling without -g as we normally do.
2858 - # This might need some more thought if anyone ever wanted to build us
2859 - # for debugging with Apple's tools.
2860 - emake \
2861 - LIB_PRUNETRIE="-L../../${LD64}/src -lprunetrie" \
2862 - EFITOOLS= \
2863 - LTO="${ENABLE_LTO}" \
2864 - LTO_LIBDIR=../../../lib \
2865 - COMMON_SUBDIRS='libstuff ar misc otool' \
2866 - SUBDIRS_32= \
2867 - LEGACY= \
2868 - RC_ProjectSourceVersion=${CCTOOLS_VERSION} \
2869 - RC_CFLAGS="${CFLAGS}" \
2870 - OFLAG="${CCTOOLS_OFLAG}" \
2871 - DSYMUTIL=": disabled: dsymutil"
2872 -
2873 - cd "${S}"/${CCTOOLS}/as
2874 - emake \
2875 - BUILD_OBSOLETE_ARCH= \
2876 - RC_ProjectSourceVersion=${CCTOOLS_VERSION} \
2877 - RC_CFLAGS="-DASLIBEXECDIR=\"\\\"${EPREFIX}${LIBPATH}/\\\"\" -DCLANGDIR=\"\\\"${EPREFIX}/usr/bin/\\\"\" ${CFLAGS}" \
2878 - OFLAG="${CCTOOLS_OFLAG}" \
2879 - DSYMUTIL=": disabled: dsymutil"
2880 -}
2881 -
2882 -src_compile() {
2883 - compile_ld64
2884 - compile_cctools
2885 -}
2886 -
2887 -install_ld64() {
2888 - exeinto ${BINPATH}
2889 - doexe "${S}"/${LD64}/src/{ld64,rebase,dyldinfo,unwinddump,ObjectDump}
2890 - dosym ld64 ${BINPATH}/ld
2891 - insinto ${DATAPATH}/man/man1
2892 - doins "${S}"/${LD64}/doc/man/man1/{ld,ld64,rebase}.1
2893 -}
2894 -
2895 -install_cctools() {
2896 - cd "${S}"/${CCTOOLS}
2897 - emake install_all_but_headers \
2898 - EFITOOLS= \
2899 - COMMON_SUBDIRS='ar misc otool' \
2900 - SUBDIRS_32= \
2901 - DSTROOT=\"${D}\" \
2902 - BINDIR=\"${EPREFIX}\"${BINPATH} \
2903 - LOCBINDIR=\"${EPREFIX}\"${BINPATH} \
2904 - USRBINDIR=\"${EPREFIX}\"${BINPATH} \
2905 - LOCLIBDIR=\"${EPREFIX}\"${LIBPATH} \
2906 - MANDIR=\"${EPREFIX}\"${DATAPATH}/man/
2907 - cd "${S}"/${CCTOOLS}/as
2908 - emake install \
2909 - BUILD_OBSOLETE_ARCH= \
2910 - DSTROOT=\"${D}\" \
2911 - USRBINDIR=\"${EPREFIX}\"${BINPATH} \
2912 - LIBDIR=\"${EPREFIX}\"${LIBPATH} \
2913 - LOCLIBDIR=\"${EPREFIX}\"${LIBPATH}
2914 -
2915 - cd "${ED}"${BINPATH}
2916 - insinto ${DATAPATH}/man/man1
2917 - local skips manpage
2918 - # ar brings an up-to-date manpage with it
2919 - skips=( ar )
2920 - for bin in *; do
2921 - for skip in ${skips[@]}; do
2922 - if [[ ${bin} == ${skip} ]]; then
2923 - continue 2;
2924 - fi
2925 - done
2926 - manpage=${S}/${CCTOOLS}/man/${bin}.1
2927 - if [[ -f "${manpage}" ]]; then
2928 - doins "${manpage}"
2929 - fi
2930 - done
2931 - insinto ${DATAPATH}/man/man5
2932 - doins "${S}"/${CCTOOLS}/man/*.5
2933 -}
2934 -
2935 -src_test() {
2936 - if ! [ "${EPREFIX}"/usr/bin/clang ] ; then
2937 - einfo "Test suite only works properly with clang - please install"
2938 - return
2939 - fi
2940 -
2941 - einfo "Running unit tests"
2942 - cd "${S}"/${LD64}/unit-tests/test-cases
2943 - # provide the new ld as a symlink to clang so that -ccc-install-dir
2944 - # will pick it up
2945 - ln -sfn ../../src/ld64 ld
2946 - # use our arch command because the System's will report i386 even for an
2947 - # x86_64 prefix
2948 - perl ../bin/make-recursive.pl \
2949 - BUILT_PRODUCTS_DIR="${S}"/${LD64}/src \
2950 - ARCH="$(arch)" \
2951 - LD="${S}"/${LD64}/src/ld64 \
2952 - CC="${CC} -ccc-install-dir $PWD" \
2953 - CXX="${CXX} -ccc-install-dir $PWD" \
2954 - OTOOL="${S}"/${CCTOOLS}/otool/otool.NEW \
2955 - | perl ../bin/result-filter.pl
2956 -}
2957 -
2958 -src_install() {
2959 - install_ld64
2960 - install_cctools
2961 -
2962 - cd "${S}"
2963 - insinto /etc/env.d/binutils
2964 - cat <<-EOF > env.d
2965 - TARGET="${CHOST}"
2966 - VER="${PV}"
2967 - FAKE_TARGETS="${CHOST}"
2968 - EOF
2969 - newins env.d ${CHOST}-${PV}
2970 -}
2971 -
2972 -pkg_postinst() {
2973 - binutils-config ${CHOST}-${PV}
2974 -}
2975
2976 diff --git a/sys-devel/binutils-apple/binutils-apple-7.3.1.ebuild b/sys-devel/binutils-apple/binutils-apple-7.3.1.ebuild
2977 deleted file mode 100644
2978 index 9497b6024a8..00000000000
2979 --- a/sys-devel/binutils-apple/binutils-apple-7.3.1.ebuild
2980 +++ /dev/null
2981 @@ -1,393 +0,0 @@
2982 -# Copyright 1999-2019 Gentoo Authors
2983 -# Distributed under the terms of the GNU General Public License v2
2984 -
2985 -EAPI="5"
2986 -
2987 -inherit eutils flag-o-matic toolchain-funcs
2988 -
2989 -LD64=ld64-264.3.102
2990 -CCTOOLS_VERSION=886
2991 -CCTOOLS=cctools-${CCTOOLS_VERSION}
2992 -LIBUNWIND=libunwind-35.3
2993 -DYLD=dyld-360.18
2994 -
2995 -DESCRIPTION="Darwin assembler as(1) and static linker ld(1), Xcode Tools ${PV}"
2996 -HOMEPAGE="http://www.opensource.apple.com/"
2997 -SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz
2998 - http://www.opensource.apple.com/tarballs/cctools/${CCTOOLS}.tar.gz
2999 - http://www.opensource.apple.com/tarballs/dyld/${DYLD}.tar.gz
3000 - http://www.opensource.apple.com/tarballs/libunwind/${LIBUNWIND}.tar.gz
3001 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-4.3-r1.tar.bz2
3002 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-5.1-r2.tar.bz2
3003 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-6.1-r1.tar.bz2
3004 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-6.3-r2.tar.bz2
3005 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.0-r3.tar.bz2
3006 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.2-r1.tar.bz2
3007 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.3-r2.tar.bz2"
3008 -
3009 -LICENSE="APSL-2"
3010 -KEYWORDS="~ppc-macos ~x64-macos ~x86-macos"
3011 -IUSE="lto test multitarget"
3012 -RESTRICT="!test? ( test )"
3013 -
3014 -# ld64 can now only be compiled using llvm and libc++ since it massively uses
3015 -# C++11 language features. *But additionally* the as driver now defaults to
3016 -# calling clang as the assembler on many platforms. This can be disabled using
3017 -# -Wa,-Q but since it's default we make llvm a static runtime dependency.
3018 -RDEPEND="sys-devel/binutils-config
3019 - lto? ( app-arch/xar )
3020 - sys-devel/llvm:*
3021 - sys-libs/libcxx"
3022 -DEPEND="${RDEPEND}
3023 - test? ( >=dev-lang/perl-5.8.8 )"
3024 -
3025 -SLOT="7"
3026 -
3027 -S=${WORKDIR}
3028 -
3029 -is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
3030 -
3031 -src_prepare() {
3032 - if use multitarget ; then
3033 - ewarn "You have enabled support for non-standard target architectures"
3034 - ewarn "using USE=multitarget. This includes experimental support for"
3035 - ewarn "ppc and ppc64 which is a community forward-port from the last"
3036 - ewarn "version of ld64 to officially support PPC."
3037 -
3038 - if [[ ${CHOST} == powerpc*-darwin* ]] ; then
3039 - ewarn "HERE BE DRAGONS! Your system seems to be PPC which means that"
3040 - ewarn "the actual usability of your Gentoo programs will depend on the"
3041 - ewarn "above-mentioned experimental PPC support in the linker. Be"
3042 - ewarn "sure to keep a known-to-work version like ${PN}-3.2.6 around!"
3043 - fi
3044 - fi
3045 -
3046 - cd "${S}"/${LD64}/src
3047 - cp "${S}"/ld64-136-compile_stubs.h ld/compile_stubs.h
3048 - cp "${S}"/ld64-264.3.101-Makefile Makefile
3049 -
3050 - epatch "${S}"/ld64-264.3.101-nolto.patch
3051 - epatch "${S}"/ld64-241.9-extraneous-includes.patch
3052 - epatch "${S}"/ld64-241.9-osatomic.patch
3053 - epatch "${S}"/ld64-236.3-crashreporter.patch
3054 - epatch "${S}"/ld64-264.3.101-nosnapshots.patch
3055 - epatch "${S}"/ld64-264.3.102-ppc.patch
3056 - epatch "${S}"/ld64-264.3.101-constant-types.patch
3057 - epatch "${S}"/ld64-241.9-register-names.patch
3058 - epatch "${S}"/ld64-241.9-get-comm-align.patch
3059 - epatch "${S}"/ld64-241.9-cc_md5.patch
3060 - epatch "${S}"/ld64-264.3.102-bitcode-case.patch
3061 -
3062 - # workound llvm-3.9.{0,1} issue
3063 - # https://bugs.gentoo.org/show_bug.cgi?id=603580
3064 - # https://groups.google.com/forum/#!topic/llvm-dev/JY6nuKE__sU
3065 - # http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160829/169553.html
3066 - sed -i -e '/COMPILE_TIME_ASSERT/d' ld/parsers/libunwind/*.hpp || die
3067 -
3068 - # provide missing headers from libunwind and dyld
3069 - mkdir -p include/{mach,mach-o/arm} || die
3070 - # never present because it's private
3071 - cp ../../${DYLD}/include/mach-o/dyld_priv.h include/mach-o || die
3072 - # missing on <= 10.5
3073 - cp ../../${LIBUNWIND}/include/libunwind.h include/ || die
3074 - cp ../../${LIBUNWIND}/include/mach-o/compact_unwind_encoding.h include/mach-o || die
3075 - # missing on <= 10.4
3076 - cp ../../${DYLD}/include/mach-o/dyld_images.h include/mach-o || die
3077 - cp ../../${CCTOOLS}/include/mach-o/loader.h include/mach-o || die
3078 - # use copies from cctools because they're otherwise hidden in some SDK
3079 - cp ../../${CCTOOLS}/include/mach-o/arm/reloc.h include/mach-o/arm || die
3080 - # provide all required CPU_TYPEs on all platforms
3081 - cp ../../${CCTOOLS}/include/mach/machine.h include/mach/machine.h
3082 - # add alias for newer identifiers, because ld64 uses both but cctools
3083 - # header only defines the older
3084 - epatch "${S}"/ld64-236.3-missing-cputypes.patch
3085 -
3086 - # mimic OS X Leopard-style Availability.h macros for libunwind.h on
3087 - # older systems
3088 - [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 8 ]] && \
3089 - echo "#define __OSX_AVAILABLE_STARTING(x,y) " > include/Availability.h
3090 -
3091 - local VER_STR="\"@(#)PROGRAM:ld PROJECT:${LD64} (Gentoo ${PN}-${PVR})\\n\""
3092 - echo "char ldVersionString[] = ${VER_STR};" > version.cpp
3093 -
3094 - epatch "${S}"/ld64-123.2-debug-backtrace.patch
3095 - if [[ ${CHOST} == powerpc*-darwin* ]] ; then
3096 - epatch "${S}"/ld64-123.2-darwin8-no-mlong-branch-warning.patch
3097 - epatch "${S}"/ld64-127.2-thread_state.patch
3098 - fi
3099 -
3100 - cd "${S}"/${CCTOOLS}
3101 - epatch "${S}"/${PN}-4.5-as.patch
3102 - epatch "${S}"/${PN}-5.1-as-dir.patch
3103 - epatch "${S}"/${PN}-5.1-ranlib.patch
3104 - epatch "${S}"/${PN}-3.1.1-libtool-ranlib.patch
3105 - epatch "${S}"/${PN}-3.1.1-no-headers.patch
3106 - epatch "${S}"/${PN}-4.0-no-oss-dir.patch
3107 - epatch "${S}"/cctools-839-intel-retf.patch
3108 - epatch "${S}"/${PN}-5.1-extraneous-includes.patch
3109 - #epatch "${S}"/${PN}-5.1-otool-stdc.patch
3110 - epatch "${S}"/${PN}-5.1-constant-types.patch
3111 - epatch "${S}"/${PN}-5.1-strnlen.patch
3112 - epatch "${S}"/${PN}-5.1-ppc.patch
3113 - epatch "${S}"/${PN}-5.1-thread-state-redefined.patch
3114 - epatch "${S}"/${PN}-7.3-make-j.patch
3115 - epatch "${S}"/${PN}-7.0-lto-prefix-2.patch
3116 - epatch "${S}"/${PN}-7.0-clang-as.patch
3117 - epatch "${S}"/${PN}-7.3-nolto.patch
3118 - epatch "${S}"/${PN}-7.3-nollvm.patch
3119 - epatch "${S}"/${PN}-7.3-no-developertools-dir.patch
3120 - cp ../${LD64}/src/other/prune_trie.h include/mach-o/ || die
3121 -
3122 - # do not build profileable libstuff to save compile time
3123 - sed -i -e "/^all:/s, profile , ," libstuff/Makefile
3124 -
3125 - # cctools version is provided to make via RC_ProjectSourceVersion which
3126 - # generates and compiles it as apple_version[] into libstuff. From
3127 - # there it's picked up by the individual tools. Since
3128 - # RC_ProjectSourceVersion is also used as library version, we can't
3129 - # just append our local version info. So we hack the libstuff Makefile
3130 - # to include our Gentoo version.
3131 - sed -i -e "/cctools-.*(RC_ProjectSourceVersion).*OFILE_DIR/s,Version),Version) (Gentoo ${PN}-${PVR})," \
3132 - libstuff/Makefile
3133 -
3134 - # clean up test suite
3135 - cd "${S}"/${LD64}/unit-tests/test-cases
3136 - local c
3137 -
3138 - # we don't have llvm
3139 - ((++c)); rm -rf llvm-integration;
3140 -
3141 - # we don't have dtrace
3142 - ((++c)); rm -rf dtrace-static-probes-coalescing;
3143 - ((++c)); rm -rf dtrace-static-probes;
3144 -
3145 - # a file is missing
3146 - ((++c)); rm -rf eh-coalescing-r
3147 -
3148 - # we don't do universal binaries
3149 - ((++c)); rm -rf blank-stubs;
3150 -
3151 - # looks like a problem with apple's result-filter.pl
3152 - ((++c)); rm -rf implicit-common3;
3153 - ((++c)); rm -rf order_file-ans;
3154 -
3155 - # TODO no idea what goes wrong here
3156 - ((++c)); rm -rf dwarf-debug-notes;
3157 -
3158 - einfo "Deleted $c tests that were bound to fail"
3159 -
3160 - cd "${S}"
3161 - ebegin "cleaning Makefiles from unwanted CFLAGS"
3162 - find . -name "Makefile" -print0 | xargs -0 sed \
3163 - -i \
3164 - -e 's/ -g / /g' \
3165 - -e 's/^G =.*$/G =/' \
3166 - -e 's/^OFLAG =.*$/OFLAG =/' \
3167 - -e 's/install -c -s/install/g'
3168 - eend $?
3169 -}
3170 -
3171 -src_configure() {
3172 - ENABLE_LTO=0
3173 - use lto && ENABLE_LTO=1
3174 -
3175 - export CTARGET=${CTARGET:-${CHOST}}
3176 - if [[ ${CTARGET} == ${CHOST} ]] ; then
3177 - if [[ ${CATEGORY} == cross-* ]] ; then
3178 - export CTARGET=${CATEGORY#cross-}
3179 - fi
3180 - fi
3181 -
3182 - LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
3183 - INCPATH=${LIBPATH}/include
3184 - DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
3185 - if is_cross ; then
3186 - BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${PV}
3187 - else
3188 - BINPATH=/usr/${CTARGET}/binutils-bin/${PV}
3189 - fi
3190 -
3191 - # CPPFLAGS only affects ld64, cctools don't use 'em (which currently is
3192 - # what we want)
3193 - append-cppflags -DNDEBUG
3194 -
3195 - # Block API and thus snapshots supported on >= 10.6
3196 - [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -ge 10 ]] && \
3197 - append-cppflags -DSUPPORT_SNAPSHOTS
3198 -
3199 - CCTOOLS_OFLAG=
3200 - if [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 8 ]] ; then
3201 - # cctools expect to use UNIX03 struct member names.
3202 - # This is default on > 10.4. Activate it on <= 10.4 by defining
3203 - # __DARWIN_UNIX03 explicitly.
3204 - CCTOOLS_OFLAG="-D__DARWIN_UNIX03=1"
3205 - fi
3206 -
3207 - # if compiling with USE multitarget, extract all the known arches from
3208 - # create_configure and pass them back to it
3209 - creco=${LD64}/src/create_configure
3210 - ARCHS_TO_SUPPORT=""
3211 - if use multitarget ; then
3212 - ARCHS_TO_SUPPORT="$(grep KNOWN_ARCHS= $creco | \
3213 - cut -d\" -f2 | tr ',' ' ')"
3214 - fi
3215 -
3216 - # Create configure.h for ld64 with SUPPORT_ARCH_<arch> defines in it.
3217 - DERIVED_FILE_DIR=${LD64}/src \
3218 - RC_SUPPORTED_ARCHS="$ARCHS_TO_SUPPORT" \
3219 - $creco
3220 -
3221 - # do not depend on MachOFileAbstraction.hpp to define
3222 - # SUPPORT_ARCH_arm_any because that's not included by every file where
3223 - # our ppc/arm-optional patch uses it, ld.hpp in particular
3224 - grep "SUPPORT_ARCH_armv[0-9]" ${LD64}/src/configure.h >/dev/null && \
3225 - echo "#define SUPPORT_ARCH_arm_any 1" >> ${LD64}/src/configure.h
3226 -}
3227 -
3228 -compile_ld64() {
3229 - einfo "building ${LD64}"
3230 - cd "${S}"/${LD64}/src
3231 - emake \
3232 - LTO=${ENABLE_LTO}
3233 -
3234 - use test && emake build_test
3235 -}
3236 -
3237 -compile_cctools() {
3238 - einfo "building ${CCTOOLS}"
3239 - cd "${S}"/${CCTOOLS}
3240 - # Suppress running dsymutil because it will warn about missing debug
3241 - # info which is expected when compiling without -g as we normally do.
3242 - # This might need some more thought if anyone ever wanted to build us
3243 - # for debugging with Apple's tools.
3244 - emake \
3245 - LIB_PRUNETRIE="-L../../${LD64}/src -lprunetrie" \
3246 - EFITOOLS= \
3247 - LTO="${ENABLE_LTO}" \
3248 - LTO_LIBDIR=../../../lib \
3249 - COMMON_SUBDIRS='libstuff ar misc otool' \
3250 - SUBDIRS_32= \
3251 - LEGACY= \
3252 - RC_ProjectSourceVersion=${CCTOOLS_VERSION} \
3253 - RC_CFLAGS="${CFLAGS}" \
3254 - OFLAG="${CCTOOLS_OFLAG}" \
3255 - DSYMUTIL=": disabled: dsymutil"
3256 -
3257 - cd "${S}"/${CCTOOLS}/as
3258 - emake \
3259 - BUILD_OBSOLETE_ARCH= \
3260 - RC_ProjectSourceVersion=${CCTOOLS_VERSION} \
3261 - RC_CFLAGS="-DASLIBEXECDIR=\"\\\"${EPREFIX}${LIBPATH}/\\\"\" -DCLANGDIR=\"\\\"${EPREFIX}/usr/bin/\\\"\" ${CFLAGS}" \
3262 - OFLAG="${CCTOOLS_OFLAG}" \
3263 - DSYMUTIL=": disabled: dsymutil"
3264 -}
3265 -
3266 -src_compile() {
3267 - compile_ld64
3268 - compile_cctools
3269 -}
3270 -
3271 -install_ld64() {
3272 - exeinto ${BINPATH}
3273 - doexe "${S}"/${LD64}/src/{ld64,rebase,dyldinfo,unwinddump,ObjectDump}
3274 - dosym ld64 ${BINPATH}/ld
3275 - insinto ${DATAPATH}/man/man1
3276 - doins "${S}"/${LD64}/doc/man/man1/{ld,ld64,rebase}.1
3277 -}
3278 -
3279 -install_cctools() {
3280 - cd "${S}"/${CCTOOLS}
3281 - emake install_all_but_headers \
3282 - EFITOOLS= \
3283 - COMMON_SUBDIRS='ar misc otool' \
3284 - SUBDIRS_32= \
3285 - DSTROOT=\"${D}\" \
3286 - BINDIR=\"${EPREFIX}\"${BINPATH} \
3287 - LOCBINDIR=\"${EPREFIX}\"${BINPATH} \
3288 - USRBINDIR=\"${EPREFIX}\"${BINPATH} \
3289 - LOCLIBDIR=\"${EPREFIX}\"${LIBPATH} \
3290 - MANDIR=\"${EPREFIX}\"${DATAPATH}/man/
3291 - cd "${S}"/${CCTOOLS}/as
3292 - emake install \
3293 - BUILD_OBSOLETE_ARCH= \
3294 - DSTROOT=\"${D}\" \
3295 - USRBINDIR=\"${EPREFIX}\"${BINPATH} \
3296 - LIBDIR=\"${EPREFIX}\"${LIBPATH} \
3297 - LOCLIBDIR=\"${EPREFIX}\"${LIBPATH}
3298 -
3299 - # upstream is starting to replace classic binutils with llvm-integrated
3300 - # ones. nm and size are now symlinks to llvm-{nm,size} while the classic
3301 - # version is preserved as {nm,size}-classic. (BTW: otool is a symlink to
3302 - # otool-classic for now but a wrapper llvm-otool that is calling
3303 - # llvm-objdump is present already.)
3304 - # Since our binutils do not live in the same directory as the llvm
3305 - # installation, we have to rewrite the symlinks to the llvm tools.
3306 - # This also means, that these tools still appear to be versioned via
3307 - # binutils-config but actually always run the currently installed llvm
3308 - # tool.
3309 - for tool in nm size ; do
3310 - # ${EPREFIX}/usr/x86_64-apple-darwin15/binutils-bin/7.3/$tool
3311 - # -> ${EPREFIX}/bin/llvm-$tool
3312 - ln -sfn ../../../bin/llvm-$tool "${D}/${EPREFIX}/${BINPATH}/$tool"
3313 - done
3314 -
3315 - cd "${ED}"${BINPATH}
3316 - insinto ${DATAPATH}/man/man1
3317 - local skips manpage
3318 - # ar brings an up-to-date manpage with it
3319 - skips=( ar )
3320 - for bin in *; do
3321 - for skip in ${skips[@]}; do
3322 - if [[ ${bin} == ${skip} ]]; then
3323 - continue 2;
3324 - fi
3325 - done
3326 - manpage=${S}/${CCTOOLS}/man/${bin}.1
3327 - if [[ -f "${manpage}" ]]; then
3328 - doins "${manpage}"
3329 - fi
3330 - done
3331 - insinto ${DATAPATH}/man/man5
3332 - doins "${S}"/${CCTOOLS}/man/*.5
3333 -}
3334 -
3335 -src_test() {
3336 - if ! [ "${EPREFIX}"/usr/bin/clang ] ; then
3337 - einfo "Test suite only works properly with clang - please install"
3338 - return
3339 - fi
3340 -
3341 - einfo "Running unit tests"
3342 - cd "${S}"/${LD64}/unit-tests/test-cases
3343 - # provide the new ld as a symlink to clang so that -ccc-install-dir
3344 - # will pick it up
3345 - ln -sfn ../../src/ld64 ld
3346 - # use our arch command because the System's will report i386 even for an
3347 - # x86_64 prefix
3348 - perl ../bin/make-recursive.pl \
3349 - BUILT_PRODUCTS_DIR="${S}"/${LD64}/src \
3350 - ARCH="$(arch)" \
3351 - LD="${S}"/${LD64}/src/ld64 \
3352 - CC="${CC} -ccc-install-dir $PWD" \
3353 - CXX="${CXX} -ccc-install-dir $PWD" \
3354 - OTOOL="${S}"/${CCTOOLS}/otool/otool.NEW \
3355 - | perl ../bin/result-filter.pl
3356 -}
3357 -
3358 -src_install() {
3359 - install_ld64
3360 - install_cctools
3361 -
3362 - cd "${S}"
3363 - insinto /etc/env.d/binutils
3364 - cat <<-EOF > env.d
3365 - TARGET="${CHOST}"
3366 - VER="${PV}"
3367 - FAKE_TARGETS="${CHOST}"
3368 - EOF
3369 - newins env.d ${CHOST}-${PV}
3370 -}
3371 -
3372 -pkg_postinst() {
3373 - binutils-config ${CHOST}-${PV}
3374 -}
3375
3376 diff --git a/sys-devel/binutils-apple/binutils-apple-8.1.ebuild b/sys-devel/binutils-apple/binutils-apple-8.1.ebuild
3377 deleted file mode 100644
3378 index 94587375465..00000000000
3379 --- a/sys-devel/binutils-apple/binutils-apple-8.1.ebuild
3380 +++ /dev/null
3381 @@ -1,334 +0,0 @@
3382 -# Copyright 1999-2019 Gentoo Authors
3383 -# Distributed under the terms of the GNU General Public License v2
3384 -
3385 -EAPI="6"
3386 -
3387 -inherit eutils flag-o-matic toolchain-funcs
3388 -
3389 -LD64=ld64-274.1
3390 -CCTOOLS_VERSION=895
3391 -CCTOOLS=cctools-${CCTOOLS_VERSION}
3392 -DYLD=dyld-421.2
3393 -
3394 -DESCRIPTION="Darwin assembler as(1) and static linker ld(1), Xcode Tools ${PV}"
3395 -HOMEPAGE="http://www.opensource.apple.com/"
3396 -SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz
3397 - http://www.opensource.apple.com/tarballs/cctools/${CCTOOLS}.tar.gz
3398 - http://www.opensource.apple.com/tarballs/dyld/${DYLD}.tar.gz
3399 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-4.3-r1.tar.bz2
3400 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-5.1-r2.tar.bz2
3401 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.0-r3.tar.bz2
3402 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.3-r2.tar.bz2
3403 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-8.2-r1.tar.bz2"
3404 -
3405 -LICENSE="APSL-2"
3406 -KEYWORDS="~x64-macos ~x86-macos"
3407 -IUSE="lto tapi classic test"
3408 -RESTRICT="!test? ( test )"
3409 -
3410 -# ld64 can now only be compiled using llvm and libc++ since it massively uses
3411 -# C++11 language features. *But additionally* the as driver now defaults to
3412 -# calling clang as the assembler on many platforms. This can be disabled using
3413 -# -Wa,-Q but since it's default we make llvm a static runtime dependency.
3414 -RDEPEND="sys-devel/binutils-config
3415 - lto? ( app-arch/xar )
3416 - tapi? ( sys-libs/tapi )
3417 - sys-devel/llvm:*
3418 - sys-libs/libcxx"
3419 -DEPEND="${RDEPEND}
3420 - test? ( >=dev-lang/perl-5.8.8 )"
3421 -
3422 -SLOT="8"
3423 -
3424 -S=${WORKDIR}
3425 -
3426 -is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
3427 -
3428 -src_prepare() {
3429 - cd "${S}"/${LD64}/src
3430 - cp "${S}"/ld64-136-compile_stubs.h ld/compile_stubs.h
3431 - cp "${S}"/ld64-274.1-Makefile Makefile
3432 -
3433 - epatch "${S}"/ld64-274.1-nolto.patch
3434 - epatch "${S}"/ld64-236.3-crashreporter.patch
3435 - epatch "${S}"/ld64-264.3.102-bitcode-case.patch
3436 - epatch "${S}"/ld64-274.1-unknown-fixup.patch
3437 - epatch "${S}"/ld64-274.1-notapi.patch
3438 -
3439 - # workound llvm-3.9.{0,1} issue
3440 - # https://bugs.gentoo.org/show_bug.cgi?id=603580
3441 - # https://groups.google.com/forum/#!topic/llvm-dev/JY6nuKE__sU
3442 - # http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160829/169553.html
3443 - sed -i -e '/COMPILE_TIME_ASSERT/d' ld/parsers/libunwind/*.hpp || die
3444 -
3445 - # provide missing headers from libunwind and dyld
3446 - mkdir -p include/{mach,mach-o/arm} || die
3447 - # never present because it's private
3448 - cp ../../${DYLD}/include/mach-o/dyld_priv.h include/mach-o || die
3449 - # use copies from cctools because they're otherwise hidden in some SDK
3450 - cp ../../${CCTOOLS}/include/mach-o/arm/reloc.h include/mach-o/arm || die
3451 - # provide all required CPU_TYPEs on all platforms
3452 - cp ../../${CCTOOLS}/include/mach/machine.h include/mach/machine.h
3453 - # add alias for newer identifiers, because ld64 uses both but cctools
3454 - # header only defines the older
3455 - epatch "${S}"/ld64-236.3-missing-cputypes.patch
3456 -
3457 - local VER_STR="\"@(#)PROGRAM:ld PROJECT:${LD64} (Gentoo ${PN}-${PVR})\\n\""
3458 - echo "char ldVersionString[] = ${VER_STR};" > version.cpp
3459 -
3460 - epatch "${S}"/ld64-123.2-debug-backtrace.patch
3461 -
3462 - cd "${S}"/${CCTOOLS}
3463 - epatch "${S}"/${PN}-4.5-as.patch
3464 - epatch "${S}"/${PN}-5.1-as-dir.patch
3465 - epatch "${S}"/${PN}-5.1-ranlib.patch
3466 - epatch "${S}"/${PN}-3.1.1-libtool-ranlib.patch
3467 - epatch "${S}"/${PN}-3.1.1-no-headers.patch
3468 - epatch "${S}"/${PN}-4.0-no-oss-dir.patch
3469 - epatch "${S}"/cctools-839-intel-retf.patch
3470 - epatch "${S}"/${PN}-5.1-extraneous-includes.patch
3471 - epatch "${S}"/${PN}-5.1-strnlen.patch
3472 - epatch "${S}"/${PN}-7.3-make-j.patch
3473 - epatch "${S}"/${PN}-7.0-lto-prefix-2.patch
3474 - epatch "${S}"/${PN}-7.0-clang-as.patch
3475 - epatch "${S}"/${PN}-8.1-nolto.patch
3476 - epatch "${S}"/${PN}-7.3-nollvm.patch
3477 - epatch "${S}"/${PN}-7.3-no-developertools-dir.patch
3478 - epatch "${S}"/${PN}-8.1-llvm-tools.patch
3479 - cp ../${LD64}/src/other/prune_trie.h include/mach-o/ || die
3480 -
3481 - # do not build profileable libstuff to save compile time
3482 - sed -i -e "/^all:/s, profile , ," libstuff/Makefile
3483 -
3484 - # cctools version is provided to make via RC_ProjectSourceVersion which
3485 - # generates and compiles it as apple_version[] into libstuff. From
3486 - # there it's picked up by the individual tools. Since
3487 - # RC_ProjectSourceVersion is also used as library version, we can't
3488 - # just append our local version info. So we hack the libstuff Makefile
3489 - # to include our Gentoo version.
3490 - sed -i -e "/cctools-.*(RC_ProjectSourceVersion).*OFILE_DIR/s,Version),Version) (Gentoo ${PN}-${PVR})," \
3491 - libstuff/Makefile
3492 -
3493 - eapply_user
3494 -
3495 - # clean up test suite
3496 - cd "${S}"/${LD64}/unit-tests/test-cases
3497 - local c
3498 -
3499 - # we don't have llvm
3500 - ((++c)); rm -rf llvm-integration;
3501 -
3502 - # we don't have dtrace
3503 - ((++c)); rm -rf dtrace-static-probes-coalescing;
3504 - ((++c)); rm -rf dtrace-static-probes;
3505 -
3506 - # a file is missing
3507 - ((++c)); rm -rf eh-coalescing-r
3508 -
3509 - # we don't do universal binaries
3510 - ((++c)); rm -rf blank-stubs;
3511 -
3512 - # looks like a problem with apple's result-filter.pl
3513 - ((++c)); rm -rf implicit-common3;
3514 - ((++c)); rm -rf order_file-ans;
3515 -
3516 - # TODO no idea what goes wrong here
3517 - ((++c)); rm -rf dwarf-debug-notes;
3518 -
3519 - einfo "Deleted $c tests that were bound to fail"
3520 -
3521 - cd "${S}"
3522 - ebegin "cleaning Makefiles from unwanted CFLAGS"
3523 - find . -name "Makefile" -print0 | xargs -0 sed \
3524 - -i \
3525 - -e 's/ -g / /g' \
3526 - -e 's/^G =.*$/G =/' \
3527 - -e 's/^OFLAG =.*$/OFLAG =/' \
3528 - -e 's/install -c -s/install/g'
3529 - eend $?
3530 -}
3531 -
3532 -src_configure() {
3533 - ENABLE_LTO=0
3534 - use lto && ENABLE_LTO=1
3535 -
3536 - export CTARGET=${CTARGET:-${CHOST}}
3537 - if [[ ${CTARGET} == ${CHOST} ]] ; then
3538 - if [[ ${CATEGORY} == cross-* ]] ; then
3539 - export CTARGET=${CATEGORY#cross-}
3540 - fi
3541 - fi
3542 -
3543 - LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
3544 - INCPATH=${LIBPATH}/include
3545 - DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
3546 - if is_cross ; then
3547 - BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${PV}
3548 - else
3549 - BINPATH=/usr/${CTARGET}/binutils-bin/${PV}
3550 - fi
3551 -
3552 - # CPPFLAGS only affects ld64, cctools don't use 'em (which currently is
3553 - # what we want)
3554 - append-cppflags -DNDEBUG
3555 -
3556 - # Create configure.h for ld64 with SUPPORT_ARCH_<arch> defines in it.
3557 - DERIVED_FILE_DIR=${LD64}/src \
3558 - ${LD64}/src/create_configure
3559 -}
3560 -
3561 -compile_ld64() {
3562 - einfo "building ${LD64}"
3563 - cd "${S}"/${LD64}/src
3564 - emake \
3565 - LTO=${ENABLE_LTO} \
3566 - TAPI=$(use tapi && echo 1 || echo 0)
3567 -
3568 - use test && emake build_test
3569 -}
3570 -
3571 -compile_cctools() {
3572 - einfo "building ${CCTOOLS}"
3573 - cd "${S}"/${CCTOOLS}
3574 - # Suppress running dsymutil because it will warn about missing debug
3575 - # info which is expected when compiling without -g as we normally do.
3576 - # This might need some more thought if anyone ever wanted to build us
3577 - # for debugging with Apple's tools.
3578 - emake \
3579 - LIB_PRUNETRIE="-L../../${LD64}/src -lprunetrie" \
3580 - EFITOOLS= \
3581 - LTO="${ENABLE_LTO}" \
3582 - LTO_LIBDIR=../../../lib \
3583 - COMMON_SUBDIRS='libstuff ar misc otool' \
3584 - SUBDIRS_32= \
3585 - LEGACY= \
3586 - RC_ProjectSourceVersion=${CCTOOLS_VERSION} \
3587 - RC_CFLAGS="${CFLAGS}" \
3588 - OFLAG="${CCTOOLS_OFLAG}" \
3589 - DSYMUTIL=": disabled: dsymutil"
3590 -
3591 - cd "${S}"/${CCTOOLS}/as
3592 - emake \
3593 - BUILD_OBSOLETE_ARCH= \
3594 - RC_ProjectSourceVersion=${CCTOOLS_VERSION} \
3595 - RC_CFLAGS="-DASLIBEXECDIR=\"\\\"${EPREFIX}${LIBPATH}/\\\"\" -DCLANGDIR=\"\\\"${EPREFIX}/usr/bin/\\\"\" ${CFLAGS}" \
3596 - OFLAG="${CCTOOLS_OFLAG}" \
3597 - DSYMUTIL=": disabled: dsymutil"
3598 -}
3599 -
3600 -src_compile() {
3601 - compile_ld64
3602 - compile_cctools
3603 -}
3604 -
3605 -install_ld64() {
3606 - exeinto ${BINPATH}
3607 - doexe "${S}"/${LD64}/src/{ld64,rebase,dyldinfo,unwinddump,ObjectDump}
3608 - dosym ld64 ${BINPATH}/ld
3609 - insinto ${DATAPATH}/man/man1
3610 - doins "${S}"/${LD64}/doc/man/man1/{ld,ld64,rebase}.1
3611 -}
3612 -
3613 -install_cctools() {
3614 - cd "${S}"/${CCTOOLS}
3615 - emake install_all_but_headers \
3616 - EFITOOLS= \
3617 - COMMON_SUBDIRS='ar misc otool' \
3618 - SUBDIRS_32= \
3619 - DSTROOT=\"${D}\" \
3620 - BINDIR=\"${EPREFIX}\"${BINPATH} \
3621 - LOCBINDIR=\"${EPREFIX}\"${BINPATH} \
3622 - USRBINDIR=\"${EPREFIX}\"${BINPATH} \
3623 - LOCLIBDIR=\"${EPREFIX}\"${LIBPATH} \
3624 - MANDIR=\"${EPREFIX}\"${DATAPATH}/man/
3625 - cd "${S}"/${CCTOOLS}/as
3626 - emake install \
3627 - BUILD_OBSOLETE_ARCH= \
3628 - DSTROOT=\"${D}\" \
3629 - USRBINDIR=\"${EPREFIX}\"${BINPATH} \
3630 - LIBDIR=\"${EPREFIX}\"${LIBPATH} \
3631 - LOCLIBDIR=\"${EPREFIX}\"${LIBPATH}
3632 -
3633 - # upstream is starting to replace classic binutils with llvm-integrated
3634 - # ones. nm and size are now symlinks to llvm-{nm,size} while the classic
3635 - # version is preserved as {nm,size}-classic.
3636 - # Since our binutils do not live in the same directory as the llvm
3637 - # installation, we have to rewrite the symlinks to the llvm tools.
3638 - # This also means, that these tools still appear to be versioned via
3639 - # binutils-config but actually always run the currently installed llvm
3640 - # tool.
3641 - budir=${D}/${EPREFIX}/${BINPATH}
3642 - for tool in nm size ; do
3643 - # ${EPREFIX}/usr/x86_64-apple-darwin15/binutils-bin/7.3/$tool
3644 - # -> ${EPREFIX}/bin/llvm-$tool
3645 - use classic && \
3646 - ln -sfn ${tool}-classic "${budir}/${tool}" || \
3647 - ln -sfn ../../../bin/llvm-${tool} "${budir}/${tool}"
3648 - done
3649 -
3650 - # Also, otool is now based on llvm-objdump. But a small wrapper installed
3651 - # as llvm-otool remains, providing command line compatibility.
3652 - use classic && \
3653 - ln -sfn otool-classic "${budir}/otool" || \
3654 - ln -sfn llvm-otool "${budir}/otool"
3655 -
3656 - cd "${ED}"${BINPATH}
3657 - insinto ${DATAPATH}/man/man1
3658 - local skips manpage
3659 - # ar brings an up-to-date manpage with it
3660 - skips=( ar )
3661 - for bin in *; do
3662 - for skip in ${skips[@]}; do
3663 - if [[ ${bin} == ${skip} ]]; then
3664 - continue 2;
3665 - fi
3666 - done
3667 - manpage=${S}/${CCTOOLS}/man/${bin}.1
3668 - if [[ -f "${manpage}" ]]; then
3669 - doins "${manpage}"
3670 - fi
3671 - done
3672 - insinto ${DATAPATH}/man/man5
3673 - doins "${S}"/${CCTOOLS}/man/*.5
3674 -}
3675 -
3676 -src_test() {
3677 - if ! [ "${EPREFIX}"/usr/bin/clang ] ; then
3678 - einfo "Test suite only works properly with clang - please install"
3679 - return
3680 - fi
3681 -
3682 - einfo "Running unit tests"
3683 - cd "${S}"/${LD64}/unit-tests/test-cases
3684 - # provide the new ld as a symlink to clang so that -ccc-install-dir
3685 - # will pick it up
3686 - ln -sfn ../../src/ld64 ld
3687 - # use our arch command because the System's will report i386 even for an
3688 - # x86_64 prefix
3689 - perl ../bin/make-recursive.pl \
3690 - BUILT_PRODUCTS_DIR="${S}"/${LD64}/src \
3691 - ARCH="$(arch)" \
3692 - LD="${S}"/${LD64}/src/ld64 \
3693 - CC="${CC} -ccc-install-dir $PWD" \
3694 - CXX="${CXX} -ccc-install-dir $PWD" \
3695 - OTOOL="${S}"/${CCTOOLS}/otool/otool.NEW \
3696 - | perl ../bin/result-filter.pl
3697 -}
3698 -
3699 -src_install() {
3700 - install_ld64
3701 - install_cctools
3702 -
3703 - cd "${S}"
3704 - insinto /etc/env.d/binutils
3705 - cat <<-EOF > env.d
3706 - TARGET="${CHOST}"
3707 - VER="${PV}"
3708 - FAKE_TARGETS="${CHOST}"
3709 - EOF
3710 - newins env.d ${CHOST}-${PV}
3711 -}
3712 -
3713 -pkg_postinst() {
3714 - binutils-config ${CHOST}-${PV}
3715 -}
3716
3717 diff --git a/sys-devel/binutils-apple/metadata.xml b/sys-devel/binutils-apple/metadata.xml
3718 index b6fa3676524..93df0e9db7f 100644
3719 --- a/sys-devel/binutils-apple/metadata.xml
3720 +++ b/sys-devel/binutils-apple/metadata.xml
3721 @@ -7,10 +7,6 @@
3722 </maintainer>
3723 <use>
3724 <flag name="lto">Add support for Link-Time Optimization with LLVM</flag>
3725 - <flag name="libcxx">Add support for libcxx</flag>
3726 - <flag name="multitarget">Compile for non-standard target
3727 - architectures (ppc and ppc64) -- experimental, Gentoo
3728 - only</flag>
3729 <flag name="classic">Use nm, otool, etc. from this ebuild
3730 instead of llvm-based tools</flag>
3731 <flag name="tapi">Build against <pkg>sys-libs/tapi</pkg></flag>