1 |
commit: 2dcc5b74a0f2cd5912cb838da1d49291fd909843 |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jul 10 17:41:23 2016 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jul 10 17:41:39 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2dcc5b74 |
7 |
|
8 |
sys-devel/binutils-apple: cleanup old |
9 |
|
10 |
Package-Manager: portage-2.2.28 |
11 |
|
12 |
sys-devel/binutils-apple/Manifest | 11 - |
13 |
.../binutils-apple/binutils-apple-3.1.2.ebuild | 214 ---- |
14 |
.../binutils-apple/binutils-apple-3.2.6.ebuild | 254 ---- |
15 |
sys-devel/binutils-apple/binutils-apple-3.2.ebuild | 234 ---- |
16 |
.../binutils-apple/binutils-apple-4.2-r1.ebuild | 328 ----- |
17 |
sys-devel/binutils-apple/binutils-apple-4.2.ebuild | 312 ----- |
18 |
.../binutils-apple/binutils-apple-4.3-r1.ebuild | 316 ----- |
19 |
.../binutils-apple/binutils-apple-4.3-r2.ebuild | 2 +- |
20 |
sys-devel/binutils-apple/binutils-apple-4.3.ebuild | 309 ----- |
21 |
.../binutils-apple/binutils-apple-5.1-r1.ebuild | 2 +- |
22 |
sys-devel/binutils-apple/binutils-apple-5.1.ebuild | 356 ------ |
23 |
.../binutils-apple/binutils-apple-6.1-r1.ebuild | 2 +- |
24 |
sys-devel/binutils-apple/binutils-apple-6.1.ebuild | 355 ------ |
25 |
.../binutils-apple/binutils-apple-6.3-r1.ebuild | 2 +- |
26 |
sys-devel/binutils-apple/binutils-apple-6.3.ebuild | 347 ------ |
27 |
.../binutils-apple/binutils-apple-7.0-r1.ebuild | 2 +- |
28 |
sys-devel/binutils-apple/binutils-apple-7.0.ebuild | 2 +- |
29 |
.../binutils-apple/binutils-apple-7.1-r1.ebuild | 2 +- |
30 |
sys-devel/binutils-apple/binutils-apple-7.1.ebuild | 2 +- |
31 |
.../binutils-apple/binutils-apple-7.2-r1.ebuild | 2 +- |
32 |
sys-devel/binutils-apple/binutils-apple-7.2.ebuild | 2 +- |
33 |
.../binutils-apple/binutils-apple-7.3.1.ebuild | 2 +- |
34 |
sys-devel/binutils-apple/binutils-apple-7.3.ebuild | 2 +- |
35 |
sys-devel/binutils-apple/files/Makefile | 12 - |
36 |
.../files/binutils-apple-3.1.1-as-dir.patch | 69 -- |
37 |
.../files/binutils-apple-3.1.1-as.patch | 98 -- |
38 |
.../binutils-apple-3.1.1-libtool-ranlib.patch | 17 - |
39 |
.../files/binutils-apple-3.1.1-nmedit.patch | 15 - |
40 |
.../files/binutils-apple-3.1.1-no-efi-man.patch | 38 - |
41 |
.../files/binutils-apple-3.1.1-no-headers.patch | 15 - |
42 |
.../files/binutils-apple-3.1.1-no-oss-dir.patch | 17 - |
43 |
.../files/binutils-apple-3.1.1-ranlib.patch | 53 - |
44 |
.../files/binutils-apple-3.1.1-testsuite.patch | 102 -- |
45 |
.../files/binutils-apple-3.1.2-as-Makefile.patch | 11 - |
46 |
.../files/binutils-apple-3.2-armv7-defines.patch | 10 - |
47 |
.../files/binutils-apple-3.2.2-as.patch | 101 -- |
48 |
.../files/binutils-apple-3.2.3-ranlib.patch | 59 - |
49 |
.../files/binutils-apple-4.0-as-dir.patch | 67 - |
50 |
.../files/binutils-apple-4.0-as.patch | 99 -- |
51 |
.../files/binutils-apple-4.0-no-oss-dir.patch | 15 - |
52 |
.../files/binutils-apple-4.2-as-dir.patch | 45 - |
53 |
.../files/binutils-apple-4.2-globals-extern.patch | 29 - |
54 |
.../files/binutils-apple-4.2-lto.patch | 34 - |
55 |
.../files/binutils-apple-4.5-as.patch | 100 -- |
56 |
.../files/binutils-apple-5.1-as-dir.patch | 47 - |
57 |
.../files/binutils-apple-5.1-constant-types.patch | 26 - |
58 |
.../binutils-apple-5.1-extraneous-includes.patch | 31 - |
59 |
.../files/binutils-apple-5.1-nolto.patch | 43 - |
60 |
.../files/binutils-apple-5.1-otool-stdc.patch | 23 - |
61 |
.../files/binutils-apple-5.1-ranlib.patch | 15 - |
62 |
.../files/binutils-apple-5.1-strnlen.patch | 45 - |
63 |
.../files/cctools-839-intel-retf.patch | 14 - |
64 |
sys-devel/binutils-apple/files/ld64-123.2-Makefile | 47 - |
65 |
...d64-123.2-darwin8-no-mlong-branch-warning.patch | 17 - |
66 |
.../files/ld64-123.2-debug-backtrace.patch | 15 - |
67 |
.../binutils-apple/files/ld64-123.2.1-lto.patch | 218 ---- |
68 |
sys-devel/binutils-apple/files/ld64-127.2-Makefile | 50 - |
69 |
.../files/ld64-127.2-extraneous-headers.patch | 12 - |
70 |
.../binutils-apple/files/ld64-127.2-lto.patch | 214 ---- |
71 |
.../files/ld64-127.2-ppc-range-warning.patch | 16 - |
72 |
.../files/ld64-127.2-thread_state.patch | 13 - |
73 |
.../binutils-apple/files/ld64-128.2-1010.patch | 20 - |
74 |
sys-devel/binutils-apple/files/ld64-128.2-Makefile | 47 - |
75 |
.../binutils-apple/files/ld64-128.2-Makefile-2 | 50 - |
76 |
.../binutils-apple/files/ld64-128.2-stdlib.patch | 14 - |
77 |
sys-devel/binutils-apple/files/ld64-136-Makefile | 48 - |
78 |
.../binutils-apple/files/ld64-136-compile_stubs.h | 53 - |
79 |
sys-devel/binutils-apple/files/ld64-236.3-Makefile | 51 - |
80 |
.../files/ld64-236.3-arm64-fixup.patch | 17 - |
81 |
.../files/ld64-236.3-constant-types.patch | 61 - |
82 |
.../files/ld64-236.3-crashreporter.patch | 23 - |
83 |
.../binutils-apple/files/ld64-236.3-gcc.patch | 1038 ---------------- |
84 |
.../files/ld64-236.3-missing-cputypes.patch | 10 - |
85 |
.../binutils-apple/files/ld64-236.3-noarm.patch | 1236 ------------------- |
86 |
.../binutils-apple/files/ld64-236.3-nolto.patch | 219 ---- |
87 |
.../binutils-apple/files/ld64-236.3-noppc.patch | 26 - |
88 |
.../files/ld64-236.3-nosnapshots.patch | 644 ---------- |
89 |
.../files/ld64-241.9-arm64-cputype.patch | 17 - |
90 |
.../files/ld64-241.9-atomic-volatile.patch | 27 - |
91 |
.../binutils-apple/files/ld64-241.9-cc_md5.patch | 24 - |
92 |
.../files/ld64-241.9-extraneous-includes.patch | 13 - |
93 |
.../binutils-apple/files/ld64-241.9-gcc.patch | 1029 ---------------- |
94 |
.../files/ld64-241.9-get-comm-align.patch | 30 - |
95 |
.../files/ld64-241.9-lto-noremarks.patch | 107 -- |
96 |
.../binutils-apple/files/ld64-241.9-noarm.patch | 1288 -------------------- |
97 |
.../files/ld64-241.9-nosnapshots.patch | 644 ---------- |
98 |
.../files/ld64-241.9-register-names.patch | 50 - |
99 |
sys-devel/binutils-apple/files/ld64-242-gcc.patch | 1038 ---------------- |
100 |
.../binutils-apple/files/ld64-242-noarm.patch | 1255 ------------------- |
101 |
.../binutils-apple/files/ld64-95.2.12-Makefile | 26 - |
102 |
...4-95.2.12-darwin8-no-mlong-branch-warning.patch | 15 - |
103 |
.../binutils-apple/files/libunwind-30-Makefile | 23 - |
104 |
92 files changed, 12 insertions(+), 14043 deletions(-) |
105 |
|
106 |
diff --git a/sys-devel/binutils-apple/Manifest b/sys-devel/binutils-apple/Manifest |
107 |
index 6b5b191..96e0594 100644 |
108 |
--- a/sys-devel/binutils-apple/Manifest |
109 |
+++ b/sys-devel/binutils-apple/Manifest |
110 |
@@ -1,5 +1,3 @@ |
111 |
-DIST binutils-apple-3.2-unwind-patches-5.tar.xz 26924 SHA256 65a3b979df5c2033ac34e830d8a77b92b436b6d5707483c619c90a1c2ea46428 SHA512 9f3ec399274060b67c51193029da5af2199c45bf923a2fa513143111cf3f1c899256c993f4927f4da85a21570d0bc9ff0872e663f90284b2cdbb3f609ea8484e WHIRLPOOL 877410e6e0b442df9e9b7cdef51cc28bd636856949ea42ac53e97ebfc41c2f50309a054729d4fc3498d6eccac96170ffb59dd5700237e59684773832218793cc |
112 |
-DIST binutils-apple-LP64-patches-1.tar.bz2 10235 SHA256 a107459f3914d57524e51ec4cb5e800f6715d40003514c79add0b5b4521cf809 SHA512 5632d4033c39e47de3ec275d02100ed53408a63122fe722c26dda1b02275c397524b113e51e1334d3235fc7f0a3bb8e53d4ccc1c2e40f24c6129282846da22e1 WHIRLPOOL c46d2021c85cee46e87871687ca7217169d14061848d12b4fa203db5d76a89969313ce55b345f2ad9fdba65fd39bdd34b146393332566fd539b2bdfc3f1e4304 |
113 |
DIST binutils-apple-patches-4.3-r1.tar.bz2 37363 SHA256 0abb41301034903452084f13566d912976a8d8845dfe37564e727c9dba9bb130 SHA512 f5d64ad182891c3af971e6aabd3c0c1b717b6a1cb471632339cba61b41a998d15880d18de09aafa1c3d059e528c888d6e8b914025c79bc21897d90a6d0e2ebf5 WHIRLPOOL eca7f9c2cd0e0c35978824c7ae591844ee5f88522db0747ed7d4e37e73bec076dadb3a2e017de7ee6cf2564a8363f4848b0cac36117a6dfd918b4514ad14e843 |
114 |
DIST binutils-apple-patches-5.1-r2.tar.bz2 51642 SHA256 fa179acf848b3cb4f888d8f8154dffec2737e06bb7002daa8d317ad0bdf02f49 SHA512 37ba0dcae6c10b54a07c6208f6893ab80b0de1bd1c2f677902f707c8290629f7671a481e256b57a18bf304b95e41e4d59519bc1c88f15de488c0ef7e142f5cd8 WHIRLPOOL 8cd1b1730b7df31d2324c8c5f23d9b7e11ffb85284cbc1f6f6ee0290304789c405b878d207821dae997420382dd39aa943fcd1fe78ae8135fc238589f429b55f |
115 |
DIST binutils-apple-patches-6.1-r1.tar.bz2 42189 SHA256 8efc006a59a589d498cd0a745e3096f6e0387031a69b0583b94f8ff943bdd10a SHA512 be8ee5af5c8c9f9228cf6980f032aa101058ac1a414bec89401dbc4ff32ea96d6ebf96b7b79285fa1e7b4037a9ed68b285dbe59ff8e3d3e62bfc0145199e72f3 WHIRLPOOL 80fa76ed8c8f60908ac12b4a2d252d8ec1ae6d418f3e20faa6e1905f6d6284dae74d9d82190d02fdd2690ce572c7e97cf38e9e4b88089beaf8962b6162616b20 |
116 |
@@ -8,10 +6,6 @@ DIST binutils-apple-patches-7.0-r1.tar.bz2 43705 SHA256 e016615294167a539c716094 |
117 |
DIST binutils-apple-patches-7.0-r2.tar.bz2 50934 SHA256 5be8cf3ed268bb413ffd05aff91a74a138c5ee92f3cad7c1bcafb4abd957ce8d SHA512 c7c8f50fad0507228336b6144b8be3e70df07d64f1df617bfd9cd717a095c49cd9555c441cde7d24bbe2d179ab8763e4f6ab1074dd6c5532b80a1bbb4f13a244 WHIRLPOOL 35e735356ee72161b0f69ea12ca3ae6745dcea18f8bcba62adbe8c189da9ddf0595bbd837c21acecf0a32a6a50a998c80a2cc3088e63b64655c6f0d0949e05c8 |
118 |
DIST binutils-apple-patches-7.2-r0.tar.bz2 2917 SHA256 8fa3c64c840aefb71c32fc0294ce6c2b0cf058a5e7f624d736dac6b8c1f44287 SHA512 ca2fc2da88144fbf01f34f1664e6177105a5d1bff956e83f6c7cd530b8e80dcd59b0c921ad95d3c4554e02909bcd846d3a2a4535bf47569b343c85e765619821 WHIRLPOOL 9ba63b8407f6015dd8cca48bea474c375cf90047a138fac8aef800622a780bfcc98910cc46781aea72a2b9803e7cd86c3ea35cfe9fa33bba8813499cc8b91c2c |
119 |
DIST binutils-apple-patches-7.3-r0.tar.bz2 44576 SHA256 18a9484b53225004ccd37d34d0e208e3a716f73831f4a433be211f233d855fb1 SHA512 6b092c586ac4c3a3c65229a7490f93b0f0d38348e5a2db4f73d6062c737007ee0a5b6bdb5948b7aac1d74d32442fa501ba92161a9ffe13151288432c6a706c43 WHIRLPOOL ef159c24cd1e53538f73aac805e06d14775f82921b1e8a10919981dbec0017d0c70ada0e80ea6135cca5551ccfb38f229df666bcb2e692880d6a23d380d39801 |
120 |
-DIST cctools-698.1.tar.gz 2318018 SHA256 383f1c0c78a2b3efdfdf7ce01adb7e2f8ee9985164dba6ab1c0fae800a211cec SHA512 05e64df9bead958e6035b3cf449a2cb21b19cef10278348ebea8b47816b05a77ebd7f72fd90270400784a231b5d55c8f909653e8177cbe1332d7f7d618453f12 WHIRLPOOL 6ae1244ca97b13378e864609aa62efc4bf028b3e55bfb00cdbf9d20ed6cedd917c64ce337b2635dcabce334b8f994e2558fbda36055b951bf769a21950673e12 |
121 |
-DIST cctools-750.tar.gz 1947953 SHA256 188855640da114e37e4ddd4824ff6cdc1ea89dfb6c90a23905c9ca315342f356 SHA512 e2e152a9fb7db47c60fe450e1fc92c6866ab89682c7fdc594b97e419ce93ea1353654bd4419bf3df99d119f554aa0f32993dc645dd7c4680840cd01b7dce2f67 WHIRLPOOL 98e48fca183ee47d138426c65401138954a86abc3b80bfc4c5d105b97b8eb583ae350657f1a7dc1154259d0bcdfe1d60dc0a63409826e9a24b178674a5afdf21 |
122 |
-DIST cctools-795.tar.gz 1993795 SHA256 7fab7044b648e92a9fefd493a1bb6daa4246f24c5838d8b5c913a446e6bbd2ef SHA512 5a34a73dc71d3574a357f6b0f26a48a99dd0995d62695b309cdfe85c4960934b410455b1ba6bdbc9a4e32106bb45b35555604975d2a80ad1be21f5d4eac69254 WHIRLPOOL 2bd074ac8ef8542c2c3df5fae91a0bece2e1c31d6c6c771c55e7c7a3d90929f9a7cd420760dcb5ecffb9dd279abed4ba5ebf840c9e9bb983a806707d735cd735 |
123 |
-DIST cctools-809.tar.gz 2014410 SHA256 03ba62749b843b131c7304a044a98c6ffacd65b1399b921d69add0375f79d8ad SHA512 1349b3e6b3b48d9fa88dade187c05c80f161c3895fc6451a530880a256eb82dc93376b3cfd0f4d65e83f5fe00dc2baab386c5f78ce5b096f2c69fe53e1a55e24 WHIRLPOOL bd06ed88a7ab0bca173c0ee03c39cf60c719b9e0f03d21df9189e3e4a62e4fb452be46b0b0b05eafc70aed88bccc0a621d9165a1df63ea0eb071f9e5dda43c25 |
124 |
DIST cctools-822.tar.gz 2024412 SHA256 dfaa9bdbd023524d47429674f64d2d5ea393123dabf90868be0aa17f61f45289 SHA512 8b02cc837d5e0520f35da445f25ba86b5042d5caa27b49a599e829ed89428cf78dbd1831bcf6c18301f941fbfb31ac2114e248041d98008a466e1574f4fe1586 WHIRLPOOL 81191ab46e8a9e47e4267146f978438ff64314b0363296b973a02f361918a5cd69057753a1b40766b93d3d4a3ed10585a27f6da2953992a406be61d1dcc1d06c |
125 |
DIST cctools-855.tar.gz 1699635 SHA256 751748ddf32c8ea84c175f32792721fa44424dad6acbf163f84f41e9617dbc58 SHA512 50f5d015ce807aa5ca274dd2deea810b8b375110e60b5e334ca4b2170526b738ea5f86a5436caebbdb748badc3b89601d0f450f5b867d8393c89e336a3db4b3f WHIRLPOOL fa493a29e32583f60c3553794bbb6d01a7b5ef797d8e8ba8161c9cbf237906ebbfaff560366da2d5b852bfcbdd55e874c00edf5b3169b16b357a54fcf3c07c4c |
126 |
DIST cctools-862.tar.gz 1702345 SHA256 1bf29f620b91c901ad3116b47738ab5076c1aed75d13869cd3bc7f067b4aaadb SHA512 faa401c1dc55bfb9cd2a9a9cc7bc9d473ee63b019607967c8b0da325514d6a1f7b1f52404370bcc018e86d30d75a4b01183f49b793f577110663efe43871360a WHIRLPOOL 371307f3264361f5e2e48d83177aff1a8f435cf2bdc1f4998cc5780c5b3760048a29a7620d2390db8f0c9378cd2f3b2f130b6aca9d402e3d428c4f4d353db097 |
127 |
@@ -20,13 +14,11 @@ DIST cctools-877.5.tar.gz 1717664 SHA256 5e7525c86581d9dead8a8508a9e824101765d05 |
128 |
DIST cctools-877.7.tar.gz 1720523 SHA256 c3809b7604a27db0c0b418fcccd5cad49f002e2a750ec611f92f806521f7ed9e SHA512 5c381fe8b85d1254f660eb3c3510d9e0a49792ae5bb0e69a4dfb5a18e7f1706ee1411589f20583a9d7f12126ef616f66f1ad5c1c4ff405f66b52759c0a4272b5 WHIRLPOOL 2c8e85fd33f183bd074abf90237301eff252ca05aa48a59aea713d263b10e0710d261a5ac01185e9a17d1a391fa025fb91d60df0f3b426140defdbd5536e4bbb |
129 |
DIST cctools-877.8.tar.gz 1720708 SHA256 88be2788adf461f1d8278324b0078f6003b2328b6f95a54b16ec6ed1ba651dc2 SHA512 3f75fbe4eacd89f2e6372a3167ed197e2b8bda9faa10fe6bce0cf9d3d3eca536f0af5fc4ce1e4bc6a24eb68db36f5d0b1d0bc3f9807e285e67cfaa2d336d81ef WHIRLPOOL eea67bacd8037b19ba3efcc2fecfcc74ec3e785ce92628fdeccbeca6e17dee4d1926719a02ca7f68fc2045f9b37571cb044cc29a3a8fe6a5bd704a3446f44945 |
130 |
DIST cctools-886.tar.gz 1731850 SHA256 f3a4fa7dad4a54d862b1d9f48e3dfb25fc532c9cf46a041cf8134694328a8878 SHA512 49f14e165da3a9fcf16614a810b8a2a68907348bd27a60b268b330e416a0bc070fb6445e1e6b80d849026bd6ce7de4459623ab86168e2d63bb492d1ba6680c5b WHIRLPOOL 91a09d3c773f0aede36de548310879a1ad4158f39e9d4d91b4e1a9460d31acdcab5c658113381742512861c6281661dea7fd8273d7146ac6838088d1435ebe2f |
131 |
-DIST dyld-195.5.tar.gz 411615 SHA256 2cf0484c87cf79b606b351a7055a247dae84093ae92c747a74e0cde2c8c8f83c SHA512 f316d32f3e417cf0898a8e231df66572d3424765831375863799d3ff30f8e28342ca692426d0ece7a8d069b341a3b9ca79c625edc322d90e3f26f528ea555324 WHIRLPOOL e0e231653ad37ad8fdb7d5fbd372fe1dc34b80e41f7dafa8bb46f4c8fa4f5acb4574f4cd346304dfaca1f074667f381931ca5ff7a7efddaea770fb35d30539dc |
132 |
DIST dyld-195.6.tar.gz 412518 SHA256 69296e9b4192bdac778ea899fffc18b02be62b51b5e8474b4cf85ae5f2b08aa4 SHA512 58a9ea27efc02e66f9d99bfa250af1d90326385385431e5279386bbd9ab53366bf7e8236543296908b7214c33523c8f60098a6298a7393b3180e2a6bce18e7c5 WHIRLPOOL e37b11d3996559f8a1843577a5fa42f96e4d42419f205276600f0ed79fcd2490da1f8a77eecf29f111b3db62a65e8e9cd77a154e3b389d633a7ac1525273b9b5 |
133 |
DIST dyld-353.2.1.tar.gz 510036 SHA256 051089e284c5a4d671b21b73866abd01d54e5ea1912cadf3a9b916890fb31540 SHA512 a9488620499f682e245b55b7e0e4ec02fc0bcf03bd8a70d4a4ee0ba762067ade2f41c188990c101727476d41c19368b4cc89cccf2df40231da1c777742c7391f WHIRLPOOL 3164746ed8c866df993f08e405e7e329db427af8eeded681d5fb88031ef2c025363d5bfb647e9315738024adf9f48efacf49226f86f27def584ec7f538da292e |
134 |
DIST dyld-360.14.tar.gz 518873 SHA256 c4e011241d75e3fac4dbdfc0049ccf26fb939fea6c0256b6f16036b2e4690c6e SHA512 cfe536ea1f0ad8fbc2846417289e3e36704bf69388e083e0ece0ffa6eeee501e7e9b2ba47eed7be0e5120b5cc72f33b2fc0d2d39ba7a16beaf98db94dfb4ae40 WHIRLPOOL 6ed42fa38f60a84deab0bc9b128f5de232df487613726978be29783ede7eee9b5899472a984d50f44a20c87c1772aeede9b81706000fa66713df34d6e956c88e |
135 |
DIST dyld-360.17.tar.gz 518876 SHA256 e137f54d5f7af7512e2e2337248caa0580743db212471de71fd45d3e3e92c68d SHA512 aae2a0ea1f4130de51aa920ce1affa579993b3b58a7d398ec998c0d7ac4919907ba4e508b9bfc15080b1f4f4cf15e4615bc416b6ec32b52a4b5d8fbbad1dc9ab WHIRLPOOL 2c3cc5fe0063b0a6ad1cc77e5ae1204e8bcd23ba732ad775910fe6340a5d908b77d2623fb7fa4eccff20e0e2176405d8d6734b7d60dbba61ccfc58f37009aca7 |
136 |
DIST dyld-360.18.tar.gz 518957 SHA256 a5bec8c2e3bded111aec7e447b35c110038e822f95e11e55b9a4d331fbaeff08 SHA512 1299bd2dd5cd663917ec4a03ed0f875e0bf07d6680d3d095af12f4b11960c02a52e361bde27ff88843f80832fc6d36654e2556ee0a3ca2259fcded5b568ab2f9 WHIRLPOOL 5b42ea6de3f08b7e0fbad7ea9df512c74fd4bceecf859683297d0cb8998d642ea3a0597ef488dcbf42a75064a07a528baf63c957d36174fddff34d6e6c7502d8 |
137 |
-DIST ld64-127.2.tar.gz 496975 SHA256 97b75547b2bd761306ab3e15ae297f01e7ab9760b922bc657f4ef72e4e052142 SHA512 a87181eca9307518aa21fc52a4d665c11ad51106c318c229d7f08650228f771484fd0b8c01c63639d577503aa9bc86d0792a3524643dc18cff19c3754aed9fc8 WHIRLPOOL 94f58da977da3d2d0c5a907a7d2c02e4a0d8323d04b8429d133e377b8495b0d344eec93dd1baaf369aa0a1517c7666cbef1d98d3cc6e8fd5d51c9622a2edcdf1 |
138 |
DIST ld64-128.2.tar.gz 494361 SHA256 96a912464e2d4d3d7cdaab0744003b0fa93d139f203c82867f659ee94b4ae9f7 SHA512 f50a3c396e6f4fddc685bb3f59f9a260bd2f47060535d24259b2b411e4f759e48daa35819da682ad9bceaa1b9a1981eb34716387d988cdc4b7eec9ab2169726e WHIRLPOOL 78dec40124ae11c80483b362860b01c833fcaff67bae6b6cb3b72371daffdf3be809186f5daca4bb6ace77441cb43168939eb60eedf9f8c05ae3ec644c2a0502 |
139 |
DIST ld64-236.3.tar.gz 624400 SHA256 8ef36729b643201081ab45ebd8586ede8f9968bc17614b679a940faa82875ca6 SHA512 e103fc5efd4d4161c7dc55b1ad53aebd455cfcd72de7873ebfdf5ba896b7b0da9c9aeb12e1e1a76425768ac1dc85d864a4ce33b5b841ba115eeab96a2e2965aa WHIRLPOOL d122e325518860c810b9efde7016ebecb6b59c56bb40ae1f041a840be764a5d9b90c7db1922fd9037c18f4caae7ace0d395591ffb3db704c87b92837ef997a17 |
140 |
DIST ld64-241.9.tar.gz 639944 SHA256 3594e87c626c3b5abab6470cac6f27b367f1efcee60eb3d0f6b6d4ecf9b24230 SHA512 6958e7064f4fd8b47501225fc4cbc6292e5da63d7f4103ad79add177ef7382c8de3c732f14d19a9c11356b8070f578392383caccc3795e2ab8ef7b7ddbde88da WHIRLPOOL 5b07a336efde52b00b2601866907513517593a113583f05a9c45b98b4d6f394d87add887a7e44a95f462b6c2b5617ce497376b94a523e5cdf0f69d4d10ef3407 |
141 |
@@ -36,8 +28,5 @@ DIST ld64-253.6.tar.gz 671838 SHA256 7fbae5e88ac1420480de8a495dcd3b876d399278bfc |
142 |
DIST ld64-253.9.tar.gz 673388 SHA256 8fa3a1b65f665824ac129c02e2fab8926a06e503ec277ea32cd8bc27c8de11c3 SHA512 a52b081295c19f28858f8ee47c05249bba3e15cc8bb6f7017d9f6dcf7509cdacef7a4b16b3940cd0b1f72b3b67efb503ab2e3801b31e50cda1d34c6bc8df8dcf WHIRLPOOL 07e850984d2ff24637a64d76860799136e63af56dc2740f8d1e1bd3311ae3f33eac902e7850f94555407002d0d16f44d4a276470f54e60a0633169b884b7dfc1 |
143 |
DIST ld64-264.3.101.tar.gz 681491 SHA256 2882f0c104334bdba8eb64cd3a9f9059ceca4d4e0c08473506a926d53c9ef218 SHA512 ffa37af95f1a6e76829d0ac8badfd0236d93dc2f9988c7f4b88fe271b7b02a4b5553402a1e9a49feed9da4d04a50e2a2cacdb1bd4c04ecbef09d68b85a2e8a6a WHIRLPOOL cdc466a24fdbc2bf3756d73f89f91d26fec21d8004a2e77804e2b678a9da08afe83bb5aa9fb4548496feb3d9180c3d2521a8d5329b875ed76d4e3a0ea231d5be |
144 |
DIST ld64-264.3.102.tar.gz 681509 SHA256 307f73678a3e5c9ed4d1bcf77da7399d84efac32916c5df6cd477c3b5c36f953 SHA512 ec221de3624dcce3db694ec2d7b05f3c939cd1ba79c97437ba9f2d4e5d9c37369bb5df82cc37bc158bf5c4e2128cc2b96ca1a7477f98538850092bffa4601da0 WHIRLPOOL 509774429d498c4a070a54798715776eddf2b8ef70a99dd4250d60144efa2d4a6a324914112556435709beb614172dd45b860f3963b0da9a0825cb0756bcd719 |
145 |
-DIST ld64-85.2.1.tar.gz 598524 SHA256 4bcbcbdfd62efdc46c51700b8f5dae2cbd1638e9e50f649d5c7f242d32fca804 SHA512 b5ffaffc43e74f22688fecd9fb3023a59160cf051f9412f34e6b0acf1c4f9d43ba641e199d8d6b1c6cf3bbbbf117645988fd879ded1fec8be056b6941fe79999 WHIRLPOOL 7c50f462eb41808b57ea06b82bdf576460bddb4150abe7a678af541aa0b179105d994a2b6fd10152481aa28acc903265160945b4aae9dcfce0a1a1cfe4b9460a |
146 |
-DIST ld64-97.17.tar.gz 421947 SHA256 02bd46af0809eaa415d096d7d41c3e8e7d80f7d8d181840866fb87f036b4e089 SHA512 841774a1a7c0e2f661ac7e66703f7578d8f11274897ffa15f8c49daf290a23465763f264a4dae99f15754891f44c425c0d327652112007b499bc8f755a7fc9d6 WHIRLPOOL 7225b44d845b13c6b6d1a685170f2b6e15b81c48320fa3b570771938ed457a59452e80873996a4b2712a8f6813486063afd73acf979a97d823afb3d510d74678 |
147 |
DIST libunwind-30.tar.gz 82811 SHA256 6ac97d18cc2b05e6de1269bf5af03b81948bd2200dae827527f3dc618b82bd41 SHA512 57106eafa1516791b4e0db2de6c6336bc0c1cbd8bf098a6d3a809fafa457802c95a7aeae9137f4ca5922a3018dfd8f597907ea4187b0afbbf267500eae00041f WHIRLPOOL c3caf5ba593cffa2f0a9cdb256f518524e9500eaf0a013c4973dc9881b16efa0c388e70407bbed1fd331f100af2da01ddeee12d33b3afc1213d69c32ab5e1d0b |
148 |
DIST libunwind-35.3.tar.gz 90002 SHA256 2bcc95553a44fa3edca41993ccfac65ba267830cb37c85dca760b34094722e56 SHA512 b7d9a86ef24f1fe9ca14517471e03a910219a229af9f0d4cf94435115971360640451107ba20c93fb1aab788f8b6eb5ed580ee08fdaa990b9fa43e9ae360c6b4 WHIRLPOOL 838912e46031b3a6796bfe854f0244991ce5bc3b59b95855224c9e84639e57b69f541b7993658360721423533dca75037248ea90f5e274b332f27319fdd85a9a |
149 |
-DIST libunwind-llvm-115426.tar.bz2 74622 SHA256 e77a42c04eda5e3db61fc8b5bc98a55c6a015a9b02a74aab0f35d551fc38272f SHA512 01d78852632072ae48e95cfcf893dbb5325d4a3f4535a3cd3bc2afd5388c5f76995454219c8c6c2c2767abb2edc23bfe0212508c57b1d6db1c4a5d80cc5d4f9a WHIRLPOOL 0c7c8b8493b83e9c1337ab323697cfc255d1ef3e9ae2042df3a4f7480948a25fd571eb88a49e33168587d0994ec2d1371f2ef4d7834d7b41f77722d9693e8d55 |
150 |
|
151 |
diff --git a/sys-devel/binutils-apple/binutils-apple-3.1.2.ebuild b/sys-devel/binutils-apple/binutils-apple-3.1.2.ebuild |
152 |
deleted file mode 100644 |
153 |
index 12fb004..0000000 |
154 |
--- a/sys-devel/binutils-apple/binutils-apple-3.1.2.ebuild |
155 |
+++ /dev/null |
156 |
@@ -1,214 +0,0 @@ |
157 |
-# Copyright 1999-2015 Gentoo Foundation |
158 |
-# Distributed under the terms of the GNU General Public License v2 |
159 |
-# $Id$ |
160 |
- |
161 |
-EAPI="3" |
162 |
- |
163 |
-inherit eutils flag-o-matic toolchain-funcs |
164 |
- |
165 |
-RESTRICT="test" # the test suite will test what's installed. |
166 |
- |
167 |
-LD64=ld64-85.2.1 |
168 |
-CCTOOLS=cctools-698.1 |
169 |
- |
170 |
-DESCRIPTION="Darwin assembler as(1) and static linker ld(1), Xcode Tools 3.1.2" |
171 |
-HOMEPAGE="http://www.opensource.apple.com/darwinsource/" |
172 |
-SRC_URI="https://www.gentoo.org/~grobian/distfiles/${LD64}.tar.gz |
173 |
- https://www.gentoo.org/~grobian/distfiles/${CCTOOLS}.tar.gz" |
174 |
- |
175 |
-LICENSE="APSL-2" |
176 |
-KEYWORDS="~ppc-macos ~x86-macos" |
177 |
-IUSE="test" |
178 |
-SLOT="0" |
179 |
- |
180 |
-RDEPEND="sys-devel/binutils-config" |
181 |
-DEPEND="${RDEPEND} |
182 |
- test? ( >=dev-lang/perl-5.8.8 )" |
183 |
- |
184 |
-export CTARGET=${CTARGET:-${CHOST}} |
185 |
-if [[ ${CTARGET} == ${CHOST} ]] ; then |
186 |
- if [[ ${CATEGORY} == cross-* ]] ; then |
187 |
- export CTARGET=${CATEGORY#cross-} |
188 |
- fi |
189 |
-fi |
190 |
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } |
191 |
- |
192 |
-if is_cross ; then |
193 |
- SLOT="${CTARGET}" |
194 |
-else |
195 |
- SLOT="0" |
196 |
-fi |
197 |
- |
198 |
-LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV} |
199 |
-INCPATH=${LIBPATH}/include |
200 |
-DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV} |
201 |
-if is_cross ; then |
202 |
- BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${PV} |
203 |
-else |
204 |
- BINPATH=/usr/${CTARGET}/binutils-bin/${PV} |
205 |
-fi |
206 |
- |
207 |
-S=${WORKDIR} |
208 |
- |
209 |
-prepare_ld64() { |
210 |
- cd "${S}"/${LD64}/src |
211 |
- cp "${FILESDIR}"/Makefile . |
212 |
- |
213 |
- local VER_STR="\"@(#)PROGRAM:ld PROJECT:${LD64}\\n\"" |
214 |
- sed -i \ |
215 |
- -e '/^#define LTO_SUPPORT 1/s:1:0:' \ |
216 |
- ObjectDump.cpp |
217 |
- echo '#undef LTO_SUPPORT' > configure.h |
218 |
- echo "char ldVersionString[] = ${VER_STR};" > version.cpp |
219 |
- |
220 |
- # clean up test suite |
221 |
- cd "${S}"/${LD64}/unit-tests/test-cases |
222 |
- local c |
223 |
- |
224 |
- # we don't have llvm |
225 |
- ((++c)); rm -rf llvm-integration; |
226 |
- |
227 |
- # we don't have dtrace |
228 |
- ((++c)); rm -rf dtrace-static-probes-coalescing; |
229 |
- ((++c)); rm -rf dtrace-static-probes; |
230 |
- |
231 |
- # a file is missing |
232 |
- ((++c)); rm -rf eh-coalescing-r |
233 |
- |
234 |
- # we don't do universal binaries |
235 |
- ((++c)); rm -rf blank-stubs; |
236 |
- |
237 |
- # looks like a problem with apple's result-filter.pl |
238 |
- ((++c)); rm -rf implicit-common3; |
239 |
- ((++c)); rm -rf order_file-ans; |
240 |
- |
241 |
- # TODO no idea what goes wrong here |
242 |
- ((++c)); rm -rf dwarf-debug-notes; |
243 |
- |
244 |
- elog "Deleted $c tests that were bound to fail" |
245 |
-} |
246 |
- |
247 |
-src_prepare() { |
248 |
- prepare_ld64 |
249 |
- |
250 |
- cd "${S}"/${CCTOOLS} |
251 |
- epatch "${FILESDIR}"/${PN}-3.1.1-as.patch |
252 |
- epatch "${FILESDIR}"/${PN}-3.1.1-as-dir.patch |
253 |
- epatch "${FILESDIR}"/${PN}-3.1.1-ranlib.patch |
254 |
- epatch "${FILESDIR}"/${PN}-3.1.1-libtool-ranlib.patch |
255 |
- epatch "${FILESDIR}"/${PN}-3.1.1-nmedit.patch |
256 |
- epatch "${FILESDIR}"/${PN}-3.1.1-no-efi-man.patch |
257 |
- epatch "${FILESDIR}"/${PN}-3.1.1-no-headers.patch |
258 |
- epatch "${FILESDIR}"/${PN}-3.1.1-no-oss-dir.patch |
259 |
- epatch "${FILESDIR}"/${PN}-3.1.2-as-Makefile.patch |
260 |
- cd "${S}"/${LD64} |
261 |
- epatch "${FILESDIR}"/${PN}-3.1.1-testsuite.patch |
262 |
- |
263 |
- # -pg is used and the two are incompatible |
264 |
- filter-flags -fomit-frame-pointer |
265 |
-} |
266 |
- |
267 |
-compile_ld64() { |
268 |
- cd "${S}"/${LD64}/src |
269 |
- # 'struct linkedit_data_command' is defined in mach-o/loader.h on leopard, |
270 |
- # but not on tiger. |
271 |
- [[ ${CHOST} == *-apple-darwin8 ]] && \ |
272 |
- append-flags -isystem "${S}"/${CCTOOLS}/include/ |
273 |
- emake || die "emake failed for ld64" |
274 |
- use test && emake build_test |
275 |
-} |
276 |
- |
277 |
-compile_cctools() { |
278 |
- cd "${S}"/${CCTOOLS} |
279 |
- emake \ |
280 |
- LTO= \ |
281 |
- EFITOOLS= \ |
282 |
- COMMON_SUBDIRS='libstuff ar misc otool' \ |
283 |
- RC_CFLAGS="${CFLAGS}" || die "emake failed for the cctools" |
284 |
- cd "${S}"/${CCTOOLS}/as |
285 |
- emake \ |
286 |
- BUILD_OBSOLETE_ARCH= \ |
287 |
- RC_CFLAGS="-DASLIBEXECDIR=\"\\\"${EPREFIX}${LIBPATH}/\\\"\" ${CFLAGS}" \ |
288 |
- || die "emake failed for as" |
289 |
-} |
290 |
- |
291 |
-src_compile() { |
292 |
- tc-export CC CXX |
293 |
- compile_cctools |
294 |
- compile_ld64 |
295 |
-} |
296 |
- |
297 |
-install_ld64() { |
298 |
- exeinto ${BINPATH} |
299 |
- doexe "${S}"/${LD64}/src/{ld64,rebase} |
300 |
- dosym ld64 ${BINPATH}/ld |
301 |
- insinto ${DATAPATH}/man/man1 |
302 |
- doins "${S}"/${LD64}/doc/man/man1/{ld,ld64,rebase}.1 |
303 |
-} |
304 |
- |
305 |
-install_cctools() { |
306 |
- cd "${S}"/${CCTOOLS} |
307 |
- emake install_all_but_headers \ |
308 |
- EFITOOLS= \ |
309 |
- COMMON_SUBDIRS='ar misc otool' \ |
310 |
- DSTROOT=\"${D}\" \ |
311 |
- BINDIR=\"${EPREFIX}\"${BINPATH} \ |
312 |
- LOCBINDIR=\"${EPREFIX}\"${BINPATH} \ |
313 |
- USRBINDIR=\"${EPREFIX}\"${BINPATH} \ |
314 |
- LOCLIBDIR=\"${EPREFIX}\"${LIBPATH} \ |
315 |
- MANDIR=\"${EPREFIX}\"${DATAPATH}/man/ |
316 |
- cd "${S}"/${CCTOOLS}/as |
317 |
- emake install \ |
318 |
- BUILD_OBSOLETE_ARCH= \ |
319 |
- DSTROOT=\"${D}\" \ |
320 |
- USRBINDIR=\"${EPREFIX}\"${BINPATH} \ |
321 |
- LIBDIR=\"${EPREFIX}\"${LIBPATH} |
322 |
- |
323 |
- cd "${ED}"${BINPATH} |
324 |
- insinto ${DATAPATH}/man/man1 |
325 |
- local skips manpage |
326 |
- # ar brings an up-to-date manpage with it |
327 |
- skips=( ar ) |
328 |
- for bin in *; do |
329 |
- for skip in ${skips[@]}; do |
330 |
- if [[ ${bin} == ${skip} ]]; then |
331 |
- continue 2; |
332 |
- fi |
333 |
- done |
334 |
- manpage=${S}/${CCTOOLS}/man/${bin}.1 |
335 |
- if [[ -f "${manpage}" ]]; then |
336 |
- doins "${manpage}" |
337 |
- fi |
338 |
- done |
339 |
- insinto ${DATAPATH}/man/man5 |
340 |
- doins "${S}"/${CCTOOLS}/man/*.5 |
341 |
-} |
342 |
- |
343 |
-src_test() { |
344 |
- einfo "Running unit tests" |
345 |
- cd "${S}"/${LD64}/unit-tests/test-cases |
346 |
- # need host arch, since GNU arch doesn't do what Apple's does |
347 |
- tc-export CC CXX |
348 |
- perl ../bin/make-recursive.pl \ |
349 |
- ARCH="$(/usr/bin/arch)" \ |
350 |
- RELEASEDIR="${S}"/${LD64}/src \ |
351 |
- | perl ../bin/result-filter.pl |
352 |
-} |
353 |
- |
354 |
-src_install() { |
355 |
- install_ld64 |
356 |
- install_cctools |
357 |
- |
358 |
- cd "${S}" |
359 |
- insinto /etc/env.d/binutils |
360 |
- cat <<-EOF > env.d |
361 |
- TARGET="${CHOST}" |
362 |
- VER="${PV}" |
363 |
- FAKE_TARGETS="${CHOST}" |
364 |
- EOF |
365 |
- newins env.d ${CHOST}-${PV} |
366 |
-} |
367 |
- |
368 |
-pkg_postinst() { |
369 |
- binutils-config ${CHOST}-${PV} |
370 |
-} |
371 |
|
372 |
diff --git a/sys-devel/binutils-apple/binutils-apple-3.2.6.ebuild b/sys-devel/binutils-apple/binutils-apple-3.2.6.ebuild |
373 |
deleted file mode 100644 |
374 |
index 6746790..0000000 |
375 |
--- a/sys-devel/binutils-apple/binutils-apple-3.2.6.ebuild |
376 |
+++ /dev/null |
377 |
@@ -1,254 +0,0 @@ |
378 |
-# Copyright 1999-2015 Gentoo Foundation |
379 |
-# Distributed under the terms of the GNU General Public License v2 |
380 |
-# $Id$ |
381 |
- |
382 |
-EAPI="3" |
383 |
- |
384 |
-inherit eutils flag-o-matic toolchain-funcs |
385 |
- |
386 |
-RESTRICT="test" # the test suite will test what's installed. |
387 |
- |
388 |
-LD64=ld64-97.17 |
389 |
-CCTOOLS=cctools-795 |
390 |
-# http://lists.apple.com/archives/Darwin-dev/2009/Sep/msg00025.html |
391 |
-UNWIND=binutils-apple-3.2-unwind-patches-5 |
392 |
- |
393 |
-DESCRIPTION="Darwin assembler as(1) and static linker ld(1), Xcode Tools ${PV}" |
394 |
-HOMEPAGE="http://www.opensource.apple.com/darwinsource/" |
395 |
-SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz |
396 |
- http://www.opensource.apple.com/tarballs/cctools/${CCTOOLS}.tar.gz |
397 |
- https://www.gentoo.org/~grobian/distfiles/${UNWIND}.tar.xz" |
398 |
- |
399 |
-LICENSE="APSL-2" |
400 |
-KEYWORDS="~ppc-macos ~x64-macos ~x86-macos" |
401 |
-IUSE="lto test" |
402 |
-SLOT="0" |
403 |
- |
404 |
-RDEPEND="sys-devel/binutils-config |
405 |
- lto? ( sys-devel/llvm )" |
406 |
-DEPEND="${RDEPEND} |
407 |
- test? ( >=dev-lang/perl-5.8.8 ) |
408 |
- >=sys-devel/gcc-apple-4.2.1" |
409 |
- |
410 |
-export CTARGET=${CTARGET:-${CHOST}} |
411 |
-if [[ ${CTARGET} == ${CHOST} ]] ; then |
412 |
- if [[ ${CATEGORY} == cross-* ]] ; then |
413 |
- export CTARGET=${CATEGORY#cross-} |
414 |
- fi |
415 |
-fi |
416 |
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } |
417 |
- |
418 |
-if is_cross ; then |
419 |
- SLOT="${CTARGET}" |
420 |
-else |
421 |
- SLOT="0" |
422 |
-fi |
423 |
- |
424 |
-LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV} |
425 |
-INCPATH=${LIBPATH}/include |
426 |
-DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV} |
427 |
-if is_cross ; then |
428 |
- BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${PV} |
429 |
-else |
430 |
- BINPATH=/usr/${CTARGET}/binutils-bin/${PV} |
431 |
-fi |
432 |
- |
433 |
-S=${WORKDIR} |
434 |
- |
435 |
-src_prepare() { |
436 |
- cd "${S}"/${CCTOOLS} |
437 |
- epatch "${FILESDIR}"/${PN}-3.2.2-as.patch |
438 |
- epatch "${FILESDIR}"/${PN}-4.0-as-dir.patch |
439 |
- epatch "${FILESDIR}"/${PN}-3.2.3-ranlib.patch |
440 |
- epatch "${FILESDIR}"/${PN}-3.1.1-libtool-ranlib.patch |
441 |
- epatch "${FILESDIR}"/${PN}-3.1.1-nmedit.patch |
442 |
- epatch "${FILESDIR}"/${PN}-3.1.1-no-headers.patch |
443 |
- epatch "${FILESDIR}"/${PN}-3.1.1-no-oss-dir.patch |
444 |
- |
445 |
- cd "${S}"/${LD64}/src |
446 |
- cp "${FILESDIR}"/ld64-95.2.12-Makefile Makefile |
447 |
- |
448 |
- ln -s ../../${CCTOOLS}/include |
449 |
- cp "${WORKDIR}"/ld64-unwind/compact_unwind_encoding.h include/mach-o/ |
450 |
- cp other/prune_trie.h include/mach-o/ || die |
451 |
- # use our own copy of lto.h, which doesn't require llvm build-env |
452 |
- mkdir -p include/llvm-c || die |
453 |
- cp "${WORKDIR}"/ld64-unwind/ld64-97.14-llvm-lto.h include/llvm-c/lto.h || die |
454 |
- |
455 |
- echo '' > configure.h |
456 |
- echo '' > linker_opts |
457 |
- local VER_STR="\"@(#)PROGRAM:ld PROJECT:${LD64} (Gentoo ${PN}-${PVR})\\n\"" |
458 |
- echo "char ldVersionString[] = ${VER_STR};" > version.cpp |
459 |
- |
460 |
- epatch "${WORKDIR}"/ld64-unwind/ld64-97.14-unlibunwind.patch |
461 |
- [[ ${CHOST} == powerpc*-darwin* ]] && \ |
462 |
- epatch "${FILESDIR}"/ld64-95.2.12-darwin8-no-mlong-branch-warning.patch |
463 |
- if use !lto ; then |
464 |
- sed -i -e '/#define LTO_SUPPORT 1/d' other/ObjectDump.cpp || die |
465 |
- fi |
466 |
- |
467 |
- # clean up test suite |
468 |
- cd "${S}"/${LD64} |
469 |
- epatch "${FILESDIR}"/${PN}-3.1.1-testsuite.patch |
470 |
- |
471 |
- cd "${S}"/${LD64}/unit-tests/test-cases |
472 |
- local c |
473 |
- |
474 |
- # we don't have llvm |
475 |
- ((++c)); rm -rf llvm-integration; |
476 |
- |
477 |
- # we don't have dtrace |
478 |
- ((++c)); rm -rf dtrace-static-probes-coalescing; |
479 |
- ((++c)); rm -rf dtrace-static-probes; |
480 |
- |
481 |
- # a file is missing |
482 |
- ((++c)); rm -rf eh-coalescing-r |
483 |
- |
484 |
- # we don't do universal binaries |
485 |
- ((++c)); rm -rf blank-stubs; |
486 |
- |
487 |
- # looks like a problem with apple's result-filter.pl |
488 |
- ((++c)); rm -rf implicit-common3; |
489 |
- ((++c)); rm -rf order_file-ans; |
490 |
- |
491 |
- # TODO no idea what goes wrong here |
492 |
- ((++c)); rm -rf dwarf-debug-notes; |
493 |
- |
494 |
- einfo "Deleted $c tests that were bound to fail" |
495 |
- |
496 |
- cd "${S}" |
497 |
- ebegin "cleaning Makefiles from unwanted CFLAGS" |
498 |
- find . -name "Makefile" -print0 | xargs -0 sed \ |
499 |
- -i \ |
500 |
- -e 's/ -g / /g' \ |
501 |
- -e 's/^OFLAG =.*$/OFLAG =/' \ |
502 |
- -e 's/install -c -s/install/g' |
503 |
- eend $? |
504 |
- |
505 |
- # -pg is used and the two are incompatible |
506 |
- filter-flags -fomit-frame-pointer |
507 |
-} |
508 |
- |
509 |
-src_configure() { |
510 |
- tc-export CC CXX AR |
511 |
- if use lto ; then |
512 |
- append-flags -DLTO_SUPPORT |
513 |
- append-ldflags -L"${EPREFIX}"/usr/$(get_libdir)/llvm |
514 |
- append-libs LTO |
515 |
- else |
516 |
- append-flags -ULTO_SUPPORT |
517 |
- fi |
518 |
-} |
519 |
- |
520 |
-compile_ld64() { |
521 |
- cd "${S}"/${LD64}/src |
522 |
- # remove antiquated copy that's available on any OSX system and |
523 |
- # breaks ld64 compilation |
524 |
- mv include/mach-o/dyld.h{,.disable} |
525 |
- emake \ |
526 |
- CFLAGS="${CFLAGS}" \ |
527 |
- CXXFLAGS="${CXXFLAGS}" \ |
528 |
- LDFLAGS="${LDFLAGS} ${LIBS}" \ |
529 |
- || die "emake failed for ld64" |
530 |
- use test && emake build_test |
531 |
- # restore, it's necessary for cctools' install |
532 |
- mv include/mach-o/dyld.h{.disable,} |
533 |
-} |
534 |
- |
535 |
-compile_cctools() { |
536 |
- cd "${S}"/${CCTOOLS} |
537 |
- emake \ |
538 |
- LIB_PRUNETRIE="-L../../${LD64}/src -lprunetrie" \ |
539 |
- EFITOOLS= LTO= \ |
540 |
- COMMON_SUBDIRS='libstuff ar misc otool' \ |
541 |
- SUBDIRS_32= \ |
542 |
- RC_CFLAGS="${CFLAGS}" OFLAG="${CFLAGS}" \ |
543 |
- || die "emake failed for the cctools" |
544 |
- cd "${S}"/${CCTOOLS}/as |
545 |
- emake \ |
546 |
- BUILD_OBSOLETE_ARCH= \ |
547 |
- RC_CFLAGS="-DASLIBEXECDIR=\"\\\"${EPREFIX}${LIBPATH}/\\\"\" ${CFLAGS}" \ |
548 |
- || die "emake failed for as" |
549 |
-} |
550 |
- |
551 |
-src_compile() { |
552 |
- compile_ld64 |
553 |
- compile_cctools |
554 |
-} |
555 |
- |
556 |
-install_ld64() { |
557 |
- exeinto ${BINPATH} |
558 |
- doexe "${S}"/${LD64}/src/{ld64,rebase,dyldinfo,unwinddump,ObjectDump} |
559 |
- dosym ld64 ${BINPATH}/ld |
560 |
- insinto ${DATAPATH}/man/man1 |
561 |
- doins "${S}"/${LD64}/doc/man/man1/{ld,ld64,rebase}.1 |
562 |
-} |
563 |
- |
564 |
-install_cctools() { |
565 |
- cd "${S}"/${CCTOOLS} |
566 |
- emake install_all_but_headers \ |
567 |
- EFITOOLS= LTO= \ |
568 |
- COMMON_SUBDIRS='ar misc otool' \ |
569 |
- SUBDIRS_32= \ |
570 |
- RC_CFLAGS="${CFLAGS}" OFLAG="${CFLAGS}" \ |
571 |
- DSTROOT=\"${D}\" \ |
572 |
- BINDIR=\"${EPREFIX}\"${BINPATH} \ |
573 |
- LOCBINDIR=\"${EPREFIX}\"${BINPATH} \ |
574 |
- USRBINDIR=\"${EPREFIX}\"${BINPATH} \ |
575 |
- LOCLIBDIR=\"${EPREFIX}\"${LIBPATH} \ |
576 |
- MANDIR=\"${EPREFIX}\"${DATAPATH}/man/ |
577 |
- cd "${S}"/${CCTOOLS}/as |
578 |
- emake install \ |
579 |
- BUILD_OBSOLETE_ARCH= \ |
580 |
- DSTROOT=\"${D}\" \ |
581 |
- USRBINDIR=\"${EPREFIX}\"${BINPATH} \ |
582 |
- LIBDIR=\"${EPREFIX}\"${LIBPATH} |
583 |
- |
584 |
- cd "${ED}"${BINPATH} |
585 |
- insinto ${DATAPATH}/man/man1 |
586 |
- local skips manpage |
587 |
- # ar brings an up-to-date manpage with it |
588 |
- skips=( ar ) |
589 |
- for bin in *; do |
590 |
- for skip in ${skips[@]}; do |
591 |
- if [[ ${bin} == ${skip} ]]; then |
592 |
- continue 2; |
593 |
- fi |
594 |
- done |
595 |
- manpage=${S}/${CCTOOLS}/man/${bin}.1 |
596 |
- if [[ -f "${manpage}" ]]; then |
597 |
- doins "${manpage}" |
598 |
- fi |
599 |
- done |
600 |
- insinto ${DATAPATH}/man/man5 |
601 |
- doins "${S}"/${CCTOOLS}/man/*.5 |
602 |
-} |
603 |
- |
604 |
-src_test() { |
605 |
- einfo "Running unit tests" |
606 |
- cd "${S}"/${LD64}/unit-tests/test-cases |
607 |
- # need host arch, since GNU arch doesn't do what Apple's does |
608 |
- tc-export CC CXX |
609 |
- perl ../bin/make-recursive.pl \ |
610 |
- ARCH="$(/usr/bin/arch)" \ |
611 |
- RELEASEDIR="${S}"/${LD64}/src \ |
612 |
- | perl ../bin/result-filter.pl |
613 |
-} |
614 |
- |
615 |
-src_install() { |
616 |
- install_ld64 |
617 |
- install_cctools |
618 |
- |
619 |
- cd "${S}" |
620 |
- insinto /etc/env.d/binutils |
621 |
- cat <<-EOF > env.d |
622 |
- TARGET="${CHOST}" |
623 |
- VER="${PV}" |
624 |
- FAKE_TARGETS="${CHOST}" |
625 |
- EOF |
626 |
- newins env.d ${CHOST}-${PV} |
627 |
-} |
628 |
- |
629 |
-pkg_postinst() { |
630 |
- binutils-config ${CHOST}-${PV} |
631 |
-} |
632 |
|
633 |
diff --git a/sys-devel/binutils-apple/binutils-apple-3.2.ebuild b/sys-devel/binutils-apple/binutils-apple-3.2.ebuild |
634 |
deleted file mode 100644 |
635 |
index cd59773..0000000 |
636 |
--- a/sys-devel/binutils-apple/binutils-apple-3.2.ebuild |
637 |
+++ /dev/null |
638 |
@@ -1,234 +0,0 @@ |
639 |
-# Copyright 1999-2015 Gentoo Foundation |
640 |
-# Distributed under the terms of the GNU General Public License v2 |
641 |
-# $Id$ |
642 |
- |
643 |
-EAPI="3" |
644 |
- |
645 |
-inherit eutils flag-o-matic toolchain-funcs |
646 |
- |
647 |
-RESTRICT="test" # the test suite will test what's installed. |
648 |
- |
649 |
-# LD64=ld64-95.2.12 # can't compile this one, missing libunwind/* includes |
650 |
-# http://lists.apple.com/archives/Darwin-dev/2009/Sep/msg00025.html |
651 |
-LD64=ld64-85.2.1 # from 3.1.2 |
652 |
-CCTOOLS=cctools-750 |
653 |
-LP64PATCHES=binutils-apple-LP64-patches-1 |
654 |
- |
655 |
-DESCRIPTION="Darwin assembler as(1) and static linker ld(1), Xcode Tools 3.2" |
656 |
-HOMEPAGE="http://www.opensource.apple.com/darwinsource/" |
657 |
-SRC_URI="https://www.gentoo.org/~grobian/distfiles/${LD64}.tar.gz |
658 |
- https://www.gentoo.org/~grobian/distfiles/${CCTOOLS}.tar.gz |
659 |
- https://www.gentoo.org/~grobian/distfiles/${LP64PATCHES}.tar.bz2" |
660 |
- |
661 |
-LICENSE="APSL-2" |
662 |
-KEYWORDS="~ppc-macos ~x64-macos ~x86-macos" |
663 |
-IUSE="test" |
664 |
-SLOT="0" |
665 |
- |
666 |
-RDEPEND="sys-devel/binutils-config" |
667 |
-DEPEND="${RDEPEND} |
668 |
- test? ( >=dev-lang/perl-5.8.8 )" |
669 |
- |
670 |
-export CTARGET=${CTARGET:-${CHOST}} |
671 |
-if [[ ${CTARGET} == ${CHOST} ]] ; then |
672 |
- if [[ ${CATEGORY} == cross-* ]] ; then |
673 |
- export CTARGET=${CATEGORY#cross-} |
674 |
- fi |
675 |
-fi |
676 |
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } |
677 |
- |
678 |
-if is_cross ; then |
679 |
- SLOT="${CTARGET}" |
680 |
-else |
681 |
- SLOT="0" |
682 |
-fi |
683 |
- |
684 |
-LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV} |
685 |
-INCPATH=${LIBPATH}/include |
686 |
-DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV} |
687 |
-if is_cross ; then |
688 |
- BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${PV} |
689 |
-else |
690 |
- BINPATH=/usr/${CTARGET}/binutils-bin/${PV} |
691 |
-fi |
692 |
- |
693 |
-S=${WORKDIR} |
694 |
- |
695 |
-prepare_ld64() { |
696 |
- cd "${S}"/${LD64}/src |
697 |
- cp "${FILESDIR}"/Makefile . |
698 |
- |
699 |
- local VER_STR="\"@(#)PROGRAM:ld PROJECT:${LD64} (Gentoo ${PN}-${PVR})\\n\"" |
700 |
- sed -i \ |
701 |
- -e '/^#define LTO_SUPPORT 1/s:1:0:' \ |
702 |
- ObjectDump.cpp || die |
703 |
- echo '#undef LTO_SUPPORT' > configure.h |
704 |
- echo '' > linker_opts |
705 |
- echo "char ldVersionString[] = ${VER_STR};" > version.cpp |
706 |
- |
707 |
- # clean up test suite |
708 |
- cd "${S}"/${LD64}/unit-tests/test-cases |
709 |
- local c |
710 |
- |
711 |
- # we don't have llvm |
712 |
- ((++c)); rm -rf llvm-integration; |
713 |
- |
714 |
- # we don't have dtrace |
715 |
- ((++c)); rm -rf dtrace-static-probes-coalescing; |
716 |
- ((++c)); rm -rf dtrace-static-probes; |
717 |
- |
718 |
- # a file is missing |
719 |
- ((++c)); rm -rf eh-coalescing-r |
720 |
- |
721 |
- # we don't do universal binaries |
722 |
- ((++c)); rm -rf blank-stubs; |
723 |
- |
724 |
- # looks like a problem with apple's result-filter.pl |
725 |
- ((++c)); rm -rf implicit-common3; |
726 |
- ((++c)); rm -rf order_file-ans; |
727 |
- |
728 |
- # TODO no idea what goes wrong here |
729 |
- ((++c)); rm -rf dwarf-debug-notes; |
730 |
- |
731 |
- elog "Deleted $c tests that were bound to fail" |
732 |
-} |
733 |
- |
734 |
-src_prepare() { |
735 |
- prepare_ld64 |
736 |
- |
737 |
- cd "${S}"/${CCTOOLS} |
738 |
- epatch "${FILESDIR}"/${PN}-3.1.1-as.patch |
739 |
- epatch "${FILESDIR}"/${PN}-3.1.1-as-dir.patch |
740 |
- epatch "${FILESDIR}"/${PN}-3.1.1-ranlib.patch |
741 |
- epatch "${FILESDIR}"/${PN}-3.1.1-libtool-ranlib.patch |
742 |
- epatch "${FILESDIR}"/${PN}-3.1.1-nmedit.patch |
743 |
- epatch "${FILESDIR}"/${PN}-3.1.1-no-headers.patch |
744 |
- epatch "${FILESDIR}"/${PN}-3.1.1-no-oss-dir.patch |
745 |
- epatch "${FILESDIR}"/${P}-armv7-defines.patch |
746 |
- |
747 |
- cd "${S}"/${LD64} |
748 |
- epatch "${FILESDIR}"/${PN}-3.1.1-testsuite.patch |
749 |
- epatch "${WORKDIR}"/LP64/ld64/*.patch |
750 |
- |
751 |
- cd "${S}" |
752 |
- ebegin "cleaning Makefiles from unwanted CFLAGS" |
753 |
- find . -name "Makefile" -print0 | xargs -0 sed \ |
754 |
- -i \ |
755 |
- -e 's/ -g / /g' \ |
756 |
- -e 's/^OFLAG =.*$/OFLAG =/' \ |
757 |
- -e 's/install -c -s/install/g' |
758 |
- eend $? |
759 |
- |
760 |
- # -pg is used and the two are incompatible |
761 |
- filter-flags -fomit-frame-pointer |
762 |
-} |
763 |
- |
764 |
-compile_ld64() { |
765 |
- cd "${S}"/${LD64}/src |
766 |
- # 'struct linkedit_data_command' is defined in mach-o/loader.h on leopard, |
767 |
- # but not on tiger. |
768 |
- [[ ${CHOST} == *-apple-darwin8 ]] && \ |
769 |
- append-flags -isystem "${S}"/${CCTOOLS}/include/ |
770 |
- emake || die "emake failed for ld64" |
771 |
- use test && emake build_test |
772 |
-} |
773 |
- |
774 |
-compile_cctools() { |
775 |
- cd "${S}"/${CCTOOLS} |
776 |
- emake \ |
777 |
- LTO= \ |
778 |
- TRIE= \ |
779 |
- EFITOOLS= \ |
780 |
- COMMON_SUBDIRS='libstuff ar misc otool' \ |
781 |
- SUBDIRS_32= \ |
782 |
- RC_CFLAGS="${CFLAGS}" OFLAG="${CFLAGS}" \ |
783 |
- || die "emake failed for the cctools" |
784 |
- cd "${S}"/${CCTOOLS}/as |
785 |
- emake \ |
786 |
- BUILD_OBSOLETE_ARCH= \ |
787 |
- RC_CFLAGS="-DASLIBEXECDIR=\"\\\"${EPREFIX}${LIBPATH}/\\\"\" ${CFLAGS}" \ |
788 |
- || die "emake failed for as" |
789 |
-} |
790 |
- |
791 |
-src_compile() { |
792 |
- tc-export CC CXX |
793 |
- compile_cctools |
794 |
- compile_ld64 |
795 |
-} |
796 |
- |
797 |
-install_ld64() { |
798 |
- exeinto ${BINPATH} |
799 |
- doexe "${S}"/${LD64}/src/{ld64,rebase} |
800 |
- dosym ld64 ${BINPATH}/ld |
801 |
- insinto ${DATAPATH}/man/man1 |
802 |
- doins "${S}"/${LD64}/doc/man/man1/{ld,ld64,rebase}.1 |
803 |
-} |
804 |
- |
805 |
-install_cctools() { |
806 |
- cd "${S}"/${CCTOOLS} |
807 |
- emake install_all_but_headers \ |
808 |
- EFITOOLS= \ |
809 |
- COMMON_SUBDIRS='ar misc otool' \ |
810 |
- SUBDIRS_32= \ |
811 |
- RC_CFLAGS="${CFLAGS}" OFLAG="${CFLAGS}" \ |
812 |
- DSTROOT=\"${D}\" \ |
813 |
- BINDIR=\"${EPREFIX}\"${BINPATH} \ |
814 |
- LOCBINDIR=\"${EPREFIX}\"${BINPATH} \ |
815 |
- USRBINDIR=\"${EPREFIX}\"${BINPATH} \ |
816 |
- LOCLIBDIR=\"${EPREFIX}\"${LIBPATH} \ |
817 |
- MANDIR=\"${EPREFIX}\"${DATAPATH}/man/ |
818 |
- cd "${S}"/${CCTOOLS}/as |
819 |
- emake install \ |
820 |
- BUILD_OBSOLETE_ARCH= \ |
821 |
- DSTROOT=\"${D}\" \ |
822 |
- USRBINDIR=\"${EPREFIX}\"${BINPATH} \ |
823 |
- LIBDIR=\"${EPREFIX}\"${LIBPATH} |
824 |
- |
825 |
- cd "${ED}"${BINPATH} |
826 |
- insinto ${DATAPATH}/man/man1 |
827 |
- local skips manpage |
828 |
- # ar brings an up-to-date manpage with it |
829 |
- skips=( ar ) |
830 |
- for bin in *; do |
831 |
- for skip in ${skips[@]}; do |
832 |
- if [[ ${bin} == ${skip} ]]; then |
833 |
- continue 2; |
834 |
- fi |
835 |
- done |
836 |
- manpage=${S}/${CCTOOLS}/man/${bin}.1 |
837 |
- if [[ -f "${manpage}" ]]; then |
838 |
- doins "${manpage}" |
839 |
- fi |
840 |
- done |
841 |
- insinto ${DATAPATH}/man/man5 |
842 |
- doins "${S}"/${CCTOOLS}/man/*.5 |
843 |
-} |
844 |
- |
845 |
-src_test() { |
846 |
- einfo "Running unit tests" |
847 |
- cd "${S}"/${LD64}/unit-tests/test-cases |
848 |
- # need host arch, since GNU arch doesn't do what Apple's does |
849 |
- tc-export CC CXX |
850 |
- perl ../bin/make-recursive.pl \ |
851 |
- ARCH="$(/usr/bin/arch)" \ |
852 |
- RELEASEDIR="${S}"/${LD64}/src \ |
853 |
- | perl ../bin/result-filter.pl |
854 |
-} |
855 |
- |
856 |
-src_install() { |
857 |
- install_ld64 |
858 |
- install_cctools |
859 |
- |
860 |
- cd "${S}" |
861 |
- insinto /etc/env.d/binutils |
862 |
- cat <<-EOF > env.d |
863 |
- TARGET="${CHOST}" |
864 |
- VER="${PV}" |
865 |
- FAKE_TARGETS="${CHOST}" |
866 |
- EOF |
867 |
- newins env.d ${CHOST}-${PV} |
868 |
-} |
869 |
- |
870 |
-pkg_postinst() { |
871 |
- binutils-config ${CHOST}-${PV} |
872 |
-} |
873 |
|
874 |
diff --git a/sys-devel/binutils-apple/binutils-apple-4.2-r1.ebuild b/sys-devel/binutils-apple/binutils-apple-4.2-r1.ebuild |
875 |
deleted file mode 100644 |
876 |
index 406cd3e..0000000 |
877 |
--- a/sys-devel/binutils-apple/binutils-apple-4.2-r1.ebuild |
878 |
+++ /dev/null |
879 |
@@ -1,328 +0,0 @@ |
880 |
-# Copyright 1999-2015 Gentoo Foundation |
881 |
-# Distributed under the terms of the GNU General Public License v2 |
882 |
-# $Id$ |
883 |
- |
884 |
-EAPI="3" |
885 |
- |
886 |
-inherit eutils flag-o-matic toolchain-funcs |
887 |
- |
888 |
-LD64=ld64-127.2 |
889 |
-CCTOOLS_VERSION=809 |
890 |
-CCTOOLS=cctools-${CCTOOLS_VERSION} |
891 |
-CCTOOLS_HEADERS=cctools-855 |
892 |
-LIBUNWIND=libunwind-30 |
893 |
-DYLD=dyld-195.5 |
894 |
- |
895 |
-DESCRIPTION="Darwin assembler as(1) and static linker ld(1), Xcode Tools ${PV}" |
896 |
-HOMEPAGE="http://www.opensource.apple.com/darwinsource/" |
897 |
-SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz |
898 |
- http://www.opensource.apple.com/tarballs/cctools/${CCTOOLS}.tar.gz |
899 |
- http://www.opensource.apple.com/tarballs/cctools/${CCTOOLS_HEADERS}.tar.gz |
900 |
- http://www.opensource.apple.com/tarballs/libunwind/${LIBUNWIND}.tar.gz |
901 |
- http://www.opensource.apple.com/tarballs/dyld/${DYLD}.tar.gz" |
902 |
- |
903 |
-LICENSE="APSL-2" |
904 |
-KEYWORDS="~ppc-macos ~x64-macos ~x86-macos" |
905 |
-IUSE="lto test" |
906 |
- |
907 |
-RDEPEND="sys-devel/binutils-config |
908 |
- lto? ( sys-devel/llvm )" |
909 |
-DEPEND="${RDEPEND} |
910 |
- test? ( >=dev-lang/perl-5.8.8 ) |
911 |
- || ( >=sys-devel/gcc-apple-4.2.1 sys-devel/llvm )" |
912 |
- |
913 |
-export CTARGET=${CTARGET:-${CHOST}} |
914 |
-if [[ ${CTARGET} == ${CHOST} ]] ; then |
915 |
- if [[ ${CATEGORY} == cross-* ]] ; then |
916 |
- export CTARGET=${CATEGORY#cross-} |
917 |
- fi |
918 |
-fi |
919 |
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } |
920 |
- |
921 |
-if is_cross ; then |
922 |
- SLOT="${CTARGET}-4" |
923 |
-else |
924 |
- SLOT="4" |
925 |
-fi |
926 |
- |
927 |
-LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV} |
928 |
-INCPATH=${LIBPATH}/include |
929 |
-DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV} |
930 |
-if is_cross ; then |
931 |
- BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${PV} |
932 |
-else |
933 |
- BINPATH=/usr/${CTARGET}/binutils-bin/${PV} |
934 |
-fi |
935 |
- |
936 |
-S=${WORKDIR} |
937 |
- |
938 |
-src_prepare() { |
939 |
- cd "${S}"/${LD64}/src |
940 |
- cp "${FILESDIR}"/ld64-127.2-Makefile Makefile |
941 |
- epatch "${FILESDIR}"/${LD64}-lto.patch |
942 |
- epatch "${FILESDIR}"/ld64-128.2-stdlib.patch |
943 |
- epatch "${FILESDIR}"/${LD64}-ppc-range-warning.patch |
944 |
- epatch "${FILESDIR}"/ld64-127.2-extraneous-headers.patch |
945 |
- epatch "${FILESDIR}"/ld64-241.9-register-names.patch |
946 |
- epatch "${FILESDIR}"/ld64-241.9-get-comm-align.patch |
947 |
- epatch "${FILESDIR}"/ld64-241.9-cc_md5.patch |
948 |
- epatch "${FILESDIR}"/ld64-128.2-1010.patch |
949 |
- |
950 |
- # We used to use our own copy of lto.h, which doesn't require llvm |
951 |
- # build-env. Current versions of llvm provide |
952 |
- # $EPREFIX/usr/include/llvm-c/lto.h as well as |
953 |
- # $EPREFIX/usr/lib/libLTO.{so,dylib}, so we just use these. |
954 |
- |
955 |
- # provide missing headers from libunwind and dyld |
956 |
- mkdir -p include/{mach,mach-o/arm} || die |
957 |
- # never present because it's private |
958 |
- cp ../../${DYLD}/include/mach-o/dyld_priv.h include/mach-o || die |
959 |
- # missing on <= 10.5 |
960 |
- cp ../../${LIBUNWIND}/include/libunwind.h include/ || die |
961 |
- cp ../../${LIBUNWIND}/include/mach-o/compact_unwind_encoding.h include/mach-o || die |
962 |
- # missing on <= 10.4 |
963 |
- cp ../../${DYLD}/include/mach-o/dyld_images.h include/mach-o || die |
964 |
- cp ../../${CCTOOLS}/include/mach-o/loader.h include/mach-o || die |
965 |
- # use copies from cctools because they're otherwise hidden in some SDK |
966 |
- cp ../../${CCTOOLS}/include/mach-o/arm/reloc.h include/mach-o/arm || die |
967 |
- # provide all required CPU_TYPEs on all platforms |
968 |
- cp ../../${CCTOOLS}/include/mach/machine.h include/mach/machine.h |
969 |
- # add alias for newer identifiers, because ld64 uses both but cctools |
970 |
- # header only defines the older |
971 |
- epatch "${FILESDIR}"/ld64-236.3-missing-cputypes.patch |
972 |
- |
973 |
- # mimic OS X Leopard-style Availability.h macros for libunwind.h on |
974 |
- # older systems |
975 |
- [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 8 ]] && \ |
976 |
- echo "#define __OSX_AVAILABLE_STARTING(x,y) " > include/Availability.h |
977 |
- |
978 |
- local VER_STR="\"@(#)PROGRAM:ld PROJECT:${LD64} (Gentoo ${PN}-${PVR})\\n\"" |
979 |
- echo "char ldVersionString[] = ${VER_STR};" > version.cpp |
980 |
- |
981 |
- epatch "${FILESDIR}"/ld64-123.2-debug-backtrace.patch |
982 |
- if [[ ${CHOST} == powerpc*-darwin* ]] ; then |
983 |
- epatch "${FILESDIR}"/ld64-123.2-darwin8-no-mlong-branch-warning.patch |
984 |
- epatch "${FILESDIR}"/ld64-127.2-thread_state.patch |
985 |
- fi |
986 |
- |
987 |
- cd "${S}"/${CCTOOLS} |
988 |
- epatch "${FILESDIR}"/${PN}-4.0-as.patch |
989 |
- epatch "${FILESDIR}"/${PN}-4.2-as-dir.patch |
990 |
- epatch "${FILESDIR}"/${PN}-3.2.3-ranlib.patch |
991 |
- epatch "${FILESDIR}"/${PN}-3.1.1-libtool-ranlib.patch |
992 |
- epatch "${FILESDIR}"/${PN}-3.1.1-nmedit.patch |
993 |
- epatch "${FILESDIR}"/${PN}-3.1.1-no-headers.patch |
994 |
- epatch "${FILESDIR}"/${PN}-4.0-no-oss-dir.patch |
995 |
- epatch "${FILESDIR}"/${PN}-4.2-lto.patch |
996 |
- epatch "${FILESDIR}"/${PN}-5.1-extraneous-includes.patch |
997 |
- epatch "${FILESDIR}"/${PN}-4.2-globals-extern.patch |
998 |
- cp ../${LD64}/src/other/prune_trie.h include/mach-o/ || die |
999 |
- # __darwin_i386_float_state missing on <= 10.4 |
1000 |
- cp -a ../${CCTOOLS_HEADERS}/include/mach/i386 include/mach |
1001 |
- |
1002 |
- # do not build profileable libstuff to save compile time |
1003 |
- sed -i -e "/^all:/s, profile , ," libstuff/Makefile |
1004 |
- |
1005 |
- # Provide patched version information to the tools. This is normally |
1006 |
- # done by the Makefile using vers_string. As an added benefit, the |
1007 |
- # build will not fail on later OS Xes where that tool doesn't exist any |
1008 |
- # more. |
1009 |
- |
1010 |
- # Those tools don't even use their version information. Just make make |
1011 |
- # happy. |
1012 |
- touch {ar,gprof,otool}/vers.c |
1013 |
- |
1014 |
- # for the others defining apple_version suffices nicely although the |
1015 |
- # Makefile does a lot more. |
1016 |
- VER_STR="${CCTOOLS} (Gentoo ${PN}-${PVR})" |
1017 |
- echo "const char apple_version[] = \"${VER_STR}\";" \ |
1018 |
- >> as/apple_version.c || die |
1019 |
- echo "const char apple_version[] = \"${VER_STR})\";" \ |
1020 |
- >> misc/vers.c || die |
1021 |
- # the rest we don't even build |
1022 |
- |
1023 |
- # clean up test suite |
1024 |
- cd "${S}"/${LD64}/unit-tests/test-cases |
1025 |
- local c |
1026 |
- |
1027 |
- # we don't have llvm |
1028 |
- ((++c)); rm -rf llvm-integration; |
1029 |
- |
1030 |
- # we don't have dtrace |
1031 |
- ((++c)); rm -rf dtrace-static-probes-coalescing; |
1032 |
- ((++c)); rm -rf dtrace-static-probes; |
1033 |
- |
1034 |
- # a file is missing |
1035 |
- ((++c)); rm -rf eh-coalescing-r |
1036 |
- |
1037 |
- # we don't do universal binaries |
1038 |
- ((++c)); rm -rf blank-stubs; |
1039 |
- |
1040 |
- # looks like a problem with apple's result-filter.pl |
1041 |
- ((++c)); rm -rf implicit-common3; |
1042 |
- ((++c)); rm -rf order_file-ans; |
1043 |
- |
1044 |
- # TODO no idea what goes wrong here |
1045 |
- ((++c)); rm -rf dwarf-debug-notes; |
1046 |
- |
1047 |
- einfo "Deleted $c tests that were bound to fail" |
1048 |
- |
1049 |
- cd "${S}" |
1050 |
- ebegin "cleaning Makefiles from unwanted CFLAGS" |
1051 |
- find . -name "Makefile" -print0 | xargs -0 sed \ |
1052 |
- -i \ |
1053 |
- -e 's/ -g / /g' \ |
1054 |
- -e 's/^G =.*$/G =/' \ |
1055 |
- -e 's/^OFLAG =.*$/OFLAG =/' \ |
1056 |
- -e 's/install -c -s/install/g' |
1057 |
- eend $? |
1058 |
-} |
1059 |
- |
1060 |
-src_configure() { |
1061 |
- CCTOOLS_LTO= |
1062 |
- LD64_LTO=0 |
1063 |
- if use lto ; then |
1064 |
- CCTOOLS_LTO="-DLTO_SUPPORT" |
1065 |
- LD64_LTO=1 |
1066 |
- fi |
1067 |
- |
1068 |
- # CPPFLAGS only affects ld64, cctools don't use 'em (which currently is |
1069 |
- # what we want) |
1070 |
- append-cppflags -DNDEBUG |
1071 |
- |
1072 |
- CCTOOLS_OFLAG= |
1073 |
- if [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 8 ]] ; then |
1074 |
- # cctools expect to use UNIX03 struct member names. |
1075 |
- # This is default on > 10.4. Activate it on <= 10.4 by defining |
1076 |
- # __DARWIN_UNIX03 explicitly. |
1077 |
- CCTOOLS_OFLAG="-D__DARWIN_UNIX03=1" |
1078 |
- fi |
1079 |
- |
1080 |
- cat <<EOF > ${LD64}/src/configure.h |
1081 |
-#define DEFAULT_MACOSX_MIN_VERSION "${MACOSX_DEPLOYMENT_TARGET}" |
1082 |
-EOF |
1083 |
-} |
1084 |
- |
1085 |
-compile_ld64() { |
1086 |
- einfo "building ${LD64}" |
1087 |
- cd "${S}"/${LD64}/src |
1088 |
- emake \ |
1089 |
- LTO=${LD64_LTO} \ |
1090 |
- || die "emake failed for ld64" |
1091 |
- use test && emake build_test |
1092 |
-} |
1093 |
- |
1094 |
-compile_cctools() { |
1095 |
- einfo "building ${CCTOOLS}" |
1096 |
- cd "${S}"/${CCTOOLS} |
1097 |
- emake \ |
1098 |
- LIB_PRUNETRIE="-L../../${LD64}/src -lprunetrie" \ |
1099 |
- EFITOOLS= \ |
1100 |
- LTO="${CCTOOLS_LTO}" \ |
1101 |
- COMMON_SUBDIRS='libstuff ar misc otool' \ |
1102 |
- SUBDIRS_32= \ |
1103 |
- LEGACY= \ |
1104 |
- RC_CFLAGS="${CFLAGS}" \ |
1105 |
- OFLAG="${CCTOOLS_OFLAG}" \ |
1106 |
- || die "emake failed for the cctools" |
1107 |
- cd "${S}"/${CCTOOLS}/as |
1108 |
- emake \ |
1109 |
- BUILD_OBSOLETE_ARCH= \ |
1110 |
- RC_CFLAGS="-DASLIBEXECDIR=\"\\\"${EPREFIX}${LIBPATH}/\\\"\" ${CFLAGS}" \ |
1111 |
- OFLAG="${CCTOOLS_OFLAG}" \ |
1112 |
- || die "emake failed for as" |
1113 |
-} |
1114 |
- |
1115 |
-src_compile() { |
1116 |
- compile_ld64 |
1117 |
- compile_cctools |
1118 |
-} |
1119 |
- |
1120 |
-install_ld64() { |
1121 |
- exeinto ${BINPATH} |
1122 |
- doexe "${S}"/${LD64}/src/{ld64,rebase,dyldinfo,unwinddump,ObjectDump} |
1123 |
- dosym ld64 ${BINPATH}/ld |
1124 |
- insinto ${DATAPATH}/man/man1 |
1125 |
- doins "${S}"/${LD64}/doc/man/man1/{ld,ld64,rebase}.1 |
1126 |
-} |
1127 |
- |
1128 |
-install_cctools() { |
1129 |
- cd "${S}"/${CCTOOLS} |
1130 |
- emake install_all_but_headers \ |
1131 |
- EFITOOLS= \ |
1132 |
- COMMON_SUBDIRS='ar misc otool' \ |
1133 |
- SUBDIRS_32= \ |
1134 |
- DSTROOT=\"${D}\" \ |
1135 |
- BINDIR=\"${EPREFIX}\"${BINPATH} \ |
1136 |
- LOCBINDIR=\"${EPREFIX}\"${BINPATH} \ |
1137 |
- USRBINDIR=\"${EPREFIX}\"${BINPATH} \ |
1138 |
- LOCLIBDIR=\"${EPREFIX}\"${LIBPATH} \ |
1139 |
- MANDIR=\"${EPREFIX}\"${DATAPATH}/man/ |
1140 |
- cd "${S}"/${CCTOOLS}/as |
1141 |
- emake install \ |
1142 |
- BUILD_OBSOLETE_ARCH= \ |
1143 |
- DSTROOT=\"${D}\" \ |
1144 |
- USRBINDIR=\"${EPREFIX}\"${BINPATH} \ |
1145 |
- LIBDIR=\"${EPREFIX}\"${LIBPATH} \ |
1146 |
- LOCLIBDIR=\"${EPREFIX}\"${LIBPATH} |
1147 |
- |
1148 |
- cd "${ED}"${BINPATH} |
1149 |
- insinto ${DATAPATH}/man/man1 |
1150 |
- local skips manpage |
1151 |
- # ar brings an up-to-date manpage with it |
1152 |
- skips=( ar ) |
1153 |
- for bin in *; do |
1154 |
- for skip in ${skips[@]}; do |
1155 |
- if [[ ${bin} == ${skip} ]]; then |
1156 |
- continue 2; |
1157 |
- fi |
1158 |
- done |
1159 |
- manpage=${S}/${CCTOOLS}/man/${bin}.1 |
1160 |
- if [[ -f "${manpage}" ]]; then |
1161 |
- doins "${manpage}" |
1162 |
- fi |
1163 |
- done |
1164 |
- insinto ${DATAPATH}/man/man5 |
1165 |
- doins "${S}"/${CCTOOLS}/man/*.5 |
1166 |
-} |
1167 |
- |
1168 |
-src_test() { |
1169 |
- if ! [ "${EPREFIX}"/usr/bin/clang ] ; then |
1170 |
- einfo "Test suite only works properly with clang - please install" |
1171 |
- return |
1172 |
- fi |
1173 |
- |
1174 |
- einfo "Running unit tests" |
1175 |
- cd "${S}"/${LD64}/unit-tests/test-cases |
1176 |
- # provide the new ld as a symlink to clang so that -ccc-install-dir |
1177 |
- # will pick it up |
1178 |
- ln -sfn ../../src/ld64 ld |
1179 |
- # use our arch command because the System's will report i386 even for an |
1180 |
- # x86_64 prefix |
1181 |
- perl ../bin/make-recursive.pl \ |
1182 |
- BUILT_PRODUCTS_DIR="${S}"/${LD64}/src \ |
1183 |
- ARCH="$(arch)" \ |
1184 |
- LD="${S}"/${LD64}/src/ld64 \ |
1185 |
- CC="clang -ccc-install-dir $PWD" \ |
1186 |
- CXX="clang++ -ccc-install-dir $PWD" \ |
1187 |
- OTOOL="${S}"/${CCTOOLS}/otool/otool.NEW \ |
1188 |
- | perl ../bin/result-filter.pl |
1189 |
-} |
1190 |
- |
1191 |
-src_install() { |
1192 |
- install_ld64 |
1193 |
- install_cctools |
1194 |
- |
1195 |
- cd "${S}" |
1196 |
- insinto /etc/env.d/binutils |
1197 |
- cat <<-EOF > env.d |
1198 |
- TARGET="${CHOST}" |
1199 |
- VER="${PV}" |
1200 |
- FAKE_TARGETS="${CHOST}" |
1201 |
- EOF |
1202 |
- newins env.d ${CHOST}-${PV} |
1203 |
-} |
1204 |
- |
1205 |
-pkg_postinst() { |
1206 |
- binutils-config ${CHOST}-${PV} |
1207 |
-} |
1208 |
|
1209 |
diff --git a/sys-devel/binutils-apple/binutils-apple-4.2.ebuild b/sys-devel/binutils-apple/binutils-apple-4.2.ebuild |
1210 |
deleted file mode 100644 |
1211 |
index c2eab93..0000000 |
1212 |
--- a/sys-devel/binutils-apple/binutils-apple-4.2.ebuild |
1213 |
+++ /dev/null |
1214 |
@@ -1,312 +0,0 @@ |
1215 |
-# Copyright 1999-2015 Gentoo Foundation |
1216 |
-# Distributed under the terms of the GNU General Public License v2 |
1217 |
-# $Id$ |
1218 |
- |
1219 |
-EAPI="3" |
1220 |
- |
1221 |
-inherit eutils flag-o-matic toolchain-funcs |
1222 |
- |
1223 |
-RESTRICT="test" # the test suite will test what's installed. |
1224 |
- |
1225 |
-LD64=ld64-127.2 |
1226 |
-CCTOOLS=cctools-809 |
1227 |
-LIBUNWIND=libunwind-30 |
1228 |
-DYLD=dyld-195.5 |
1229 |
-# http://lists.apple.com/archives/Darwin-dev/2009/Sep/msg00025.html |
1230 |
-UNWIND=binutils-apple-3.2-unwind-patches-5 |
1231 |
- |
1232 |
-DESCRIPTION="Darwin assembler as(1) and static linker ld(1), Xcode Tools ${PV}" |
1233 |
-HOMEPAGE="http://www.opensource.apple.com/darwinsource/" |
1234 |
-SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz |
1235 |
- http://www.opensource.apple.com/tarballs/cctools/${CCTOOLS}.tar.gz |
1236 |
- http://www.opensource.apple.com/tarballs/libunwind/${LIBUNWIND}.tar.gz |
1237 |
- http://www.opensource.apple.com/tarballs/dyld/${DYLD}.tar.gz |
1238 |
- https://www.gentoo.org/~grobian/distfiles/${UNWIND}.tar.xz |
1239 |
- https://www.gentoo.org/~grobian/distfiles/libunwind-llvm-115426.tar.bz2" |
1240 |
- |
1241 |
-LICENSE="APSL-2" |
1242 |
-KEYWORDS="~ppc-macos ~x64-macos ~x86-macos" |
1243 |
-IUSE="lto test" |
1244 |
- |
1245 |
-RDEPEND="sys-devel/binutils-config |
1246 |
- lto? ( sys-devel/llvm )" |
1247 |
-DEPEND="${RDEPEND} |
1248 |
- test? ( >=dev-lang/perl-5.8.8 ) |
1249 |
- >=sys-devel/gcc-apple-4.2.1" |
1250 |
- |
1251 |
-export CTARGET=${CTARGET:-${CHOST}} |
1252 |
-if [[ ${CTARGET} == ${CHOST} ]] ; then |
1253 |
- if [[ ${CATEGORY} == cross-* ]] ; then |
1254 |
- export CTARGET=${CATEGORY#cross-} |
1255 |
- fi |
1256 |
-fi |
1257 |
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } |
1258 |
- |
1259 |
-if is_cross ; then |
1260 |
- SLOT="${CTARGET}-4" |
1261 |
-else |
1262 |
- SLOT="4" |
1263 |
-fi |
1264 |
- |
1265 |
-LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV} |
1266 |
-INCPATH=${LIBPATH}/include |
1267 |
-DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV} |
1268 |
-if is_cross ; then |
1269 |
- BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${PV} |
1270 |
-else |
1271 |
- BINPATH=/usr/${CTARGET}/binutils-bin/${PV} |
1272 |
-fi |
1273 |
- |
1274 |
-S=${WORKDIR} |
1275 |
- |
1276 |
-src_prepare() { |
1277 |
- cd "${S}"/${LIBUNWIND}/src |
1278 |
- cp "${FILESDIR}"/${LIBUNWIND}-Makefile Makefile |
1279 |
- |
1280 |
- cd "${S}"/${LD64}/src |
1281 |
- cp "${FILESDIR}"/ld64-123.2-Makefile Makefile |
1282 |
- epatch "${FILESDIR}"/${LD64}-lto.patch |
1283 |
- epatch "${FILESDIR}"/${LD64}-ppc-range-warning.patch |
1284 |
- |
1285 |
- ln -s ../../${CCTOOLS}/include |
1286 |
- cp other/prune_trie.h include/mach-o/ || die |
1287 |
- # use our own copy of lto.h, which doesn't require llvm build-env |
1288 |
- mkdir -p include/llvm-c || die |
1289 |
- cp "${WORKDIR}"/ld64-unwind/ld64-97.14-llvm-lto.h include/llvm-c/lto.h || die |
1290 |
- # make libunwind sources known |
1291 |
- ln -s ../../${LIBUNWIND}/src libunwind || die |
1292 |
- cp ../../${LIBUNWIND}/include/*.h include/ || die |
1293 |
- # mimic OS X Lion-style Availability.h macros |
1294 |
- if [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 10 ]] ; then |
1295 |
- { |
1296 |
- echo "#define __OSX_AVAILABLE_STARTING(x,y) " |
1297 |
- echo "#define __OSX_AVAILABLE_BUT_DEPRECATED(a,b,c,d) " |
1298 |
- } > include/Availability.h |
1299 |
- fi |
1300 |
- |
1301 |
- echo '' > configure.h |
1302 |
- echo '' > linker_opts |
1303 |
- local VER_STR="\"@(#)PROGRAM:ld PROJECT:${LD64} (Gentoo ${PN}-${PVR})\\n\"" |
1304 |
- echo "char ldVersionString[] = ${VER_STR};" > version.cpp |
1305 |
- |
1306 |
- epatch "${FILESDIR}"/ld64-123.2-debug-backtrace.patch |
1307 |
- if [[ ${CHOST} == powerpc*-darwin* ]] ; then |
1308 |
- epatch "${FILESDIR}"/ld64-123.2-darwin8-no-mlong-branch-warning.patch |
1309 |
- sed -i -e '/#include <mach-o\/loader.h>/a\#include <mach/i386/thread_status.h>' \ |
1310 |
- ld/HeaderAndLoadCommands.hpp || die |
1311 |
- fi |
1312 |
- if use !lto ; then |
1313 |
- sed -i -e '/#define LTO_SUPPORT 1/d' other/ObjectDump.cpp || die |
1314 |
- fi |
1315 |
- |
1316 |
- cd "${S}"/${CCTOOLS} |
1317 |
- epatch "${FILESDIR}"/${PN}-4.0-as.patch |
1318 |
- epatch "${FILESDIR}"/${PN}-4.2-as-dir.patch |
1319 |
- epatch "${FILESDIR}"/${PN}-3.2.3-ranlib.patch |
1320 |
- epatch "${FILESDIR}"/${PN}-3.1.1-libtool-ranlib.patch |
1321 |
- epatch "${FILESDIR}"/${PN}-3.1.1-nmedit.patch |
1322 |
- epatch "${FILESDIR}"/${PN}-3.1.1-no-headers.patch |
1323 |
- epatch "${FILESDIR}"/${PN}-4.0-no-oss-dir.patch |
1324 |
- epatch "${FILESDIR}"/${PN}-4.2-lto.patch |
1325 |
- |
1326 |
- local program |
1327 |
- for program in ar efitools gprof libmacho misc otool ; do |
1328 |
- VER_STR="@(#)PROGRAM:${program} PROJECT:${CCTOOLS} (Gentoo ${PN}-${PVR}) DEVELOPER:${PORTAGE_ROOT_USER} BUILT:$(date)" |
1329 |
- cat > ${program}/vers.c <<- _EOF |
1330 |
- #include <sys/cdefs.h> |
1331 |
- __IDSTRING(SGS_VERS,"${VER_STR}\n"); |
1332 |
- _EOF |
1333 |
- [[ ${program} != "libmacho" ]] && \ |
1334 |
- echo '__IDSTRING(VERS_NUM,"apple");' >> ${program}/vers.c |
1335 |
- done |
1336 |
- |
1337 |
- VER_STR="${CCTOOLS} (Gentoo ${PN}-${PVR})" |
1338 |
- echo "const char apple_version[] = \"${VER_STR}\";" \ |
1339 |
- >> as/apple_version.c || die |
1340 |
- echo "const char apple_version[] = \"${VER_STR})\";" \ |
1341 |
- >> efitools/vers.c || die |
1342 |
- echo "const char apple_version[] = \"${VER_STR})\";" \ |
1343 |
- >> ld/ld_vers.c || die |
1344 |
- echo "const char apple_version[] = \"${VER_STR})\";" \ |
1345 |
- >> misc/vers.c || die |
1346 |
- |
1347 |
- # clean up test suite |
1348 |
- cd "${S}"/${LD64} |
1349 |
-# epatch "${FILESDIR}"/${PN}-3.1.1-testsuite.patch |
1350 |
- |
1351 |
- cd "${S}"/${LD64}/unit-tests/test-cases |
1352 |
- local c |
1353 |
- |
1354 |
- # we don't have llvm |
1355 |
- ((++c)); rm -rf llvm-integration; |
1356 |
- |
1357 |
- # we don't have dtrace |
1358 |
- ((++c)); rm -rf dtrace-static-probes-coalescing; |
1359 |
- ((++c)); rm -rf dtrace-static-probes; |
1360 |
- |
1361 |
- # a file is missing |
1362 |
- ((++c)); rm -rf eh-coalescing-r |
1363 |
- |
1364 |
- # we don't do universal binaries |
1365 |
- ((++c)); rm -rf blank-stubs; |
1366 |
- |
1367 |
- # looks like a problem with apple's result-filter.pl |
1368 |
- ((++c)); rm -rf implicit-common3; |
1369 |
- ((++c)); rm -rf order_file-ans; |
1370 |
- |
1371 |
- # TODO no idea what goes wrong here |
1372 |
- ((++c)); rm -rf dwarf-debug-notes; |
1373 |
- |
1374 |
- einfo "Deleted $c tests that were bound to fail" |
1375 |
- |
1376 |
- cd "${S}" |
1377 |
- ebegin "cleaning Makefiles from unwanted CFLAGS" |
1378 |
- find . -name "Makefile" -print0 | xargs -0 sed \ |
1379 |
- -i \ |
1380 |
- -e 's/ -g / /g' \ |
1381 |
- -e 's/^OFLAG =.*$/OFLAG =/' \ |
1382 |
- -e 's/install -c -s/install/g' |
1383 |
- eend $? |
1384 |
- |
1385 |
- # -pg is used and the two are incompatible |
1386 |
- filter-flags -fomit-frame-pointer |
1387 |
-} |
1388 |
- |
1389 |
-src_configure() { |
1390 |
- tc-export CC CXX AR |
1391 |
- if use lto ; then |
1392 |
- append-cppflags -DLTO_SUPPORT |
1393 |
- append-ldflags -L"${EPREFIX}"/usr/$(get_libdir)/llvm |
1394 |
- append-libs LTO |
1395 |
- LTO=1 |
1396 |
- else |
1397 |
- append-cppflags -ULTO_SUPPORT |
1398 |
- LTO=0 |
1399 |
- fi |
1400 |
- append-cppflags -DNDEBUG |
1401 |
- append-cppflags -I"${WORKDIR}"/libunwind/include |
1402 |
-} |
1403 |
- |
1404 |
-compile_libunwind() { |
1405 |
- # not used, just for testing, and possible use in the future |
1406 |
- einfo "building ${LIBUNWIND}" |
1407 |
- cd "${S}"/${LIBUNWIND}/src |
1408 |
- emake DYLDINCS=-I../../${DYLD}/include || die |
1409 |
-} |
1410 |
- |
1411 |
-compile_ld64() { |
1412 |
- einfo "building ${LD64}" |
1413 |
- cd "${S}"/${LD64}/src |
1414 |
- # remove antiquated copy that's available on any OSX system and |
1415 |
- # breaks ld64 compilation |
1416 |
- mv include/mach-o/dyld.h{,.disable} |
1417 |
- emake \ |
1418 |
- LTO=${LTO} \ |
1419 |
- CFLAGS="${CFLAGS}" \ |
1420 |
- CXXFLAGS="${CXXFLAGS} -I../../${DYLD}/include" \ |
1421 |
- LDFLAGS="${LDFLAGS} ${LIBS}" \ |
1422 |
- || die "emake failed for ld64" |
1423 |
- use test && emake build_test |
1424 |
- # restore, it's necessary for cctools' install |
1425 |
- mv include/mach-o/dyld.h{.disable,} |
1426 |
-} |
1427 |
- |
1428 |
-compile_cctools() { |
1429 |
- einfo "building ${CCTOOLS}" |
1430 |
- cd "${S}"/${CCTOOLS} |
1431 |
- emake \ |
1432 |
- LIB_PRUNETRIE="-L../../${LD64}/src -lprunetrie" \ |
1433 |
- EFITOOLS= LTO= \ |
1434 |
- COMMON_SUBDIRS='libstuff ar misc otool' \ |
1435 |
- SUBDIRS_32= \ |
1436 |
- RC_CFLAGS="${CFLAGS}" OFLAG="${CFLAGS}" \ |
1437 |
- || die "emake failed for the cctools" |
1438 |
- cd "${S}"/${CCTOOLS}/as |
1439 |
- emake \ |
1440 |
- BUILD_OBSOLETE_ARCH= \ |
1441 |
- RC_CFLAGS="-DASLIBEXECDIR=\"\\\"${EPREFIX}${LIBPATH}/\\\"\" ${CFLAGS}" \ |
1442 |
- || die "emake failed for as" |
1443 |
-} |
1444 |
- |
1445 |
-src_compile() { |
1446 |
- compile_ld64 |
1447 |
- compile_cctools |
1448 |
-} |
1449 |
- |
1450 |
-install_ld64() { |
1451 |
- exeinto ${BINPATH} |
1452 |
- doexe "${S}"/${LD64}/src/{ld64,rebase,dyldinfo,unwinddump,ObjectDump} |
1453 |
- dosym ld64 ${BINPATH}/ld |
1454 |
- insinto ${DATAPATH}/man/man1 |
1455 |
- doins "${S}"/${LD64}/doc/man/man1/{ld,ld64,rebase}.1 |
1456 |
-} |
1457 |
- |
1458 |
-install_cctools() { |
1459 |
- cd "${S}"/${CCTOOLS} |
1460 |
- emake install_all_but_headers \ |
1461 |
- EFITOOLS= LTO= \ |
1462 |
- COMMON_SUBDIRS='ar misc otool' \ |
1463 |
- SUBDIRS_32= \ |
1464 |
- RC_CFLAGS="${CFLAGS}" OFLAG="${CFLAGS}" \ |
1465 |
- DSTROOT=\"${D}\" \ |
1466 |
- BINDIR=\"${EPREFIX}\"${BINPATH} \ |
1467 |
- LOCBINDIR=\"${EPREFIX}\"${BINPATH} \ |
1468 |
- USRBINDIR=\"${EPREFIX}\"${BINPATH} \ |
1469 |
- LOCLIBDIR=\"${EPREFIX}\"${LIBPATH} \ |
1470 |
- MANDIR=\"${EPREFIX}\"${DATAPATH}/man/ |
1471 |
- cd "${S}"/${CCTOOLS}/as |
1472 |
- emake install \ |
1473 |
- BUILD_OBSOLETE_ARCH= \ |
1474 |
- DSTROOT=\"${D}\" \ |
1475 |
- USRBINDIR=\"${EPREFIX}\"${BINPATH} \ |
1476 |
- LIBDIR=\"${EPREFIX}\"${LIBPATH} \ |
1477 |
- LOCLIBDIR=\"${EPREFIX}\"${LIBPATH} |
1478 |
- |
1479 |
- cd "${ED}"${BINPATH} |
1480 |
- insinto ${DATAPATH}/man/man1 |
1481 |
- local skips manpage |
1482 |
- # ar brings an up-to-date manpage with it |
1483 |
- skips=( ar ) |
1484 |
- for bin in *; do |
1485 |
- for skip in ${skips[@]}; do |
1486 |
- if [[ ${bin} == ${skip} ]]; then |
1487 |
- continue 2; |
1488 |
- fi |
1489 |
- done |
1490 |
- manpage=${S}/${CCTOOLS}/man/${bin}.1 |
1491 |
- if [[ -f "${manpage}" ]]; then |
1492 |
- doins "${manpage}" |
1493 |
- fi |
1494 |
- done |
1495 |
- insinto ${DATAPATH}/man/man5 |
1496 |
- doins "${S}"/${CCTOOLS}/man/*.5 |
1497 |
-} |
1498 |
- |
1499 |
-src_test() { |
1500 |
- einfo "Running unit tests" |
1501 |
- cd "${S}"/${LD64}/unit-tests/test-cases |
1502 |
- # need host arch, since GNU arch doesn't do what Apple's does |
1503 |
- tc-export CC CXX |
1504 |
- perl ../bin/make-recursive.pl \ |
1505 |
- ARCH="$(/usr/bin/arch)" \ |
1506 |
- RELEASEDIR="${S}"/${LD64}/src \ |
1507 |
- | perl ../bin/result-filter.pl |
1508 |
-} |
1509 |
- |
1510 |
-src_install() { |
1511 |
- install_ld64 |
1512 |
- install_cctools |
1513 |
- |
1514 |
- cd "${S}" |
1515 |
- insinto /etc/env.d/binutils |
1516 |
- cat <<-EOF > env.d |
1517 |
- TARGET="${CHOST}" |
1518 |
- VER="${PV}" |
1519 |
- FAKE_TARGETS="${CHOST}" |
1520 |
- EOF |
1521 |
- newins env.d ${CHOST}-${PV} |
1522 |
-} |
1523 |
- |
1524 |
-pkg_postinst() { |
1525 |
- binutils-config ${CHOST}-${PV} |
1526 |
-} |
1527 |
|
1528 |
diff --git a/sys-devel/binutils-apple/binutils-apple-4.3-r1.ebuild b/sys-devel/binutils-apple/binutils-apple-4.3-r1.ebuild |
1529 |
deleted file mode 100644 |
1530 |
index 5594369..0000000 |
1531 |
--- a/sys-devel/binutils-apple/binutils-apple-4.3-r1.ebuild |
1532 |
+++ /dev/null |
1533 |
@@ -1,316 +0,0 @@ |
1534 |
-# Copyright 1999-2015 Gentoo Foundation |
1535 |
-# Distributed under the terms of the GNU General Public License v2 |
1536 |
-# $Id$ |
1537 |
- |
1538 |
-EAPI="3" |
1539 |
- |
1540 |
-inherit eutils flag-o-matic toolchain-funcs |
1541 |
- |
1542 |
-LD64=ld64-128.2 |
1543 |
-CCTOOLS_VERSION=822 |
1544 |
-CCTOOLS=cctools-${CCTOOLS_VERSION} |
1545 |
-CCTOOLS_HEADERS=cctools-855 |
1546 |
-LIBUNWIND=libunwind-30 |
1547 |
-DYLD=dyld-195.6 |
1548 |
- |
1549 |
-DESCRIPTION="Darwin assembler as(1) and static linker ld(1), Xcode Tools ${PV}" |
1550 |
-HOMEPAGE="http://www.opensource.apple.com/darwinsource/" |
1551 |
-SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz |
1552 |
- http://www.opensource.apple.com/tarballs/cctools/${CCTOOLS}.tar.gz |
1553 |
- http://www.opensource.apple.com/tarballs/cctools/${CCTOOLS_HEADERS}.tar.gz |
1554 |
- http://www.opensource.apple.com/tarballs/libunwind/${LIBUNWIND}.tar.gz |
1555 |
- http://www.opensource.apple.com/tarballs/dyld/${DYLD}.tar.gz" |
1556 |
- |
1557 |
-LICENSE="APSL-2" |
1558 |
-KEYWORDS="~x64-macos ~x86-macos" |
1559 |
-IUSE="lto test" |
1560 |
- |
1561 |
-RDEPEND="sys-devel/binutils-config |
1562 |
- lto? ( sys-devel/llvm )" |
1563 |
-DEPEND="${RDEPEND} |
1564 |
- test? ( >=dev-lang/perl-5.8.8 ) |
1565 |
- || ( >=sys-devel/gcc-apple-4.2.1 sys-devel/llvm )" |
1566 |
- |
1567 |
-export CTARGET=${CTARGET:-${CHOST}} |
1568 |
-if [[ ${CTARGET} == ${CHOST} ]] ; then |
1569 |
- if [[ ${CATEGORY} == cross-* ]] ; then |
1570 |
- export CTARGET=${CATEGORY#cross-} |
1571 |
- fi |
1572 |
-fi |
1573 |
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } |
1574 |
- |
1575 |
-if is_cross ; then |
1576 |
- SLOT="${CTARGET}-4" |
1577 |
-else |
1578 |
- SLOT="4" |
1579 |
-fi |
1580 |
- |
1581 |
-LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV} |
1582 |
-INCPATH=${LIBPATH}/include |
1583 |
-DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV} |
1584 |
-if is_cross ; then |
1585 |
- BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${PV} |
1586 |
-else |
1587 |
- BINPATH=/usr/${CTARGET}/binutils-bin/${PV} |
1588 |
-fi |
1589 |
- |
1590 |
-S=${WORKDIR} |
1591 |
- |
1592 |
-src_prepare() { |
1593 |
- cd "${S}"/${LD64}/src |
1594 |
- cp "${FILESDIR}"/ld64-128.2-Makefile-2 Makefile |
1595 |
- epatch "${FILESDIR}"/ld64-127.2-lto.patch |
1596 |
- epatch "${FILESDIR}"/ld64-128.2-stdlib.patch |
1597 |
- epatch "${FILESDIR}"/ld64-241.9-register-names.patch |
1598 |
- epatch "${FILESDIR}"/ld64-241.9-get-comm-align.patch |
1599 |
- epatch "${FILESDIR}"/ld64-241.9-cc_md5.patch |
1600 |
- epatch "${FILESDIR}"/ld64-128.2-1010.patch |
1601 |
- |
1602 |
- # We used to use our own copy of lto.h, which doesn't require llvm |
1603 |
- # build-env. Current versions of llvm provide |
1604 |
- # $EPREFIX/usr/include/llvm-c/lto.h as well as |
1605 |
- # $EPREFIX/usr/lib/libLTO.{so,dylib}, so we just use these. |
1606 |
- |
1607 |
- # provide missing headers from libunwind and dyld |
1608 |
- mkdir -p include/{mach,mach-o/arm} || die |
1609 |
- # never present because it's private |
1610 |
- cp ../../${DYLD}/include/mach-o/dyld_priv.h include/mach-o || die |
1611 |
- # missing on <= 10.5 |
1612 |
- cp ../../${LIBUNWIND}/include/libunwind.h include/ || die |
1613 |
- cp ../../${LIBUNWIND}/include/mach-o/compact_unwind_encoding.h include/mach-o || die |
1614 |
- # missing on <= 10.4 |
1615 |
- cp ../../${DYLD}/include/mach-o/dyld_images.h include/mach-o || die |
1616 |
- cp ../../${CCTOOLS}/include/mach-o/loader.h include/mach-o || die |
1617 |
- # use copies from cctools because they're otherwise hidden in some SDK |
1618 |
- cp ../../${CCTOOLS}/include/mach-o/arm/reloc.h include/mach-o/arm || die |
1619 |
- # provide all required CPU_TYPEs on all platforms |
1620 |
- cp ../../${CCTOOLS}/include/mach/machine.h include/mach/machine.h |
1621 |
- # add alias for newer identifiers, because ld64 uses both but cctools |
1622 |
- # header only defines the older |
1623 |
- epatch "${FILESDIR}"/ld64-236.3-missing-cputypes.patch |
1624 |
- |
1625 |
- # mimic OS X Leopard-style Availability.h macros for libunwind.h on |
1626 |
- # older systems |
1627 |
- [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 8 ]] && \ |
1628 |
- echo "#define __OSX_AVAILABLE_STARTING(x,y) " > include/Availability.h |
1629 |
- |
1630 |
- local VER_STR="\"@(#)PROGRAM:ld PROJECT:${LD64} (Gentoo ${PN}-${PVR})\\n\"" |
1631 |
- echo "char ldVersionString[] = ${VER_STR};" > version.cpp |
1632 |
- |
1633 |
- epatch "${FILESDIR}"/ld64-123.2-debug-backtrace.patch |
1634 |
- |
1635 |
- cd "${S}"/${CCTOOLS} |
1636 |
- epatch "${FILESDIR}"/${PN}-4.0-as.patch |
1637 |
- epatch "${FILESDIR}"/${PN}-4.2-as-dir.patch |
1638 |
- epatch "${FILESDIR}"/${PN}-3.2.3-ranlib.patch |
1639 |
- epatch "${FILESDIR}"/${PN}-3.1.1-libtool-ranlib.patch |
1640 |
- epatch "${FILESDIR}"/${PN}-3.1.1-nmedit.patch |
1641 |
- epatch "${FILESDIR}"/${PN}-3.1.1-no-headers.patch |
1642 |
- epatch "${FILESDIR}"/${PN}-4.0-no-oss-dir.patch |
1643 |
- epatch "${FILESDIR}"/${PN}-4.2-lto.patch |
1644 |
- epatch "${FILESDIR}"/${PN}-5.1-extraneous-includes.patch |
1645 |
- cp ../${LD64}/src/other/prune_trie.h include/mach-o/ || die |
1646 |
- # __darwin_i386_float_state missing on <= 10.4 |
1647 |
- cp -a ../${CCTOOLS_HEADERS}/include/mach/i386 include/mach |
1648 |
- |
1649 |
- # do not build profileable libstuff to save compile time |
1650 |
- sed -i -e "/^all:/s, profile , ," libstuff/Makefile |
1651 |
- |
1652 |
- # cctools version is provided to make via RC_ProjectSourceVersion which |
1653 |
- # generates and compiles it as apple_version[] into libstuff. From |
1654 |
- # there it's picked up by the individual tools. Since |
1655 |
- # RC_ProjectSourceVersion is also used as library version, we can't |
1656 |
- # just append our local version info. So we hack the libstuff Makefile |
1657 |
- # to include our Gentoo version. |
1658 |
- sed -i -e "/cctools-.*(RC_ProjectSourceVersion).*OFILE_DIR/s,Version),Version) (Gentoo ${PN}-${PVR})," \ |
1659 |
- libstuff/Makefile |
1660 |
- |
1661 |
- # clean up test suite |
1662 |
- cd "${S}"/${LD64}/unit-tests/test-cases |
1663 |
- local c |
1664 |
- |
1665 |
- # we don't have llvm |
1666 |
- ((++c)); rm -rf llvm-integration; |
1667 |
- |
1668 |
- # we don't have dtrace |
1669 |
- ((++c)); rm -rf dtrace-static-probes-coalescing; |
1670 |
- ((++c)); rm -rf dtrace-static-probes; |
1671 |
- |
1672 |
- # a file is missing |
1673 |
- ((++c)); rm -rf eh-coalescing-r |
1674 |
- |
1675 |
- # we don't do universal binaries |
1676 |
- ((++c)); rm -rf blank-stubs; |
1677 |
- |
1678 |
- # looks like a problem with apple's result-filter.pl |
1679 |
- ((++c)); rm -rf implicit-common3; |
1680 |
- ((++c)); rm -rf order_file-ans; |
1681 |
- |
1682 |
- # TODO no idea what goes wrong here |
1683 |
- ((++c)); rm -rf dwarf-debug-notes; |
1684 |
- |
1685 |
- einfo "Deleted $c tests that were bound to fail" |
1686 |
- |
1687 |
- cd "${S}" |
1688 |
- ebegin "cleaning Makefiles from unwanted CFLAGS" |
1689 |
- find . -name "Makefile" -print0 | xargs -0 sed \ |
1690 |
- -i \ |
1691 |
- -e 's/ -g / /g' \ |
1692 |
- -e 's/^G =.*$/G =/' \ |
1693 |
- -e 's/^OFLAG =.*$/OFLAG =/' \ |
1694 |
- -e 's/install -c -s/install/g' |
1695 |
- eend $? |
1696 |
-} |
1697 |
- |
1698 |
-src_configure() { |
1699 |
- CCTOOLS_LTO= |
1700 |
- LD64_LTO=0 |
1701 |
- if use lto ; then |
1702 |
- CCTOOLS_LTO="-DLTO_SUPPORT" |
1703 |
- LD64_LTO=1 |
1704 |
- fi |
1705 |
- |
1706 |
- # CPPFLAGS only affects ld64, cctools don't use 'em (which currently is |
1707 |
- # what we want) |
1708 |
- append-cppflags -DNDEBUG |
1709 |
- |
1710 |
- CCTOOLS_OFLAG= |
1711 |
- if [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 8 ]] ; then |
1712 |
- # cctools expect to use UNIX03 struct member names. |
1713 |
- # This is default on > 10.4. Activate it on <= 10.4 by defining |
1714 |
- # __DARWIN_UNIX03 explicitly. |
1715 |
- CCTOOLS_OFLAG="-D__DARWIN_UNIX03=1" |
1716 |
- fi |
1717 |
- |
1718 |
- cat <<EOF > ${LD64}/src/configure.h |
1719 |
-#define DEFAULT_MACOSX_MIN_VERSION "${MACOSX_DEPLOYMENT_TARGET}" |
1720 |
-EOF |
1721 |
-} |
1722 |
- |
1723 |
-compile_ld64() { |
1724 |
- einfo "building ${LD64}" |
1725 |
- cd "${S}"/${LD64}/src |
1726 |
- emake \ |
1727 |
- LTO=${LD64_LTO} \ |
1728 |
- || die "emake failed for ld64" |
1729 |
- use test && emake build_test |
1730 |
-} |
1731 |
- |
1732 |
-compile_cctools() { |
1733 |
- einfo "building ${CCTOOLS}" |
1734 |
- cd "${S}"/${CCTOOLS} |
1735 |
- # -j1 because it fails too often with weird errors |
1736 |
- emake \ |
1737 |
- LIB_PRUNETRIE="-L../../${LD64}/src -lprunetrie" \ |
1738 |
- EFITOOLS= \ |
1739 |
- LTO="${CCTOOLS_LTO}" \ |
1740 |
- COMMON_SUBDIRS='libstuff ar misc otool' \ |
1741 |
- SUBDIRS_32= \ |
1742 |
- LEGACY= \ |
1743 |
- RC_ProjectSourceVersion=${CCTOOLS_VERSION} \ |
1744 |
- RC_CFLAGS="${CFLAGS}" \ |
1745 |
- OFLAG="${CCTOOLS_OFLAG}" \ |
1746 |
- -j1 \ |
1747 |
- || die "emake failed for the cctools" |
1748 |
- cd "${S}"/${CCTOOLS}/as |
1749 |
- emake \ |
1750 |
- BUILD_OBSOLETE_ARCH= \ |
1751 |
- RC_ProjectSourceVersion=${CCTOOLS_VERSION} \ |
1752 |
- RC_CFLAGS="-DASLIBEXECDIR=\"\\\"${EPREFIX}${LIBPATH}/\\\"\" ${CFLAGS}" \ |
1753 |
- OFLAG="${CCTOOLS_OFLAG}" \ |
1754 |
- || die "emake failed for as" |
1755 |
-} |
1756 |
- |
1757 |
-src_compile() { |
1758 |
- compile_ld64 |
1759 |
- compile_cctools |
1760 |
-} |
1761 |
- |
1762 |
-install_ld64() { |
1763 |
- exeinto ${BINPATH} |
1764 |
- doexe "${S}"/${LD64}/src/{ld64,rebase,dyldinfo,unwinddump,ObjectDump} |
1765 |
- dosym ld64 ${BINPATH}/ld |
1766 |
- insinto ${DATAPATH}/man/man1 |
1767 |
- doins "${S}"/${LD64}/doc/man/man1/{ld,ld64,rebase}.1 |
1768 |
-} |
1769 |
- |
1770 |
-install_cctools() { |
1771 |
- cd "${S}"/${CCTOOLS} |
1772 |
- emake install_all_but_headers \ |
1773 |
- EFITOOLS= \ |
1774 |
- COMMON_SUBDIRS='ar misc otool' \ |
1775 |
- SUBDIRS_32= \ |
1776 |
- DSTROOT=\"${D}\" \ |
1777 |
- BINDIR=\"${EPREFIX}\"${BINPATH} \ |
1778 |
- LOCBINDIR=\"${EPREFIX}\"${BINPATH} \ |
1779 |
- USRBINDIR=\"${EPREFIX}\"${BINPATH} \ |
1780 |
- LOCLIBDIR=\"${EPREFIX}\"${LIBPATH} \ |
1781 |
- MANDIR=\"${EPREFIX}\"${DATAPATH}/man/ |
1782 |
- cd "${S}"/${CCTOOLS}/as |
1783 |
- emake install \ |
1784 |
- BUILD_OBSOLETE_ARCH= \ |
1785 |
- DSTROOT=\"${D}\" \ |
1786 |
- USRBINDIR=\"${EPREFIX}\"${BINPATH} \ |
1787 |
- LIBDIR=\"${EPREFIX}\"${LIBPATH} \ |
1788 |
- LOCLIBDIR=\"${EPREFIX}\"${LIBPATH} |
1789 |
- |
1790 |
- cd "${ED}"${BINPATH} |
1791 |
- insinto ${DATAPATH}/man/man1 |
1792 |
- local skips manpage |
1793 |
- # ar brings an up-to-date manpage with it |
1794 |
- skips=( ar ) |
1795 |
- for bin in *; do |
1796 |
- for skip in ${skips[@]}; do |
1797 |
- if [[ ${bin} == ${skip} ]]; then |
1798 |
- continue 2; |
1799 |
- fi |
1800 |
- done |
1801 |
- manpage=${S}/${CCTOOLS}/man/${bin}.1 |
1802 |
- if [[ -f "${manpage}" ]]; then |
1803 |
- doins "${manpage}" |
1804 |
- fi |
1805 |
- done |
1806 |
- insinto ${DATAPATH}/man/man5 |
1807 |
- doins "${S}"/${CCTOOLS}/man/*.5 |
1808 |
-} |
1809 |
- |
1810 |
-src_test() { |
1811 |
- if ! [ "${EPREFIX}"/usr/bin/clang ] ; then |
1812 |
- einfo "Test suite only works properly with clang - please install" |
1813 |
- return |
1814 |
- fi |
1815 |
- |
1816 |
- einfo "Running unit tests" |
1817 |
- cd "${S}"/${LD64}/unit-tests/test-cases |
1818 |
- # provide the new ld as a symlink to clang so that -ccc-install-dir |
1819 |
- # will pick it up |
1820 |
- ln -sfn ../../src/ld64 ld |
1821 |
- # use our arch command because the System's will report i386 even for an |
1822 |
- # x86_64 prefix |
1823 |
- perl ../bin/make-recursive.pl \ |
1824 |
- BUILT_PRODUCTS_DIR="${S}"/${LD64}/src \ |
1825 |
- ARCH="$(arch)" \ |
1826 |
- LD="${S}"/${LD64}/src/ld64 \ |
1827 |
- CC="clang -ccc-install-dir $PWD" \ |
1828 |
- CXX="clang++ -ccc-install-dir $PWD" \ |
1829 |
- OTOOL="${S}"/${CCTOOLS}/otool/otool.NEW \ |
1830 |
- | perl ../bin/result-filter.pl |
1831 |
-} |
1832 |
- |
1833 |
-src_install() { |
1834 |
- install_ld64 |
1835 |
- install_cctools |
1836 |
- |
1837 |
- cd "${S}" |
1838 |
- insinto /etc/env.d/binutils |
1839 |
- cat <<-EOF > env.d |
1840 |
- TARGET="${CHOST}" |
1841 |
- VER="${PV}" |
1842 |
- FAKE_TARGETS="${CHOST}" |
1843 |
- EOF |
1844 |
- newins env.d ${CHOST}-${PV} |
1845 |
-} |
1846 |
- |
1847 |
-pkg_postinst() { |
1848 |
- binutils-config ${CHOST}-${PV} |
1849 |
-} |
1850 |
|
1851 |
diff --git a/sys-devel/binutils-apple/binutils-apple-4.3-r2.ebuild b/sys-devel/binutils-apple/binutils-apple-4.3-r2.ebuild |
1852 |
index df763c4..15692ec 100644 |
1853 |
--- a/sys-devel/binutils-apple/binutils-apple-4.3-r2.ebuild |
1854 |
+++ b/sys-devel/binutils-apple/binutils-apple-4.3-r2.ebuild |
1855 |
@@ -23,7 +23,7 @@ SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz |
1856 |
http://dev.gentoo.org/~grobian/distfiles/${PN}-patches-4.3-r1.tar.bz2" |
1857 |
|
1858 |
LICENSE="APSL-2" |
1859 |
-KEYWORDS="~x64-macos ~x86-macos" |
1860 |
+KEYWORDS="~ppc-macos ~x64-macos ~x86-macos" |
1861 |
IUSE="lto test multitarget" |
1862 |
|
1863 |
RDEPEND="sys-devel/binutils-config |
1864 |
|
1865 |
diff --git a/sys-devel/binutils-apple/binutils-apple-4.3.ebuild b/sys-devel/binutils-apple/binutils-apple-4.3.ebuild |
1866 |
deleted file mode 100644 |
1867 |
index 2c51040..0000000 |
1868 |
--- a/sys-devel/binutils-apple/binutils-apple-4.3.ebuild |
1869 |
+++ /dev/null |
1870 |
@@ -1,309 +0,0 @@ |
1871 |
-# Copyright 1999-2015 Gentoo Foundation |
1872 |
-# Distributed under the terms of the GNU General Public License v2 |
1873 |
-# $Id$ |
1874 |
- |
1875 |
-EAPI="3" |
1876 |
- |
1877 |
-inherit eutils flag-o-matic toolchain-funcs |
1878 |
- |
1879 |
-RESTRICT="test" # the test suite will test what's installed. |
1880 |
- |
1881 |
-LD64=ld64-128.2 |
1882 |
-CCTOOLS=cctools-822 |
1883 |
-LIBUNWIND=libunwind-30 |
1884 |
-DYLD=dyld-195.6 |
1885 |
-# http://lists.apple.com/archives/Darwin-dev/2009/Sep/msg00025.html |
1886 |
-UNWIND=binutils-apple-3.2-unwind-patches-5 |
1887 |
- |
1888 |
-DESCRIPTION="Darwin assembler as(1) and static linker ld(1), Xcode Tools ${PV}" |
1889 |
-HOMEPAGE="http://www.opensource.apple.com/darwinsource/" |
1890 |
-SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz |
1891 |
- http://www.opensource.apple.com/tarballs/cctools/${CCTOOLS}.tar.gz |
1892 |
- http://www.opensource.apple.com/tarballs/libunwind/${LIBUNWIND}.tar.gz |
1893 |
- http://www.opensource.apple.com/tarballs/dyld/${DYLD}.tar.gz |
1894 |
- https://www.gentoo.org/~grobian/distfiles/${UNWIND}.tar.xz |
1895 |
- https://www.gentoo.org/~grobian/distfiles/libunwind-llvm-115426.tar.bz2" |
1896 |
- |
1897 |
-LICENSE="APSL-2" |
1898 |
-KEYWORDS="~x64-macos ~x86-macos" |
1899 |
-IUSE="lto test" |
1900 |
- |
1901 |
-RDEPEND="sys-devel/binutils-config |
1902 |
- lto? ( sys-devel/llvm )" |
1903 |
-DEPEND="${RDEPEND} |
1904 |
- test? ( >=dev-lang/perl-5.8.8 ) |
1905 |
- >=sys-devel/gcc-apple-4.2.1" |
1906 |
- |
1907 |
-export CTARGET=${CTARGET:-${CHOST}} |
1908 |
-if [[ ${CTARGET} == ${CHOST} ]] ; then |
1909 |
- if [[ ${CATEGORY} == cross-* ]] ; then |
1910 |
- export CTARGET=${CATEGORY#cross-} |
1911 |
- fi |
1912 |
-fi |
1913 |
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } |
1914 |
- |
1915 |
-if is_cross ; then |
1916 |
- SLOT="${CTARGET}-4" |
1917 |
-else |
1918 |
- SLOT="4" |
1919 |
-fi |
1920 |
- |
1921 |
-LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV} |
1922 |
-INCPATH=${LIBPATH}/include |
1923 |
-DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV} |
1924 |
-if is_cross ; then |
1925 |
- BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${PV} |
1926 |
-else |
1927 |
- BINPATH=/usr/${CTARGET}/binutils-bin/${PV} |
1928 |
-fi |
1929 |
- |
1930 |
-S=${WORKDIR} |
1931 |
- |
1932 |
-src_prepare() { |
1933 |
- cd "${S}"/${LIBUNWIND}/src |
1934 |
- cp "${FILESDIR}"/${LIBUNWIND}-Makefile Makefile |
1935 |
- |
1936 |
- cd "${S}"/${LD64}/src |
1937 |
- cp "${FILESDIR}"/ld64-128.2-Makefile Makefile |
1938 |
- epatch "${FILESDIR}"/ld64-127.2-lto.patch |
1939 |
- epatch "${FILESDIR}"/ld64-128.2-stdlib.patch |
1940 |
- |
1941 |
- ln -s ../../${CCTOOLS}/include |
1942 |
- cp other/prune_trie.h include/mach-o/ || die |
1943 |
- # use our own copy of lto.h, which doesn't require llvm build-env |
1944 |
- mkdir -p include/llvm-c || die |
1945 |
- cp "${WORKDIR}"/ld64-unwind/ld64-97.14-llvm-lto.h include/llvm-c/lto.h || die |
1946 |
- # make libunwind sources known |
1947 |
- ln -s ../../${LIBUNWIND}/src libunwind || die |
1948 |
- cp ../../${LIBUNWIND}/include/*.h include/ || die |
1949 |
- # mimic OS X Lion-style Availability.h macros |
1950 |
- if [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 10 ]] ; then |
1951 |
- { |
1952 |
- echo "#define __OSX_AVAILABLE_STARTING(x,y) " |
1953 |
- echo "#define __OSX_AVAILABLE_BUT_DEPRECATED(a,b,c,d) " |
1954 |
- } > include/Availability.h |
1955 |
- fi |
1956 |
- |
1957 |
- echo '' > configure.h |
1958 |
- echo '' > linker_opts |
1959 |
- local VER_STR="\"@(#)PROGRAM:ld PROJECT:${LD64} (Gentoo ${PN}-${PVR})\\n\"" |
1960 |
- echo "char ldVersionString[] = ${VER_STR};" > version.cpp |
1961 |
- |
1962 |
- epatch "${FILESDIR}"/ld64-123.2-debug-backtrace.patch |
1963 |
- if use !lto ; then |
1964 |
- sed -i -e '/#define LTO_SUPPORT 1/d' other/ObjectDump.cpp || die |
1965 |
- fi |
1966 |
- |
1967 |
- cd "${S}"/${CCTOOLS} |
1968 |
- epatch "${FILESDIR}"/${PN}-4.0-as.patch |
1969 |
- epatch "${FILESDIR}"/${PN}-4.2-as-dir.patch |
1970 |
- epatch "${FILESDIR}"/${PN}-3.2.3-ranlib.patch |
1971 |
- epatch "${FILESDIR}"/${PN}-3.1.1-libtool-ranlib.patch |
1972 |
- epatch "${FILESDIR}"/${PN}-3.1.1-nmedit.patch |
1973 |
- epatch "${FILESDIR}"/${PN}-3.1.1-no-headers.patch |
1974 |
- epatch "${FILESDIR}"/${PN}-4.0-no-oss-dir.patch |
1975 |
- epatch "${FILESDIR}"/${PN}-4.2-lto.patch |
1976 |
- |
1977 |
- local program |
1978 |
- for program in ar efitools gprof libmacho misc otool ; do |
1979 |
- VER_STR="@(#)PROGRAM:${program} PROJECT:${CCTOOLS} (Gentoo ${PN}-${PVR}) DEVELOPER:${PORTAGE_ROOT_USER} BUILT:$(date)" |
1980 |
- cat > ${program}/vers.c <<- _EOF |
1981 |
- #include <sys/cdefs.h> |
1982 |
- __IDSTRING(SGS_VERS,"${VER_STR}\n"); |
1983 |
- _EOF |
1984 |
- [[ ${program} != "libmacho" ]] && \ |
1985 |
- echo '__IDSTRING(VERS_NUM,"apple");' >> ${program}/vers.c |
1986 |
- done |
1987 |
- |
1988 |
- VER_STR="${CCTOOLS} (Gentoo ${PN}-${PVR})" |
1989 |
- echo "const char apple_version[] = \"${VER_STR}\";" \ |
1990 |
- >> as/apple_version.c || die |
1991 |
- echo "const char apple_version[] = \"${VER_STR})\";" \ |
1992 |
- >> efitools/vers.c || die |
1993 |
- echo "const char apple_version[] = \"${VER_STR})\";" \ |
1994 |
- >> ld/ld_vers.c || die |
1995 |
- echo "const char apple_version[] = \"${VER_STR})\";" \ |
1996 |
- >> misc/vers.c || die |
1997 |
- |
1998 |
- # clean up test suite |
1999 |
- cd "${S}"/${LD64} |
2000 |
-# epatch "${FILESDIR}"/${PN}-3.1.1-testsuite.patch |
2001 |
- |
2002 |
- cd "${S}"/${LD64}/unit-tests/test-cases |
2003 |
- local c |
2004 |
- |
2005 |
- # we don't have llvm |
2006 |
- ((++c)); rm -rf llvm-integration; |
2007 |
- |
2008 |
- # we don't have dtrace |
2009 |
- ((++c)); rm -rf dtrace-static-probes-coalescing; |
2010 |
- ((++c)); rm -rf dtrace-static-probes; |
2011 |
- |
2012 |
- # a file is missing |
2013 |
- ((++c)); rm -rf eh-coalescing-r |
2014 |
- |
2015 |
- # we don't do universal binaries |
2016 |
- ((++c)); rm -rf blank-stubs; |
2017 |
- |
2018 |
- # looks like a problem with apple's result-filter.pl |
2019 |
- ((++c)); rm -rf implicit-common3; |
2020 |
- ((++c)); rm -rf order_file-ans; |
2021 |
- |
2022 |
- # TODO no idea what goes wrong here |
2023 |
- ((++c)); rm -rf dwarf-debug-notes; |
2024 |
- |
2025 |
- einfo "Deleted $c tests that were bound to fail" |
2026 |
- |
2027 |
- cd "${S}" |
2028 |
- ebegin "cleaning Makefiles from unwanted CFLAGS" |
2029 |
- find . -name "Makefile" -print0 | xargs -0 sed \ |
2030 |
- -i \ |
2031 |
- -e 's/ -g / /g' \ |
2032 |
- -e 's/^OFLAG =.*$/OFLAG =/' \ |
2033 |
- -e 's/install -c -s/install/g' |
2034 |
- eend $? |
2035 |
- |
2036 |
- # -pg is used and the two are incompatible |
2037 |
- filter-flags -fomit-frame-pointer |
2038 |
-} |
2039 |
- |
2040 |
-src_configure() { |
2041 |
- tc-export CC CXX AR |
2042 |
- if use lto ; then |
2043 |
- append-cppflags -DLTO_SUPPORT |
2044 |
- append-ldflags -L"${EPREFIX}"/usr/$(get_libdir)/llvm |
2045 |
- append-libs LTO |
2046 |
- LTO=1 |
2047 |
- else |
2048 |
- append-cppflags -ULTO_SUPPORT |
2049 |
- LTO=0 |
2050 |
- fi |
2051 |
- append-cppflags -DNDEBUG |
2052 |
- append-cppflags -I"${WORKDIR}"/libunwind/include |
2053 |
-} |
2054 |
- |
2055 |
-compile_libunwind() { |
2056 |
- # not used, just for testing, and possible use in the future |
2057 |
- einfo "building ${LIBUNWIND}" |
2058 |
- cd "${S}"/${LIBUNWIND}/src |
2059 |
- emake DYLDINCS=-I../../${DYLD}/include || die |
2060 |
-} |
2061 |
- |
2062 |
-compile_ld64() { |
2063 |
- einfo "building ${LD64}" |
2064 |
- cd "${S}"/${LD64}/src |
2065 |
- # remove antiquated copy that's available on any OSX system and |
2066 |
- # breaks ld64 compilation |
2067 |
- mv include/mach-o/dyld.h{,.disable} |
2068 |
- emake \ |
2069 |
- LTO=${LTO} \ |
2070 |
- CFLAGS="${CFLAGS}" \ |
2071 |
- CXXFLAGS="${CXXFLAGS} -I../../${DYLD}/include" \ |
2072 |
- LDFLAGS="${LDFLAGS} ${LIBS}" \ |
2073 |
- || die "emake failed for ld64" |
2074 |
- use test && emake build_test |
2075 |
- # restore, it's necessary for cctools' install |
2076 |
- mv include/mach-o/dyld.h{.disable,} |
2077 |
-} |
2078 |
- |
2079 |
-compile_cctools() { |
2080 |
- einfo "building ${CCTOOLS}" |
2081 |
- cd "${S}"/${CCTOOLS} |
2082 |
- # -j1 because it fails too often with weird errors |
2083 |
- emake \ |
2084 |
- LIB_PRUNETRIE="-L../../${LD64}/src -lprunetrie" \ |
2085 |
- EFITOOLS= LTO= \ |
2086 |
- COMMON_SUBDIRS='libstuff ar misc otool' \ |
2087 |
- SUBDIRS_32= \ |
2088 |
- RC_CFLAGS="${CFLAGS}" OFLAG="${CFLAGS}" \ |
2089 |
- -j1 \ |
2090 |
- || die "emake failed for the cctools" |
2091 |
- cd "${S}"/${CCTOOLS}/as |
2092 |
- emake \ |
2093 |
- BUILD_OBSOLETE_ARCH= \ |
2094 |
- RC_CFLAGS="-DASLIBEXECDIR=\"\\\"${EPREFIX}${LIBPATH}/\\\"\" ${CFLAGS}" \ |
2095 |
- || die "emake failed for as" |
2096 |
-} |
2097 |
- |
2098 |
-src_compile() { |
2099 |
- compile_ld64 |
2100 |
- compile_cctools |
2101 |
-} |
2102 |
- |
2103 |
-install_ld64() { |
2104 |
- exeinto ${BINPATH} |
2105 |
- doexe "${S}"/${LD64}/src/{ld64,rebase,dyldinfo,unwinddump,ObjectDump} |
2106 |
- dosym ld64 ${BINPATH}/ld |
2107 |
- insinto ${DATAPATH}/man/man1 |
2108 |
- doins "${S}"/${LD64}/doc/man/man1/{ld,ld64,rebase}.1 |
2109 |
-} |
2110 |
- |
2111 |
-install_cctools() { |
2112 |
- cd "${S}"/${CCTOOLS} |
2113 |
- emake install_all_but_headers \ |
2114 |
- EFITOOLS= LTO= \ |
2115 |
- COMMON_SUBDIRS='ar misc otool' \ |
2116 |
- SUBDIRS_32= \ |
2117 |
- RC_CFLAGS="${CFLAGS}" OFLAG="${CFLAGS}" \ |
2118 |
- DSTROOT=\"${D}\" \ |
2119 |
- BINDIR=\"${EPREFIX}\"${BINPATH} \ |
2120 |
- LOCBINDIR=\"${EPREFIX}\"${BINPATH} \ |
2121 |
- USRBINDIR=\"${EPREFIX}\"${BINPATH} \ |
2122 |
- LOCLIBDIR=\"${EPREFIX}\"${LIBPATH} \ |
2123 |
- MANDIR=\"${EPREFIX}\"${DATAPATH}/man/ |
2124 |
- cd "${S}"/${CCTOOLS}/as |
2125 |
- emake install \ |
2126 |
- BUILD_OBSOLETE_ARCH= \ |
2127 |
- DSTROOT=\"${D}\" \ |
2128 |
- USRBINDIR=\"${EPREFIX}\"${BINPATH} \ |
2129 |
- LIBDIR=\"${EPREFIX}\"${LIBPATH} \ |
2130 |
- LOCLIBDIR=\"${EPREFIX}\"${LIBPATH} |
2131 |
- |
2132 |
- cd "${ED}"${BINPATH} |
2133 |
- insinto ${DATAPATH}/man/man1 |
2134 |
- local skips manpage |
2135 |
- # ar brings an up-to-date manpage with it |
2136 |
- skips=( ar ) |
2137 |
- for bin in *; do |
2138 |
- for skip in ${skips[@]}; do |
2139 |
- if [[ ${bin} == ${skip} ]]; then |
2140 |
- continue 2; |
2141 |
- fi |
2142 |
- done |
2143 |
- manpage=${S}/${CCTOOLS}/man/${bin}.1 |
2144 |
- if [[ -f "${manpage}" ]]; then |
2145 |
- doins "${manpage}" |
2146 |
- fi |
2147 |
- done |
2148 |
- insinto ${DATAPATH}/man/man5 |
2149 |
- doins "${S}"/${CCTOOLS}/man/*.5 |
2150 |
-} |
2151 |
- |
2152 |
-src_test() { |
2153 |
- einfo "Running unit tests" |
2154 |
- cd "${S}"/${LD64}/unit-tests/test-cases |
2155 |
- # need host arch, since GNU arch doesn't do what Apple's does |
2156 |
- tc-export CC CXX |
2157 |
- perl ../bin/make-recursive.pl \ |
2158 |
- ARCH="$(/usr/bin/arch)" \ |
2159 |
- RELEASEDIR="${S}"/${LD64}/src \ |
2160 |
- | perl ../bin/result-filter.pl |
2161 |
-} |
2162 |
- |
2163 |
-src_install() { |
2164 |
- install_ld64 |
2165 |
- install_cctools |
2166 |
- |
2167 |
- cd "${S}" |
2168 |
- insinto /etc/env.d/binutils |
2169 |
- cat <<-EOF > env.d |
2170 |
- TARGET="${CHOST}" |
2171 |
- VER="${PV}" |
2172 |
- FAKE_TARGETS="${CHOST}" |
2173 |
- EOF |
2174 |
- newins env.d ${CHOST}-${PV} |
2175 |
-} |
2176 |
- |
2177 |
-pkg_postinst() { |
2178 |
- binutils-config ${CHOST}-${PV} |
2179 |
-} |
2180 |
|
2181 |
diff --git a/sys-devel/binutils-apple/binutils-apple-5.1-r1.ebuild b/sys-devel/binutils-apple/binutils-apple-5.1-r1.ebuild |
2182 |
index 397aaa6..9e3d115 100644 |
2183 |
--- a/sys-devel/binutils-apple/binutils-apple-5.1-r1.ebuild |
2184 |
+++ b/sys-devel/binutils-apple/binutils-apple-5.1-r1.ebuild |
2185 |
@@ -22,7 +22,7 @@ SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz |
2186 |
http://dev.gentoo.org/~grobian/distfiles/${PN}-patches-5.1-r2.tar.bz2" |
2187 |
|
2188 |
LICENSE="APSL-2" |
2189 |
-KEYWORDS="~x64-macos ~x86-macos" |
2190 |
+KEYWORDS="~ppc-macos ~x64-macos ~x86-macos" |
2191 |
IUSE="lto test libcxx multitarget" |
2192 |
|
2193 |
RDEPEND="sys-devel/binutils-config |
2194 |
|
2195 |
diff --git a/sys-devel/binutils-apple/binutils-apple-5.1.ebuild b/sys-devel/binutils-apple/binutils-apple-5.1.ebuild |
2196 |
deleted file mode 100644 |
2197 |
index d6355c4..0000000 |
2198 |
--- a/sys-devel/binutils-apple/binutils-apple-5.1.ebuild |
2199 |
+++ /dev/null |
2200 |
@@ -1,356 +0,0 @@ |
2201 |
-# Copyright 1999-2015 Gentoo Foundation |
2202 |
-# Distributed under the terms of the GNU General Public License v2 |
2203 |
-# $Id$ |
2204 |
- |
2205 |
-EAPI="3" |
2206 |
- |
2207 |
-inherit eutils flag-o-matic toolchain-funcs |
2208 |
- |
2209 |
-LD64=ld64-236.3 |
2210 |
-CCTOOLS_VERSION=855 |
2211 |
-CCTOOLS=cctools-${CCTOOLS_VERSION} |
2212 |
-LIBUNWIND=libunwind-35.3 |
2213 |
-DYLD=dyld-353.2.1 |
2214 |
- |
2215 |
-DESCRIPTION="Darwin assembler as(1) and static linker ld(1), Xcode Tools ${PV}" |
2216 |
-HOMEPAGE="http://www.opensource.apple.com/darwinsource/" |
2217 |
-SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz |
2218 |
- http://www.opensource.apple.com/tarballs/cctools/${CCTOOLS}.tar.gz |
2219 |
- http://www.opensource.apple.com/tarballs/dyld/${DYLD}.tar.gz |
2220 |
- http://www.opensource.apple.com/tarballs/libunwind/${LIBUNWIND}.tar.gz" |
2221 |
- |
2222 |
-LICENSE="APSL-2" |
2223 |
-KEYWORDS="~x64-macos ~x86-macos" |
2224 |
-IUSE="lto test libcxx" |
2225 |
- |
2226 |
-RDEPEND="sys-devel/binutils-config |
2227 |
- lto? ( sys-devel/llvm ) |
2228 |
- libcxx? ( sys-libs/libcxx )" |
2229 |
-DEPEND="${RDEPEND} |
2230 |
- test? ( >=dev-lang/perl-5.8.8 ) |
2231 |
- || ( >=sys-devel/gcc-apple-4.2.1 sys-devel/llvm ) |
2232 |
- libcxx? ( sys-devel/llvm )" |
2233 |
- |
2234 |
-export CTARGET=${CTARGET:-${CHOST}} |
2235 |
-if [[ ${CTARGET} == ${CHOST} ]] ; then |
2236 |
- if [[ ${CATEGORY} == cross-* ]] ; then |
2237 |
- export CTARGET=${CATEGORY#cross-} |
2238 |
- fi |
2239 |
-fi |
2240 |
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } |
2241 |
- |
2242 |
-if is_cross ; then |
2243 |
- SLOT="${CTARGET}-5" |
2244 |
-else |
2245 |
- SLOT="5" |
2246 |
-fi |
2247 |
- |
2248 |
-LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV} |
2249 |
-INCPATH=${LIBPATH}/include |
2250 |
-DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV} |
2251 |
-if is_cross ; then |
2252 |
- BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${PV} |
2253 |
-else |
2254 |
- BINPATH=/usr/${CTARGET}/binutils-bin/${PV} |
2255 |
-fi |
2256 |
- |
2257 |
-S=${WORKDIR} |
2258 |
- |
2259 |
-src_prepare() { |
2260 |
- cd "${S}"/${LD64}/src |
2261 |
- cp "${FILESDIR}"/ld64-136-compile_stubs.h ld/compile_stubs.h |
2262 |
- cp "${FILESDIR}"/ld64-236.3-Makefile Makefile |
2263 |
- |
2264 |
- epatch "${FILESDIR}"/ld64-236.3-nolto.patch |
2265 |
- epatch "${FILESDIR}"/ld64-241.9-extraneous-includes.patch |
2266 |
- epatch "${FILESDIR}"/ld64-241.9-atomic-volatile.patch |
2267 |
- epatch "${FILESDIR}"/ld64-236.3-arm64-fixup.patch |
2268 |
- epatch "${FILESDIR}"/ld64-241.9-arm64-cputype.patch |
2269 |
- epatch "${FILESDIR}"/ld64-236.3-crashreporter.patch |
2270 |
- epatch "${FILESDIR}"/ld64-236.3-gcc.patch |
2271 |
- epatch "${FILESDIR}"/ld64-236.3-constant-types.patch |
2272 |
- epatch "${FILESDIR}"/ld64-236.3-nosnapshots.patch |
2273 |
- epatch "${FILESDIR}"/ld64-236.3-noppc.patch |
2274 |
- epatch "${FILESDIR}"/ld64-236.3-noarm.patch |
2275 |
- epatch "${FILESDIR}"/ld64-241.9-register-names.patch |
2276 |
- epatch "${FILESDIR}"/ld64-241.9-get-comm-align.patch |
2277 |
- epatch "${FILESDIR}"/ld64-241.9-cc_md5.patch |
2278 |
- |
2279 |
- # We used to use our own copy of lto.h, which doesn't require llvm |
2280 |
- # build-env. Current versions of llvm provide |
2281 |
- # $EPREFIX/usr/include/llvm-c/lto.h as well as |
2282 |
- # $EPREFIX/usr/lib/libLTO.{so,dylib}, so we just use these. |
2283 |
- |
2284 |
- # provide missing headers from libunwind and dyld |
2285 |
- mkdir -p include/{mach,mach-o/arm} || die |
2286 |
- # never present because it's private |
2287 |
- cp ../../${DYLD}/include/mach-o/dyld_priv.h include/mach-o || die |
2288 |
- # missing on <= 10.5 |
2289 |
- cp ../../${LIBUNWIND}/include/libunwind.h include/ || die |
2290 |
- cp ../../${LIBUNWIND}/include/mach-o/compact_unwind_encoding.h include/mach-o || die |
2291 |
- # missing on <= 10.4 |
2292 |
- cp ../../${DYLD}/include/mach-o/dyld_images.h include/mach-o || die |
2293 |
- cp ../../${CCTOOLS}/include/mach-o/loader.h include/mach-o || die |
2294 |
- # use copies from cctools because they're otherwise hidden in some SDK |
2295 |
- cp ../../${CCTOOLS}/include/mach-o/arm/reloc.h include/mach-o/arm || die |
2296 |
- # provide all required CPU_TYPEs on all platforms |
2297 |
- cp ../../${CCTOOLS}/include/mach/machine.h include/mach/machine.h |
2298 |
- # add alias for newer identifiers, because ld64 uses both but cctools |
2299 |
- # header only defines the older |
2300 |
- epatch "${FILESDIR}"/ld64-236.3-missing-cputypes.patch |
2301 |
- |
2302 |
- # mimic OS X Leopard-style Availability.h macros for libunwind.h on |
2303 |
- # older systems |
2304 |
- [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 8 ]] && \ |
2305 |
- echo "#define __OSX_AVAILABLE_STARTING(x,y) " > include/Availability.h |
2306 |
- |
2307 |
- local VER_STR="\"@(#)PROGRAM:ld PROJECT:${LD64} (Gentoo ${PN}-${PVR})\\n\"" |
2308 |
- echo "char ldVersionString[] = ${VER_STR};" > version.cpp |
2309 |
- |
2310 |
- epatch "${FILESDIR}"/ld64-123.2-debug-backtrace.patch |
2311 |
- |
2312 |
- cd "${S}"/${CCTOOLS} |
2313 |
- epatch "${FILESDIR}"/${PN}-4.5-as.patch |
2314 |
- epatch "${FILESDIR}"/${PN}-5.1-as-dir.patch |
2315 |
- epatch "${FILESDIR}"/${PN}-5.1-ranlib.patch |
2316 |
- epatch "${FILESDIR}"/${PN}-3.1.1-libtool-ranlib.patch |
2317 |
- epatch "${FILESDIR}"/${PN}-3.1.1-no-headers.patch |
2318 |
- epatch "${FILESDIR}"/${PN}-4.0-no-oss-dir.patch |
2319 |
- epatch "${FILESDIR}"/${PN}-5.1-nolto.patch |
2320 |
- epatch "${FILESDIR}"/cctools-839-intel-retf.patch |
2321 |
- epatch "${FILESDIR}"/${PN}-5.1-extraneous-includes.patch |
2322 |
- epatch "${FILESDIR}"/${PN}-5.1-otool-stdc.patch |
2323 |
- epatch "${FILESDIR}"/${PN}-5.1-constant-types.patch |
2324 |
- epatch "${FILESDIR}"/${PN}-5.1-strnlen.patch |
2325 |
- cp ../${LD64}/src/other/prune_trie.h include/mach-o/ || die |
2326 |
- |
2327 |
- # do not build profileable libstuff to save compile time |
2328 |
- sed -i -e "/^all:/s, profile , ," libstuff/Makefile |
2329 |
- |
2330 |
- # cctools version is provided to make via RC_ProjectSourceVersion which |
2331 |
- # generates and compiles it as apple_version[] into libstuff. From |
2332 |
- # there it's picked up by the individual tools. Since |
2333 |
- # RC_ProjectSourceVersion is also used as library version, we can't |
2334 |
- # just append our local version info. So we hack the libstuff Makefile |
2335 |
- # to include our Gentoo version. |
2336 |
- sed -i -e "/cctools-.*(RC_ProjectSourceVersion).*OFILE_DIR/s,Version),Version) (Gentoo ${PN}-${PVR})," \ |
2337 |
- libstuff/Makefile |
2338 |
- |
2339 |
- # clean up test suite |
2340 |
- cd "${S}"/${LD64}/unit-tests/test-cases |
2341 |
- local c |
2342 |
- |
2343 |
- # we don't have llvm |
2344 |
- ((++c)); rm -rf llvm-integration; |
2345 |
- |
2346 |
- # we don't have dtrace |
2347 |
- ((++c)); rm -rf dtrace-static-probes-coalescing; |
2348 |
- ((++c)); rm -rf dtrace-static-probes; |
2349 |
- |
2350 |
- # a file is missing |
2351 |
- ((++c)); rm -rf eh-coalescing-r |
2352 |
- |
2353 |
- # we don't do universal binaries |
2354 |
- ((++c)); rm -rf blank-stubs; |
2355 |
- |
2356 |
- # looks like a problem with apple's result-filter.pl |
2357 |
- ((++c)); rm -rf implicit-common3; |
2358 |
- ((++c)); rm -rf order_file-ans; |
2359 |
- |
2360 |
- # TODO no idea what goes wrong here |
2361 |
- ((++c)); rm -rf dwarf-debug-notes; |
2362 |
- |
2363 |
- einfo "Deleted $c tests that were bound to fail" |
2364 |
- |
2365 |
- cd "${S}" |
2366 |
- ebegin "cleaning Makefiles from unwanted CFLAGS" |
2367 |
- find . -name "Makefile" -print0 | xargs -0 sed \ |
2368 |
- -i \ |
2369 |
- -e 's/ -g / /g' \ |
2370 |
- -e 's/^G =.*$/G =/' \ |
2371 |
- -e 's/^OFLAG =.*$/OFLAG =/' \ |
2372 |
- -e 's/install -c -s/install/g' |
2373 |
- eend $? |
2374 |
-} |
2375 |
- |
2376 |
-src_configure() { |
2377 |
- CCTOOLS_LTO= |
2378 |
- LD64_LTO=0 |
2379 |
- if use lto ; then |
2380 |
- CCTOOLS_LTO="-DLTO_SUPPORT" |
2381 |
- LD64_LTO=1 |
2382 |
- fi |
2383 |
- |
2384 |
- if [ "${CXX/*clang*/yes}" = "yes" ] ; then |
2385 |
- if use libcxx ; then |
2386 |
- append-cxxflags -stdlib=libc++ |
2387 |
- CXXLIB=-stdlib=libc++ |
2388 |
- else |
2389 |
- # force libstdc++ for systems where libc++ is default (OS X 10.9+?) |
2390 |
- append-cxxflags -stdlib=libstdc++ |
2391 |
- CXXLIB=-stdlib=libstdc++ |
2392 |
- fi |
2393 |
- else |
2394 |
- use libcxx && \ |
2395 |
- ewarn "libcxx only available with clang and your C++ compiler ($CXX) does not seem to be clang" |
2396 |
- fi |
2397 |
- |
2398 |
- # CPPFLAGS only affects ld64, cctools don't use 'em (which currently is |
2399 |
- # what we want) |
2400 |
- append-cppflags -DNDEBUG |
2401 |
- |
2402 |
- # Block API and thus snapshots supported on >= 10.6 |
2403 |
- [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -ge 10 ]] && \ |
2404 |
- append-cppflags -DSUPPORT_SNAPSHOTS |
2405 |
- |
2406 |
- CCTOOLS_OFLAG= |
2407 |
- if [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 8 ]] ; then |
2408 |
- # cctools expect to use UNIX03 struct member names. |
2409 |
- # This is default on > 10.4. Activate it on <= 10.4 by defining |
2410 |
- # __DARWIN_UNIX03 explicitly. |
2411 |
- CCTOOLS_OFLAG="-D__DARWIN_UNIX03=1" |
2412 |
- fi |
2413 |
- |
2414 |
- # Create configure.h for ld64 with SUPPORT_ARCH_<arch> defines in it. |
2415 |
- # RC_SUPPORTED_ARCHS="i386 x86_64 x86_64h armv6 ..." can be used to |
2416 |
- # override architectures (there are more arms to add) but we configure |
2417 |
- # with the default to be in line with Xcode's ld. |
2418 |
- DERIVED_FILE_DIR=${LD64}/src \ |
2419 |
- RC_SUPPORTED_ARCHS="" \ |
2420 |
- ${LD64}/src/create_configure |
2421 |
-} |
2422 |
- |
2423 |
-compile_ld64() { |
2424 |
- einfo "building ${LD64}" |
2425 |
- cd "${S}"/${LD64}/src |
2426 |
- emake \ |
2427 |
- LTO=${LD64_LTO} \ |
2428 |
- || die "emake failed for ld64" |
2429 |
- use test && emake build_test |
2430 |
-} |
2431 |
- |
2432 |
-compile_cctools() { |
2433 |
- einfo "building ${CCTOOLS}" |
2434 |
- cd "${S}"/${CCTOOLS} |
2435 |
- # -j1 because it fails too often with weird errors |
2436 |
- # Suppress running dsymutil because it will warn about missing debug |
2437 |
- # info which is expected when compiling without -g as we normally do. |
2438 |
- # This might need some more thought if anyone ever wanted to build us |
2439 |
- # for debugging with Apple's tools. |
2440 |
- emake \ |
2441 |
- LIB_PRUNETRIE="-L../../${LD64}/src -lprunetrie" \ |
2442 |
- EFITOOLS= \ |
2443 |
- LTO="${CCTOOLS_LTO}" \ |
2444 |
- COMMON_SUBDIRS='libstuff ar misc otool' \ |
2445 |
- SUBDIRS_32= \ |
2446 |
- LEGACY= \ |
2447 |
- RC_ProjectSourceVersion=${CCTOOLS_VERSION} \ |
2448 |
- RC_CFLAGS="${CFLAGS}" \ |
2449 |
- OFLAG="${CCTOOLS_OFLAG}" \ |
2450 |
- CXXLIB="${CXXLIB}" \ |
2451 |
- DSYMUTIL=": disabled: dsymutil" \ |
2452 |
- -j1 \ |
2453 |
- || die "emake failed for the cctools" |
2454 |
- cd "${S}"/${CCTOOLS}/as |
2455 |
- emake \ |
2456 |
- BUILD_OBSOLETE_ARCH= \ |
2457 |
- RC_ProjectSourceVersion=${CCTOOLS_VERSION} \ |
2458 |
- RC_CFLAGS="-DASLIBEXECDIR=\"\\\"${EPREFIX}${LIBPATH}/\\\"\" ${CFLAGS}" \ |
2459 |
- OFLAG="${CCTOOLS_OFLAG}" \ |
2460 |
- DSYMUTIL=": disabled: dsymutil" \ |
2461 |
- || die "emake failed for as" |
2462 |
-} |
2463 |
- |
2464 |
-src_compile() { |
2465 |
- compile_ld64 |
2466 |
- compile_cctools |
2467 |
-} |
2468 |
- |
2469 |
-install_ld64() { |
2470 |
- exeinto ${BINPATH} |
2471 |
- doexe "${S}"/${LD64}/src/{ld64,rebase,dyldinfo,unwinddump,ObjectDump} |
2472 |
- dosym ld64 ${BINPATH}/ld |
2473 |
- insinto ${DATAPATH}/man/man1 |
2474 |
- doins "${S}"/${LD64}/doc/man/man1/{ld,ld64,rebase}.1 |
2475 |
-} |
2476 |
- |
2477 |
-install_cctools() { |
2478 |
- cd "${S}"/${CCTOOLS} |
2479 |
- emake install_all_but_headers \ |
2480 |
- EFITOOLS= \ |
2481 |
- COMMON_SUBDIRS='ar misc otool' \ |
2482 |
- SUBDIRS_32= \ |
2483 |
- DSTROOT=\"${D}\" \ |
2484 |
- BINDIR=\"${EPREFIX}\"${BINPATH} \ |
2485 |
- LOCBINDIR=\"${EPREFIX}\"${BINPATH} \ |
2486 |
- USRBINDIR=\"${EPREFIX}\"${BINPATH} \ |
2487 |
- LOCLIBDIR=\"${EPREFIX}\"${LIBPATH} \ |
2488 |
- MANDIR=\"${EPREFIX}\"${DATAPATH}/man/ |
2489 |
- cd "${S}"/${CCTOOLS}/as |
2490 |
- emake install \ |
2491 |
- BUILD_OBSOLETE_ARCH= \ |
2492 |
- DSTROOT=\"${D}\" \ |
2493 |
- USRBINDIR=\"${EPREFIX}\"${BINPATH} \ |
2494 |
- LIBDIR=\"${EPREFIX}\"${LIBPATH} \ |
2495 |
- LOCLIBDIR=\"${EPREFIX}\"${LIBPATH} |
2496 |
- |
2497 |
- cd "${ED}"${BINPATH} |
2498 |
- insinto ${DATAPATH}/man/man1 |
2499 |
- local skips manpage |
2500 |
- # ar brings an up-to-date manpage with it |
2501 |
- skips=( ar ) |
2502 |
- for bin in *; do |
2503 |
- for skip in ${skips[@]}; do |
2504 |
- if [[ ${bin} == ${skip} ]]; then |
2505 |
- continue 2; |
2506 |
- fi |
2507 |
- done |
2508 |
- manpage=${S}/${CCTOOLS}/man/${bin}.1 |
2509 |
- if [[ -f "${manpage}" ]]; then |
2510 |
- doins "${manpage}" |
2511 |
- fi |
2512 |
- done |
2513 |
- insinto ${DATAPATH}/man/man5 |
2514 |
- doins "${S}"/${CCTOOLS}/man/*.5 |
2515 |
-} |
2516 |
- |
2517 |
-src_test() { |
2518 |
- if ! [ "${EPREFIX}"/usr/bin/clang ] ; then |
2519 |
- einfo "Test suite only works properly with clang - please install" |
2520 |
- return |
2521 |
- fi |
2522 |
- |
2523 |
- einfo "Running unit tests" |
2524 |
- cd "${S}"/${LD64}/unit-tests/test-cases |
2525 |
- # provide the new ld as a symlink to clang so that -ccc-install-dir |
2526 |
- # will pick it up |
2527 |
- ln -sfn ../../src/ld64 ld |
2528 |
- # use our arch command because the System's will report i386 even for an |
2529 |
- # x86_64 prefix |
2530 |
- perl ../bin/make-recursive.pl \ |
2531 |
- BUILT_PRODUCTS_DIR="${S}"/${LD64}/src \ |
2532 |
- ARCH="$(arch)" \ |
2533 |
- LD="${S}"/${LD64}/src/ld64 \ |
2534 |
- CC="clang -ccc-install-dir $PWD" \ |
2535 |
- CXX="clang++ -ccc-install-dir $PWD" \ |
2536 |
- OTOOL="${S}"/${CCTOOLS}/otool/otool.NEW \ |
2537 |
- | perl ../bin/result-filter.pl |
2538 |
-} |
2539 |
- |
2540 |
-src_install() { |
2541 |
- install_ld64 |
2542 |
- install_cctools |
2543 |
- |
2544 |
- cd "${S}" |
2545 |
- insinto /etc/env.d/binutils |
2546 |
- cat <<-EOF > env.d |
2547 |
- TARGET="${CHOST}" |
2548 |
- VER="${PV}" |
2549 |
- FAKE_TARGETS="${CHOST}" |
2550 |
- EOF |
2551 |
- newins env.d ${CHOST}-${PV} |
2552 |
-} |
2553 |
- |
2554 |
-pkg_postinst() { |
2555 |
- binutils-config ${CHOST}-${PV} |
2556 |
-} |
2557 |
|
2558 |
diff --git a/sys-devel/binutils-apple/binutils-apple-6.1-r1.ebuild b/sys-devel/binutils-apple/binutils-apple-6.1-r1.ebuild |
2559 |
index f588fad..b85a90c 100644 |
2560 |
--- a/sys-devel/binutils-apple/binutils-apple-6.1-r1.ebuild |
2561 |
+++ b/sys-devel/binutils-apple/binutils-apple-6.1-r1.ebuild |
2562 |
@@ -23,7 +23,7 @@ SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz |
2563 |
http://dev.gentoo.org/~grobian/distfiles/${PN}-patches-6.1-r1.tar.bz2" |
2564 |
|
2565 |
LICENSE="APSL-2" |
2566 |
-KEYWORDS="~x64-macos ~x86-macos" |
2567 |
+KEYWORDS="~ppc-macos ~x64-macos ~x86-macos" |
2568 |
IUSE="lto test libcxx multitarget" |
2569 |
|
2570 |
RDEPEND="sys-devel/binutils-config |
2571 |
|
2572 |
diff --git a/sys-devel/binutils-apple/binutils-apple-6.1.ebuild b/sys-devel/binutils-apple/binutils-apple-6.1.ebuild |
2573 |
deleted file mode 100644 |
2574 |
index 7554c4e..0000000 |
2575 |
--- a/sys-devel/binutils-apple/binutils-apple-6.1.ebuild |
2576 |
+++ /dev/null |
2577 |
@@ -1,355 +0,0 @@ |
2578 |
-# Copyright 1999-2015 Gentoo Foundation |
2579 |
-# Distributed under the terms of the GNU General Public License v2 |
2580 |
-# $Id$ |
2581 |
- |
2582 |
-EAPI="3" |
2583 |
- |
2584 |
-inherit eutils flag-o-matic toolchain-funcs |
2585 |
- |
2586 |
-LD64=ld64-241.9 |
2587 |
-CCTOOLS_VERSION=862 |
2588 |
-CCTOOLS=cctools-${CCTOOLS_VERSION} |
2589 |
-LIBUNWIND=libunwind-35.3 |
2590 |
-DYLD=dyld-353.2.1 |
2591 |
- |
2592 |
-DESCRIPTION="Darwin assembler as(1) and static linker ld(1), Xcode Tools ${PV}" |
2593 |
-HOMEPAGE="http://www.opensource.apple.com/darwinsource/" |
2594 |
-SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz |
2595 |
- http://www.opensource.apple.com/tarballs/cctools/${CCTOOLS}.tar.gz |
2596 |
- http://www.opensource.apple.com/tarballs/dyld/${DYLD}.tar.gz |
2597 |
- http://www.opensource.apple.com/tarballs/libunwind/${LIBUNWIND}.tar.gz" |
2598 |
- |
2599 |
-LICENSE="APSL-2" |
2600 |
-KEYWORDS="~x64-macos ~x86-macos" |
2601 |
-IUSE="lto test libcxx" |
2602 |
- |
2603 |
-RDEPEND="sys-devel/binutils-config |
2604 |
- lto? ( sys-devel/llvm ) |
2605 |
- libcxx? ( sys-libs/libcxx )" |
2606 |
-DEPEND="${RDEPEND} |
2607 |
- test? ( >=dev-lang/perl-5.8.8 ) |
2608 |
- || ( >=sys-devel/gcc-apple-4.2.1 sys-devel/llvm ) |
2609 |
- libcxx? ( sys-devel/llvm )" |
2610 |
- |
2611 |
-export CTARGET=${CTARGET:-${CHOST}} |
2612 |
-if [[ ${CTARGET} == ${CHOST} ]] ; then |
2613 |
- if [[ ${CATEGORY} == cross-* ]] ; then |
2614 |
- export CTARGET=${CATEGORY#cross-} |
2615 |
- fi |
2616 |
-fi |
2617 |
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } |
2618 |
- |
2619 |
-if is_cross ; then |
2620 |
- SLOT="${CTARGET}-6" |
2621 |
-else |
2622 |
- SLOT="6" |
2623 |
-fi |
2624 |
- |
2625 |
-LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV} |
2626 |
-INCPATH=${LIBPATH}/include |
2627 |
-DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV} |
2628 |
-if is_cross ; then |
2629 |
- BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${PV} |
2630 |
-else |
2631 |
- BINPATH=/usr/${CTARGET}/binutils-bin/${PV} |
2632 |
-fi |
2633 |
- |
2634 |
-S=${WORKDIR} |
2635 |
- |
2636 |
-src_prepare() { |
2637 |
- cd "${S}"/${LD64}/src |
2638 |
- cp "${FILESDIR}"/ld64-136-compile_stubs.h ld/compile_stubs.h |
2639 |
- cp "${FILESDIR}"/ld64-236.3-Makefile Makefile |
2640 |
- |
2641 |
- epatch "${FILESDIR}"/ld64-236.3-nolto.patch |
2642 |
- epatch "${FILESDIR}"/ld64-241.9-extraneous-includes.patch |
2643 |
- epatch "${FILESDIR}"/ld64-241.9-atomic-volatile.patch |
2644 |
- epatch "${FILESDIR}"/ld64-241.9-arm64-cputype.patch |
2645 |
- epatch "${FILESDIR}"/ld64-236.3-crashreporter.patch |
2646 |
- epatch "${FILESDIR}"/ld64-241.9-gcc.patch |
2647 |
- epatch "${FILESDIR}"/ld64-236.3-constant-types.patch |
2648 |
- epatch "${FILESDIR}"/ld64-241.9-nosnapshots.patch |
2649 |
- epatch "${FILESDIR}"/ld64-241.9-noarm.patch |
2650 |
- epatch "${FILESDIR}"/ld64-241.9-register-names.patch |
2651 |
- epatch "${FILESDIR}"/ld64-241.9-get-comm-align.patch |
2652 |
- epatch "${FILESDIR}"/ld64-241.9-cc_md5.patch |
2653 |
- epatch "${FILESDIR}"/ld64-241.9-lto-noremarks.patch |
2654 |
- |
2655 |
- # We used to use our own copy of lto.h, which doesn't require llvm |
2656 |
- # build-env. Current versions of llvm provide |
2657 |
- # $EPREFIX/usr/include/llvm-c/lto.h as well as |
2658 |
- # $EPREFIX/usr/lib/libLTO.{so,dylib}, so we just use these. |
2659 |
- |
2660 |
- # provide missing headers from libunwind and dyld |
2661 |
- mkdir -p include/{mach,mach-o/arm} || die |
2662 |
- # never present because it's private |
2663 |
- cp ../../${DYLD}/include/mach-o/dyld_priv.h include/mach-o || die |
2664 |
- # missing on <= 10.5 |
2665 |
- cp ../../${LIBUNWIND}/include/libunwind.h include/ || die |
2666 |
- cp ../../${LIBUNWIND}/include/mach-o/compact_unwind_encoding.h include/mach-o || die |
2667 |
- # missing on <= 10.4 |
2668 |
- cp ../../${DYLD}/include/mach-o/dyld_images.h include/mach-o || die |
2669 |
- cp ../../${CCTOOLS}/include/mach-o/loader.h include/mach-o || die |
2670 |
- # use copies from cctools because they're otherwise hidden in some SDK |
2671 |
- cp ../../${CCTOOLS}/include/mach-o/arm/reloc.h include/mach-o/arm || die |
2672 |
- # provide all required CPU_TYPEs on all platforms |
2673 |
- cp ../../${CCTOOLS}/include/mach/machine.h include/mach/machine.h |
2674 |
- # add alias for newer identifiers, because ld64 uses both but cctools |
2675 |
- # header only defines the older |
2676 |
- epatch "${FILESDIR}"/ld64-236.3-missing-cputypes.patch |
2677 |
- |
2678 |
- # mimic OS X Leopard-style Availability.h macros for libunwind.h on |
2679 |
- # older systems |
2680 |
- [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 8 ]] && \ |
2681 |
- echo "#define __OSX_AVAILABLE_STARTING(x,y) " > include/Availability.h |
2682 |
- |
2683 |
- local VER_STR="\"@(#)PROGRAM:ld PROJECT:${LD64} (Gentoo ${PN}-${PVR})\\n\"" |
2684 |
- echo "char ldVersionString[] = ${VER_STR};" > version.cpp |
2685 |
- |
2686 |
- epatch "${FILESDIR}"/ld64-123.2-debug-backtrace.patch |
2687 |
- |
2688 |
- cd "${S}"/${CCTOOLS} |
2689 |
- epatch "${FILESDIR}"/${PN}-4.5-as.patch |
2690 |
- epatch "${FILESDIR}"/${PN}-5.1-as-dir.patch |
2691 |
- epatch "${FILESDIR}"/${PN}-5.1-ranlib.patch |
2692 |
- epatch "${FILESDIR}"/${PN}-3.1.1-libtool-ranlib.patch |
2693 |
- epatch "${FILESDIR}"/${PN}-3.1.1-no-headers.patch |
2694 |
- epatch "${FILESDIR}"/${PN}-4.0-no-oss-dir.patch |
2695 |
- epatch "${FILESDIR}"/${PN}-5.1-nolto.patch |
2696 |
- epatch "${FILESDIR}"/cctools-839-intel-retf.patch |
2697 |
- epatch "${FILESDIR}"/${PN}-5.1-extraneous-includes.patch |
2698 |
- epatch "${FILESDIR}"/${PN}-5.1-otool-stdc.patch |
2699 |
- epatch "${FILESDIR}"/${PN}-5.1-constant-types.patch |
2700 |
- epatch "${FILESDIR}"/${PN}-5.1-strnlen.patch |
2701 |
- cp ../${LD64}/src/other/prune_trie.h include/mach-o/ || die |
2702 |
- |
2703 |
- # do not build profileable libstuff to save compile time |
2704 |
- sed -i -e "/^all:/s, profile , ," libstuff/Makefile |
2705 |
- |
2706 |
- # cctools version is provided to make via RC_ProjectSourceVersion which |
2707 |
- # generates and compiles it as apple_version[] into libstuff. From |
2708 |
- # there it's picked up by the individual tools. Since |
2709 |
- # RC_ProjectSourceVersion is also used as library version, we can't |
2710 |
- # just append our local version info. So we hack the libstuff Makefile |
2711 |
- # to include our Gentoo version. |
2712 |
- sed -i -e "/cctools-.*(RC_ProjectSourceVersion).*OFILE_DIR/s,Version),Version) (Gentoo ${PN}-${PVR})," \ |
2713 |
- libstuff/Makefile |
2714 |
- |
2715 |
- # clean up test suite |
2716 |
- cd "${S}"/${LD64}/unit-tests/test-cases |
2717 |
- local c |
2718 |
- |
2719 |
- # we don't have llvm |
2720 |
- ((++c)); rm -rf llvm-integration; |
2721 |
- |
2722 |
- # we don't have dtrace |
2723 |
- ((++c)); rm -rf dtrace-static-probes-coalescing; |
2724 |
- ((++c)); rm -rf dtrace-static-probes; |
2725 |
- |
2726 |
- # a file is missing |
2727 |
- ((++c)); rm -rf eh-coalescing-r |
2728 |
- |
2729 |
- # we don't do universal binaries |
2730 |
- ((++c)); rm -rf blank-stubs; |
2731 |
- |
2732 |
- # looks like a problem with apple's result-filter.pl |
2733 |
- ((++c)); rm -rf implicit-common3; |
2734 |
- ((++c)); rm -rf order_file-ans; |
2735 |
- |
2736 |
- # TODO no idea what goes wrong here |
2737 |
- ((++c)); rm -rf dwarf-debug-notes; |
2738 |
- |
2739 |
- einfo "Deleted $c tests that were bound to fail" |
2740 |
- |
2741 |
- cd "${S}" |
2742 |
- ebegin "cleaning Makefiles from unwanted CFLAGS" |
2743 |
- find . -name "Makefile" -print0 | xargs -0 sed \ |
2744 |
- -i \ |
2745 |
- -e 's/ -g / /g' \ |
2746 |
- -e 's/^G =.*$/G =/' \ |
2747 |
- -e 's/^OFLAG =.*$/OFLAG =/' \ |
2748 |
- -e 's/install -c -s/install/g' |
2749 |
- eend $? |
2750 |
-} |
2751 |
- |
2752 |
-src_configure() { |
2753 |
- CCTOOLS_LTO= |
2754 |
- LD64_LTO=0 |
2755 |
- if use lto ; then |
2756 |
- CCTOOLS_LTO="-DLTO_SUPPORT" |
2757 |
- LD64_LTO=1 |
2758 |
- fi |
2759 |
- |
2760 |
- if [ "${CXX/*clang*/yes}" = "yes" ] ; then |
2761 |
- if use libcxx ; then |
2762 |
- append-cxxflags -stdlib=libc++ |
2763 |
- CXXLIB=-stdlib=libc++ |
2764 |
- else |
2765 |
- # force libstdc++ for systems where libc++ is default (OS X 10.9+?) |
2766 |
- append-cxxflags -stdlib=libstdc++ |
2767 |
- CXXLIB=-stdlib=libstdc++ |
2768 |
- fi |
2769 |
- else |
2770 |
- use libcxx && \ |
2771 |
- ewarn "libcxx only available with clang and your C++ compiler ($CXX) does not seem to be clang" |
2772 |
- fi |
2773 |
- |
2774 |
- # CPPFLAGS only affects ld64, cctools don't use 'em (which currently is |
2775 |
- # what we want) |
2776 |
- append-cppflags -DNDEBUG |
2777 |
- |
2778 |
- # Block API and thus snapshots supported on >= 10.6 |
2779 |
- [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -ge 10 ]] && \ |
2780 |
- append-cppflags -DSUPPORT_SNAPSHOTS |
2781 |
- |
2782 |
- CCTOOLS_OFLAG= |
2783 |
- if [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 8 ]] ; then |
2784 |
- # cctools expect to use UNIX03 struct member names. |
2785 |
- # This is default on > 10.4. Activate it on <= 10.4 by defining |
2786 |
- # __DARWIN_UNIX03 explicitly. |
2787 |
- CCTOOLS_OFLAG="-D__DARWIN_UNIX03=1" |
2788 |
- fi |
2789 |
- |
2790 |
- # Create configure.h for ld64 with SUPPORT_ARCH_<arch> defines in it. |
2791 |
- # RC_SUPPORTED_ARCHS="i386 x86_64 x86_64h armv6 ..." can be used to |
2792 |
- # override architectures (there are more arms to add) but we configure |
2793 |
- # with the default to be in line with Xcode's ld. |
2794 |
- DERIVED_FILE_DIR=${LD64}/src \ |
2795 |
- RC_SUPPORTED_ARCHS="" \ |
2796 |
- ${LD64}/src/create_configure |
2797 |
-} |
2798 |
- |
2799 |
-compile_ld64() { |
2800 |
- einfo "building ${LD64}" |
2801 |
- cd "${S}"/${LD64}/src |
2802 |
- emake \ |
2803 |
- LTO=${LD64_LTO} \ |
2804 |
- || die "emake failed for ld64" |
2805 |
- use test && emake build_test |
2806 |
-} |
2807 |
- |
2808 |
-compile_cctools() { |
2809 |
- einfo "building ${CCTOOLS}" |
2810 |
- cd "${S}"/${CCTOOLS} |
2811 |
- # -j1 because it fails too often with weird errors |
2812 |
- # Suppress running dsymutil because it will warn about missing debug |
2813 |
- # info which is expected when compiling without -g as we normally do. |
2814 |
- # This might need some more thought if anyone ever wanted to build us |
2815 |
- # for debugging with Apple's tools. |
2816 |
- emake \ |
2817 |
- LIB_PRUNETRIE="-L../../${LD64}/src -lprunetrie" \ |
2818 |
- EFITOOLS= \ |
2819 |
- LTO="${CCTOOLS_LTO}" \ |
2820 |
- COMMON_SUBDIRS='libstuff ar misc otool' \ |
2821 |
- SUBDIRS_32= \ |
2822 |
- LEGACY= \ |
2823 |
- RC_ProjectSourceVersion=${CCTOOLS_VERSION} \ |
2824 |
- RC_CFLAGS="${CFLAGS}" \ |
2825 |
- OFLAG="${CCTOOLS_OFLAG}" \ |
2826 |
- CXXLIB="${CXXLIB}" \ |
2827 |
- DSYMUTIL=": disabled: dsymutil" \ |
2828 |
- -j1 \ |
2829 |
- || die "emake failed for the cctools" |
2830 |
- cd "${S}"/${CCTOOLS}/as |
2831 |
- emake \ |
2832 |
- BUILD_OBSOLETE_ARCH= \ |
2833 |
- RC_ProjectSourceVersion=${CCTOOLS_VERSION} \ |
2834 |
- RC_CFLAGS="-DASLIBEXECDIR=\"\\\"${EPREFIX}${LIBPATH}/\\\"\" ${CFLAGS}" \ |
2835 |
- OFLAG="${CCTOOLS_OFLAG}" \ |
2836 |
- DSYMUTIL=": disabled: dsymutil" \ |
2837 |
- || die "emake failed for as" |
2838 |
-} |
2839 |
- |
2840 |
-src_compile() { |
2841 |
- compile_ld64 |
2842 |
- compile_cctools |
2843 |
-} |
2844 |
- |
2845 |
-install_ld64() { |
2846 |
- exeinto ${BINPATH} |
2847 |
- doexe "${S}"/${LD64}/src/{ld64,rebase,dyldinfo,unwinddump,ObjectDump} |
2848 |
- dosym ld64 ${BINPATH}/ld |
2849 |
- insinto ${DATAPATH}/man/man1 |
2850 |
- doins "${S}"/${LD64}/doc/man/man1/{ld,ld64,rebase}.1 |
2851 |
-} |
2852 |
- |
2853 |
-install_cctools() { |
2854 |
- cd "${S}"/${CCTOOLS} |
2855 |
- emake install_all_but_headers \ |
2856 |
- EFITOOLS= \ |
2857 |
- COMMON_SUBDIRS='ar misc otool' \ |
2858 |
- SUBDIRS_32= \ |
2859 |
- DSTROOT=\"${D}\" \ |
2860 |
- BINDIR=\"${EPREFIX}\"${BINPATH} \ |
2861 |
- LOCBINDIR=\"${EPREFIX}\"${BINPATH} \ |
2862 |
- USRBINDIR=\"${EPREFIX}\"${BINPATH} \ |
2863 |
- LOCLIBDIR=\"${EPREFIX}\"${LIBPATH} \ |
2864 |
- MANDIR=\"${EPREFIX}\"${DATAPATH}/man/ |
2865 |
- cd "${S}"/${CCTOOLS}/as |
2866 |
- emake install \ |
2867 |
- BUILD_OBSOLETE_ARCH= \ |
2868 |
- DSTROOT=\"${D}\" \ |
2869 |
- USRBINDIR=\"${EPREFIX}\"${BINPATH} \ |
2870 |
- LIBDIR=\"${EPREFIX}\"${LIBPATH} \ |
2871 |
- LOCLIBDIR=\"${EPREFIX}\"${LIBPATH} |
2872 |
- |
2873 |
- cd "${ED}"${BINPATH} |
2874 |
- insinto ${DATAPATH}/man/man1 |
2875 |
- local skips manpage |
2876 |
- # ar brings an up-to-date manpage with it |
2877 |
- skips=( ar ) |
2878 |
- for bin in *; do |
2879 |
- for skip in ${skips[@]}; do |
2880 |
- if [[ ${bin} == ${skip} ]]; then |
2881 |
- continue 2; |
2882 |
- fi |
2883 |
- done |
2884 |
- manpage=${S}/${CCTOOLS}/man/${bin}.1 |
2885 |
- if [[ -f "${manpage}" ]]; then |
2886 |
- doins "${manpage}" |
2887 |
- fi |
2888 |
- done |
2889 |
- insinto ${DATAPATH}/man/man5 |
2890 |
- doins "${S}"/${CCTOOLS}/man/*.5 |
2891 |
-} |
2892 |
- |
2893 |
-src_test() { |
2894 |
- if ! [ "${EPREFIX}"/usr/bin/clang ] ; then |
2895 |
- einfo "Test suite only works properly with clang - please install" |
2896 |
- return |
2897 |
- fi |
2898 |
- |
2899 |
- einfo "Running unit tests" |
2900 |
- cd "${S}"/${LD64}/unit-tests/test-cases |
2901 |
- # provide the new ld as a symlink to clang so that -ccc-install-dir |
2902 |
- # will pick it up |
2903 |
- ln -sfn ../../src/ld64 ld |
2904 |
- # use our arch command because the System's will report i386 even for an |
2905 |
- # x86_64 prefix |
2906 |
- perl ../bin/make-recursive.pl \ |
2907 |
- BUILT_PRODUCTS_DIR="${S}"/${LD64}/src \ |
2908 |
- ARCH="$(arch)" \ |
2909 |
- LD="${S}"/${LD64}/src/ld64 \ |
2910 |
- CC="clang -ccc-install-dir $PWD" \ |
2911 |
- CXX="clang++ -ccc-install-dir $PWD" \ |
2912 |
- OTOOL="${S}"/${CCTOOLS}/otool/otool.NEW \ |
2913 |
- | perl ../bin/result-filter.pl |
2914 |
-} |
2915 |
- |
2916 |
-src_install() { |
2917 |
- install_ld64 |
2918 |
- install_cctools |
2919 |
- |
2920 |
- cd "${S}" |
2921 |
- insinto /etc/env.d/binutils |
2922 |
- cat <<-EOF > env.d |
2923 |
- TARGET="${CHOST}" |
2924 |
- VER="${PV}" |
2925 |
- FAKE_TARGETS="${CHOST}" |
2926 |
- EOF |
2927 |
- newins env.d ${CHOST}-${PV} |
2928 |
-} |
2929 |
- |
2930 |
-pkg_postinst() { |
2931 |
- binutils-config ${CHOST}-${PV} |
2932 |
-} |
2933 |
|
2934 |
diff --git a/sys-devel/binutils-apple/binutils-apple-6.3-r1.ebuild b/sys-devel/binutils-apple/binutils-apple-6.3-r1.ebuild |
2935 |
index abf6a25..75fdff2 100644 |
2936 |
--- a/sys-devel/binutils-apple/binutils-apple-6.3-r1.ebuild |
2937 |
+++ b/sys-devel/binutils-apple/binutils-apple-6.3-r1.ebuild |
2938 |
@@ -24,7 +24,7 @@ SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz |
2939 |
http://dev.gentoo.org/~grobian/distfiles/${PN}-patches-6.3-r1.tar.bz2" |
2940 |
|
2941 |
LICENSE="APSL-2" |
2942 |
-KEYWORDS="~x64-macos ~x86-macos" |
2943 |
+KEYWORDS="~ppc-macos ~x64-macos ~x86-macos" |
2944 |
IUSE="lto test libcxx multitarget" |
2945 |
|
2946 |
RDEPEND="sys-devel/binutils-config |
2947 |
|
2948 |
diff --git a/sys-devel/binutils-apple/binutils-apple-6.3.ebuild b/sys-devel/binutils-apple/binutils-apple-6.3.ebuild |
2949 |
deleted file mode 100644 |
2950 |
index 99999f6..0000000 |
2951 |
--- a/sys-devel/binutils-apple/binutils-apple-6.3.ebuild |
2952 |
+++ /dev/null |
2953 |
@@ -1,347 +0,0 @@ |
2954 |
-# Copyright 1999-2016 Gentoo Foundation |
2955 |
-# Distributed under the terms of the GNU General Public License v2 |
2956 |
-# $Id$ |
2957 |
- |
2958 |
-EAPI="5" |
2959 |
- |
2960 |
-inherit eutils flag-o-matic toolchain-funcs |
2961 |
- |
2962 |
-LD64=ld64-242 |
2963 |
-CCTOOLS_VERSION=870 |
2964 |
-CCTOOLS=cctools-${CCTOOLS_VERSION} |
2965 |
-LIBUNWIND=libunwind-35.3 |
2966 |
-DYLD=dyld-353.2.1 |
2967 |
- |
2968 |
-DESCRIPTION="Darwin assembler as(1) and static linker ld(1), Xcode Tools ${PV}" |
2969 |
-HOMEPAGE="http://www.opensource.apple.com/darwinsource/" |
2970 |
-SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz |
2971 |
- http://www.opensource.apple.com/tarballs/cctools/${CCTOOLS}.tar.gz |
2972 |
- http://www.opensource.apple.com/tarballs/dyld/${DYLD}.tar.gz |
2973 |
- http://www.opensource.apple.com/tarballs/libunwind/${LIBUNWIND}.tar.gz" |
2974 |
- |
2975 |
-LICENSE="APSL-2" |
2976 |
-KEYWORDS="~x64-macos ~x86-macos" |
2977 |
-IUSE="lto test libcxx" |
2978 |
- |
2979 |
-RDEPEND="sys-devel/binutils-config |
2980 |
- lto? ( sys-devel/llvm ) |
2981 |
- libcxx? ( sys-libs/libcxx )" |
2982 |
-DEPEND="${RDEPEND} |
2983 |
- test? ( >=dev-lang/perl-5.8.8 ) |
2984 |
- || ( >=sys-devel/gcc-apple-4.2.1 sys-devel/llvm ) |
2985 |
- libcxx? ( sys-devel/llvm )" |
2986 |
- |
2987 |
-export CTARGET=${CTARGET:-${CHOST}} |
2988 |
-if [[ ${CTARGET} == ${CHOST} ]] ; then |
2989 |
- if [[ ${CATEGORY} == cross-* ]] ; then |
2990 |
- export CTARGET=${CATEGORY#cross-} |
2991 |
- fi |
2992 |
-fi |
2993 |
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } |
2994 |
- |
2995 |
-if is_cross ; then |
2996 |
- SLOT="${CTARGET}-6" |
2997 |
-else |
2998 |
- SLOT="6" |
2999 |
-fi |
3000 |
- |
3001 |
-LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV} |
3002 |
-INCPATH=${LIBPATH}/include |
3003 |
-DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV} |
3004 |
-if is_cross ; then |
3005 |
- BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${PV} |
3006 |
-else |
3007 |
- BINPATH=/usr/${CTARGET}/binutils-bin/${PV} |
3008 |
-fi |
3009 |
- |
3010 |
-S=${WORKDIR} |
3011 |
- |
3012 |
-src_prepare() { |
3013 |
- cd "${S}"/${LD64}/src |
3014 |
- cp "${FILESDIR}"/ld64-136-compile_stubs.h ld/compile_stubs.h |
3015 |
- cp "${FILESDIR}"/ld64-236.3-Makefile Makefile |
3016 |
- |
3017 |
- epatch "${FILESDIR}"/ld64-236.3-nolto.patch |
3018 |
- epatch "${FILESDIR}"/ld64-241.9-extraneous-includes.patch |
3019 |
- epatch "${FILESDIR}"/ld64-241.9-atomic-volatile.patch |
3020 |
- epatch "${FILESDIR}"/ld64-236.3-crashreporter.patch |
3021 |
- epatch "${FILESDIR}"/ld64-242-gcc.patch |
3022 |
- epatch "${FILESDIR}"/ld64-236.3-constant-types.patch |
3023 |
- epatch "${FILESDIR}"/ld64-241.9-nosnapshots.patch |
3024 |
- epatch "${FILESDIR}"/ld64-242-noarm.patch |
3025 |
- epatch "${FILESDIR}"/ld64-241.9-register-names.patch |
3026 |
- epatch "${FILESDIR}"/ld64-241.9-get-comm-align.patch |
3027 |
- epatch "${FILESDIR}"/ld64-241.9-cc_md5.patch |
3028 |
- |
3029 |
- # provide missing headers from libunwind and dyld |
3030 |
- mkdir -p include/{mach,mach-o/arm} || die |
3031 |
- # never present because it's private |
3032 |
- cp ../../${DYLD}/include/mach-o/dyld_priv.h include/mach-o || die |
3033 |
- # missing on <= 10.5 |
3034 |
- cp ../../${LIBUNWIND}/include/libunwind.h include/ || die |
3035 |
- cp ../../${LIBUNWIND}/include/mach-o/compact_unwind_encoding.h include/mach-o || die |
3036 |
- # missing on <= 10.4 |
3037 |
- cp ../../${DYLD}/include/mach-o/dyld_images.h include/mach-o || die |
3038 |
- cp ../../${CCTOOLS}/include/mach-o/loader.h include/mach-o || die |
3039 |
- # use copies from cctools because they're otherwise hidden in some SDK |
3040 |
- cp ../../${CCTOOLS}/include/mach-o/arm/reloc.h include/mach-o/arm || die |
3041 |
- # provide all required CPU_TYPEs on all platforms |
3042 |
- cp ../../${CCTOOLS}/include/mach/machine.h include/mach/machine.h |
3043 |
- # add alias for newer identifiers, because ld64 uses both but cctools |
3044 |
- # header only defines the older |
3045 |
- epatch "${FILESDIR}"/ld64-236.3-missing-cputypes.patch |
3046 |
- |
3047 |
- # mimic OS X Leopard-style Availability.h macros for libunwind.h on |
3048 |
- # older systems |
3049 |
- [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 8 ]] && \ |
3050 |
- echo "#define __OSX_AVAILABLE_STARTING(x,y) " > include/Availability.h |
3051 |
- |
3052 |
- local VER_STR="\"@(#)PROGRAM:ld PROJECT:${LD64} (Gentoo ${PN}-${PVR})\\n\"" |
3053 |
- echo "char ldVersionString[] = ${VER_STR};" > version.cpp |
3054 |
- |
3055 |
- epatch "${FILESDIR}"/ld64-123.2-debug-backtrace.patch |
3056 |
- |
3057 |
- cd "${S}"/${CCTOOLS} |
3058 |
- epatch "${FILESDIR}"/${PN}-4.5-as.patch |
3059 |
- epatch "${FILESDIR}"/${PN}-5.1-as-dir.patch |
3060 |
- epatch "${FILESDIR}"/${PN}-5.1-ranlib.patch |
3061 |
- epatch "${FILESDIR}"/${PN}-3.1.1-libtool-ranlib.patch |
3062 |
- epatch "${FILESDIR}"/${PN}-3.1.1-no-headers.patch |
3063 |
- epatch "${FILESDIR}"/${PN}-4.0-no-oss-dir.patch |
3064 |
- epatch "${FILESDIR}"/cctools-839-intel-retf.patch |
3065 |
- epatch "${FILESDIR}"/${PN}-5.1-extraneous-includes.patch |
3066 |
- epatch "${FILESDIR}"/${PN}-5.1-otool-stdc.patch |
3067 |
- epatch "${FILESDIR}"/${PN}-5.1-constant-types.patch |
3068 |
- epatch "${FILESDIR}"/${PN}-5.1-strnlen.patch |
3069 |
- cp ../${LD64}/src/other/prune_trie.h include/mach-o/ || die |
3070 |
- |
3071 |
- # do not build profileable libstuff to save compile time |
3072 |
- sed -i -e "/^all:/s, profile , ," libstuff/Makefile |
3073 |
- |
3074 |
- # cctools version is provided to make via RC_ProjectSourceVersion which |
3075 |
- # generates and compiles it as apple_version[] into libstuff. From |
3076 |
- # there it's picked up by the individual tools. Since |
3077 |
- # RC_ProjectSourceVersion is also used as library version, we can't |
3078 |
- # just append our local version info. So we hack the libstuff Makefile |
3079 |
- # to include our Gentoo version. |
3080 |
- sed -i -e "/cctools-.*(RC_ProjectSourceVersion).*OFILE_DIR/s,Version),Version) (Gentoo ${PN}-${PVR})," \ |
3081 |
- libstuff/Makefile |
3082 |
- |
3083 |
- # clean up test suite |
3084 |
- cd "${S}"/${LD64}/unit-tests/test-cases |
3085 |
- local c |
3086 |
- |
3087 |
- # we don't have llvm |
3088 |
- ((++c)); rm -rf llvm-integration; |
3089 |
- |
3090 |
- # we don't have dtrace |
3091 |
- ((++c)); rm -rf dtrace-static-probes-coalescing; |
3092 |
- ((++c)); rm -rf dtrace-static-probes; |
3093 |
- |
3094 |
- # a file is missing |
3095 |
- ((++c)); rm -rf eh-coalescing-r |
3096 |
- |
3097 |
- # we don't do universal binaries |
3098 |
- ((++c)); rm -rf blank-stubs; |
3099 |
- |
3100 |
- # looks like a problem with apple's result-filter.pl |
3101 |
- ((++c)); rm -rf implicit-common3; |
3102 |
- ((++c)); rm -rf order_file-ans; |
3103 |
- |
3104 |
- # TODO no idea what goes wrong here |
3105 |
- ((++c)); rm -rf dwarf-debug-notes; |
3106 |
- |
3107 |
- einfo "Deleted $c tests that were bound to fail" |
3108 |
- |
3109 |
- cd "${S}" |
3110 |
- ebegin "cleaning Makefiles from unwanted CFLAGS" |
3111 |
- find . -name "Makefile" -print0 | xargs -0 sed \ |
3112 |
- -i \ |
3113 |
- -e 's/ -g / /g' \ |
3114 |
- -e 's/^G =.*$/G =/' \ |
3115 |
- -e 's/^OFLAG =.*$/OFLAG =/' \ |
3116 |
- -e 's/install -c -s/install/g' |
3117 |
- eend $? |
3118 |
-} |
3119 |
- |
3120 |
-src_configure() { |
3121 |
- CCTOOLS_LTO= |
3122 |
- LD64_LTO=0 |
3123 |
- if use lto ; then |
3124 |
- CCTOOLS_LTO="-DLTO_SUPPORT" |
3125 |
- LD64_LTO=1 |
3126 |
- fi |
3127 |
- |
3128 |
- if [[ ${CXX} == *clang* ]] ; then |
3129 |
- if use libcxx ; then |
3130 |
- append-cxxflags -stdlib=libc++ |
3131 |
- CXXLIB=-stdlib=libc++ |
3132 |
- else |
3133 |
- # force libstdc++ for systems where libc++ is default (OS X 10.9+?) |
3134 |
- append-cxxflags -stdlib=libstdc++ |
3135 |
- CXXLIB=-stdlib=libstdc++ |
3136 |
- fi |
3137 |
- else |
3138 |
- use libcxx && \ |
3139 |
- ewarn "libcxx only available with clang and your C++ compiler ($CXX) does not seem to be clang" |
3140 |
- fi |
3141 |
- |
3142 |
- # CPPFLAGS only affects ld64, cctools don't use 'em (which currently is |
3143 |
- # what we want) |
3144 |
- append-cppflags -DNDEBUG |
3145 |
- |
3146 |
- # Block API and thus snapshots supported on >= 10.6 |
3147 |
- [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -ge 10 ]] && \ |
3148 |
- append-cppflags -DSUPPORT_SNAPSHOTS |
3149 |
- |
3150 |
- CCTOOLS_OFLAG= |
3151 |
- if [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 8 ]] ; then |
3152 |
- # cctools expect to use UNIX03 struct member names. |
3153 |
- # This is default on > 10.4. Activate it on <= 10.4 by defining |
3154 |
- # __DARWIN_UNIX03 explicitly. |
3155 |
- CCTOOLS_OFLAG="-D__DARWIN_UNIX03=1" |
3156 |
- fi |
3157 |
- |
3158 |
- # Create configure.h for ld64 with SUPPORT_ARCH_<arch> defines in it. |
3159 |
- # RC_SUPPORTED_ARCHS="i386 x86_64 x86_64h armv6 ..." can be used to |
3160 |
- # override architectures (there are more arms to add) but we configure |
3161 |
- # with the default to be in line with Xcode's ld. |
3162 |
- DERIVED_FILE_DIR=${LD64}/src \ |
3163 |
- RC_SUPPORTED_ARCHS="" \ |
3164 |
- ${LD64}/src/create_configure |
3165 |
-} |
3166 |
- |
3167 |
-compile_ld64() { |
3168 |
- einfo "building ${LD64}" |
3169 |
- cd "${S}"/${LD64}/src |
3170 |
- emake \ |
3171 |
- LTO=${LD64_LTO} \ |
3172 |
- || die "emake failed for ld64" |
3173 |
- use test && emake build_test |
3174 |
-} |
3175 |
- |
3176 |
-compile_cctools() { |
3177 |
- einfo "building ${CCTOOLS}" |
3178 |
- cd "${S}"/${CCTOOLS} |
3179 |
- # -j1 because it fails too often with weird errors |
3180 |
- # Suppress running dsymutil because it will warn about missing debug |
3181 |
- # info which is expected when compiling without -g as we normally do. |
3182 |
- # This might need some more thought if anyone ever wanted to build us |
3183 |
- # for debugging with Apple's tools. |
3184 |
- emake \ |
3185 |
- LIB_PRUNETRIE="-L../../${LD64}/src -lprunetrie" \ |
3186 |
- EFITOOLS= \ |
3187 |
- LTO="${CCTOOLS_LTO}" \ |
3188 |
- COMMON_SUBDIRS='libstuff ar misc otool' \ |
3189 |
- SUBDIRS_32= \ |
3190 |
- LEGACY= \ |
3191 |
- RC_ProjectSourceVersion=${CCTOOLS_VERSION} \ |
3192 |
- RC_CFLAGS="${CFLAGS}" \ |
3193 |
- OFLAG="${CCTOOLS_OFLAG}" \ |
3194 |
- CXXLIB="${CXXLIB}" \ |
3195 |
- DSYMUTIL=": disabled: dsymutil" \ |
3196 |
- -j1 \ |
3197 |
- || die "emake failed for the cctools" |
3198 |
- cd "${S}"/${CCTOOLS}/as |
3199 |
- emake \ |
3200 |
- BUILD_OBSOLETE_ARCH= \ |
3201 |
- RC_ProjectSourceVersion=${CCTOOLS_VERSION} \ |
3202 |
- RC_CFLAGS="-DASLIBEXECDIR=\"\\\"${EPREFIX}${LIBPATH}/\\\"\" ${CFLAGS}" \ |
3203 |
- OFLAG="${CCTOOLS_OFLAG}" \ |
3204 |
- DSYMUTIL=": disabled: dsymutil" \ |
3205 |
- || die "emake failed for as" |
3206 |
-} |
3207 |
- |
3208 |
-src_compile() { |
3209 |
- compile_ld64 |
3210 |
- compile_cctools |
3211 |
-} |
3212 |
- |
3213 |
-install_ld64() { |
3214 |
- exeinto ${BINPATH} |
3215 |
- doexe "${S}"/${LD64}/src/{ld64,rebase,dyldinfo,unwinddump,ObjectDump} |
3216 |
- dosym ld64 ${BINPATH}/ld |
3217 |
- insinto ${DATAPATH}/man/man1 |
3218 |
- doins "${S}"/${LD64}/doc/man/man1/{ld,ld64,rebase}.1 |
3219 |
-} |
3220 |
- |
3221 |
-install_cctools() { |
3222 |
- cd "${S}"/${CCTOOLS} |
3223 |
- emake install_all_but_headers \ |
3224 |
- EFITOOLS= \ |
3225 |
- COMMON_SUBDIRS='ar misc otool' \ |
3226 |
- SUBDIRS_32= \ |
3227 |
- DSTROOT=\"${D}\" \ |
3228 |
- BINDIR=\"${EPREFIX}\"${BINPATH} \ |
3229 |
- LOCBINDIR=\"${EPREFIX}\"${BINPATH} \ |
3230 |
- USRBINDIR=\"${EPREFIX}\"${BINPATH} \ |
3231 |
- LOCLIBDIR=\"${EPREFIX}\"${LIBPATH} \ |
3232 |
- MANDIR=\"${EPREFIX}\"${DATAPATH}/man/ |
3233 |
- cd "${S}"/${CCTOOLS}/as |
3234 |
- emake install \ |
3235 |
- BUILD_OBSOLETE_ARCH= \ |
3236 |
- DSTROOT=\"${D}\" \ |
3237 |
- USRBINDIR=\"${EPREFIX}\"${BINPATH} \ |
3238 |
- LIBDIR=\"${EPREFIX}\"${LIBPATH} \ |
3239 |
- LOCLIBDIR=\"${EPREFIX}\"${LIBPATH} |
3240 |
- |
3241 |
- cd "${ED}"${BINPATH} |
3242 |
- insinto ${DATAPATH}/man/man1 |
3243 |
- local skips manpage |
3244 |
- # ar brings an up-to-date manpage with it |
3245 |
- skips=( ar ) |
3246 |
- for bin in *; do |
3247 |
- for skip in ${skips[@]}; do |
3248 |
- if [[ ${bin} == ${skip} ]]; then |
3249 |
- continue 2; |
3250 |
- fi |
3251 |
- done |
3252 |
- manpage=${S}/${CCTOOLS}/man/${bin}.1 |
3253 |
- if [[ -f "${manpage}" ]]; then |
3254 |
- doins "${manpage}" |
3255 |
- fi |
3256 |
- done |
3257 |
- insinto ${DATAPATH}/man/man5 |
3258 |
- doins "${S}"/${CCTOOLS}/man/*.5 |
3259 |
-} |
3260 |
- |
3261 |
-src_test() { |
3262 |
- if ! [ "${EPREFIX}"/usr/bin/clang ] ; then |
3263 |
- einfo "Test suite only works properly with clang - please install" |
3264 |
- return |
3265 |
- fi |
3266 |
- |
3267 |
- einfo "Running unit tests" |
3268 |
- cd "${S}"/${LD64}/unit-tests/test-cases |
3269 |
- # provide the new ld as a symlink to clang so that -ccc-install-dir |
3270 |
- # will pick it up |
3271 |
- ln -sfn ../../src/ld64 ld |
3272 |
- # use our arch command because the System's will report i386 even for an |
3273 |
- # x86_64 prefix |
3274 |
- perl ../bin/make-recursive.pl \ |
3275 |
- BUILT_PRODUCTS_DIR="${S}"/${LD64}/src \ |
3276 |
- ARCH="$(arch)" \ |
3277 |
- LD="${S}"/${LD64}/src/ld64 \ |
3278 |
- CC="clang -ccc-install-dir $PWD" \ |
3279 |
- CXX="clang++ -ccc-install-dir $PWD" \ |
3280 |
- OTOOL="${S}"/${CCTOOLS}/otool/otool.NEW \ |
3281 |
- | perl ../bin/result-filter.pl |
3282 |
-} |
3283 |
- |
3284 |
-src_install() { |
3285 |
- install_ld64 |
3286 |
- install_cctools |
3287 |
- |
3288 |
- cd "${S}" |
3289 |
- insinto /etc/env.d/binutils |
3290 |
- cat <<-EOF > env.d |
3291 |
- TARGET="${CHOST}" |
3292 |
- VER="${PV}" |
3293 |
- FAKE_TARGETS="${CHOST}" |
3294 |
- EOF |
3295 |
- newins env.d ${CHOST}-${PV} |
3296 |
-} |
3297 |
- |
3298 |
-pkg_postinst() { |
3299 |
- binutils-config ${CHOST}-${PV} |
3300 |
-} |
3301 |
|
3302 |
diff --git a/sys-devel/binutils-apple/binutils-apple-7.0-r1.ebuild b/sys-devel/binutils-apple/binutils-apple-7.0-r1.ebuild |
3303 |
index 0606643..017df46 100644 |
3304 |
--- a/sys-devel/binutils-apple/binutils-apple-7.0-r1.ebuild |
3305 |
+++ b/sys-devel/binutils-apple/binutils-apple-7.0-r1.ebuild |
3306 |
@@ -25,7 +25,7 @@ SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz |
3307 |
http://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.0-r2.tar.bz2" |
3308 |
|
3309 |
LICENSE="APSL-2" |
3310 |
-KEYWORDS="~x64-macos ~x86-macos" |
3311 |
+KEYWORDS="~ppc-macos ~x64-macos ~x86-macos" |
3312 |
IUSE="lto test multitarget" |
3313 |
|
3314 |
# ld64 can now only be compiled using llvm and libc++ since it massivley uses |
3315 |
|
3316 |
diff --git a/sys-devel/binutils-apple/binutils-apple-7.0.ebuild b/sys-devel/binutils-apple/binutils-apple-7.0.ebuild |
3317 |
index 3994a76..0cd3df8 100644 |
3318 |
--- a/sys-devel/binutils-apple/binutils-apple-7.0.ebuild |
3319 |
+++ b/sys-devel/binutils-apple/binutils-apple-7.0.ebuild |
3320 |
@@ -25,7 +25,7 @@ SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz |
3321 |
http://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.0-r1.tar.bz2" |
3322 |
|
3323 |
LICENSE="APSL-2" |
3324 |
-KEYWORDS="~x64-macos ~x86-macos" |
3325 |
+KEYWORDS="~ppc-macos ~x64-macos ~x86-macos" |
3326 |
IUSE="test multitarget" |
3327 |
|
3328 |
# ld64 can now only be compiled using llvm and libc++ since it massivley uses |
3329 |
|
3330 |
diff --git a/sys-devel/binutils-apple/binutils-apple-7.1-r1.ebuild b/sys-devel/binutils-apple/binutils-apple-7.1-r1.ebuild |
3331 |
index f588ce7..6e49c5a 100644 |
3332 |
--- a/sys-devel/binutils-apple/binutils-apple-7.1-r1.ebuild |
3333 |
+++ b/sys-devel/binutils-apple/binutils-apple-7.1-r1.ebuild |
3334 |
@@ -26,7 +26,7 @@ SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz |
3335 |
|
3336 |
|
3337 |
LICENSE="APSL-2" |
3338 |
-KEYWORDS="~x64-macos ~x86-macos" |
3339 |
+KEYWORDS="~ppc-macos ~x64-macos ~x86-macos" |
3340 |
IUSE="lto test multitarget" |
3341 |
|
3342 |
# ld64 can now only be compiled using llvm and libc++ since it massivley uses |
3343 |
|
3344 |
diff --git a/sys-devel/binutils-apple/binutils-apple-7.1.ebuild b/sys-devel/binutils-apple/binutils-apple-7.1.ebuild |
3345 |
index 85fa258..fc8e6be 100644 |
3346 |
--- a/sys-devel/binutils-apple/binutils-apple-7.1.ebuild |
3347 |
+++ b/sys-devel/binutils-apple/binutils-apple-7.1.ebuild |
3348 |
@@ -26,7 +26,7 @@ SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz |
3349 |
|
3350 |
|
3351 |
LICENSE="APSL-2" |
3352 |
-KEYWORDS="~x64-macos ~x86-macos" |
3353 |
+KEYWORDS="~ppc-macos ~x64-macos ~x86-macos" |
3354 |
IUSE="test multitarget" |
3355 |
|
3356 |
# ld64 can now only be compiled using llvm and libc++ since it massivley uses |
3357 |
|
3358 |
diff --git a/sys-devel/binutils-apple/binutils-apple-7.2-r1.ebuild b/sys-devel/binutils-apple/binutils-apple-7.2-r1.ebuild |
3359 |
index e251faf..e1886af 100644 |
3360 |
--- a/sys-devel/binutils-apple/binutils-apple-7.2-r1.ebuild |
3361 |
+++ b/sys-devel/binutils-apple/binutils-apple-7.2-r1.ebuild |
3362 |
@@ -26,7 +26,7 @@ SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz |
3363 |
http://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.2-r0.tar.bz2" |
3364 |
|
3365 |
LICENSE="APSL-2" |
3366 |
-KEYWORDS="~x64-macos ~x86-macos" |
3367 |
+KEYWORDS="~ppc-macos ~x64-macos ~x86-macos" |
3368 |
IUSE="lto test multitarget" |
3369 |
|
3370 |
# ld64 can now only be compiled using llvm and libc++ since it massivley uses |
3371 |
|
3372 |
diff --git a/sys-devel/binutils-apple/binutils-apple-7.2.ebuild b/sys-devel/binutils-apple/binutils-apple-7.2.ebuild |
3373 |
index b705276..82a9a7a 100644 |
3374 |
--- a/sys-devel/binutils-apple/binutils-apple-7.2.ebuild |
3375 |
+++ b/sys-devel/binutils-apple/binutils-apple-7.2.ebuild |
3376 |
@@ -25,7 +25,7 @@ SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz |
3377 |
http://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.0-r1.tar.bz2" |
3378 |
|
3379 |
LICENSE="APSL-2" |
3380 |
-KEYWORDS="~x64-macos ~x86-macos" |
3381 |
+KEYWORDS="~ppc-macos ~x64-macos ~x86-macos" |
3382 |
IUSE="test multitarget" |
3383 |
|
3384 |
# ld64 can now only be compiled using llvm and libc++ since it massivley uses |
3385 |
|
3386 |
diff --git a/sys-devel/binutils-apple/binutils-apple-7.3.1.ebuild b/sys-devel/binutils-apple/binutils-apple-7.3.1.ebuild |
3387 |
index 68ecb9f..733b6af 100644 |
3388 |
--- a/sys-devel/binutils-apple/binutils-apple-7.3.1.ebuild |
3389 |
+++ b/sys-devel/binutils-apple/binutils-apple-7.3.1.ebuild |
3390 |
@@ -27,7 +27,7 @@ SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz |
3391 |
http://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.3-r0.tar.bz2" |
3392 |
|
3393 |
LICENSE="APSL-2" |
3394 |
-KEYWORDS="~x64-macos ~x86-macos" |
3395 |
+KEYWORDS="~ppc-macos ~x64-macos ~x86-macos" |
3396 |
IUSE="lto test multitarget" |
3397 |
|
3398 |
# ld64 can now only be compiled using llvm and libc++ since it massivley uses |
3399 |
|
3400 |
diff --git a/sys-devel/binutils-apple/binutils-apple-7.3.ebuild b/sys-devel/binutils-apple/binutils-apple-7.3.ebuild |
3401 |
index 89e17b0..6828f5a 100644 |
3402 |
--- a/sys-devel/binutils-apple/binutils-apple-7.3.ebuild |
3403 |
+++ b/sys-devel/binutils-apple/binutils-apple-7.3.ebuild |
3404 |
@@ -27,7 +27,7 @@ SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz |
3405 |
http://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.3-r0.tar.bz2" |
3406 |
|
3407 |
LICENSE="APSL-2" |
3408 |
-KEYWORDS="~x64-macos ~x86-macos" |
3409 |
+KEYWORDS="~ppc-macos ~x64-macos ~x86-macos" |
3410 |
IUSE="lto test multitarget" |
3411 |
|
3412 |
# ld64 can now only be compiled using llvm and libc++ since it massivley uses |
3413 |
|
3414 |
diff --git a/sys-devel/binutils-apple/files/Makefile b/sys-devel/binutils-apple/files/Makefile |
3415 |
deleted file mode 100644 |
3416 |
index 9d8f928..0000000 |
3417 |
--- a/sys-devel/binutils-apple/files/Makefile |
3418 |
+++ /dev/null |
3419 |
@@ -1,12 +0,0 @@ |
3420 |
-all: ld64 rebase |
3421 |
- |
3422 |
-build_test: machocheck ObjectDump |
3423 |
- |
3424 |
-ld64: debugline.o Options.o ld.o version.o |
3425 |
- $(CXX) $(LDFLAGS) -o $@ $^ |
3426 |
- |
3427 |
-machocheck: machochecker.o |
3428 |
- $(CXX) $(LDFLAGS) -o $@ $^ |
3429 |
- |
3430 |
-ObjectDump: ObjectDump.o debugline.o |
3431 |
- $(CXX) $(LDFLAGS) -o $@ $^ |
3432 |
|
3433 |
diff --git a/sys-devel/binutils-apple/files/binutils-apple-3.1.1-as-dir.patch b/sys-devel/binutils-apple/files/binutils-apple-3.1.1-as-dir.patch |
3434 |
deleted file mode 100644 |
3435 |
index 8d9203e..0000000 |
3436 |
--- a/sys-devel/binutils-apple/files/binutils-apple-3.1.1-as-dir.patch |
3437 |
+++ /dev/null |
3438 |
@@ -1,69 +0,0 @@ |
3439 |
-handles the libexecdir for as and other fixes |
3440 |
- |
3441 |
---- cctools-698/as/driver.c |
3442 |
-+++ cctools-698/as/driver.c |
3443 |
-@@ -27,6 +27,9 @@ |
3444 |
- char **envp) |
3445 |
- { |
3446 |
- const char *LIB = |
3447 |
-+#ifdef ASLIBEXECDIR |
3448 |
-+ ASLIBEXECDIR; |
3449 |
-+#else |
3450 |
- #if defined(__OPENSTEP__) || defined(__HERA__) || \ |
3451 |
- defined(__GONZO_BUNSEN_BEAKER__) || defined(__KODIAK__) |
3452 |
- "/usr/libexec/"; |
3453 |
-@@ -40,6 +42,7 @@ |
3454 |
- #else |
3455 |
- "/usr/local/libexec/gcc/darwin/"; |
3456 |
- #endif |
3457 |
-+#endif |
3458 |
- const char *AS = "/as"; |
3459 |
- |
3460 |
- int i; |
3461 |
-@@ -170,7 +170,11 @@ |
3462 |
- } |
3463 |
- |
3464 |
- } |
3465 |
-+#ifndef ASLIBEXECDIR |
3466 |
- as = makestr(prefix, LIB, arch_name, AS, NULL); |
3467 |
-+#else |
3468 |
-+ as = makestr(LIB, arch_name, AS, NULL); |
3469 |
-+#endif |
3470 |
- |
3471 |
- /* |
3472 |
- * If this assembler exist try to run it else print an error message. |
3473 |
-@@ -182,6 +182,9 @@ |
3474 |
- else |
3475 |
- exit(1); |
3476 |
- } |
3477 |
-+#ifdef ASLIBEXECDIR |
3478 |
-+ as_local = ""; |
3479 |
-+#else |
3480 |
- as_local = makestr(prefix, LOCALLIB, arch_name, AS, NULL); |
3481 |
- if(access(as_local, F_OK) == 0){ |
3482 |
- argv[0] = as_local; |
3483 |
-@@ -193,6 +198,8 @@ |
3484 |
- exit(1); |
3485 |
- } |
3486 |
- else{ |
3487 |
-+#endif |
3488 |
-+ { |
3489 |
- printf("%s: assembler (%s or %s) for architecture %s not " |
3490 |
- "installed\n", progname, as, as_local, arch_name); |
3491 |
- arch_flags = get_arch_flags(); |
3492 |
-@@ -183,6 +190,7 @@ |
3493 |
- printf("%s for architecture %s\n", as, arch_flags[i].name); |
3494 |
- count++; |
3495 |
- } |
3496 |
-+#ifndef ASLIBEXECDIR |
3497 |
- else{ |
3498 |
- as_local = makestr(LOCALLIB, arch_flags[i].name, AS, NULL); |
3499 |
- if(access(as_local, F_OK) == 0){ |
3500 |
-@@ -193,6 +201,7 @@ |
3501 |
- count++; |
3502 |
- } |
3503 |
- } |
3504 |
-+#endif |
3505 |
- } |
3506 |
- if(count == 0) |
3507 |
- printf("%s: no assemblers installed\n", progname); |
3508 |
|
3509 |
diff --git a/sys-devel/binutils-apple/files/binutils-apple-3.1.1-as.patch b/sys-devel/binutils-apple/files/binutils-apple-3.1.1-as.patch |
3510 |
deleted file mode 100644 |
3511 |
index c0cff44..0000000 |
3512 |
--- a/sys-devel/binutils-apple/files/binutils-apple-3.1.1-as.patch |
3513 |
+++ /dev/null |
3514 |
@@ -1,98 +0,0 @@ |
3515 |
-make building for obsolete architectures optional. |
3516 |
- |
3517 |
---- cctools-698/as/Makefile |
3518 |
-+++ cctools-698/as/Makefile |
3519 |
-@@ -1,3 +1,4 @@ |
3520 |
-+BUILD_OBSOLETE_ARCH = yes |
3521 |
- RC_OS = macos |
3522 |
- export USE_APPLE_PB_SUPPORT = all |
3523 |
- OFLAG = -Os |
3524 |
-@@ -31,26 +32,34 @@ |
3525 |
- SYMROOT = . |
3526 |
- OBJROOT = . |
3527 |
- SYM_DIRS = $(SYMROOT)/driver_dir \ |
3528 |
-- $(SYMROOT)/a68_dir \ |
3529 |
-- $(SYMROOT)/a88_dir \ |
3530 |
- $(SYMROOT)/a386_dir \ |
3531 |
- $(SYMROOT)/ax86_64_dir \ |
3532 |
- $(SYMROOT)/appc_dir \ |
3533 |
-- $(SYMROOT)/appc64_dir \ |
3534 |
-+ $(SYMROOT)/appc64_dir |
3535 |
-+ |
3536 |
-+ifeq "yes" "$(BUILD_OBSOLETE_ARCH)" |
3537 |
-+SYM_DIRS += \ |
3538 |
-+ $(SYMROOT)/a68_dir \ |
3539 |
-+ $(SYMROOT)/a88_dir \ |
3540 |
- $(SYMROOT)/a860_dir \ |
3541 |
- $(SYMROOT)/ahppa_dir \ |
3542 |
- $(SYMROOT)/asparc_dir |
3543 |
-+endif |
3544 |
- |
3545 |
- OFILE_DIRS = $(OBJROOT)/driver_dir \ |
3546 |
-- $(OBJROOT)/a68_dir \ |
3547 |
-- $(OBJROOT)/a88_dir \ |
3548 |
- $(OBJROOT)/a386_dir \ |
3549 |
- $(OBJROOT)/ax86_64_dir \ |
3550 |
- $(OBJROOT)/appc_dir \ |
3551 |
-- $(OBJROOT)/appc64_dir \ |
3552 |
-+ $(OBJROOT)/appc64_dir |
3553 |
-+ |
3554 |
-+ifeq "yes" "$(BUILD_OBSOLETE_ARCH)" |
3555 |
-+OFILE_DIRS += \ |
3556 |
-+ $(OBJROOT)/a68_dir \ |
3557 |
-+ $(OBJROOT)/a88_dir \ |
3558 |
- $(OBJROOT)/a860_dir \ |
3559 |
- $(OBJROOT)/ahppa_dir \ |
3560 |
- $(OBJROOT)/asparc_dir |
3561 |
-+endif |
3562 |
- |
3563 |
- BINDIR = /bin |
3564 |
- USRBINDIR = /usr/bin |
3565 |
-@@ -109,9 +118,13 @@ |
3566 |
- OBJS_hppa = $(CFILES_hppa:.c=.o) |
3567 |
- OBJS_sparc = $(CFILES_sparc:.c=.o) |
3568 |
- |
3569 |
--all: $(OFILE_DIRS) $(SYM_DIRS) driver_build a68_build a88_build a386_build \ |
3570 |
-- ax86_64_build a860_build appc_build appc64_build ahppa_build \ |
3571 |
-- $(A_BUILD) asparc_build |
3572 |
-+all: $(OFILE_DIRS) $(SYM_DIRS) driver_build a386_build \ |
3573 |
-+ ax86_64_build appc_build appc64_build \ |
3574 |
-+ $(A_BUILD) |
3575 |
-+ |
3576 |
-+ifeq "yes" "$(BUILD_OBSOLETE_ARCH)" |
3577 |
-+all: a68_build a88_build a860_build ahppa_build asparc_build |
3578 |
-+endif |
3579 |
- |
3580 |
- all_test: a68_test a88_test a860_test a386_test appc_test ahppa_test |
3581 |
- |
3582 |
-@@ -414,12 +427,14 @@ |
3583 |
- $(MKDIRS) $(DSTROOT)$(LIBDIR)/ppc64 |
3584 |
- install -c -s -m 555 $(SYMROOT)/appc64_dir/as \ |
3585 |
- $(DSTROOT)$(LIBDIR)/ppc64/as |
3586 |
-+ifeq "yes" "$(BUILD_OBSOLETE_ARCH)" |
3587 |
- $(MKDIRS) $(DSTROOT)$(LOCLIBDIR)/m68k |
3588 |
- install -c -s -m 555 $(SYMROOT)/a68_dir/as \ |
3589 |
- $(DSTROOT)$(LOCLIBDIR)/m68k/as |
3590 |
- $(MKDIRS) $(DSTROOT)$(LOCLIBDIR)/sparc |
3591 |
- install -c -s -m 555 $(SYMROOT)/asparc_dir/as \ |
3592 |
- $(DSTROOT)$(LOCLIBDIR)/sparc/as |
3593 |
-+endif |
3594 |
- |
3595 |
- nextstep_install: common_install |
3596 |
- $(MKDIRS) $(DSTROOT)$(BINDIR) |
3597 |
-@@ -439,6 +454,7 @@ |
3598 |
- $(DSTROOT)$(LOCLIBDIR)/ppc/as |
3599 |
- |
3600 |
- common_install: |
3601 |
-+ifeq "yes" "$(BUILD_OBSOLETE_ARCH)" |
3602 |
- $(MKDIRS) $(DSTROOT)$(LOCLIBDIR)/m88k |
3603 |
- install -c -s -m 555 $(SYMROOT)/a88_dir/as \ |
3604 |
- $(DSTROOT)$(LOCLIBDIR)/m88k/as |
3605 |
-@@ -448,6 +464,7 @@ |
3606 |
- $(MKDIRS) $(DSTROOT)$(LOCLIBDIR)/i860 |
3607 |
- install -s -m 555 $(SYMROOT)/a860_dir/as \ |
3608 |
- $(DSTROOT)$(LOCLIBDIR)/i860/as |
3609 |
-+endif |
3610 |
- |
3611 |
- $(OFILE_DIRS) $(SYM_DIRS): |
3612 |
- $(MKDIRS) $@ |
3613 |
|
3614 |
diff --git a/sys-devel/binutils-apple/files/binutils-apple-3.1.1-libtool-ranlib.patch b/sys-devel/binutils-apple/files/binutils-apple-3.1.1-libtool-ranlib.patch |
3615 |
deleted file mode 100644 |
3616 |
index fc86dde..0000000 |
3617 |
--- a/sys-devel/binutils-apple/files/binutils-apple-3.1.1-libtool-ranlib.patch |
3618 |
+++ /dev/null |
3619 |
@@ -1,17 +0,0 @@ |
3620 |
-match "ranlib" at the back of the string, such that <CHOST>-ranlib also |
3621 |
-works correctly |
3622 |
- |
3623 |
---- cctools-698/misc/libtool.c |
3624 |
-+++ cctools-698/misc/libtool.c |
3625 |
-@@ -336,8 +336,9 @@ |
3626 |
- p++; |
3627 |
- else |
3628 |
- p = argv[0]; |
3629 |
-- if(strncmp(p, "ranlib", sizeof("ranlib") - 1) == 0) |
3630 |
-- cmd_flags.ranlib = TRUE; |
3631 |
-+ if ((i = strlen(p)) >= sizeof("ranlib") - 1 && |
3632 |
-+ strcmp(p + (i - (sizeof("ranlib") - 1)), "ranlib") == 0) |
3633 |
-+ cmd_flags.ranlib = TRUE; |
3634 |
- |
3635 |
- /* The default is to used long names */ |
3636 |
- cmd_flags.use_long_names = TRUE; |
3637 |
|
3638 |
diff --git a/sys-devel/binutils-apple/files/binutils-apple-3.1.1-nmedit.patch b/sys-devel/binutils-apple/files/binutils-apple-3.1.1-nmedit.patch |
3639 |
deleted file mode 100644 |
3640 |
index 3b14e3d..0000000 |
3641 |
--- a/sys-devel/binutils-apple/files/binutils-apple-3.1.1-nmedit.patch |
3642 |
+++ /dev/null |
3643 |
@@ -1,15 +0,0 @@ |
3644 |
-don't create a symlink to nmedit from the dir nmedit is in |
3645 |
- |
3646 |
---- cctools-698/misc/Makefile |
3647 |
-+++ cctools-698/misc/Makefile |
3648 |
-@@ -427,8 +427,10 @@ |
3649 |
- install -c -s -m 555 $(SYMROOT)/redo_prebinding.NEW \ |
3650 |
- $(DSTROOT)$(USRBINDIR)/redo_prebinding |
3651 |
- install -c -s -m 555 $(SYMROOT)/nmedit.NEW $(DSTROOT)$(USRBINDIR)/nmedit |
3652 |
-+ifneq "$(USRBINDIR)" "$(LOCBINDIR)" |
3653 |
- (cd $(DSTROOT)$(LOCBINDIR); rm -f nmedit; \ |
3654 |
- ln -s $(USRBINDIR)/nmedit nmedit) |
3655 |
-+endif |
3656 |
- install -c -s -m 555 $(SYMROOT)/install_name_tool.NEW \ |
3657 |
- $(DSTROOT)$(USRBINDIR)/install_name_tool |
3658 |
- install -c -s -m 555 $(SYMROOT)/codesign_allocate.NEW \ |
3659 |
|
3660 |
diff --git a/sys-devel/binutils-apple/files/binutils-apple-3.1.1-no-efi-man.patch b/sys-devel/binutils-apple/files/binutils-apple-3.1.1-no-efi-man.patch |
3661 |
deleted file mode 100644 |
3662 |
index 978f1ab..0000000 |
3663 |
--- a/sys-devel/binutils-apple/files/binutils-apple-3.1.1-no-efi-man.patch |
3664 |
+++ /dev/null |
3665 |
@@ -1,38 +0,0 @@ |
3666 |
-don't install efi's manpages since we don't install efi |
3667 |
- |
3668 |
---- cctools-698/man/Makefile |
3669 |
-+++ cctools-698/man/Makefile |
3670 |
-@@ -27,14 +27,21 @@ |
3671 |
- MANL3 = libsyminfo.3 redo_prebinding.3 |
3672 |
- |
3673 |
- INSTALL_FILES = Makefile $(COMMON_MAN1) $(OTHER_MAN1) $(MAN3) $(MAN5) $(MANL) \ |
3674 |
-- $(MANL3) $(DYLD_MAN1) $(DYLD_MAN3) $(DYLD_MANL3) $(EFI1) notes |
3675 |
-+ $(MANL3) $(DYLD_MAN1) $(DYLD_MAN3) $(DYLD_MANL3) notes |
3676 |
-+ |
3677 |
-+ifeq "$(EFITOOLS)" "efitools" |
3678 |
-+ INSTALL_FILES += $(EFI1) |
3679 |
-+endif |
3680 |
- |
3681 |
- MANDIR = /usr/share/man |
3682 |
- LOCMANDIR = /usr/local/man |
3683 |
- EFIMANDIR = /usr/local/efi/share/man |
3684 |
- DSTDIRS = $(DSTROOT)$(MANDIR)/man1 $(DSTROOT)$(MANDIR)/man3 \ |
3685 |
- $(DSTROOT)$(MANDIR)/man5 $(DSTROOT)$(LOCMANDIR)/man1 \ |
3686 |
-- $(DSTROOT)$(LOCMANDIR)/man3 $(DSTROOT)$(EFIMANDIR)/man1 |
3687 |
-+ $(DSTROOT)$(LOCMANDIR)/man3 |
3688 |
-+ifeq "$(EFITOOLS)" "efitools" |
3689 |
-+ DSTDIR += $(DSTROOT)$(EFIMANDIR)/man1 |
3690 |
-+endif |
3691 |
- |
3692 |
- install: $(DSTDIRS) $(COMMON_MAN1) $(OTHER_MAN1) $(MAN3) $(MAN5) $(MANL) \ |
3693 |
- $(RC_OS) $(MANL3) |
3694 |
-@@ -51,7 +58,9 @@ |
3695 |
- install -c -m 444 $(MAN5) $(DSTROOT)$(MANDIR)/man5 |
3696 |
- install -c -m 444 $(MANL) $(DSTROOT)$(LOCMANDIR)/man1 |
3697 |
- install -c -m 444 $(MANL3) $(DSTROOT)$(LOCMANDIR)/man3 |
3698 |
-+ifeq "$(EFITOOLS)" "efitools" |
3699 |
- install -c -m 444 $(EFI1) $(DSTROOT)$(EFIMANDIR)/man1 |
3700 |
-+endif |
3701 |
- if [ $(OLD_DYLD_STUFF) ]; \ |
3702 |
- then \ |
3703 |
- install -c -m 444 $(DYLD_MANL3) $(DSTROOT)$(LOCMANDIR)/man3;\ |
3704 |
|
3705 |
diff --git a/sys-devel/binutils-apple/files/binutils-apple-3.1.1-no-headers.patch b/sys-devel/binutils-apple/files/binutils-apple-3.1.1-no-headers.patch |
3706 |
deleted file mode 100644 |
3707 |
index 098a95f..0000000 |
3708 |
--- a/sys-devel/binutils-apple/files/binutils-apple-3.1.1-no-headers.patch |
3709 |
+++ /dev/null |
3710 |
@@ -1,15 +0,0 @@ |
3711 |
-get rid of libraries, includes, and obsolete manpages |
3712 |
- |
3713 |
---- cctools-698/Makefile |
3714 |
-+++ cctools-698/Makefile |
3715 |
-@@ -170,7 +170,9 @@ |
3716 |
- DSTROOT=$$DSTROOT install_tools lib_ofiles_install; \ |
3717 |
- fi |
3718 |
- |
3719 |
--install_tools: installhdrs |
3720 |
-+install_tools: installhdrs install_all_but_headers |
3721 |
-+ |
3722 |
-+install_all_but_headers: |
3723 |
- @if [ $(SRCROOT) ]; \ |
3724 |
- then \ |
3725 |
- CWD=`pwd`; cd "$(DSTROOT)"; DSTROOT=`pwd`; cd "$$CWD"; \ |
3726 |
|
3727 |
diff --git a/sys-devel/binutils-apple/files/binutils-apple-3.1.1-no-oss-dir.patch b/sys-devel/binutils-apple/files/binutils-apple-3.1.1-no-oss-dir.patch |
3728 |
deleted file mode 100644 |
3729 |
index 5ed8237..0000000 |
3730 |
--- a/sys-devel/binutils-apple/files/binutils-apple-3.1.1-no-oss-dir.patch |
3731 |
+++ /dev/null |
3732 |
@@ -1,17 +0,0 @@ |
3733 |
-don't create an OpenSource dir |
3734 |
- |
3735 |
---- cctools-698/as/Makefile |
3736 |
-+++ cctools-698/as/Makefile |
3737 |
-@@ -408,12 +408,6 @@ |
3738 |
- $(MKDIRS) $(DSTROOT)$(USRBINDIR) |
3739 |
- install -c -s -m 555 $(SYMROOT)/driver_dir/driver \ |
3740 |
- $(DSTROOT)$(USRBINDIR)/as |
3741 |
-- $(MKDIRS) $(DSTROOT)/usr/local/OpenSourceVersions/ |
3742 |
-- install -c -s -m 444 $(SRCROOT)/cctools.plist \ |
3743 |
-- $(DSTROOT)/usr/local/OpenSourceVersions/cctools.plist |
3744 |
-- $(MKDIRS) $(DSTROOT)/usr/local/OpenSourceLicenses/ |
3745 |
-- install -c -s -m 444 $(SRCROOT)/COPYING \ |
3746 |
-- $(DSTROOT)/usr/local/OpenSourceLicenses/cctools.txt |
3747 |
- $(MKDIRS) $(DSTROOT)$(LIBDIR)/ppc |
3748 |
- install -c -s -m 555 $(SYMROOT)/appc_dir/as \ |
3749 |
- $(DSTROOT)$(LIBDIR)/ppc/as |
3750 |
|
3751 |
diff --git a/sys-devel/binutils-apple/files/binutils-apple-3.1.1-ranlib.patch b/sys-devel/binutils-apple/files/binutils-apple-3.1.1-ranlib.patch |
3752 |
deleted file mode 100644 |
3753 |
index 94865fb..0000000 |
3754 |
--- a/sys-devel/binutils-apple/files/binutils-apple-3.1.1-ranlib.patch |
3755 |
+++ /dev/null |
3756 |
@@ -1,53 +0,0 @@ |
3757 |
-run ranlib before installation so we needn't touch permissions |
3758 |
- |
3759 |
---- cctools-698/libmacho/Makefile |
3760 |
-+++ cctools-698/libmacho/Makefile |
3761 |
-@@ -316,29 +316,29 @@ |
3762 |
- $(MKDIRS) $(DSTROOT)$(SYSTEMDIR) |
3763 |
- if [ $(SRCROOT) = . ]; \ |
3764 |
- then \ |
3765 |
-+ ranlib dtmp_obj/libmacho.a; \ |
3766 |
- install -c -m 444 dtmp_obj/libmacho.a \ |
3767 |
- $(DSTROOT)$(SYSTEMDIR)/libmacho.a; \ |
3768 |
-- ranlib $(DSTROOT)$(SYSTEMDIR)/libmacho.a; \ |
3769 |
- (cd $(DSTROOT)$(SYSTEMDIR) ; \ |
3770 |
- rm -f libmacho_debug.a ; ln -s libmacho.a libmacho_debug.a); \ |
3771 |
-+ ranlib ptmp_obj/libmacho_pg.a; \ |
3772 |
- install -c -m 444 ptmp_obj/libmacho_pg.a \ |
3773 |
- $(DSTROOT)$(SYSTEMDIR)/libmacho_profile.a; \ |
3774 |
-- ranlib $(DSTROOT)$(SYSTEMDIR)/libmacho_profile.a; \ |
3775 |
-+ ranlib otmp_obj/libmacho_static.a; \ |
3776 |
- install -c -m 444 otmp_obj/libmacho_static.a \ |
3777 |
- $(DSTROOT)$(SYSTEMDIR)/libmacho_static.a; \ |
3778 |
-- ranlib $(DSTROOT)$(SYSTEMDIR)/libmacho_static.a; \ |
3779 |
- else \ |
3780 |
-+ ranlib $(SYMROOT)/libmacho.a; \ |
3781 |
- install -c -m 444 $(SYMROOT)/libmacho.a \ |
3782 |
- $(DSTROOT)$(SYSTEMDIR)/libmacho.a; \ |
3783 |
-- ranlib $(DSTROOT)$(SYSTEMDIR)/libmacho.a; \ |
3784 |
- (cd $(DSTROOT)$(SYSTEMDIR) ; \ |
3785 |
- rm -f libmacho_debug.a ; ln -s libmacho.a libmacho_debug.a); \ |
3786 |
-+ ranlib $(SYMROOT)/libmacho_pg.a; \ |
3787 |
- install -c -m 444 $(SYMROOT)/libmacho_pg.a \ |
3788 |
- $(DSTROOT)$(SYSTEMDIR)/libmacho_profile.a; \ |
3789 |
-- ranlib $(DSTROOT)$(SYSTEMDIR)/libmacho_profile.a; \ |
3790 |
-+ ranlib $(SYMROOT)/libmacho_static.a; \ |
3791 |
- install -c -m 444 $(SYMROOT)/libmacho_static.a \ |
3792 |
- $(DSTROOT)$(SYSTEMDIR)/libmacho_static.a; \ |
3793 |
-- ranlib $(DSTROOT)$(SYSTEMDIR)/libmacho_static.a; \ |
3794 |
- fi |
3795 |
- |
3796 |
- teflon_lib_ofiles_install nextstep_lib_ofiles_install: |
3797 |
---- cctools-698/cbtlibs/Makefile |
3798 |
-+++ cctools-698/cbtlibs/Makefile |
3799 |
-@@ -80,9 +80,9 @@ |
3800 |
- |
3801 |
- lib_ofiles_install: lib_ofiles |
3802 |
- $(MKDIRS) $(DSTROOT)$(LOCLIBDIR) |
3803 |
-+ ranlib $(SYMROOT)/libsyminfo.a |
3804 |
- install -p -c -m 444 $(SYMROOT)/libsyminfo.a \ |
3805 |
- $(DSTROOT)$(LOCLIBDIR)/libsyminfo.a |
3806 |
-- ranlib $(DSTROOT)$(LOCLIBDIR)/libsyminfo.a |
3807 |
- |
3808 |
- -include $(OFILE_DIR)/Makedep |
3809 |
- |
3810 |
|
3811 |
diff --git a/sys-devel/binutils-apple/files/binutils-apple-3.1.1-testsuite.patch b/sys-devel/binutils-apple/files/binutils-apple-3.1.1-testsuite.patch |
3812 |
deleted file mode 100644 |
3813 |
index b391326..0000000 |
3814 |
--- a/sys-devel/binutils-apple/files/binutils-apple-3.1.1-testsuite.patch |
3815 |
+++ /dev/null |
3816 |
@@ -1,102 +0,0 @@ |
3817 |
-fix the test suite so it is even usable |
3818 |
- |
3819 |
---- ld64-85.2.2/unit-tests/test-cases/commons-alignment/Makefile |
3820 |
-+++ ld64-85.2.2/unit-tests/test-cases/commons-alignment/Makefile |
3821 |
-@@ -29,9 +29,9 @@ |
3822 |
- |
3823 |
- all: |
3824 |
- ${CC} ${CCFLAGS} foo.s -c -o foo.o |
3825 |
-- nm -m foo.o | grep '(alignment 2^6)' | ${FAIL_IF_EMPTY} |
3826 |
-+ nm -m foo.o | fgrep '(alignment 2^6)' | ${FAIL_IF_EMPTY} |
3827 |
- ${LD} foo.o -r -o foo2.o |
3828 |
-- nm -m foo2.o | grep '(alignment 2^6)' | ${PASS_IFF_STDIN} |
3829 |
-+ nm -m foo2.o | fgrep '(alignment 2^6)' | ${PASS_IFF_STDIN} |
3830 |
- |
3831 |
- clean: |
3832 |
- rm -rf foo.o foo2.o |
3833 |
---- ld64-85.2.2/unit-tests/test-cases/order_file/Makefile |
3834 |
-+++ ld64-85.2.2/unit-tests/test-cases/order_file/Makefile |
3835 |
-@@ -33,7 +33,7 @@ |
3836 |
- run: all |
3837 |
- |
3838 |
- all: |
3839 |
-- as -arch ${ARCH} -L extra.s -o extra.o |
3840 |
-+ as -L extra.s -o extra.o |
3841 |
- ${CC} ${CCFLAGS} main.c extra.o -o main1 -Wl,-order_file -Wl,main1.order |
3842 |
- ${FAIL_IF_BAD_MACHO} main1 |
3843 |
- nm -n -g -j main1 | grep "_main" > main1.nm |
3844 |
-@@ -44,7 +44,7 @@ |
3845 |
- nm -n -j main2 | egrep '^_[a-z]+[0-9]$$' > main2.nm |
3846 |
- ${PASS_IFF} diff main2.nm main2.expected |
3847 |
- |
3848 |
-- ${CC} -arch ${ARCH} -c main.c -o main.o |
3849 |
-+ ${CC} -c main.c -o main.o |
3850 |
- ${CC} ${CCFLAGS} main.o extra.o -o main3 -Wl,-order_file -Wl,main3.order |
3851 |
- ${FAIL_IF_BAD_MACHO} main3 |
3852 |
- nm -n -g -j main3 | grep "_main" > main3.nm |
3853 |
---- ld64-85.2.2/unit-tests/test-cases/16-byte-alignment/Makefile |
3854 |
-+++ ld64-85.2.2/unit-tests/test-cases/16-byte-alignment/Makefile |
3855 |
-@@ -30,13 +30,13 @@ |
3856 |
- run: all |
3857 |
- |
3858 |
- all: |
3859 |
-- ${FAIL_IF_ERROR} ${CC} ${CCFLAGS} -arch ${ARCH} -c -O2 tl_test2.c -o tl_test2-${ARCH}.o |
3860 |
-+ ${FAIL_IF_ERROR} ${CC} ${CCFLAGS} -c -O2 tl_test2.c -o tl_test2-${ARCH}.o |
3861 |
- |
3862 |
- # verify that the alignment is correct in the .o |
3863 |
- ObjectDump -only _ai -align -no_content tl_test2-${ARCH}.o|${FAIL_IF_ERROR} grep '\<0 mod 16\>' >/dev/null |
3864 |
- |
3865 |
- # now verify the executable |
3866 |
-- ${FAIL_IF_ERROR} ${CC} ${CCFLAGS} -arch ${ARCH} -O2 tl_test2-${ARCH}.o -o tl_test2-${ARCH} |
3867 |
-+ ${FAIL_IF_ERROR} ${CC} ${CCFLAGS} -O2 tl_test2-${ARCH}.o -o tl_test2-${ARCH} |
3868 |
- ${FAIL_IF_ERROR} sh -c "nm tl_test2-${ARCH}|grep '0 D _ai\>' >/dev/null" |
3869 |
- ${PASS_IFF_GOOD_MACHO} tl_test2-${ARCH} |
3870 |
- |
3871 |
---- ld64-85.2.2/unit-tests/test-cases/eh-strip-test/Makefile |
3872 |
-+++ ld64-85.2.2/unit-tests/test-cases/eh-strip-test/Makefile |
3873 |
-@@ -27,7 +27,7 @@ |
3874 |
- |
3875 |
- |
3876 |
- all: |
3877 |
-- ${FAIL_IF_ERROR} $(CXX) main.cxx -arch ${ARCH} -o main |
3878 |
-+ ${FAIL_IF_ERROR} $(CXX) main.cxx -o main |
3879 |
- ${FAIL_IF_ERROR} nm -j main | grep '\.eh$$'| ${FAIL_IF_STDIN} |
3880 |
- ${PASS_IFF_GOOD_MACHO} main |
3881 |
- clean: |
3882 |
---- ld64-85.2.2/unit-tests/test-cases/strip-test2/Makefile |
3883 |
-+++ ld64-85.2.2/unit-tests/test-cases/strip-test2/Makefile |
3884 |
-@@ -50,10 +50,10 @@ |
3885 |
- |
3886 |
- |
3887 |
- all: |
3888 |
-- $(CXX) main.cxx -arch ${ARCH} -o main |
3889 |
-+ $(CXX) main.cxx -o main |
3890 |
- ${FAIL_IF_BAD_MACHO} main |
3891 |
- ${FAIL_IF_ERROR} nm -j main >main-no-strip.nm |
3892 |
-- $(CXX) main.cxx -arch ${ARCH} -o main |
3893 |
-+ $(CXX) main.cxx -o main |
3894 |
- ${FAIL_IF_BAD_MACHO} main |
3895 |
- |
3896 |
- # Make sure there are no symbols in the stripped file that aren't |
3897 |
---- ld64-85.2.2/unit-tests/test-cases/literals-coalesce/Makefile |
3898 |
-+++ ld64-85.2.2/unit-tests/test-cases/literals-coalesce/Makefile |
3899 |
-@@ -32,7 +32,7 @@ |
3900 |
- |
3901 |
- all: |
3902 |
- ${CC} ${ASMFLAGS} literals.s -c -o literals-${ARCH}.o |
3903 |
-- ${FAIL_IF_ERROR} ${OBJECTDUMP} literals-${ARCH}.o | grep 'name:'| uniq -c | grep -v '^ [1|2]' | ${FAIL_IF_STDIN} |
3904 |
-+ ${FAIL_IF_ERROR} ${OBJECTDUMP} literals-${ARCH}.o | grep 'name:'| uniq -c | grep -v '^ *[1|2]' | ${FAIL_IF_STDIN} |
3905 |
- ${LD} -arch ${ARCH} -r literals-${ARCH}.o -o literals-r-${ARCH}.o |
3906 |
- ${FAIL_IF_ERROR} ${OBJECTDUMP} literals-r-${ARCH}.o | grep 'name:' | uniq -d | ${PASS_IFF_EMPTY} |
3907 |
- |
3908 |
---- ld64-85.2.2/unit-tests/test-cases/stabs-coalesce/Makefile |
3909 |
-+++ ld64-85.2.2/unit-tests/test-cases/stabs-coalesce/Makefile |
3910 |
-@@ -38,7 +38,7 @@ |
3911 |
- ${FAIL_IF_BAD_MACHO} stabs-hello-${ARCH} |
3912 |
- nm -ap stabs-hello-${ARCH} | grep FUN | grep _Z3fooi | wc -l > stabs-hello-foo-count |
3913 |
- echo " 1" > one |
3914 |
-- ${PASS_IFF} diff stabs-hello-foo-count one |
3915 |
-+ ${PASS_IFF} diff -w stabs-hello-foo-count one |
3916 |
- |
3917 |
- hello.o : hello.cxx |
3918 |
- ${CXX} ${CCXXFLAGS} -gstabs+ -gused hello.cxx -c -o $@ |
3919 |
|
3920 |
diff --git a/sys-devel/binutils-apple/files/binutils-apple-3.1.2-as-Makefile.patch b/sys-devel/binutils-apple/files/binutils-apple-3.1.2-as-Makefile.patch |
3921 |
deleted file mode 100644 |
3922 |
index 554fed1..0000000 |
3923 |
--- a/sys-devel/binutils-apple/files/binutils-apple-3.1.2-as-Makefile.patch |
3924 |
+++ /dev/null |
3925 |
@@ -1,11 +0,0 @@ |
3926 |
---- as/Makefile |
3927 |
-+++ as/Makefile |
3928 |
-@@ -343,7 +343,7 @@ |
3929 |
- makeUser.o $(LIBSTUFF_DIR) $(LIBSTUFF) |
3930 |
- $(CC) $(CFLAGS) $(RC_CFLAGS) -o $(SYMROOT)/as $(SYMROOT)/as.private.o |
3931 |
- |
3932 |
--makeUser.c messages.c: make.h |
3933 |
-+makeUser.c ../messages.c: make.h |
3934 |
- |
3935 |
- make.h makeUser.c: make.defs |
3936 |
- $(MIG) $(MIG_FLAGS) $(SRCROOT)/make.defs |
3937 |
|
3938 |
diff --git a/sys-devel/binutils-apple/files/binutils-apple-3.2-armv7-defines.patch b/sys-devel/binutils-apple/files/binutils-apple-3.2-armv7-defines.patch |
3939 |
deleted file mode 100644 |
3940 |
index d89a0c1..0000000 |
3941 |
--- a/sys-devel/binutils-apple/files/binutils-apple-3.2-armv7-defines.patch |
3942 |
+++ /dev/null |
3943 |
@@ -1,10 +0,0 @@ |
3944 |
---- cctools/include/mach/machine.h |
3945 |
-+++ cctools/include/mach/machine.h |
3946 |
-@@ -306,6 +306,7 @@ |
3947 |
- #define CPU_SUBTYPE_ARM_V6 ((cpu_subtype_t) 6) |
3948 |
- #define CPU_SUBTYPE_ARM_V5TEJ ((cpu_subtype_t) 7) |
3949 |
- #define CPU_SUBTYPE_ARM_XSCALE ((cpu_subtype_t) 8) |
3950 |
-+#define CPU_SUBTYPE_ARM_V7 ((cpu_subtype_t) 9) |
3951 |
- |
3952 |
- /* |
3953 |
- * MC88000 subtypes |
3954 |
|
3955 |
diff --git a/sys-devel/binutils-apple/files/binutils-apple-3.2.2-as.patch b/sys-devel/binutils-apple/files/binutils-apple-3.2.2-as.patch |
3956 |
deleted file mode 100644 |
3957 |
index f032e1b..0000000 |
3958 |
--- a/sys-devel/binutils-apple/files/binutils-apple-3.2.2-as.patch |
3959 |
+++ /dev/null |
3960 |
@@ -1,101 +0,0 @@ |
3961 |
-make building for obsolete architectures optional. |
3962 |
- |
3963 |
---- as/Makefile |
3964 |
-+++ as/Makefile |
3965 |
-@@ -1,3 +1,4 @@ |
3966 |
-+BUILD_OBSOLETE_ARCH = yes |
3967 |
- RC_OS = macos |
3968 |
- export USE_APPLE_PB_SUPPORT = all |
3969 |
- OFLAG = |
3970 |
-@@ -32,28 +33,36 @@ |
3971 |
- SYMROOT = . |
3972 |
- OBJROOT = . |
3973 |
- SYM_DIRS = $(SYMROOT)/driver_dir \ |
3974 |
-- $(SYMROOT)/a68_dir \ |
3975 |
-- $(SYMROOT)/a88_dir \ |
3976 |
- $(SYMROOT)/a386_dir \ |
3977 |
- $(SYMROOT)/ax86_64_dir \ |
3978 |
- $(SYMROOT)/appc_dir \ |
3979 |
- $(SYMROOT)/appc64_dir \ |
3980 |
-+ $(SYMROOT)/aarm_dir |
3981 |
-+ |
3982 |
-+ifeq "yes" "$(BUILD_OBSOLETE_ARCH)" |
3983 |
-+SYM_DIRS += \ |
3984 |
-+ $(SYMROOT)/a68_dir \ |
3985 |
-+ $(SYMROOT)/a88_dir \ |
3986 |
- $(SYMROOT)/a860_dir \ |
3987 |
- $(SYMROOT)/ahppa_dir \ |
3988 |
-- $(SYMROOT)/asparc_dir \ |
3989 |
-- $(SYMROOT)/aarm_dir |
3990 |
-+ $(SYMROOT)/asparc_dir |
3991 |
-+endif |
3992 |
- |
3993 |
- OFILE_DIRS = $(OBJROOT)/driver_dir \ |
3994 |
-- $(OBJROOT)/a68_dir \ |
3995 |
-- $(OBJROOT)/a88_dir \ |
3996 |
- $(OBJROOT)/a386_dir \ |
3997 |
- $(OBJROOT)/ax86_64_dir \ |
3998 |
- $(OBJROOT)/appc_dir \ |
3999 |
- $(OBJROOT)/appc64_dir \ |
4000 |
-+ $(OBJROOT)/aarm_dir |
4001 |
-+ |
4002 |
-+ifeq "yes" "$(BUILD_OBSOLETE_ARCH)" |
4003 |
-+OFILE_DIRS += \ |
4004 |
-+ $(OBJROOT)/a68_dir \ |
4005 |
-+ $(OBJROOT)/a88_dir \ |
4006 |
- $(OBJROOT)/a860_dir \ |
4007 |
- $(OBJROOT)/ahppa_dir \ |
4008 |
-- $(OBJROOT)/asparc_dir \ |
4009 |
-- $(OBJROOT)/aarm_dir |
4010 |
-+ $(OBJROOT)/asparc_dir |
4011 |
-+endif |
4012 |
- |
4013 |
- BINDIR = /bin |
4014 |
- USRBINDIR = /usr/bin |
4015 |
-@@ -115,9 +124,12 @@ |
4016 |
- OBJS_sparc = $(CFILES_sparc:.c=.o) |
4017 |
- OBJS_arm = $(CFILES_arm:.c=.o) |
4018 |
- |
4019 |
--all: $(OFILE_DIRS) $(SYM_DIRS) driver_build a68_build a88_build a386_build \ |
4020 |
-- ax86_64_build a860_build appc_build appc64_build ahppa_build \ |
4021 |
-- aarm_build asparc_build |
4022 |
-+all: $(OFILE_DIRS) $(SYM_DIRS) driver_build a386_build \ |
4023 |
-+ ax86_64_build appc_build appc64_build aarm_build |
4024 |
-+ |
4025 |
-+ifeq "yes" "$(BUILD_OBSOLETE_ARCH)" |
4026 |
-+all: a68_build a88_build a860_build ahppa_build asparc_build |
4027 |
-+endif |
4028 |
- |
4029 |
- all_test: a68_test a88_test a860_test a386_test appc_test ahppa_test |
4030 |
- |
4031 |
-@@ -429,12 +441,14 @@ |
4032 |
- $(MKDIRS) $(DSTROOT)$(LIBDIR)/ppc64 |
4033 |
- install -c -s -m 555 $(SYMROOT)/appc64_dir/as \ |
4034 |
- $(DSTROOT)$(LIBDIR)/ppc64/as |
4035 |
-+ifeq "yes" "$(BUILD_OBSOLETE_ARCH)" |
4036 |
- $(MKDIRS) $(DSTROOT)$(LOCLIBDIR)/m68k |
4037 |
- install -c -s -m 555 $(SYMROOT)/a68_dir/as \ |
4038 |
- $(DSTROOT)$(LOCLIBDIR)/m68k/as |
4039 |
- $(MKDIRS) $(DSTROOT)$(LOCLIBDIR)/sparc |
4040 |
- install -c -s -m 555 $(SYMROOT)/asparc_dir/as \ |
4041 |
- $(DSTROOT)$(LOCLIBDIR)/sparc/as |
4042 |
-+endif |
4043 |
- $(MKDIRS) $(DSTROOT)$(LIBDIR)/arm |
4044 |
- install -c -s -m 555 $(SYMROOT)/aarm_dir/as \ |
4045 |
- $(DSTROOT)$(LIBDIR)/arm/as |
4046 |
-@@ -457,6 +471,7 @@ |
4047 |
- $(DSTROOT)$(LOCLIBDIR)/ppc/as |
4048 |
- |
4049 |
- common_install: |
4050 |
-+ifeq "yes" "$(BUILD_OBSOLETE_ARCH)" |
4051 |
- $(MKDIRS) $(DSTROOT)$(LOCLIBDIR)/m88k |
4052 |
- install -s -m 555 $(SYMROOT)/a88_dir/as \ |
4053 |
- $(DSTROOT)$(LOCLIBDIR)/m88k/as |
4054 |
-@@ -466,6 +481,7 @@ |
4055 |
- $(MKDIRS) $(DSTROOT)$(LOCLIBDIR)/i860 |
4056 |
- install -s -m 555 $(SYMROOT)/a860_dir/as \ |
4057 |
- $(DSTROOT)$(LOCLIBDIR)/i860/as |
4058 |
-+endif |
4059 |
- |
4060 |
- $(OFILE_DIRS) $(SYM_DIRS): |
4061 |
- $(MKDIRS) $@ |
4062 |
|
4063 |
diff --git a/sys-devel/binutils-apple/files/binutils-apple-3.2.3-ranlib.patch b/sys-devel/binutils-apple/files/binutils-apple-3.2.3-ranlib.patch |
4064 |
deleted file mode 100644 |
4065 |
index e529274..0000000 |
4066 |
--- a/sys-devel/binutils-apple/files/binutils-apple-3.2.3-ranlib.patch |
4067 |
+++ /dev/null |
4068 |
@@ -1,59 +0,0 @@ |
4069 |
-run ranlib before installation so we needn't touch permissions |
4070 |
- |
4071 |
---- cctools-782/cbtlibs/Makefile 2009-12-16 20:34:18.000000000 +0100 |
4072 |
-+++ cctools-782/cbtlibs/Makefile.new 2010-07-30 20:08:22.000000000 +0200 |
4073 |
-@@ -84,9 +84,9 @@ libsyminfo.a: libsyminfo.o |
4074 |
- |
4075 |
- lib_ofiles_install: lib_ofiles |
4076 |
- $(MKDIRS) $(DSTROOT)$(LOCLIBDIR) |
4077 |
-+ ranlib $(DSTROOT)$(LOCLIBDIR)/libsyminfo.a |
4078 |
- install -p -c -m 444 $(SYMROOT)/libsyminfo.a \ |
4079 |
- $(DSTROOT)$(LOCLIBDIR)/libsyminfo.a |
4080 |
-- ranlib $(DSTROOT)$(LOCLIBDIR)/libsyminfo.a |
4081 |
- |
4082 |
- -include $(OFILE_DIR)/Makedep |
4083 |
- |
4084 |
---- cctools-782/libmacho/Makefile 2010-03-30 00:57:21.000000000 +0200 |
4085 |
-+++ cctools-782/libmacho/Makefile.new 2010-07-30 20:07:57.000000000 +0200 |
4086 |
-@@ -357,17 +357,17 @@ macos_lib_ofiles_install: all |
4087 |
- $(MKDIRS) $(DSTROOT)$(ARCHIVEDIR) $(DSTROOT)$(DYLIBDIR) |
4088 |
- if [ $(SRCROOT) = . ]; \ |
4089 |
- then \ |
4090 |
-+ ranlib $(DSTROOT)$(ARCHIVEDIR)/libmacho.a; \ |
4091 |
- install -c -m 444 dtmp_obj/libmacho.a \ |
4092 |
- $(DSTROOT)$(ARCHIVEDIR)/libmacho.a; \ |
4093 |
-- ranlib $(DSTROOT)$(ARCHIVEDIR)/libmacho.a; \ |
4094 |
- (cd $(DSTROOT)$(ARCHIVEDIR) ; \ |
4095 |
- rm -f libmacho_debug.a ; ln -s libmacho.a libmacho_debug.a); \ |
4096 |
-+ ranlib $(DSTROOT)$(ARCHIVEDIR)/libmacho_profile.a; \ |
4097 |
- install -c -m 444 ptmp_obj/libmacho_pg.a \ |
4098 |
- $(DSTROOT)$(ARCHIVEDIR)/libmacho_profile.a; \ |
4099 |
-- ranlib $(DSTROOT)$(ARCHIVEDIR)/libmacho_profile.a; \ |
4100 |
-+ ranlib $(DSTROOT)$(ARCHIVEDIR)/libmacho_static.a; \ |
4101 |
- install -c -m 444 otmp_obj/libmacho_static.a \ |
4102 |
- $(DSTROOT)$(ARCHIVEDIR)/libmacho_static.a; \ |
4103 |
-- ranlib $(DSTROOT)$(ARCHIVEDIR)/libmacho_static.a; \ |
4104 |
- install -c -m 555 dtmp_obj/libmacho.dylib \ |
4105 |
- $(DSTROOT)$(DYLIBDIR)/libmacho.dylib; \ |
4106 |
- strip -S $(DSTROOT)$(DYLIBDIR)/libmacho.dylib; \ |
4107 |
-@@ -378,17 +378,17 @@ macos_lib_ofiles_install: all |
4108 |
- $(DSTROOT)$(DYLIBDIR)/libmacho_debug.dylib; \ |
4109 |
- strip -S $(DSTROOT)$(DYLIBDIR)/libmacho_debug.dylib; \ |
4110 |
- else \ |
4111 |
-+ ranlib $(DSTROOT)$(ARCHIVEDIR)/libmacho.a; \ |
4112 |
- install -c -m 444 $(SYMROOT)/libmacho.a \ |
4113 |
- $(DSTROOT)$(ARCHIVEDIR)/libmacho.a; \ |
4114 |
-- ranlib $(DSTROOT)$(ARCHIVEDIR)/libmacho.a; \ |
4115 |
- (cd $(DSTROOT)$(ARCHIVEDIR) ; \ |
4116 |
- rm -f libmacho_debug.a ; ln -s libmacho.a libmacho_debug.a); \ |
4117 |
-+ ranlib $(DSTROOT)$(ARCHIVEDIR)/libmacho_profile.a; \ |
4118 |
- install -c -m 444 $(SYMROOT)/libmacho_pg.a \ |
4119 |
- $(DSTROOT)$(ARCHIVEDIR)/libmacho_profile.a; \ |
4120 |
-- ranlib $(DSTROOT)$(ARCHIVEDIR)/libmacho_profile.a; \ |
4121 |
-+ ranlib $(DSTROOT)$(ARCHIVEDIR)/libmacho_static.a; \ |
4122 |
- install -c -m 444 $(SYMROOT)/libmacho_static.a \ |
4123 |
- $(DSTROOT)$(ARCHIVEDIR)/libmacho_static.a; \ |
4124 |
-- ranlib $(DSTROOT)$(ARCHIVEDIR)/libmacho_static.a; \ |
4125 |
- install -c -m 555 $(SYMROOT)/libmacho.dylib \ |
4126 |
- $(DSTROOT)$(DYLIBDIR)/libmacho.dylib; \ |
4127 |
- strip -S $(DSTROOT)$(DYLIBDIR)/libmacho.dylib; \ |
4128 |
|
4129 |
diff --git a/sys-devel/binutils-apple/files/binutils-apple-4.0-as-dir.patch b/sys-devel/binutils-apple/files/binutils-apple-4.0-as-dir.patch |
4130 |
deleted file mode 100644 |
4131 |
index 0a6664c..0000000 |
4132 |
--- a/sys-devel/binutils-apple/files/binutils-apple-4.0-as-dir.patch |
4133 |
+++ /dev/null |
4134 |
@@ -1,67 +0,0 @@ |
4135 |
---- as/driver.c |
4136 |
-+++ as/driver.c |
4137 |
-@@ -28,6 +28,9 @@ |
4138 |
- char **envp) |
4139 |
- { |
4140 |
- const char *LIB = |
4141 |
-+#ifdef ASLIBEXECDIR |
4142 |
-+ ASLIBEXECDIR; |
4143 |
-+#else |
4144 |
- #if defined(__OPENSTEP__) || defined(__HERA__) || \ |
4145 |
- defined(__GONZO_BUNSEN_BEAKER__) || defined(__KODIAK__) |
4146 |
- "../libexec/"; |
4147 |
-@@ -41,6 +44,7 @@ |
4148 |
- #else |
4149 |
- "../local/libexec/gcc/darwin/"; |
4150 |
- #endif |
4151 |
-+#endif |
4152 |
- const char *AS = "/as"; |
4153 |
- const char *LLVM_MC = "llvm-mc"; |
4154 |
- |
4155 |
-@@ -240,7 +244,11 @@ |
4156 |
- |
4157 |
- } |
4158 |
- |
4159 |
-+#ifndef ASLIBEXECDIR |
4160 |
- as = makestr(prefix, LIB, arch_name, AS, NULL); |
4161 |
-+#else |
4162 |
-+ as = makestr(LIB, arch_name, AS, NULL); |
4163 |
-+#endif |
4164 |
- |
4165 |
- /* |
4166 |
- * If this assembler exist try to run it else print an error message. |
4167 |
-@@ -252,6 +260,10 @@ |
4168 |
- else |
4169 |
- exit(1); |
4170 |
- } |
4171 |
-+#ifdef ASLIBEXECDIR |
4172 |
-+ as_local = ""; |
4173 |
-+ { |
4174 |
-+#else |
4175 |
- as_local = makestr(prefix, LOCALLIB, arch_name, AS, NULL); |
4176 |
- if(access(as_local, F_OK) == 0){ |
4177 |
- argv[0] = as_local; |
4178 |
-@@ -261,6 +273,7 @@ |
4179 |
- exit(1); |
4180 |
- } |
4181 |
- else{ |
4182 |
-+#endif |
4183 |
- printf("%s: assembler (%s or %s) for architecture %s not " |
4184 |
- "installed\n", progname, as, as_local, arch_name); |
4185 |
- arch_flags = get_arch_flags(); |
4186 |
-@@ -273,6 +286,7 @@ |
4187 |
- printf("%s for architecture %s\n", as, arch_flags[i].name); |
4188 |
- count++; |
4189 |
- } |
4190 |
-+#ifndef ASLIBEXECDIR |
4191 |
- else{ |
4192 |
- as_local = makestr(prefix, LOCALLIB, arch_flags[i].name, |
4193 |
- AS, NULL); |
4194 |
-@@ -284,6 +298,7 @@ |
4195 |
- count++; |
4196 |
- } |
4197 |
- } |
4198 |
-+#endif |
4199 |
- } |
4200 |
- if(count == 0) |
4201 |
- printf("%s: no assemblers installed\n", progname); |
4202 |
|
4203 |
diff --git a/sys-devel/binutils-apple/files/binutils-apple-4.0-as.patch b/sys-devel/binutils-apple/files/binutils-apple-4.0-as.patch |
4204 |
deleted file mode 100644 |
4205 |
index 8df5877..0000000 |
4206 |
--- a/sys-devel/binutils-apple/files/binutils-apple-4.0-as.patch |
4207 |
+++ /dev/null |
4208 |
@@ -1,99 +0,0 @@ |
4209 |
---- as/Makefile |
4210 |
-+++ as/Makefile |
4211 |
-@@ -1,3 +1,4 @@ |
4212 |
-+BUILD_OBSOLETE_ARCH = yes |
4213 |
- RC_OS = macos |
4214 |
- export USE_APPLE_PB_SUPPORT = all |
4215 |
- OFLAG = -Os |
4216 |
-@@ -32,28 +33,36 @@ |
4217 |
- SYMROOT = . |
4218 |
- OBJROOT = . |
4219 |
- SYM_DIRS = $(SYMROOT)/driver_dir \ |
4220 |
-- $(SYMROOT)/a68_dir \ |
4221 |
-- $(SYMROOT)/a88_dir \ |
4222 |
- $(SYMROOT)/a386_dir \ |
4223 |
- $(SYMROOT)/ax86_64_dir \ |
4224 |
- $(SYMROOT)/appc_dir \ |
4225 |
- $(SYMROOT)/appc64_dir \ |
4226 |
-+ $(SYMROOT)/aarm_dir |
4227 |
-+ |
4228 |
-+ifeq "yes" "$(BUILD_OBSOLETE_ARCH)" |
4229 |
-+SYM_DIRS += \ |
4230 |
-+ $(SYMROOT)/a68_dir \ |
4231 |
-+ $(SYMROOT)/a88_dir \ |
4232 |
- $(SYMROOT)/a860_dir \ |
4233 |
- $(SYMROOT)/ahppa_dir \ |
4234 |
-- $(SYMROOT)/asparc_dir \ |
4235 |
-- $(SYMROOT)/aarm_dir |
4236 |
-+ $(SYMROOT)/asparc_dir |
4237 |
-+endif |
4238 |
- |
4239 |
- OFILE_DIRS = $(OBJROOT)/driver_dir \ |
4240 |
-- $(OBJROOT)/a68_dir \ |
4241 |
-- $(OBJROOT)/a88_dir \ |
4242 |
- $(OBJROOT)/a386_dir \ |
4243 |
- $(OBJROOT)/ax86_64_dir \ |
4244 |
- $(OBJROOT)/appc_dir \ |
4245 |
- $(OBJROOT)/appc64_dir \ |
4246 |
-+ $(OBJROOT)/aarm_dir |
4247 |
-+ |
4248 |
-+ifeq "yes" "$(BUILD_OBSOLETE_ARCH)" |
4249 |
-+OFILE_DIRS += \ |
4250 |
-+ $(OBJROOT)/a68_dir \ |
4251 |
-+ $(OBJROOT)/a88_dir \ |
4252 |
- $(OBJROOT)/a860_dir \ |
4253 |
- $(OBJROOT)/ahppa_dir \ |
4254 |
-- $(OBJROOT)/asparc_dir \ |
4255 |
-- $(OBJROOT)/aarm_dir |
4256 |
-+ $(OBJROOT)/asparc_dir |
4257 |
-+endif |
4258 |
- |
4259 |
- BINDIR = /bin |
4260 |
- USRBINDIR = /usr/bin |
4261 |
-@@ -115,9 +124,12 @@ |
4262 |
- OBJS_sparc = $(CFILES_sparc:.c=.o) |
4263 |
- OBJS_arm = $(CFILES_arm:.c=.o) |
4264 |
- |
4265 |
--all: $(OFILE_DIRS) $(SYM_DIRS) driver_build a68_build a88_build a386_build \ |
4266 |
-- ax86_64_build a860_build appc_build appc64_build ahppa_build \ |
4267 |
-- aarm_build asparc_build |
4268 |
-+all: $(OFILE_DIRS) $(SYM_DIRS) driver_build a386_build \ |
4269 |
-+ ax86_64_build appc_build appc64_build aarm_build |
4270 |
-+ |
4271 |
-+ifeq "yes" "$(BUILD_OBSOLETE_ARCH)" |
4272 |
-+all: a68_build a88_build a860_build ahppa_build asparc_build |
4273 |
-+endif |
4274 |
- |
4275 |
- all_test: a68_test a88_test a860_test a386_test appc_test ahppa_test |
4276 |
- |
4277 |
-@@ -452,12 +464,14 @@ |
4278 |
- $(MKDIRS) $(DSTROOT)$(LOCLIBDIR)/ppc64 |
4279 |
- install -c -s -m 555 $(SYMROOT)/appc64_dir/as \ |
4280 |
- $(DSTROOT)$(LOCLIBDIR)/ppc64/as |
4281 |
-+ifeq "yes" "$(BUILD_OBSOLETE_ARCH)" |
4282 |
- $(MKDIRS) $(DSTROOT)$(LOCLIBDIR)/m68k |
4283 |
- install -c -s -m 555 $(SYMROOT)/a68_dir/as \ |
4284 |
- $(DSTROOT)$(LOCLIBDIR)/m68k/as |
4285 |
- $(MKDIRS) $(DSTROOT)$(LOCLIBDIR)/sparc |
4286 |
- install -c -s -m 555 $(SYMROOT)/asparc_dir/as \ |
4287 |
- $(DSTROOT)$(LOCLIBDIR)/sparc/as |
4288 |
-+endif |
4289 |
- $(MKDIRS) $(DSTROOT)$(LIBDIR)/arm |
4290 |
- install -c -s -m 555 $(SYMROOT)/aarm_dir/as \ |
4291 |
- $(DSTROOT)$(LIBDIR)/arm/as |
4292 |
-@@ -480,6 +494,7 @@ |
4293 |
- $(DSTROOT)$(LOCLIBDIR)/ppc/as |
4294 |
- |
4295 |
- common_install: |
4296 |
-+ifeq "yes" "$(BUILD_OBSOLETE_ARCH)" |
4297 |
- $(MKDIRS) $(DSTROOT)$(LOCLIBDIR)/m88k |
4298 |
- install -c -s -m 555 $(SYMROOT)/a88_dir/as \ |
4299 |
- $(DSTROOT)$(LOCLIBDIR)/m88k/as |
4300 |
-@@ -489,6 +504,7 @@ |
4301 |
- $(MKDIRS) $(DSTROOT)$(LOCLIBDIR)/i860 |
4302 |
- install -s -m 555 $(SYMROOT)/a860_dir/as \ |
4303 |
- $(DSTROOT)$(LOCLIBDIR)/i860/as |
4304 |
-+endif |
4305 |
- |
4306 |
- $(OFILE_DIRS) $(SYM_DIRS): |
4307 |
- $(MKDIRS) $@ |
4308 |
|
4309 |
diff --git a/sys-devel/binutils-apple/files/binutils-apple-4.0-no-oss-dir.patch b/sys-devel/binutils-apple/files/binutils-apple-4.0-no-oss-dir.patch |
4310 |
deleted file mode 100644 |
4311 |
index fcce015..0000000 |
4312 |
--- a/sys-devel/binutils-apple/files/binutils-apple-4.0-no-oss-dir.patch |
4313 |
+++ /dev/null |
4314 |
@@ -1,15 +0,0 @@ |
4315 |
---- as/Makefile |
4316 |
-+++ as/Makefile |
4317 |
-@@ -452,12 +452,6 @@ |
4318 |
- $(MKDIRS) $(DSTROOT)$(USRBINDIR) |
4319 |
- install -c -s -m 555 $(SYMROOT)/driver_dir/driver \ |
4320 |
- $(DSTROOT)$(USRBINDIR)/as |
4321 |
-- $(MKDIRS) $(DSTROOT)/usr/local/OpenSourceVersions/ |
4322 |
-- install -c -s -m 444 $(SRCROOT)/cctools.plist \ |
4323 |
-- $(DSTROOT)/usr/local/OpenSourceVersions/cctools.plist |
4324 |
-- $(MKDIRS) $(DSTROOT)/usr/local/OpenSourceLicenses/ |
4325 |
-- install -c -s -m 444 $(SRCROOT)/COPYING \ |
4326 |
-- $(DSTROOT)/usr/local/OpenSourceLicenses/cctools.txt |
4327 |
- $(MKDIRS) $(DSTROOT)$(LOCLIBDIR)/ppc |
4328 |
- install -c -s -m 555 $(SYMROOT)/appc_dir/as \ |
4329 |
- $(DSTROOT)$(LOCLIBDIR)/ppc/as |
4330 |
|
4331 |
diff --git a/sys-devel/binutils-apple/files/binutils-apple-4.2-as-dir.patch b/sys-devel/binutils-apple/files/binutils-apple-4.2-as-dir.patch |
4332 |
deleted file mode 100644 |
4333 |
index b3047f6..0000000 |
4334 |
--- a/sys-devel/binutils-apple/files/binutils-apple-4.2-as-dir.patch |
4335 |
+++ /dev/null |
4336 |
@@ -1,45 +0,0 @@ |
4337 |
---- as/driver.c |
4338 |
-+++ as/driver.c |
4339 |
-@@ -230,7 +230,11 @@ |
4340 |
- /* |
4341 |
- * If this assembler exist try to run it else print an error message. |
4342 |
- */ |
4343 |
-+#ifndef ASLIBEXECDIR |
4344 |
- as = makestr(prefix, LIB, arch_name, AS, NULL); |
4345 |
-+#else |
4346 |
-+ as = makestr(ASLIBEXECDIR, arch_name, AS, NULL); |
4347 |
-+#endif |
4348 |
- if(access(as, F_OK) == 0){ |
4349 |
- argv[0] = as; |
4350 |
- if(execute(argv, verbose)) |
4351 |
-@@ -238,6 +242,9 @@ |
4352 |
- else |
4353 |
- exit(1); |
4354 |
- } |
4355 |
-+#ifdef ASLIBEXECDIR |
4356 |
-+ as_local = ""; |
4357 |
-+#else |
4358 |
- as_local = makestr(prefix, LOCALLIB, arch_name, AS, NULL); |
4359 |
- if(access(as_local, F_OK) == 0){ |
4360 |
- argv[0] = as_local; |
4361 |
-@@ -246,10 +253,12 @@ |
4362 |
- else |
4363 |
- exit(1); |
4364 |
- } |
4365 |
-+#endif |
4366 |
- printf("%s: assembler (%s or %s) for architecture %s not installed\n", |
4367 |
- progname, as, as_local, arch_name); |
4368 |
- arch_flags = get_arch_flags(); |
4369 |
- count = 0; |
4370 |
-+#ifndef ASLIBEXECDIR |
4371 |
- for(i = 0; arch_flags[i].name != NULL; i++){ |
4372 |
- as = makestr(prefix, LIB, arch_flags[i].name, AS, NULL); |
4373 |
- if(access(as, F_OK) == 0){ |
4374 |
-@@ -270,6 +279,7 @@ |
4375 |
- } |
4376 |
- } |
4377 |
- } |
4378 |
-+#endif |
4379 |
- if(count == 0) |
4380 |
- printf("%s: no assemblers installed\n", progname); |
4381 |
- exit(1); |
4382 |
|
4383 |
diff --git a/sys-devel/binutils-apple/files/binutils-apple-4.2-globals-extern.patch b/sys-devel/binutils-apple/files/binutils-apple-4.2-globals-extern.patch |
4384 |
deleted file mode 100644 |
4385 |
index 76419ad..0000000 |
4386 |
--- a/sys-devel/binutils-apple/files/binutils-apple-4.2-globals-extern.patch |
4387 |
+++ /dev/null |
4388 |
@@ -1,29 +0,0 @@ |
4389 |
-Externally referenced globals should be marked extern to avoid stuff like this happening: |
4390 |
- |
4391 |
-ld: warning: tentative definition of '_subsections_via_symbols' with size 16 from 'app.o' is being replaced by real definition of smaller size 4 from 'as.o' |
4392 |
-ld: warning: tentative definition of '_subsections_via_symbols' with size 16 from 'atof-ieee.o' is being replaced by real definition of smaller size 4 from 'as.o' |
4393 |
-... |
4394 |
- |
4395 |
---- cctools-809/as/as.h.orig 2015-01-28 23:52:40.000000000 +0100 |
4396 |
-+++ cctools-809/as/as.h 2015-01-28 23:52:52.000000000 +0100 |
4397 |
-@@ -179,7 +179,7 @@ |
4398 |
- extern char *specific_archflag; |
4399 |
- |
4400 |
- /* TRUE if the .subsections_via_symbols directive was seen */ |
4401 |
--int subsections_via_symbols; |
4402 |
-+extern int subsections_via_symbols; |
4403 |
- |
4404 |
- /* -I path options for .includes */ |
4405 |
- struct directory_stack { |
4406 |
---- cctools-809/as/arm.c.orig 2015-01-28 23:57:23.000000000 +0100 |
4407 |
-+++ cctools-809/as/arm.c 2015-01-28 23:57:35.000000000 +0100 |
4408 |
-@@ -151,8 +151,7 @@ |
4409 |
- # define N_(String) (String) |
4410 |
- |
4411 |
- /* STUFF FROM gas/as.h */ |
4412 |
--#define COMMON |
4413 |
--COMMON subsegT now_subseg; |
4414 |
-+extern subsegT now_subseg; |
4415 |
- |
4416 |
- /* STUFF FROM gas/config/tc-arm.h */ |
4417 |
- #define ARM_FLAG_THUMB (1 << 0) /* The symbol is a Thumb symbol rather than an Arm symbol. */ |
4418 |
|
4419 |
diff --git a/sys-devel/binutils-apple/files/binutils-apple-4.2-lto.patch b/sys-devel/binutils-apple/files/binutils-apple-4.2-lto.patch |
4420 |
deleted file mode 100644 |
4421 |
index 791a922..0000000 |
4422 |
--- a/sys-devel/binutils-apple/files/binutils-apple-4.2-lto.patch |
4423 |
+++ /dev/null |
4424 |
@@ -1,34 +0,0 @@ |
4425 |
---- misc/lipo.c |
4426 |
-+++ misc/lipo.c |
4427 |
-@@ -1191,6 +1191,7 @@ |
4428 |
- thin->fat_arch.align = 0; |
4429 |
- } |
4430 |
- else{ |
4431 |
-+#ifdef LTO_SUPPORT |
4432 |
- if(is_llvm_bitcode_from_memory(addr, size, &input->arch_flag, |
4433 |
- NULL) != 0){ |
4434 |
- /* create a thin file struct for it */ |
4435 |
-@@ -1204,6 +1205,7 @@ |
4436 |
- thin->fat_arch.align = 0; |
4437 |
- } |
4438 |
- else |
4439 |
-+#endif |
4440 |
- fatal("can't figure out the architecture type of: %s", |
4441 |
- input->name); |
4442 |
- } |
4443 |
-@@ -1444,6 +1446,7 @@ |
4444 |
- if(strncmp(ar_name, SYMDEF, sizeof(SYMDEF) - 1) != 0){ |
4445 |
- ar_addr = addr + offset + ar_name_size; |
4446 |
- ar_size = strtoul(ar_hdr->ar_size, NULL, 10); |
4447 |
-+#ifdef LTO_SUPPORT |
4448 |
- if(is_llvm_bitcode_from_memory(ar_addr, ar_size, |
4449 |
- &arch_flag, NULL) != 0){ |
4450 |
- if(*cputype == 0){ |
4451 |
-@@ -1466,6 +1464,7 @@ |
4452 |
- (*cpusubtype) & ~CPU_SUBTYPE_MASK); |
4453 |
- } |
4454 |
- } |
4455 |
-+#endif |
4456 |
- } |
4457 |
- } |
4458 |
- } |
4459 |
|
4460 |
diff --git a/sys-devel/binutils-apple/files/binutils-apple-4.5-as.patch b/sys-devel/binutils-apple/files/binutils-apple-4.5-as.patch |
4461 |
deleted file mode 100644 |
4462 |
index 0769016..0000000 |
4463 |
--- a/sys-devel/binutils-apple/files/binutils-apple-4.5-as.patch |
4464 |
+++ /dev/null |
4465 |
@@ -1,100 +0,0 @@ |
4466 |
-Allow to disable build of as backends for obsolete architectures. |
4467 |
- |
4468 |
-diff --git a/as/Makefile b/as/Makefile |
4469 |
-index a4b016e..9e8bcc3 100644 |
4470 |
---- a/as/Makefile |
4471 |
-+++ b/as/Makefile |
4472 |
-@@ -1,3 +1,4 @@ |
4473 |
-+BUILD_OBSOLETE_ARCH = yes |
4474 |
- export USE_APPLE_PB_SUPPORT = all |
4475 |
- |
4476 |
- ifneq "" "$(SDKROOT)" |
4477 |
-@@ -20,28 +21,36 @@ SRCROOT = . |
4478 |
- SYMROOT = . |
4479 |
- OBJROOT = . |
4480 |
- SYM_DIRS = $(SYMROOT)/driver_dir \ |
4481 |
-- $(SYMROOT)/a68_dir \ |
4482 |
-- $(SYMROOT)/a88_dir \ |
4483 |
- $(SYMROOT)/a386_dir \ |
4484 |
- $(SYMROOT)/ax86_64_dir \ |
4485 |
- $(SYMROOT)/appc_dir \ |
4486 |
- $(SYMROOT)/appc64_dir \ |
4487 |
-+ $(SYMROOT)/aarm_dir |
4488 |
-+ |
4489 |
-+ifeq "yes" "$(BUILD_OBSOLETE_ARCH)" |
4490 |
-+SYM_DIRS += \ |
4491 |
-+ $(SYMROOT)/a68_dir \ |
4492 |
-+ $(SYMROOT)/a88_dir \ |
4493 |
- $(SYMROOT)/a860_dir \ |
4494 |
- $(SYMROOT)/ahppa_dir \ |
4495 |
-- $(SYMROOT)/asparc_dir \ |
4496 |
-- $(SYMROOT)/aarm_dir |
4497 |
-+ $(SYMROOT)/asparc_dir |
4498 |
-+endif |
4499 |
- |
4500 |
- OFILE_DIRS = $(OBJROOT)/driver_dir \ |
4501 |
-- $(OBJROOT)/a68_dir \ |
4502 |
-- $(OBJROOT)/a88_dir \ |
4503 |
- $(OBJROOT)/a386_dir \ |
4504 |
- $(OBJROOT)/ax86_64_dir \ |
4505 |
- $(OBJROOT)/appc_dir \ |
4506 |
- $(OBJROOT)/appc64_dir \ |
4507 |
-+ $(OBJROOT)/aarm_dir |
4508 |
-+ |
4509 |
-+ifeq "yes" "$(BUILD_OBSOLETE_ARCH)" |
4510 |
-+OFILE_DIRS += \ |
4511 |
-+ $(OBJROOT)/a68_dir \ |
4512 |
-+ $(OBJROOT)/a88_dir \ |
4513 |
- $(OBJROOT)/a860_dir \ |
4514 |
- $(OBJROOT)/ahppa_dir \ |
4515 |
-- $(OBJROOT)/asparc_dir \ |
4516 |
-- $(OBJROOT)/aarm_dir |
4517 |
-+ $(OBJROOT)/asparc_dir |
4518 |
-+endif |
4519 |
- |
4520 |
- BINDIR = /bin |
4521 |
- USRBINDIR = /usr/bin |
4522 |
-@@ -88,9 +97,13 @@ OBJS_hppa = $(CFILES_hppa:.c=.o) |
4523 |
- OBJS_sparc = $(CFILES_sparc:.c=.o) |
4524 |
- OBJS_arm = $(CFILES_arm:.c=.o) |
4525 |
- |
4526 |
--all: $(OFILE_DIRS) $(SYM_DIRS) driver_build a68_build a88_build a386_build \ |
4527 |
-- ax86_64_build a860_build appc_build appc64_build ahppa_build \ |
4528 |
-- aarm_build asparc_build |
4529 |
-+all: $(OFILE_DIRS) $(SYM_DIRS) driver_build a386_build \ |
4530 |
-+ ax86_64_build appc_build appc64_build aarm_build |
4531 |
-+ |
4532 |
-+ifeq "yes" "$(BUILD_OBSOLETE_ARCH)" |
4533 |
-+all: a68_build a88_build a860_build ahppa_build asparc_build |
4534 |
-+endif |
4535 |
-+ |
4536 |
- |
4537 |
- all_test: a68_test a88_test a860_test a386_test appc_test ahppa_test |
4538 |
- |
4539 |
-@@ -406,15 +419,18 @@ install: all |
4540 |
- $(MKDIRS) $(DSTROOT)$(LOCLIBDIR)/ppc64 |
4541 |
- install -c -s -m 555 $(SYMROOT)/appc64_dir/as \ |
4542 |
- $(DSTROOT)$(LOCLIBDIR)/ppc64/as |
4543 |
-+ifeq "yes" "$(BUILD_OBSOLETE_ARCH)" |
4544 |
- $(MKDIRS) $(DSTROOT)$(LOCLIBDIR)/m68k |
4545 |
- install -c -s -m 555 $(SYMROOT)/a68_dir/as \ |
4546 |
- $(DSTROOT)$(LOCLIBDIR)/m68k/as |
4547 |
- $(MKDIRS) $(DSTROOT)$(LOCLIBDIR)/sparc |
4548 |
- install -c -s -m 555 $(SYMROOT)/asparc_dir/as \ |
4549 |
- $(DSTROOT)$(LOCLIBDIR)/sparc/as |
4550 |
-+endif |
4551 |
- $(MKDIRS) $(DSTROOT)$(LIBDIR)/arm |
4552 |
- install -c -s -m 555 $(SYMROOT)/aarm_dir/as \ |
4553 |
- $(DSTROOT)$(LIBDIR)/arm/as |
4554 |
-+ifeq "yes" "$(BUILD_OBSOLETE_ARCH)" |
4555 |
- $(MKDIRS) $(DSTROOT)$(LOCLIBDIR)/m88k |
4556 |
- install -c -s -m 555 $(SYMROOT)/a88_dir/as \ |
4557 |
- $(DSTROOT)$(LOCLIBDIR)/m88k/as |
4558 |
-@@ -424,6 +440,7 @@ install: all |
4559 |
- $(MKDIRS) $(DSTROOT)$(LOCLIBDIR)/i860 |
4560 |
- install -s -m 555 $(SYMROOT)/a860_dir/as \ |
4561 |
- $(DSTROOT)$(LOCLIBDIR)/i860/as |
4562 |
-+endif |
4563 |
- |
4564 |
- $(OFILE_DIRS) $(SYM_DIRS): |
4565 |
- $(MKDIRS) $@ |
4566 |
|
4567 |
diff --git a/sys-devel/binutils-apple/files/binutils-apple-5.1-as-dir.patch b/sys-devel/binutils-apple/files/binutils-apple-5.1-as-dir.patch |
4568 |
deleted file mode 100644 |
4569 |
index 1c7c636..0000000 |
4570 |
--- a/sys-devel/binutils-apple/files/binutils-apple-5.1-as-dir.patch |
4571 |
+++ /dev/null |
4572 |
@@ -1,47 +0,0 @@ |
4573 |
-Allow to set directory for as backends from the outside. |
4574 |
- |
4575 |
---- cctools-855/as/driver.c.orig 2014-04-05 00:42:22.000000000 +0200 |
4576 |
-+++ cctools-855/as/driver.c 2014-11-13 13:07:09.000000000 +0100 |
4577 |
-@@ -365,7 +365,11 @@ |
4578 |
- /* |
4579 |
- * If this assembler exist try to run it else print an error message. |
4580 |
- */ |
4581 |
-+#ifndef ASLIBEXECDIR |
4582 |
- as = makestr(prefix, LIB, arch_name, AS, NULL); |
4583 |
-+#else |
4584 |
-+ as = makestr(ASLIBEXECDIR, arch_name, AS, NULL); |
4585 |
-+#endif |
4586 |
- new_argv = allocate((argc + 1) * sizeof(char *)); |
4587 |
- new_argv[0] = as; |
4588 |
- j = 1; |
4589 |
-@@ -387,6 +391,9 @@ |
4590 |
- else |
4591 |
- exit(1); |
4592 |
- } |
4593 |
-+#ifdef ASLIBEXECDIR |
4594 |
-+ as_local = ""; |
4595 |
-+#else |
4596 |
- as_local = makestr(prefix, LOCALLIB, arch_name, AS, NULL); |
4597 |
- new_argv[0] = as_local; |
4598 |
- if(access(as_local, F_OK) == 0){ |
4599 |
-@@ -396,10 +403,12 @@ |
4600 |
- else |
4601 |
- exit(1); |
4602 |
- } |
4603 |
-+#endif |
4604 |
- printf("%s: assembler (%s or %s) for architecture %s not installed\n", |
4605 |
- progname, as, as_local, arch_name); |
4606 |
- arch_flags = get_arch_flags(); |
4607 |
- count = 0; |
4608 |
-+#ifndef ASLIBEXECDIR |
4609 |
- for(i = 0; arch_flags[i].name != NULL; i++){ |
4610 |
- as = makestr(prefix, LIB, arch_flags[i].name, AS, NULL); |
4611 |
- if(access(as, F_OK) == 0){ |
4612 |
-@@ -420,6 +429,7 @@ |
4613 |
- } |
4614 |
- } |
4615 |
- } |
4616 |
-+#endif |
4617 |
- if(count == 0) |
4618 |
- printf("%s: no assemblers installed\n", progname); |
4619 |
- exit(1); |
4620 |
|
4621 |
diff --git a/sys-devel/binutils-apple/files/binutils-apple-5.1-constant-types.patch b/sys-devel/binutils-apple/files/binutils-apple-5.1-constant-types.patch |
4622 |
deleted file mode 100644 |
4623 |
index 066ce57..0000000 |
4624 |
--- a/sys-devel/binutils-apple/files/binutils-apple-5.1-constant-types.patch |
4625 |
+++ /dev/null |
4626 |
@@ -1,26 +0,0 @@ |
4627 |
-Avoid error with gcc on 32bit platforms: |
4628 |
-ld/LinkEdit.hpp:1329: error: integer constant is too large for 'long' type |
4629 |
- |
4630 |
---- cctools-855/include/llvm-c/Disassembler.h.orig 2015-01-14 18:36:22.000000000 +0100 |
4631 |
-+++ cctools-855/include/llvm-c/Disassembler.h 2015-01-14 18:36:39.000000000 +0100 |
4632 |
-@@ -133,15 +133,15 @@ |
4633 |
- #define LLVMDisassembler_ReferenceType_In_PCrel_Load 2 |
4634 |
- |
4635 |
- /* The input reference is from an ARM64::ADRP instruction. */ |
4636 |
--#define LLVMDisassembler_ReferenceType_In_ARM64_ADRP 0x100000001 |
4637 |
-+#define LLVMDisassembler_ReferenceType_In_ARM64_ADRP 0x100000001ULL |
4638 |
- /* The input reference is from an ARM64::ADDXri instruction. */ |
4639 |
--#define LLVMDisassembler_ReferenceType_In_ARM64_ADDXri 0x100000002 |
4640 |
-+#define LLVMDisassembler_ReferenceType_In_ARM64_ADDXri 0x100000002ULL |
4641 |
- /* The input reference is from an ARM64::LDRXui instruction. */ |
4642 |
--#define LLVMDisassembler_ReferenceType_In_ARM64_LDRXui 0x100000003 |
4643 |
-+#define LLVMDisassembler_ReferenceType_In_ARM64_LDRXui 0x100000003ULL |
4644 |
- /* The input reference is from an ARM64::LDRXl instruction. */ |
4645 |
--#define LLVMDisassembler_ReferenceType_In_ARM64_LDRXl 0x100000004 |
4646 |
-+#define LLVMDisassembler_ReferenceType_In_ARM64_LDRXl 0x100000004ULL |
4647 |
- /* The input reference is from an ARM64::ADR instruction. */ |
4648 |
--#define LLVMDisassembler_ReferenceType_In_ARM64_ADR 0x100000005 |
4649 |
-+#define LLVMDisassembler_ReferenceType_In_ARM64_ADR 0x100000005ULL |
4650 |
- |
4651 |
- /* The output reference is to as symbol stub. */ |
4652 |
- #define LLVMDisassembler_ReferenceType_Out_SymbolStub 1 |
4653 |
|
4654 |
diff --git a/sys-devel/binutils-apple/files/binutils-apple-5.1-extraneous-includes.patch b/sys-devel/binutils-apple/files/binutils-apple-5.1-extraneous-includes.patch |
4655 |
deleted file mode 100644 |
4656 |
index 2e0a109..0000000 |
4657 |
--- a/sys-devel/binutils-apple/files/binutils-apple-5.1-extraneous-includes.patch |
4658 |
+++ /dev/null |
4659 |
@@ -1,31 +0,0 @@ |
4660 |
-Remove extraneous includes that contain clang language extensions on Mac OS X |
4661 |
-10.10 (xpc/base.h - __has_extension). |
4662 |
- |
4663 |
---- ./cctools-855/as/messages.c.orig 2015-01-12 18:49:02.000000000 +0100 |
4664 |
-+++ ./cctools-855/as/messages.c 2015-01-12 18:49:06.000000000 +0100 |
4665 |
-@@ -23,11 +23,6 @@ |
4666 |
- #include <string.h> |
4667 |
- #include <mach/mach.h> |
4668 |
- #include <mach/mach_init.h> |
4669 |
--#if defined(__OPENSTEP__) || defined(__GONZO_BUNSEN_BEAKER__) |
4670 |
--#include <servers/netname.h> |
4671 |
--#else |
4672 |
--#include <servers/bootstrap.h> |
4673 |
--#endif |
4674 |
- #include "as.h" |
4675 |
- #include "input-scrub.h" |
4676 |
- #include "messages.h" |
4677 |
---- ./cctools-855/misc/libtool.c.orig 2015-01-12 18:48:29.000000000 +0100 |
4678 |
-+++ ./cctools-855/misc/libtool.c 2015-01-12 18:48:40.000000000 +0100 |
4679 |
-@@ -53,11 +53,6 @@ |
4680 |
- #endif /* LTO_SUPPORT */ |
4681 |
- |
4682 |
- #include <mach/mach_init.h> |
4683 |
--#if defined(__OPENSTEP__) || defined(__GONZO_BUNSEN_BEAKER__) |
4684 |
--#include <servers/netname.h> |
4685 |
--#else |
4686 |
--#include <servers/bootstrap.h> |
4687 |
--#endif |
4688 |
- |
4689 |
- /* |
4690 |
- * This is used internally to build the table of contents. |
4691 |
|
4692 |
diff --git a/sys-devel/binutils-apple/files/binutils-apple-5.1-nolto.patch b/sys-devel/binutils-apple/files/binutils-apple-5.1-nolto.patch |
4693 |
deleted file mode 100644 |
4694 |
index 62490ef..0000000 |
4695 |
--- a/sys-devel/binutils-apple/files/binutils-apple-5.1-nolto.patch |
4696 |
+++ /dev/null |
4697 |
@@ -1,43 +0,0 @@ |
4698 |
-Allow to fully disable LTO. |
4699 |
- |
4700 |
-diff --git a/libstuff/lto.c b/libstuff/lto.c |
4701 |
-index 6f5758d..5ba7996 100644 |
4702 |
---- a/libstuff/lto.c |
4703 |
-+++ b/libstuff/lto.c |
4704 |
-@@ -381,4 +381,18 @@ void *mod) |
4705 |
- lto_dispose(mod); |
4706 |
- } |
4707 |
- |
4708 |
-+#else |
4709 |
-+ |
4710 |
-+#include <stdlib.h> |
4711 |
-+#include "stuff/ofile.h" |
4712 |
-+ |
4713 |
-+__private_extern__ |
4714 |
-+int |
4715 |
-+is_llvm_bitcode( |
4716 |
-+ struct ofile *ofile, |
4717 |
-+ char *addr, |
4718 |
-+ size_t size) |
4719 |
-+{ |
4720 |
-+ return 0; |
4721 |
-+} |
4722 |
- #endif /* LTO_SUPPORT */ |
4723 |
-diff --git a/misc/libtool.c b/misc/libtool.c |
4724 |
-index f9c7557..ff829cc 100644 |
4725 |
---- a/misc/libtool.c |
4726 |
-+++ b/misc/libtool.c |
4727 |
-@@ -1370,8 +1370,11 @@ void) |
4728 |
- } |
4729 |
- } |
4730 |
- } |
4731 |
-- else if(ofiles[i].arch_type == OFILE_Mach_O || |
4732 |
-- ofiles[i].arch_type == OFILE_LLVM_BITCODE){ |
4733 |
-+ else if(ofiles[i].arch_type == OFILE_Mach_O |
4734 |
-+#ifdef LTO_SUPPORT |
4735 |
-+ || ofiles[i].arch_type == OFILE_LLVM_BITCODE |
4736 |
-+#endif |
4737 |
-+ ){ |
4738 |
- if(cmd_flags.ranlib == TRUE){ |
4739 |
- error("for architecture: %s file: %s is not an " |
4740 |
- "archive (no processing done on this file)", |
4741 |
|
4742 |
diff --git a/sys-devel/binutils-apple/files/binutils-apple-5.1-otool-stdc.patch b/sys-devel/binutils-apple/files/binutils-apple-5.1-otool-stdc.patch |
4743 |
deleted file mode 100644 |
4744 |
index ca02e64..0000000 |
4745 |
--- a/sys-devel/binutils-apple/files/binutils-apple-5.1-otool-stdc.patch |
4746 |
+++ /dev/null |
4747 |
@@ -1,23 +0,0 @@ |
4748 |
-Do not use C++/C11(?) style local variable declaration. |
4749 |
- |
4750 |
---- cctools-855/otool/dyld_bind_info.c.orig 2015-01-12 18:55:04.000000000 +0100 |
4751 |
-+++ cctools-855/otool/dyld_bind_info.c 2015-01-12 18:56:35.000000000 +0100 |
4752 |
-@@ -353,7 +353,9 @@ |
4753 |
- skip = read_uleb128(&p, end); |
4754 |
- sectName = sectionName(segIndex, segStartAddr + segOffset, |
4755 |
- segs, nsegs, segs64, nsegs64); |
4756 |
-- for (uint32_t i=0; i < count; ++i) { |
4757 |
-+ { |
4758 |
-+ uint32_t i; |
4759 |
-+ for (i=0; i < count; ++i) { |
4760 |
- if(pass == 2){ |
4761 |
- (*dbi)[n].segname = segName; |
4762 |
- (*dbi)[n].sectname = sectName; |
4763 |
-@@ -367,6 +369,7 @@ |
4764 |
- n++; |
4765 |
- segOffset += skip + sizeof_pointer; |
4766 |
- } |
4767 |
-+ } |
4768 |
- break; |
4769 |
- default: |
4770 |
- return; /* throwf("bad bind opcode %d", *p); */ |
4771 |
|
4772 |
diff --git a/sys-devel/binutils-apple/files/binutils-apple-5.1-ranlib.patch b/sys-devel/binutils-apple/files/binutils-apple-5.1-ranlib.patch |
4773 |
deleted file mode 100644 |
4774 |
index 1930dfc..0000000 |
4775 |
--- a/sys-devel/binutils-apple/files/binutils-apple-5.1-ranlib.patch |
4776 |
+++ /dev/null |
4777 |
@@ -1,15 +0,0 @@ |
4778 |
-Run ranlib before installation of the libary. |
4779 |
- |
4780 |
---- ./cctools-855/cbtlibs/Makefile.ranlib 2014-04-05 00:42:22.000000000 +0200 |
4781 |
-+++ ./cctools-855/cbtlibs/Makefile 2014-08-29 14:49:41.000000000 +0200 |
4782 |
-@@ -61,9 +61,9 @@ |
4783 |
- |
4784 |
- lib_ofiles_install: lib_ofiles |
4785 |
- $(MKDIRS) $(DSTROOT)$(LOCLIBDIR) |
4786 |
-+ $(RANLIB) $(SYMROOT)/libsyminfo.a |
4787 |
- install -p -c -m 444 $(SYMROOT)/libsyminfo.a \ |
4788 |
- $(DSTROOT)$(LOCLIBDIR)/libsyminfo.a |
4789 |
-- $(RANLIB) $(DSTROOT)$(LOCLIBDIR)/libsyminfo.a |
4790 |
- |
4791 |
- $(OFILE_DIR) $(SYMROOT): |
4792 |
- $(MKDIRS) $@ |
4793 |
|
4794 |
diff --git a/sys-devel/binutils-apple/files/binutils-apple-5.1-strnlen.patch b/sys-devel/binutils-apple/files/binutils-apple-5.1-strnlen.patch |
4795 |
deleted file mode 100644 |
4796 |
index 887e156..0000000 |
4797 |
--- a/sys-devel/binutils-apple/files/binutils-apple-5.1-strnlen.patch |
4798 |
+++ /dev/null |
4799 |
@@ -1,45 +0,0 @@ |
4800 |
-Provide strnlen on platforms where it's missing. |
4801 |
- |
4802 |
---- cctools-855/otool/ofile_print.c.orig 2015-01-14 18:33:14.000000000 +0100 |
4803 |
-+++ cctools-855/otool/ofile_print.c 2015-01-14 18:34:03.000000000 +0100 |
4804 |
-@@ -3647,6 +3647,40 @@ |
4805 |
- printf(" pad %u\n", ec->pad); |
4806 |
- } |
4807 |
- |
4808 |
-+/* borrowed from gnulib */ |
4809 |
-+#include <AvailabilityMacros.h> |
4810 |
-+ |
4811 |
-+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070 |
4812 |
-+/* Find the length of STRING, but scan at most MAXLEN characters. |
4813 |
-+ * Copyright (C) 2005-2007, 2009-2015 Free Software Foundation, Inc. |
4814 |
-+ * Written by Simon Josefsson. |
4815 |
-+ * |
4816 |
-+ * This program is free software; you can redistribute it and/or modify |
4817 |
-+ * it under the terms of the GNU General Public License as published by |
4818 |
-+ * the Free Software Foundation; either version 2, or (at your option) |
4819 |
-+ * any later version. |
4820 |
-+ * |
4821 |
-+ * This program is distributed in the hope that it will be useful, |
4822 |
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
4823 |
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4824 |
-+ * GNU General Public License for more details. |
4825 |
-+ * |
4826 |
-+ * You should have received a copy of the GNU General Public License |
4827 |
-+ * along with this program; if not, see <http://www.gnu.org/licenses/>. */ |
4828 |
-+ |
4829 |
-+#include <string.h> |
4830 |
-+ |
4831 |
-+/* Find the length of STRING, but scan at most MAXLEN characters. |
4832 |
-+ * If no '\0' terminator is found in that many characters, return MAXLEN. */ |
4833 |
-+ |
4834 |
-+size_t |
4835 |
-+strnlen (const char *string, size_t maxlen) |
4836 |
-+{ |
4837 |
-+ const char *end = memchr (string, '\0', maxlen); |
4838 |
-+ return end ? (size_t) (end - string) : maxlen; |
4839 |
-+} |
4840 |
-+#endif |
4841 |
-+ |
4842 |
- /* |
4843 |
- * print an LC_LINKER_OPTION command. The linker_option_command structure |
4844 |
- * specified must be aligned correctly and in the host byte sex. The lc is |
4845 |
|
4846 |
diff --git a/sys-devel/binutils-apple/files/cctools-839-intel-retf.patch b/sys-devel/binutils-apple/files/cctools-839-intel-retf.patch |
4847 |
deleted file mode 100644 |
4848 |
index d9bd9a8..0000000 |
4849 |
--- a/sys-devel/binutils-apple/files/cctools-839-intel-retf.patch |
4850 |
+++ /dev/null |
4851 |
@@ -1,14 +0,0 @@ |
4852 |
-diff --git a/as/i386-opcode.h b/as/i386-opcode.h |
4853 |
-index 4ba397f..862449a 100644 |
4854 |
---- a/as/i386-opcode.h |
4855 |
-+++ b/as/i386-opcode.h |
4856 |
-@@ -415,6 +415,9 @@ static const template i386_optab[] = |
4857 |
- {"ret", 1, 0xc2, X, Cpu64, wq_Suf|DefaultSize|NoRex64,{ Imm16, 0, 0} }, |
4858 |
- {"lret", 0, 0xcb, X, 0, wlq_Suf|DefaultSize, { 0, 0, 0} }, |
4859 |
- {"lret", 1, 0xca, X, 0, wlq_Suf|DefaultSize, { Imm16, 0, 0} }, |
4860 |
-+// intel syntax |
4861 |
-+{"retf", 0, 0xcb, X, 0, wlq_Suf|DefaultSize, { 0, 0, 0} }, |
4862 |
-+{"retf", 1, 0xca, X, 0, wlq_Suf|DefaultSize, { Imm16, 0, 0} }, |
4863 |
- {"enter", 2, 0xc8, X, Cpu186|CpuNo64, wl_Suf|DefaultSize, { Imm16, Imm8, 0} }, |
4864 |
- {"enter", 2, 0xc8, X, Cpu64, wq_Suf|DefaultSize|NoRex64, { Imm16, Imm8, 0} }, |
4865 |
- {"leave", 0, 0xc9, X, Cpu186|CpuNo64, wl_Suf|DefaultSize, { 0, 0, 0} }, |
4866 |
|
4867 |
diff --git a/sys-devel/binutils-apple/files/ld64-123.2-Makefile b/sys-devel/binutils-apple/files/ld64-123.2-Makefile |
4868 |
deleted file mode 100644 |
4869 |
index 47af12d..0000000 |
4870 |
--- a/sys-devel/binutils-apple/files/ld64-123.2-Makefile |
4871 |
+++ /dev/null |
4872 |
@@ -1,47 +0,0 @@ |
4873 |
-CPPFLAGS += "-DCPU_SUBTYPE_X86_ALL=((cpu_subtype_t)3)" -Iinclude -Iabstraction -Ild -Ild/parsers -Iother -I. |
4874 |
- |
4875 |
-# dropped machocheck due to compilation failures |
4876 |
-all: rebase unwinddump dyldinfo ld64 ObjectDump |
4877 |
- |
4878 |
-libprunetrie.a: other/PruneTrie.o other/prune_trie.h |
4879 |
- $(AR) -s -r -c libprunetrie.a other/PruneTrie.o |
4880 |
- |
4881 |
-LD64LIBS=ld/parsers/archive_file.o ld/parsers/macho_relocatable_file.o \ |
4882 |
- ld/parsers/opaque_section_file.o \ |
4883 |
- ld/parsers/macho_dylib_file.o \ |
4884 |
- ld/passes/branch_island.o ld/passes/dylibs.o ld/passes/order_file.o \ |
4885 |
- ld/passes/branch_shim.o ld/passes/got.o ld/passes/tlvp.o \ |
4886 |
- ld/passes/compact_unwind.o ld/passes/huge.o \ |
4887 |
- ld/passes/dtrace_dof.o ld/passes/objc.o \ |
4888 |
- ld/passes/stubs/stubs.o \ |
4889 |
- ld/InputFiles.o ld/OutputFile.o ld/SymbolTable.o \ |
4890 |
- ld/Options.o ld/Resolver.o ld/debugline.o ld/ld.o |
4891 |
- |
4892 |
-ifeq ($(LTO),1) |
4893 |
-CPPFLAGS += "-DLTO" |
4894 |
-LTO_OBJ = ld/parsers/lto_file.o |
4895 |
-LIBLTO = -lLTO |
4896 |
-else |
4897 |
-CPPFLAGS += "-ULTO" |
4898 |
-LTO_OBJ = |
4899 |
-LIBLTO = |
4900 |
-endif |
4901 |
- |
4902 |
-ld64: libprunetrie.a version.o $(LD64LIBS) $(LTO_OBJ) |
4903 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) $(LIBLTO) -o $@ $^ |
4904 |
- |
4905 |
-rebase: other/rebase.o |
4906 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ |
4907 |
- |
4908 |
-dyldinfo: other/dyldinfo.o |
4909 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ |
4910 |
- |
4911 |
-unwinddump: other/unwinddump.o |
4912 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ |
4913 |
- |
4914 |
-ObjectDump: other/ObjectDump.o ld/debugline.o ld/parsers/macho_relocatable_file.o $(LTO_OBJ) |
4915 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) $(LIBLTO) -o $@ $^ |
4916 |
- |
4917 |
-machocheck: other/machochecker.o |
4918 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ |
4919 |
- |
4920 |
|
4921 |
diff --git a/sys-devel/binutils-apple/files/ld64-123.2-darwin8-no-mlong-branch-warning.patch b/sys-devel/binutils-apple/files/ld64-123.2-darwin8-no-mlong-branch-warning.patch |
4922 |
deleted file mode 100644 |
4923 |
index c8a303e..0000000 |
4924 |
--- a/sys-devel/binutils-apple/files/ld64-123.2-darwin8-no-mlong-branch-warning.patch |
4925 |
+++ /dev/null |
4926 |
@@ -1,17 +0,0 @@ |
4927 |
-On Tiger (Darwin 8) the whole system (/usr/bin/crt0.o for example) is |
4928 |
-long-branch compiled, so *any* linkage operation causes this warning to |
4929 |
-be raised. Don't do it. |
4930 |
- |
4931 |
- |
4932 |
---- ld/parsers/macho_relocatable_file.cpp |
4933 |
-+++ ld/parsers/macho_relocatable_file.cpp |
4934 |
-@@ -5532,9 +5532,6 @@ |
4935 |
- // this is from -mlong-branch codegen. We ignore the jump island and make reference to the real target |
4936 |
- if ( nextReloc->r_type() != PPC_RELOC_PAIR ) |
4937 |
- throw "PPC_RELOC_JBSR missing following pair"; |
4938 |
-- if ( !parser._hasLongBranchStubs ) |
4939 |
-- warning("object file compiled with -mlong-branch which is no longer needed. " |
4940 |
-- "To remove this warning, recompile without -mlong-branch: %s", parser._path); |
4941 |
- parser._hasLongBranchStubs = true; |
4942 |
- result = true; |
4943 |
- if ( reloc->r_extern() ) { |
4944 |
|
4945 |
diff --git a/sys-devel/binutils-apple/files/ld64-123.2-debug-backtrace.patch b/sys-devel/binutils-apple/files/ld64-123.2-debug-backtrace.patch |
4946 |
deleted file mode 100644 |
4947 |
index f112650..0000000 |
4948 |
--- a/sys-devel/binutils-apple/files/ld64-123.2-debug-backtrace.patch |
4949 |
+++ /dev/null |
4950 |
@@ -1,15 +0,0 @@ |
4951 |
-execinfo.h isn't available <10.5, so make sure it is only included when |
4952 |
-actually necessary |
4953 |
- |
4954 |
---- ld/ld.cpp |
4955 |
-+++ ld/ld.cpp |
4956 |
-@@ -37,7 +37,9 @@ |
4957 |
- #include <errno.h> |
4958 |
- #include <limits.h> |
4959 |
- #include <unistd.h> |
4960 |
-+#ifndef NDEBUG |
4961 |
- #include <execinfo.h> |
4962 |
-+#endif |
4963 |
- #include <mach/mach_time.h> |
4964 |
- #include <mach/vm_statistics.h> |
4965 |
- #include <mach/mach_init.h> |
4966 |
|
4967 |
diff --git a/sys-devel/binutils-apple/files/ld64-123.2.1-lto.patch b/sys-devel/binutils-apple/files/ld64-123.2.1-lto.patch |
4968 |
deleted file mode 100644 |
4969 |
index 17bac81..0000000 |
4970 |
--- a/sys-devel/binutils-apple/files/ld64-123.2.1-lto.patch |
4971 |
+++ /dev/null |
4972 |
@@ -1,218 +0,0 @@ |
4973 |
-diff -ur ld.orig/InputFiles.cpp ld/InputFiles.cpp |
4974 |
---- ld.orig/InputFiles.cpp 2010-10-05 01:57:50.000000000 +0200 |
4975 |
-+++ ld/InputFiles.cpp 2011-09-03 20:33:40.000000000 +0200 |
4976 |
-@@ -58,7 +58,9 @@ |
4977 |
- #include "macho_relocatable_file.h" |
4978 |
- #include "macho_dylib_file.h" |
4979 |
- #include "archive_file.h" |
4980 |
-+#ifdef LTO |
4981 |
- #include "lto_file.h" |
4982 |
-+#endif |
4983 |
- #include "opaque_section_file.h" |
4984 |
- |
4985 |
- |
4986 |
-@@ -175,9 +177,11 @@ |
4987 |
- if ( result != NULL ) |
4988 |
- return result; |
4989 |
- |
4990 |
-+#ifdef LTO |
4991 |
- result = lto::archName(p, len); |
4992 |
- if ( result != NULL ) |
4993 |
- return result; |
4994 |
-+#endif |
4995 |
- |
4996 |
- if ( strncmp((const char*)p, "!<arch>\n", 8) == 0 ) |
4997 |
- return "archive"; |
4998 |
-@@ -264,10 +268,12 @@ |
4999 |
- if ( objResult != NULL ) |
5000 |
- return this->addObject(objResult, info, len); |
5001 |
- |
5002 |
-+#if LTO |
5003 |
- // see if it is an llvm object file |
5004 |
- objResult = lto::parse(p, len, info.path, info.modTime, _nextInputOrdinal, _options.architecture(), _options.subArchitecture(), _options.logAllFiles()); |
5005 |
- if ( objResult != NULL ) |
5006 |
- return this->addObject(objResult, info, len); |
5007 |
-+#endif |
5008 |
- |
5009 |
- // see if it is a dynamic library |
5010 |
- ld::dylib::File* dylibResult = mach_o::dylib::parse(p, len, info.path, info.modTime, _options, _nextInputOrdinal, info.options.fBundleLoader); |
5011 |
-@@ -286,6 +292,7 @@ |
5012 |
- if ( archiveResult != NULL ) |
5013 |
- return this->addArchive(archiveResult, info, len); |
5014 |
- |
5015 |
-+#ifdef LTO |
5016 |
- // does not seem to be any valid linker input file, check LTO misconfiguration problems |
5017 |
- if ( lto::archName((uint8_t*)p, len) != NULL ) { |
5018 |
- if ( lto::libLTOisLoaded() ) { |
5019 |
-@@ -310,6 +317,7 @@ |
5020 |
- throwf("could not process llvm bitcode object file, because %s could not be loaded", libLTO); |
5021 |
- } |
5022 |
- } |
5023 |
-+#endif |
5024 |
- |
5025 |
- // error handling |
5026 |
- if ( ((fat_header*)p)->magic == OSSwapBigToHostInt32(FAT_MAGIC) ) { |
5027 |
-diff -ur ld.orig/Options.cpp ld/Options.cpp |
5028 |
---- ld.orig/Options.cpp 2011-03-08 03:06:35.000000000 +0100 |
5029 |
-+++ ld/Options.cpp 2011-09-03 21:06:28.000000000 +0200 |
5030 |
-@@ -36,10 +36,12 @@ |
5031 |
- #include "Architectures.hpp" |
5032 |
- #include "MachOFileAbstraction.hpp" |
5033 |
- |
5034 |
-+#ifdef LTO |
5035 |
- // upward dependency on lto::version() |
5036 |
- namespace lto { |
5037 |
- extern const char* version(); |
5038 |
- } |
5039 |
-+#endif |
5040 |
- |
5041 |
- // magic to place command line in crash reports |
5042 |
- const int crashreporterBufferSize = 2000; |
5043 |
-@@ -2786,9 +2788,11 @@ |
5044 |
- fprintf(stderr, "%s", ldVersionString); |
5045 |
- // if only -v specified, exit cleanly |
5046 |
- if ( argc == 2 ) { |
5047 |
-+#ifdef LTO |
5048 |
- const char* ltoVers = lto::version(); |
5049 |
- if ( ltoVers != NULL ) |
5050 |
- fprintf(stderr, "%s\n", ltoVers); |
5051 |
-+#endif |
5052 |
- exit(0); |
5053 |
- } |
5054 |
- } |
5055 |
-diff -ur ld.orig/Resolver.cpp ld/Resolver.cpp |
5056 |
---- ld.orig/Resolver.cpp 2010-12-10 23:39:41.000000000 +0100 |
5057 |
-+++ ld/Resolver.cpp 2011-09-03 20:38:24.000000000 +0200 |
5058 |
-@@ -58,7 +58,9 @@ |
5059 |
- #include "InputFiles.h" |
5060 |
- #include "SymbolTable.h" |
5061 |
- #include "Resolver.h" |
5062 |
-+#ifdef LTO |
5063 |
- #include "parsers/lto_file.h" |
5064 |
-+#endif |
5065 |
- |
5066 |
- |
5067 |
- namespace ld { |
5068 |
-@@ -1275,6 +1277,7 @@ |
5069 |
- |
5070 |
- void Resolver::linkTimeOptimize() |
5071 |
- { |
5072 |
-+#ifdef LTO |
5073 |
- // only do work here if some llvm obj files where loaded |
5074 |
- if ( ! _haveLLVMObjs ) |
5075 |
- return; |
5076 |
-@@ -1375,6 +1378,9 @@ |
5077 |
- // check new code does not override some dylib |
5078 |
- this->checkDylibSymbolCollisions(); |
5079 |
- } |
5080 |
-+#else |
5081 |
-+ return; |
5082 |
-+#endif |
5083 |
- } |
5084 |
- |
5085 |
- |
5086 |
-diff -ur ld.orig/ld.cpp ld/ld.cpp |
5087 |
---- ld.orig/ld.cpp 2011-09-03 20:24:07.000000000 +0200 |
5088 |
-+++ ld/ld.cpp 2011-09-03 20:40:06.000000000 +0200 |
5089 |
-@@ -85,7 +85,9 @@ |
5090 |
- #include "parsers/archive_file.h" |
5091 |
- #include "parsers/macho_relocatable_file.h" |
5092 |
- #include "parsers/macho_dylib_file.h" |
5093 |
-+#ifdef LTO |
5094 |
- #include "parsers/lto_file.h" |
5095 |
-+#endif |
5096 |
- #include "parsers/opaque_section_file.h" |
5097 |
- |
5098 |
- |
5099 |
-diff -ur ld.orig/parsers/archive_file.cpp ld/parsers/archive_file.cpp |
5100 |
---- ld.orig/parsers/archive_file.cpp 2010-09-29 02:26:13.000000000 +0200 |
5101 |
-+++ ld/parsers/archive_file.cpp 2011-09-03 21:01:55.000000000 +0200 |
5102 |
-@@ -38,7 +38,9 @@ |
5103 |
- #include "Architectures.hpp" |
5104 |
- |
5105 |
- #include "macho_relocatable_file.h" |
5106 |
-+#ifdef LTO |
5107 |
- #include "lto_file.h" |
5108 |
-+#endif |
5109 |
- #include "archive_file.h" |
5110 |
- |
5111 |
- |
5112 |
-@@ -87,8 +89,10 @@ |
5113 |
- private: |
5114 |
- static bool validMachOFile(const uint8_t* fileContent, uint64_t fileLength, |
5115 |
- const mach_o::relocatable::ParserOptions& opts); |
5116 |
-+#ifdef LTO |
5117 |
- static bool validLTOFile(const uint8_t* fileContent, uint64_t fileLength, |
5118 |
- const mach_o::relocatable::ParserOptions& opts); |
5119 |
-+#endif |
5120 |
- static cpu_type_t architecture(); |
5121 |
- |
5122 |
- |
5123 |
-@@ -232,12 +236,13 @@ |
5124 |
- return mach_o::relocatable::isObjectFile(fileContent, fileLength, opts); |
5125 |
- } |
5126 |
- |
5127 |
-+#ifdef LTO |
5128 |
- template <typename A> |
5129 |
- bool File<A>::validLTOFile(const uint8_t* fileContent, uint64_t fileLength, const mach_o::relocatable::ParserOptions& opts) |
5130 |
- { |
5131 |
- return lto::isObjectFile(fileContent, fileLength, opts.architecture, opts.subType); |
5132 |
- } |
5133 |
-- |
5134 |
-+#endif |
5135 |
- |
5136 |
- |
5137 |
- template <typename A> |
5138 |
-@@ -256,7 +261,11 @@ |
5139 |
- if ( (p==start) && ((strcmp(memberName, SYMDEF_SORTED) == 0) || (strcmp(memberName, SYMDEF) == 0)) ) |
5140 |
- continue; |
5141 |
- // archive is valid if first .o file is valid |
5142 |
-- return (validMachOFile(p->content(), p->contentSize(), opts) || validLTOFile(p->content(), p->contentSize(), opts)); |
5143 |
-+ return (validMachOFile(p->content(), p->contentSize(), opts) |
5144 |
-+#ifdef LTO |
5145 |
-+ || validLTOFile(p->content(), p->contentSize(), opts) |
5146 |
-+#endif |
5147 |
-+ ); |
5148 |
- } |
5149 |
- // empty archive |
5150 |
- return true; |
5151 |
-@@ -342,12 +351,14 @@ |
5152 |
- this->ordinal() + memberIndex, _objOpts); |
5153 |
- if ( result != NULL ) |
5154 |
- return result; |
5155 |
-+#ifdef LTO |
5156 |
- // see if member is llvm bitcode file |
5157 |
- result = lto::parse(member->content(), member->contentSize(), |
5158 |
- mPath, member->modificationTime(), this->ordinal() + memberIndex, |
5159 |
- _objOpts.architecture, _objOpts.subType, _logAllFiles); |
5160 |
- if ( result != NULL ) |
5161 |
- return result; |
5162 |
-+#endif |
5163 |
- |
5164 |
- throwf("archive member '%s' with length %d is not mach-o or llvm bitcode", memberName, member->contentSize()); |
5165 |
- } |
5166 |
---- other/ObjectDump.cpp.orig 2011-09-03 21:15:10.000000000 +0200 |
5167 |
-+++ other/ObjectDump.cpp 2011-09-03 21:14:37.000000000 +0200 |
5168 |
-@@ -33,7 +33,9 @@ |
5169 |
- |
5170 |
- #include "MachOFileAbstraction.hpp" |
5171 |
- #include "parsers/macho_relocatable_file.h" |
5172 |
-+#ifdef LTO |
5173 |
- #include "parsers/lto_file.h" |
5174 |
-+#endif |
5175 |
- |
5176 |
- static bool sDumpContent= true; |
5177 |
- static bool sDumpStabs = false; |
5178 |
-@@ -1121,10 +1123,12 @@ |
5179 |
- if ( objResult != NULL ) |
5180 |
- return objResult; |
5181 |
- |
5182 |
-+#ifdef LTO |
5183 |
- // see if it is an llvm object file |
5184 |
- objResult = lto::parse(p, fileLen, path, stat_buf.st_mtime, 0, sPreferredArch, sPreferredSubArch, false); |
5185 |
- if ( objResult != NULL ) |
5186 |
- return objResult; |
5187 |
-+#endif |
5188 |
- |
5189 |
- throwf("not a mach-o object file: %s", path); |
5190 |
- #else |
5191 |
|
5192 |
diff --git a/sys-devel/binutils-apple/files/ld64-127.2-Makefile b/sys-devel/binutils-apple/files/ld64-127.2-Makefile |
5193 |
deleted file mode 100644 |
5194 |
index 74aef56..0000000 |
5195 |
--- a/sys-devel/binutils-apple/files/ld64-127.2-Makefile |
5196 |
+++ /dev/null |
5197 |
@@ -1,50 +0,0 @@ |
5198 |
-CPPFLAGS += -Iinclude -Iabstraction -Ild -Ild/parsers -Iother -I. |
5199 |
- |
5200 |
-# some files generate warnings about applying offsetof to a non-POD type. |
5201 |
-# Upstream seems aware of that and ignores by setting |
5202 |
-# GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = NO in the xcode project. |
5203 |
-CXXFLAGS += -Wno-invalid-offsetof |
5204 |
- |
5205 |
-all: rebase unwinddump dyldinfo ld64 ObjectDump machocheck |
5206 |
- |
5207 |
-libprunetrie.a: other/PruneTrie.o other/prune_trie.h |
5208 |
- $(AR) -s -r -c libprunetrie.a other/PruneTrie.o |
5209 |
- |
5210 |
-LD64LIBS=ld/parsers/archive_file.o ld/parsers/macho_relocatable_file.o \ |
5211 |
- ld/parsers/opaque_section_file.o \ |
5212 |
- ld/parsers/macho_dylib_file.o \ |
5213 |
- ld/passes/branch_island.o ld/passes/dylibs.o ld/passes/order_file.o \ |
5214 |
- ld/passes/branch_shim.o ld/passes/got.o ld/passes/tlvp.o \ |
5215 |
- ld/passes/compact_unwind.o ld/passes/huge.o \ |
5216 |
- ld/passes/dtrace_dof.o ld/passes/objc.o \ |
5217 |
- ld/passes/stubs/stubs.o \ |
5218 |
- ld/InputFiles.o ld/OutputFile.o ld/SymbolTable.o \ |
5219 |
- ld/Options.o ld/Resolver.o ld/debugline.o ld/ld.o |
5220 |
- |
5221 |
-ifeq ($(LTO),1) |
5222 |
-CPPFLAGS += -DLTO |
5223 |
-LTO_OBJ = ld/parsers/lto_file.o |
5224 |
-LIBLTO = -lLTO |
5225 |
-else |
5226 |
-LTO_OBJ = |
5227 |
-LIBLTO = |
5228 |
-endif |
5229 |
- |
5230 |
-ld64: libprunetrie.a version.o $(LD64LIBS) $(LTO_OBJ) |
5231 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) $(LIBLTO) -o $@ $^ |
5232 |
- |
5233 |
-rebase: other/rebase.o |
5234 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ |
5235 |
- |
5236 |
-dyldinfo: other/dyldinfo.o |
5237 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ |
5238 |
- |
5239 |
-unwinddump: other/unwinddump.o |
5240 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ |
5241 |
- |
5242 |
-ObjectDump: other/ObjectDump.o ld/debugline.o ld/parsers/macho_relocatable_file.o $(LTO_OBJ) |
5243 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) $(LIBLTO) -o $@ $^ |
5244 |
- |
5245 |
-machocheck: other/machochecker.o |
5246 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ |
5247 |
- |
5248 |
|
5249 |
diff --git a/sys-devel/binutils-apple/files/ld64-127.2-extraneous-headers.patch b/sys-devel/binutils-apple/files/ld64-127.2-extraneous-headers.patch |
5250 |
deleted file mode 100644 |
5251 |
index 34d5080..0000000 |
5252 |
--- a/sys-devel/binutils-apple/files/ld64-127.2-extraneous-headers.patch |
5253 |
+++ /dev/null |
5254 |
@@ -1,12 +0,0 @@ |
5255 |
-Remove unused header that doesn't exist on older OS Xes. |
5256 |
- |
5257 |
---- ld64-127.2/src/ld/parsers/libunwind/AddressSpace.hpp.orig 2015-01-27 23:24:49.000000000 +0100 |
5258 |
-+++ ld64-127.2/src/ld/parsers/libunwind/AddressSpace.hpp 2015-01-27 23:26:21.000000000 +0100 |
5259 |
-@@ -37,7 +37,6 @@ |
5260 |
- #include <mach-o/getsect.h> |
5261 |
- #include <mach-o/dyld_priv.h> |
5262 |
- #include <mach/i386/thread_status.h> |
5263 |
--#include <Availability.h> |
5264 |
- |
5265 |
- #include "FileAbstraction.hpp" |
5266 |
- #include "libunwind.h" |
5267 |
|
5268 |
diff --git a/sys-devel/binutils-apple/files/ld64-127.2-lto.patch b/sys-devel/binutils-apple/files/ld64-127.2-lto.patch |
5269 |
deleted file mode 100644 |
5270 |
index b9a3f14..0000000 |
5271 |
--- a/sys-devel/binutils-apple/files/ld64-127.2-lto.patch |
5272 |
+++ /dev/null |
5273 |
@@ -1,214 +0,0 @@ |
5274 |
---- src/ld/InputFiles.cpp |
5275 |
-+++ src/ld/InputFiles.cpp |
5276 |
-@@ -58,7 +58,9 @@ |
5277 |
- #include "macho_relocatable_file.h" |
5278 |
- #include "macho_dylib_file.h" |
5279 |
- #include "archive_file.h" |
5280 |
-+#ifdef LTO |
5281 |
- #include "lto_file.h" |
5282 |
-+#endif |
5283 |
- #include "opaque_section_file.h" |
5284 |
- |
5285 |
- |
5286 |
-@@ -175,9 +177,11 @@ |
5287 |
- if ( result != NULL ) |
5288 |
- return result; |
5289 |
- |
5290 |
-+#ifdef LTO |
5291 |
- result = lto::archName(p, len); |
5292 |
- if ( result != NULL ) |
5293 |
- return result; |
5294 |
-+#endif |
5295 |
- |
5296 |
- if ( strncmp((const char*)p, "!<arch>\n", 8) == 0 ) |
5297 |
- return "archive"; |
5298 |
-@@ -264,10 +268,12 @@ |
5299 |
- if ( objResult != NULL ) |
5300 |
- return this->addObject(objResult, info, len); |
5301 |
- |
5302 |
-+#if LTO |
5303 |
- // see if it is an llvm object file |
5304 |
- objResult = lto::parse(p, len, info.path, info.modTime, _nextInputOrdinal, _options.architecture(), _options.subArchitecture(), _options.logAllFiles()); |
5305 |
- if ( objResult != NULL ) |
5306 |
- return this->addObject(objResult, info, len); |
5307 |
-+#endif |
5308 |
- |
5309 |
- // see if it is a dynamic library |
5310 |
- ld::dylib::File* dylibResult = mach_o::dylib::parse(p, len, info.path, info.modTime, _options, _nextInputOrdinal, info.options.fBundleLoader, indirectDylib); |
5311 |
-@@ -291,6 +297,7 @@ |
5312 |
- return this->addArchive(archiveResult, info, len); |
5313 |
- } |
5314 |
- |
5315 |
-+#ifdef LTO |
5316 |
- // does not seem to be any valid linker input file, check LTO misconfiguration problems |
5317 |
- if ( lto::archName((uint8_t*)p, len) != NULL ) { |
5318 |
- if ( lto::libLTOisLoaded() ) { |
5319 |
-@@ -315,6 +322,7 @@ |
5320 |
- throwf("could not process llvm bitcode object file, because %s could not be loaded", libLTO); |
5321 |
- } |
5322 |
- } |
5323 |
-+#endif |
5324 |
- |
5325 |
- // error handling |
5326 |
- if ( ((fat_header*)p)->magic == OSSwapBigToHostInt32(FAT_MAGIC) ) { |
5327 |
---- src/ld/Options.cpp |
5328 |
-+++ src/ld/Options.cpp |
5329 |
-@@ -36,10 +36,12 @@ |
5330 |
- #include "Architectures.hpp" |
5331 |
- #include "MachOFileAbstraction.hpp" |
5332 |
- |
5333 |
-+#ifdef LTO |
5334 |
- // upward dependency on lto::version() |
5335 |
- namespace lto { |
5336 |
- extern const char* version(); |
5337 |
- } |
5338 |
-+#endif |
5339 |
- |
5340 |
- // magic to place command line in crash reports |
5341 |
- const int crashreporterBufferSize = 2000; |
5342 |
-@@ -2766,9 +2768,11 @@ |
5343 |
- fprintf(stderr, "%s", ldVersionString); |
5344 |
- // if only -v specified, exit cleanly |
5345 |
- if ( argc == 2 ) { |
5346 |
-+#ifdef LTO |
5347 |
- const char* ltoVers = lto::version(); |
5348 |
- if ( ltoVers != NULL ) |
5349 |
- fprintf(stderr, "%s\n", ltoVers); |
5350 |
-+#endif |
5351 |
- exit(0); |
5352 |
- } |
5353 |
- } |
5354 |
---- src/ld/Resolver.cpp |
5355 |
-+++ src/ld/Resolver.cpp |
5356 |
-@@ -58,7 +58,9 @@ |
5357 |
- #include "InputFiles.h" |
5358 |
- #include "SymbolTable.h" |
5359 |
- #include "Resolver.h" |
5360 |
-+#ifdef LTO |
5361 |
- #include "parsers/lto_file.h" |
5362 |
-+#endif |
5363 |
- |
5364 |
- |
5365 |
- namespace ld { |
5366 |
-@@ -1315,6 +1317,7 @@ |
5367 |
- |
5368 |
- void Resolver::linkTimeOptimize() |
5369 |
- { |
5370 |
-+#ifdef LTO |
5371 |
- // only do work here if some llvm obj files where loaded |
5372 |
- if ( ! _haveLLVMObjs ) |
5373 |
- return; |
5374 |
-@@ -1415,6 +1418,9 @@ |
5375 |
- // check new code does not override some dylib |
5376 |
- this->checkDylibSymbolCollisions(); |
5377 |
- } |
5378 |
-+#else |
5379 |
-+ return; |
5380 |
-+#endif |
5381 |
- } |
5382 |
- |
5383 |
- |
5384 |
---- src/ld/ld.cpp |
5385 |
-+++ src/ld/ld.cpp |
5386 |
-@@ -83,7 +83,9 @@ |
5387 |
- #include "parsers/archive_file.h" |
5388 |
- #include "parsers/macho_relocatable_file.h" |
5389 |
- #include "parsers/macho_dylib_file.h" |
5390 |
-+#ifdef LTO |
5391 |
- #include "parsers/lto_file.h" |
5392 |
-+#endif |
5393 |
- #include "parsers/opaque_section_file.h" |
5394 |
- |
5395 |
- |
5396 |
---- src/ld/parsers/archive_file.cpp |
5397 |
-+++ src/ld/parsers/archive_file.cpp |
5398 |
-@@ -39,7 +39,9 @@ |
5399 |
- #include "Architectures.hpp" |
5400 |
- |
5401 |
- #include "macho_relocatable_file.h" |
5402 |
-+#ifdef LTO |
5403 |
- #include "lto_file.h" |
5404 |
-+#endif |
5405 |
- #include "archive_file.h" |
5406 |
- |
5407 |
- |
5408 |
-@@ -91,8 +93,10 @@ |
5409 |
- private: |
5410 |
- static bool validMachOFile(const uint8_t* fileContent, uint64_t fileLength, |
5411 |
- const mach_o::relocatable::ParserOptions& opts); |
5412 |
-+#ifdef LTO |
5413 |
- static bool validLTOFile(const uint8_t* fileContent, uint64_t fileLength, |
5414 |
- const mach_o::relocatable::ParserOptions& opts); |
5415 |
-+#endif |
5416 |
- static cpu_type_t architecture(); |
5417 |
- |
5418 |
- class Entry : ar_hdr |
5419 |
-@@ -239,12 +243,13 @@ |
5420 |
- return mach_o::relocatable::isObjectFile(fileContent, fileLength, opts); |
5421 |
- } |
5422 |
- |
5423 |
-+#ifdef LTO |
5424 |
- template <typename A> |
5425 |
- bool File<A>::validLTOFile(const uint8_t* fileContent, uint64_t fileLength, const mach_o::relocatable::ParserOptions& opts) |
5426 |
- { |
5427 |
- return lto::isObjectFile(fileContent, fileLength, opts.architecture, opts.subType); |
5428 |
- } |
5429 |
-- |
5430 |
-+#endif |
5431 |
- |
5432 |
- |
5433 |
- template <typename A> |
5434 |
-@@ -263,7 +268,11 @@ |
5435 |
- if ( (p==start) && ((strcmp(memberName, SYMDEF_SORTED) == 0) || (strcmp(memberName, SYMDEF) == 0)) ) |
5436 |
- continue; |
5437 |
- // archive is valid if first .o file is valid |
5438 |
-- return (validMachOFile(p->content(), p->contentSize(), opts) || validLTOFile(p->content(), p->contentSize(), opts)); |
5439 |
-+ return (validMachOFile(p->content(), p->contentSize(), opts) |
5440 |
-+#ifdef LTO |
5441 |
-+ || validLTOFile(p->content(), p->contentSize(), opts) |
5442 |
-+#endif |
5443 |
-+ ); |
5444 |
- } |
5445 |
- // empty archive |
5446 |
- return true; |
5447 |
-@@ -363,6 +372,7 @@ |
5448 |
- _instantiatedEntries[member] = state; |
5449 |
- return _instantiatedEntries[member]; |
5450 |
- } |
5451 |
-+#ifdef LTO |
5452 |
- // see if member is llvm bitcode file |
5453 |
- result = lto::parse(member->content(), member->contentSize(), |
5454 |
- mPath, member->modificationTime(), this->ordinal() + memberIndex, |
5455 |
-@@ -372,6 +382,7 @@ |
5456 |
- _instantiatedEntries[member] = state; |
5457 |
- return _instantiatedEntries[member]; |
5458 |
- } |
5459 |
-+#endif |
5460 |
- |
5461 |
- throwf("archive member '%s' with length %d is not mach-o or llvm bitcode", memberName, member->contentSize()); |
5462 |
- } |
5463 |
---- src/other/ObjectDump.cpp |
5464 |
-+++ src/other/ObjectDump.cpp |
5465 |
-@@ -33,7 +33,9 @@ |
5466 |
- |
5467 |
- #include "MachOFileAbstraction.hpp" |
5468 |
- #include "parsers/macho_relocatable_file.h" |
5469 |
-+#ifdef LTO |
5470 |
- #include "parsers/lto_file.h" |
5471 |
-+#endif |
5472 |
- |
5473 |
- static bool sDumpContent= true; |
5474 |
- static bool sDumpStabs = false; |
5475 |
-@@ -1150,10 +1152,12 @@ |
5476 |
- if ( objResult != NULL ) |
5477 |
- return objResult; |
5478 |
- |
5479 |
-+#ifdef LTO |
5480 |
- // see if it is an llvm object file |
5481 |
- objResult = lto::parse(p, fileLen, path, stat_buf.st_mtime, 0, sPreferredArch, sPreferredSubArch, false); |
5482 |
- if ( objResult != NULL ) |
5483 |
- return objResult; |
5484 |
-+#endif |
5485 |
- |
5486 |
- throwf("not a mach-o object file: %s", path); |
5487 |
- #else |
5488 |
|
5489 |
diff --git a/sys-devel/binutils-apple/files/ld64-127.2-ppc-range-warning.patch b/sys-devel/binutils-apple/files/ld64-127.2-ppc-range-warning.patch |
5490 |
deleted file mode 100644 |
5491 |
index c9f8508..0000000 |
5492 |
--- a/sys-devel/binutils-apple/files/ld64-127.2-ppc-range-warning.patch |
5493 |
+++ /dev/null |
5494 |
@@ -1,16 +0,0 @@ |
5495 |
-Insipred by the comment here: |
5496 |
-http://bugs.freepascal.org/view.php?id=20879 |
5497 |
-It looks like the PPC case is missing, hence add this. Without, we get |
5498 |
-linker errors for compiling packages like Python and TexLive. |
5499 |
- |
5500 |
---- src/ld/OutputFile.cpp |
5501 |
-+++ src/ld/OutputFile.cpp |
5502 |
-@@ -807,7 +807,7 @@ |
5503 |
- // is encoded in mach-o the same as: |
5504 |
- // .long _foo + 0x40000000 |
5505 |
- // so if _foo lays out to 0xC0000100, the first is ok, but the second is not. |
5506 |
-- if ( (_options.architecture() == CPU_TYPE_ARM) || (_options.architecture() == CPU_TYPE_I386) ) { |
5507 |
-+ if ( (_options.architecture() == CPU_TYPE_ARM) || (_options.architecture() == CPU_TYPE_I386) || (_options.architecture() == CPU_TYPE_POWERPC) ) { |
5508 |
- // Unlikely userland code does funky stuff like this, so warn for them, but not warn for -preload |
5509 |
- if ( _options.outputKind() != Options::kPreload ) { |
5510 |
- warning("32-bit absolute address out of range (0x%08llX max is 4GB): from %s + 0x%08X (0x%08llX) to 0x%08llX", |
5511 |
|
5512 |
diff --git a/sys-devel/binutils-apple/files/ld64-127.2-thread_state.patch b/sys-devel/binutils-apple/files/ld64-127.2-thread_state.patch |
5513 |
deleted file mode 100644 |
5514 |
index e894bee..0000000 |
5515 |
--- a/sys-devel/binutils-apple/files/ld64-127.2-thread_state.patch |
5516 |
+++ /dev/null |
5517 |
@@ -1,13 +0,0 @@ |
5518 |
-Include thread_status.h so that __darwin_i386_thread_state_t is known and will |
5519 |
-not generate warnings that it's declared inside parameter list. |
5520 |
- |
5521 |
---- ld64-127.2/src/ld/HeaderAndLoadCommands.hpp.orig 2015-01-28 00:32:55.000000000 +0100 |
5522 |
-+++ ld64-127.2/src/ld/HeaderAndLoadCommands.hpp 2015-01-28 00:27:51.000000000 +0100 |
5523 |
-@@ -29,6 +29,7 @@ |
5524 |
- #include <limits.h> |
5525 |
- #include <unistd.h> |
5526 |
- #include <mach-o/loader.h> |
5527 |
-+#include <mach/i386/thread_status.h> |
5528 |
- |
5529 |
- #include <vector> |
5530 |
- |
5531 |
|
5532 |
diff --git a/sys-devel/binutils-apple/files/ld64-128.2-1010.patch b/sys-devel/binutils-apple/files/ld64-128.2-1010.patch |
5533 |
deleted file mode 100644 |
5534 |
index dee69e7..0000000 |
5535 |
--- a/sys-devel/binutils-apple/files/ld64-128.2-1010.patch |
5536 |
+++ /dev/null |
5537 |
@@ -1,20 +0,0 @@ |
5538 |
-Backport (just a diff really) of OS X 10.10 handling from 241.9. |
5539 |
- |
5540 |
---- ld64-128.2/src/ld/Options.cpp 2015-01-30 17:16:48.000000000 +0100 |
5541 |
-+++ ld64-241.9/src/ld/Options.cpp 2015-01-30 17:11:57.000000000 +0100 |
5542 |
-@@ -1241,7 +1348,14 @@ |
5543 |
- throw "-macosx_version_min argument missing"; |
5544 |
- |
5545 |
- if ( (strncmp(version, "10.", 3) == 0) && isdigit(version[3]) ) { |
5546 |
-- unsigned int minorVersion = version[3] - '0'; |
5547 |
-+ unsigned int minorVersion = 0; |
5548 |
-+ for (int i=3; isdigit(version[i]); ++i) { |
5549 |
-+ minorVersion = minorVersion*10 + (version[i] - '0'); |
5550 |
-+ } |
5551 |
-+ if ( minorVersion > 255 ) { |
5552 |
-+ warning("Mac OS X minor version > 255 in '%s'", version); |
5553 |
-+ minorVersion = 255; |
5554 |
-+ } |
5555 |
- fMacVersionMin = (ld::MacVersionMin)(0x000A0000 | (minorVersion << 8)); |
5556 |
- } |
5557 |
- else { |
5558 |
|
5559 |
diff --git a/sys-devel/binutils-apple/files/ld64-128.2-Makefile b/sys-devel/binutils-apple/files/ld64-128.2-Makefile |
5560 |
deleted file mode 100644 |
5561 |
index b02c824..0000000 |
5562 |
--- a/sys-devel/binutils-apple/files/ld64-128.2-Makefile |
5563 |
+++ /dev/null |
5564 |
@@ -1,47 +0,0 @@ |
5565 |
-CPPFLAGS += "-DCPU_SUBTYPE_X86_ALL=((cpu_subtype_t)3)" -Iinclude -Iabstraction -Ild -Ild/parsers -Iother -I. |
5566 |
- |
5567 |
-# dropped machocheck due to compilation failures |
5568 |
-all: rebase unwinddump dyldinfo ld64 ObjectDump |
5569 |
- |
5570 |
-libprunetrie.a: other/PruneTrie.o other/prune_trie.h |
5571 |
- $(AR) -s -r -c libprunetrie.a other/PruneTrie.o |
5572 |
- |
5573 |
-LD64LIBS=ld/parsers/archive_file.o ld/parsers/macho_relocatable_file.o \ |
5574 |
- ld/parsers/opaque_section_file.o \ |
5575 |
- ld/parsers/macho_dylib_file.o \ |
5576 |
- ld/passes/branch_island.o ld/passes/dylibs.o ld/passes/order.o \ |
5577 |
- ld/passes/branch_shim.o ld/passes/got.o ld/passes/tlvp.o \ |
5578 |
- ld/passes/compact_unwind.o ld/passes/huge.o \ |
5579 |
- ld/passes/dtrace_dof.o ld/passes/objc.o \ |
5580 |
- ld/passes/stubs/stubs.o \ |
5581 |
- ld/InputFiles.o ld/OutputFile.o ld/SymbolTable.o \ |
5582 |
- ld/Options.o ld/Resolver.o ld/debugline.o ld/ld.o |
5583 |
- |
5584 |
-ifeq ($(LTO),1) |
5585 |
-CPPFLAGS += "-DLTO" |
5586 |
-LTO_OBJ = ld/parsers/lto_file.o |
5587 |
-LIBLTO = -lLTO |
5588 |
-else |
5589 |
-CPPFLAGS += "-ULTO" |
5590 |
-LTO_OBJ = |
5591 |
-LIBLTO = |
5592 |
-endif |
5593 |
- |
5594 |
-ld64: libprunetrie.a version.o $(LD64LIBS) $(LTO_OBJ) |
5595 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) $(LIBLTO) -o $@ $^ |
5596 |
- |
5597 |
-rebase: other/rebase.o |
5598 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ |
5599 |
- |
5600 |
-dyldinfo: other/dyldinfo.o |
5601 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ |
5602 |
- |
5603 |
-unwinddump: other/unwinddump.o |
5604 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ |
5605 |
- |
5606 |
-ObjectDump: other/ObjectDump.o ld/debugline.o ld/parsers/macho_relocatable_file.o $(LTO_OBJ) |
5607 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) $(LIBLTO) -o $@ $^ |
5608 |
- |
5609 |
-machocheck: other/machochecker.o |
5610 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ |
5611 |
- |
5612 |
|
5613 |
diff --git a/sys-devel/binutils-apple/files/ld64-128.2-Makefile-2 b/sys-devel/binutils-apple/files/ld64-128.2-Makefile-2 |
5614 |
deleted file mode 100644 |
5615 |
index 1d48ae9..0000000 |
5616 |
--- a/sys-devel/binutils-apple/files/ld64-128.2-Makefile-2 |
5617 |
+++ /dev/null |
5618 |
@@ -1,50 +0,0 @@ |
5619 |
-CPPFLAGS += -Iinclude -Iabstraction -Ild -Ild/parsers -Iother -I. |
5620 |
- |
5621 |
-# some files generate warnings about applying offsetof to a non-POD type. |
5622 |
-# Upstream seems aware of that and ignores by setting |
5623 |
-# GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = NO in the xcode project. |
5624 |
-CXXFLAGS += -Wno-invalid-offsetof |
5625 |
- |
5626 |
-all: rebase unwinddump dyldinfo ld64 ObjectDump machocheck |
5627 |
- |
5628 |
-libprunetrie.a: other/PruneTrie.o other/prune_trie.h |
5629 |
- $(AR) -s -r -c libprunetrie.a other/PruneTrie.o |
5630 |
- |
5631 |
-LD64LIBS=ld/parsers/archive_file.o ld/parsers/macho_relocatable_file.o \ |
5632 |
- ld/parsers/opaque_section_file.o \ |
5633 |
- ld/parsers/macho_dylib_file.o \ |
5634 |
- ld/passes/branch_island.o ld/passes/dylibs.o ld/passes/order.o \ |
5635 |
- ld/passes/branch_shim.o ld/passes/got.o ld/passes/tlvp.o \ |
5636 |
- ld/passes/compact_unwind.o ld/passes/huge.o \ |
5637 |
- ld/passes/dtrace_dof.o ld/passes/objc.o \ |
5638 |
- ld/passes/stubs/stubs.o \ |
5639 |
- ld/InputFiles.o ld/OutputFile.o ld/SymbolTable.o \ |
5640 |
- ld/Options.o ld/Resolver.o ld/debugline.o ld/ld.o |
5641 |
- |
5642 |
-ifeq ($(LTO),1) |
5643 |
-CPPFLAGS += -DLTO |
5644 |
-LTO_OBJ = ld/parsers/lto_file.o |
5645 |
-LIBLTO = -lLTO |
5646 |
-else |
5647 |
-LTO_OBJ = |
5648 |
-LIBLTO = |
5649 |
-endif |
5650 |
- |
5651 |
-ld64: libprunetrie.a version.o $(LD64LIBS) $(LTO_OBJ) |
5652 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) $(LIBLTO) -o $@ $^ |
5653 |
- |
5654 |
-rebase: other/rebase.o |
5655 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ |
5656 |
- |
5657 |
-dyldinfo: other/dyldinfo.o |
5658 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ |
5659 |
- |
5660 |
-unwinddump: other/unwinddump.o |
5661 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ |
5662 |
- |
5663 |
-ObjectDump: other/ObjectDump.o ld/debugline.o ld/parsers/macho_relocatable_file.o $(LTO_OBJ) |
5664 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) $(LIBLTO) -o $@ $^ |
5665 |
- |
5666 |
-machocheck: other/machochecker.o |
5667 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ |
5668 |
- |
5669 |
|
5670 |
diff --git a/sys-devel/binutils-apple/files/ld64-128.2-stdlib.patch b/sys-devel/binutils-apple/files/ld64-128.2-stdlib.patch |
5671 |
deleted file mode 100644 |
5672 |
index 8bbcb46..0000000 |
5673 |
--- a/sys-devel/binutils-apple/files/ld64-128.2-stdlib.patch |
5674 |
+++ /dev/null |
5675 |
@@ -1,14 +0,0 @@ |
5676 |
-Patch by Linlin Yan <yanlinlin82@×××××.com> |
5677 |
- |
5678 |
-https://bugs.gentoo.org/show_bug.cgi?id=490932 |
5679 |
- |
5680 |
---- ld64-128.2/src/other/rebase.cpp |
5681 |
-+++ ld64-128.2/src/other/rebase.cpp |
5682 |
-@@ -29,6 +29,7 @@ |
5683 |
- #include <limits.h> |
5684 |
- #include <stdarg.h> |
5685 |
- #include <stdio.h> |
5686 |
-+#include <stdlib.h> |
5687 |
- #include <fcntl.h> |
5688 |
- #include <errno.h> |
5689 |
- #include <unistd.h> |
5690 |
|
5691 |
diff --git a/sys-devel/binutils-apple/files/ld64-136-Makefile b/sys-devel/binutils-apple/files/ld64-136-Makefile |
5692 |
deleted file mode 100644 |
5693 |
index 948c705..0000000 |
5694 |
--- a/sys-devel/binutils-apple/files/ld64-136-Makefile |
5695 |
+++ /dev/null |
5696 |
@@ -1,48 +0,0 @@ |
5697 |
-CPPFLAGS += "-DCPU_SUBTYPE_X86_ALL=((cpu_subtype_t)3)" -Iinclude -Iabstraction -Ild -Ild/parsers -Iother -I. |
5698 |
- |
5699 |
-# dropped machocheck due to compilation failures |
5700 |
-all: rebase unwinddump dyldinfo ld64 ObjectDump |
5701 |
- |
5702 |
-libprunetrie.a: other/PruneTrie.o other/prune_trie.h |
5703 |
- $(AR) -s -r -c libprunetrie.a other/PruneTrie.o |
5704 |
- |
5705 |
-LD64LIBS=ld/parsers/archive_file.o ld/parsers/macho_relocatable_file.o \ |
5706 |
- ld/parsers/opaque_section_file.o \ |
5707 |
- ld/parsers/macho_dylib_file.o \ |
5708 |
- ld/passes/branch_island.o ld/passes/dylibs.o ld/passes/order.o \ |
5709 |
- ld/passes/branch_shim.o ld/passes/got.o ld/passes/tlvp.o \ |
5710 |
- ld/passes/compact_unwind.o ld/passes/huge.o \ |
5711 |
- ld/passes/dtrace_dof.o ld/passes/objc.o \ |
5712 |
- ld/passes/stubs/stubs.o \ |
5713 |
- ld/InputFiles.o ld/OutputFile.o ld/SymbolTable.o \ |
5714 |
- ld/Snapshot.o \ |
5715 |
- ld/Options.o ld/Resolver.o ld/debugline.o ld/ld.o |
5716 |
- |
5717 |
-ifeq ($(LTO),1) |
5718 |
-CPPFLAGS += "-DLTO" |
5719 |
-LTO_OBJ = ld/parsers/lto_file.o |
5720 |
-LIBLTO = -lLTO |
5721 |
-else |
5722 |
-CPPFLAGS += "-ULTO" |
5723 |
-LTO_OBJ = |
5724 |
-LIBLTO = |
5725 |
-endif |
5726 |
- |
5727 |
-ld64: libprunetrie.a version.o $(LD64LIBS) $(LTO_OBJ) |
5728 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) $(LIBLTO) -o $@ $^ |
5729 |
- |
5730 |
-rebase: other/rebase.o |
5731 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ |
5732 |
- |
5733 |
-dyldinfo: other/dyldinfo.o |
5734 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ |
5735 |
- |
5736 |
-unwinddump: other/unwinddump.o |
5737 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ |
5738 |
- |
5739 |
-ObjectDump: other/ObjectDump.o ld/debugline.o ld/parsers/macho_relocatable_file.o $(LTO_OBJ) |
5740 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) $(LIBLTO) -o $@ $^ |
5741 |
- |
5742 |
-machocheck: other/machochecker.o |
5743 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ |
5744 |
- |
5745 |
|
5746 |
diff --git a/sys-devel/binutils-apple/files/ld64-136-compile_stubs.h b/sys-devel/binutils-apple/files/ld64-136-compile_stubs.h |
5747 |
deleted file mode 100644 |
5748 |
index 8cd430a..0000000 |
5749 |
--- a/sys-devel/binutils-apple/files/ld64-136-compile_stubs.h |
5750 |
+++ /dev/null |
5751 |
@@ -1,53 +0,0 @@ |
5752 |
-static const char *compile_stubs = |
5753 |
-"#!/bin/csh\n" |
5754 |
-"\n" |
5755 |
-"# Attempt to find the architecture.\n" |
5756 |
-"# First look through the command line args.\n" |
5757 |
-"set arch=unknown\n" |
5758 |
-"set link_cmd=(`cat link_command`)\n" |
5759 |
-"while ( $#link_cmd > 0 )\n" |
5760 |
-" if ( \"$link_cmd[1]\" == \"-arch\" ) then\n" |
5761 |
-" set arch=$link_cmd[2]\n" |
5762 |
-" endif\n" |
5763 |
-" shift link_cmd\n" |
5764 |
-"end\n" |
5765 |
-"\n" |
5766 |
-"# look for an explicit arch file\n" |
5767 |
-"if ( \"$arch\" == \"unknown\" ) then\n" |
5768 |
-" if ( -e arch ) then\n" |
5769 |
-" set arch=`cat arch`\n" |
5770 |
-" endif\n" |
5771 |
-"endif\n" |
5772 |
-"\n" |
5773 |
-"if ( \"$arch\" == \"unknown\" ) then\n" |
5774 |
-"echo \"***** Unable to determine architecture.\"\n" |
5775 |
-"exit 1\n" |
5776 |
-"endif \n" |
5777 |
-"\n" |
5778 |
-"# Create .dylibs for each file in the dylib_stubs directory.\n" |
5779 |
-"if ( -e dylib_stubs ) then\n" |
5780 |
-" set files=`cd dylib_stubs ; echo *`\n" |
5781 |
-" mkdir -p dylibs\n" |
5782 |
-" foreach file ($files)\n" |
5783 |
-" if ( ! -e dylibs/$file ) then\n" |
5784 |
-" clang -arch $arch -c -fno-builtin -o tmp_object.o -x c dylib_stubs/$file\n" |
5785 |
-" ld -arch $arch -dylib -macosx_version_min 10.1 -no_version_load_command -o dylibs/$file tmp_object.o\n" |
5786 |
-" endif\n" |
5787 |
-" end\n" |
5788 |
-"endif\n" |
5789 |
-"\n" |
5790 |
-"# Create .frameworks for each file in the framework_stubs directory.\n" |
5791 |
-"if ( -e framework_stubs ) then\n" |
5792 |
-" set files=`cd framework_stubs ; echo *`\n" |
5793 |
-" foreach file ($files)\n" |
5794 |
-" if ( ! -e frameworks/$file.framework ) then\n" |
5795 |
-" clang -arch $arch -c -fno-builtin -o tmp_object.o -x c framework_stubs/$file\n" |
5796 |
-" mkdir -p frameworks/$file.framework\n" |
5797 |
-" ld -arch $arch -dylib -macosx_version_min 10.1 -no_version_load_command -o frameworks/$file.framework/$file tmp_object.o\n" |
5798 |
-" endif\n" |
5799 |
-" end\n" |
5800 |
-"endif\n" |
5801 |
-"\n" |
5802 |
-"# Clean up.\n" |
5803 |
-"rm -f tmp_object.o\n" |
5804 |
-; |
5805 |
|
5806 |
diff --git a/sys-devel/binutils-apple/files/ld64-236.3-Makefile b/sys-devel/binutils-apple/files/ld64-236.3-Makefile |
5807 |
deleted file mode 100644 |
5808 |
index 1f35c8f..0000000 |
5809 |
--- a/sys-devel/binutils-apple/files/ld64-236.3-Makefile |
5810 |
+++ /dev/null |
5811 |
@@ -1,51 +0,0 @@ |
5812 |
-CPPFLAGS += -Iinclude -Iabstraction -Ild -Ild/parsers -Iother -I. |
5813 |
- |
5814 |
-# some files generate warnings about applying offsetof to a non-POD type. |
5815 |
-# Upstream seems aware of that and ignores by setting |
5816 |
-# GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = NO in the xcode project. |
5817 |
-CXXFLAGS += -Wno-invalid-offsetof |
5818 |
- |
5819 |
-all: rebase unwinddump dyldinfo ld64 ObjectDump machocheck |
5820 |
- |
5821 |
-libprunetrie.a: other/PruneTrie.o other/prune_trie.h |
5822 |
- $(AR) -s -r -c libprunetrie.a other/PruneTrie.o |
5823 |
- |
5824 |
-LD64LIBS=ld/parsers/archive_file.o ld/parsers/macho_relocatable_file.o \ |
5825 |
- ld/parsers/opaque_section_file.o \ |
5826 |
- ld/parsers/macho_dylib_file.o \ |
5827 |
- ld/passes/branch_island.o ld/passes/dylibs.o ld/passes/order.o \ |
5828 |
- ld/passes/branch_shim.o ld/passes/got.o ld/passes/tlvp.o \ |
5829 |
- ld/passes/compact_unwind.o ld/passes/huge.o \ |
5830 |
- ld/passes/dtrace_dof.o ld/passes/objc.o \ |
5831 |
- ld/passes/stubs/stubs.o \ |
5832 |
- ld/InputFiles.o ld/OutputFile.o ld/SymbolTable.o \ |
5833 |
- ld/Snapshot.o \ |
5834 |
- ld/Options.o ld/Resolver.o ld/debugline.o ld/ld.o |
5835 |
- |
5836 |
-ifeq ($(LTO),1) |
5837 |
-CPPFLAGS += -DLTO |
5838 |
-LTO_OBJ = ld/parsers/lto_file.o |
5839 |
-LIBLTO = -lLTO |
5840 |
-else |
5841 |
-LTO_OBJ = |
5842 |
-LIBLTO = |
5843 |
-endif |
5844 |
- |
5845 |
-ld64: libprunetrie.a version.o $(LD64LIBS) $(LTO_OBJ) |
5846 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) $(LIBLTO) -o $@ $^ |
5847 |
- |
5848 |
-rebase: other/rebase.o |
5849 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ |
5850 |
- |
5851 |
-dyldinfo: other/dyldinfo.o |
5852 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ |
5853 |
- |
5854 |
-unwinddump: other/unwinddump.o |
5855 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ |
5856 |
- |
5857 |
-ObjectDump: other/ObjectDump.o ld/debugline.o ld/parsers/macho_relocatable_file.o $(LTO_OBJ) |
5858 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) $(LIBLTO) -o $@ $^ |
5859 |
- |
5860 |
-machocheck: other/machochecker.o |
5861 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ |
5862 |
- |
5863 |
|
5864 |
diff --git a/sys-devel/binutils-apple/files/ld64-236.3-arm64-fixup.patch b/sys-devel/binutils-apple/files/ld64-236.3-arm64-fixup.patch |
5865 |
deleted file mode 100644 |
5866 |
index b64e529..0000000 |
5867 |
--- a/sys-devel/binutils-apple/files/ld64-236.3-arm64-fixup.patch |
5868 |
+++ /dev/null |
5869 |
@@ -1,17 +0,0 @@ |
5870 |
-Use correct enum values (backport from 241.9). |
5871 |
- |
5872 |
---- ld64-236.3/src/other/ObjectDump.cpp.orig 2014-11-12 21:17:01.000000000 +0100 |
5873 |
-+++ ld64-236.3/src/other/ObjectDump.cpp 2014-11-12 21:17:44.000000000 +0100 |
5874 |
-@@ -995,10 +995,10 @@ |
5875 |
- case ld::Fixup::kindStoreTargetAddressARM64PageOff12: |
5876 |
- printf("ARM64 store 12-bit page offset of %s", referenceTargetAtomName(ref)); |
5877 |
- break; |
5878 |
-- case ld::Fixup::kindStoreTargetAddressARM64TLVPage21: |
5879 |
-+ case ld::Fixup::kindStoreTargetAddressARM64TLVPLoadPage21: |
5880 |
- printf("ARM64 store 21-bit pcrel ADRP to TLV for %s", referenceTargetAtomName(ref)); |
5881 |
- break; |
5882 |
-- case ld::Fixup::kindStoreTargetAddressARM64TLVPageOff12: |
5883 |
-+ case ld::Fixup::kindStoreTargetAddressARM64TLVPLoadPageOff12: |
5884 |
- printf("ARM64 store 12-bit page offset of TLV of %s", referenceTargetAtomName(ref)); |
5885 |
- break; |
5886 |
- case ld::Fixup::kindStoreTargetAddressARM64GOTLoadPage21: |
5887 |
|
5888 |
diff --git a/sys-devel/binutils-apple/files/ld64-236.3-constant-types.patch b/sys-devel/binutils-apple/files/ld64-236.3-constant-types.patch |
5889 |
deleted file mode 100644 |
5890 |
index c4c5e0d..0000000 |
5891 |
--- a/sys-devel/binutils-apple/files/ld64-236.3-constant-types.patch |
5892 |
+++ /dev/null |
5893 |
@@ -1,61 +0,0 @@ |
5894 |
-Avoid error with gcc on 32bit platforms: |
5895 |
-ld/LinkEdit.hpp:1329: error: integer constant is too large for 'long' type |
5896 |
- |
5897 |
---- ./ld64-236.3/src/ld/LinkEdit.hpp.orig 2015-01-14 18:00:49.000000000 +0100 |
5898 |
-+++ ./ld64-236.3/src/ld/LinkEdit.hpp 2015-01-14 18:02:23.000000000 +0100 |
5899 |
-@@ -1326,7 +1326,7 @@ |
5900 |
- void FunctionStartsAtom<A>::encode() const |
5901 |
- { |
5902 |
- this->_encodedData.reserve(8192); |
5903 |
-- const uint64_t badAddress = 0xFFFFFFFFFFFFFFFF; |
5904 |
-+ const uint64_t badAddress = 0xFFFFFFFFFFFFFFFFULL; |
5905 |
- uint64_t addr = badAddress; |
5906 |
- // delta compress all function addresses |
5907 |
- for (std::vector<ld::Internal::FinalSection*>::iterator it = this->_state.sections.begin(); it != this->_state.sections.end(); ++it) { |
5908 |
---- ./ld64-236.3/src/ld/Options.cpp.orig 2015-01-14 18:01:12.000000000 +0100 |
5909 |
-+++ ./ld64-236.3/src/ld/Options.cpp 2015-01-14 18:02:09.000000000 +0100 |
5910 |
-@@ -4173,7 +4173,7 @@ |
5911 |
- switch (fArchitecture) { |
5912 |
- case CPU_TYPE_I386: |
5913 |
- case CPU_TYPE_ARM: |
5914 |
-- if ( fStackAddr > 0xFFFFFFFF ) |
5915 |
-+ if ( fStackAddr > 0xFFFFFFFFULL ) |
5916 |
- throw "-stack_addr must be < 4G for 32-bit processes"; |
5917 |
- break; |
5918 |
- case CPU_TYPE_X86_64: |
5919 |
-@@ -4193,29 +4193,29 @@ |
5920 |
- if ( fStackSize > 0xFFFFFFFF ) |
5921 |
- throw "-stack_size must be < 4G for 32-bit processes"; |
5922 |
- if ( fStackAddr == 0 ) { |
5923 |
-- fStackAddr = 0xC0000000; |
5924 |
-+ fStackAddr = 0xC0000000ULL; |
5925 |
- } |
5926 |
-- if ( (fStackAddr > 0xB0000000) && ((fStackAddr-fStackSize) < 0xB0000000) ) |
5927 |
-+ if ( (fStackAddr > 0xB0000000ULL) && ((fStackAddr-fStackSize) < 0xB0000000ULL) ) |
5928 |
- warning("custom stack placement overlaps and will disable shared region"); |
5929 |
- break; |
5930 |
- case CPU_TYPE_ARM: |
5931 |
- if ( fStackSize > 0x2F000000 ) |
5932 |
- throw "-stack_size must be < 752MB"; |
5933 |
- if ( fStackAddr == 0 ) |
5934 |
-- fStackAddr = 0x2F000000; |
5935 |
-- if ( fStackAddr > 0x30000000) |
5936 |
-+ fStackAddr = 0x2F000000ULL; |
5937 |
-+ if ( fStackAddr > 0x30000000ULL) |
5938 |
- throw "-stack_addr must be < 0x30000000 for arm"; |
5939 |
- break; |
5940 |
- case CPU_TYPE_X86_64: |
5941 |
- if ( fStackAddr == 0 ) { |
5942 |
-- fStackAddr = 0x00007FFF5C000000LL; |
5943 |
-+ fStackAddr = 0x00007FFF5C000000ULL; |
5944 |
- } |
5945 |
- break; |
5946 |
- case CPU_TYPE_ARM64: |
5947 |
- if ( fStackSize > 0x20000000 ) |
5948 |
- throw "-stack_size must be < 512MB"; |
5949 |
- if ( fStackAddr == 0 ) { |
5950 |
-- fStackAddr = 0x120000000; |
5951 |
-+ fStackAddr = 0x120000000ULL; |
5952 |
- } |
5953 |
- break; |
5954 |
- } |
5955 |
|
5956 |
diff --git a/sys-devel/binutils-apple/files/ld64-236.3-crashreporter.patch b/sys-devel/binutils-apple/files/ld64-236.3-crashreporter.patch |
5957 |
deleted file mode 100644 |
5958 |
index f8b42b4..0000000 |
5959 |
--- a/sys-devel/binutils-apple/files/ld64-236.3-crashreporter.patch |
5960 |
+++ /dev/null |
5961 |
@@ -1,23 +0,0 @@ |
5962 |
-Allow to disable crash reporter |
5963 |
- |
5964 |
-diff -ur ld64-236.3/src/ld/Options.cpp ld64-236.3/src/ld/Options.cpp |
5965 |
---- ld64-236.3/src/ld/Options.cpp 2014-08-29 16:40:18.000000000 +0200 |
5966 |
-+++ ld64-236.3/src/ld/Options.cpp 2014-08-29 16:35:36.000000000 +0200 |
5967 |
-@@ -54,7 +54,7 @@ |
5968 |
- // magic to place command line in crash reports |
5969 |
- const int crashreporterBufferSize = 2000; |
5970 |
- static char crashreporterBuffer[crashreporterBufferSize]; |
5971 |
--#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 |
5972 |
-+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 && defined(SUPPORT_CRASHREPORTER) |
5973 |
- #include <CrashReporterClient.h> |
5974 |
- // hack until ld does not need to build on 10.6 anymore |
5975 |
- struct crashreporter_annotations_t gCRAnnotations |
5976 |
-@@ -4564,7 +4564,7 @@ |
5977 |
- bool newLinker = false; |
5978 |
- |
5979 |
- // build command line buffer in case ld crashes |
5980 |
--#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 |
5981 |
-+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 && defined(SUPPORT_CRASHREPORTER) |
5982 |
- CRSetCrashLogMessage(crashreporterBuffer); |
5983 |
- #endif |
5984 |
- const char* srcRoot = getenv("SRCROOT"); |
5985 |
|
5986 |
diff --git a/sys-devel/binutils-apple/files/ld64-236.3-gcc.patch b/sys-devel/binutils-apple/files/ld64-236.3-gcc.patch |
5987 |
deleted file mode 100644 |
5988 |
index 1e1f578..0000000 |
5989 |
--- a/sys-devel/binutils-apple/files/ld64-236.3-gcc.patch |
5990 |
+++ /dev/null |
5991 |
@@ -1,1038 +0,0 @@ |
5992 |
-Provide c++11 headers from tr1 include directory and namespace. |
5993 |
- |
5994 |
-Work around weird namespacing bug in gcc-4.2.1 where class ld::Section |
5995 |
-conflicts with template mach_o::relocatable::Section by renaming the latter to |
5996 |
-MRFSection (could possibly be done using sed from ebuild or avoided by figuring |
5997 |
-out, what's actually going on with those namespaces). |
5998 |
- |
5999 |
-diff -ur ld64-236.3.orig/src/ld/InputFiles.h ld64-236.3/src/ld/InputFiles.h |
6000 |
---- ld64-236.3.orig/src/ld/InputFiles.h 2014-04-05 00:42:29.000000000 +0200 |
6001 |
-+++ ld64-236.3/src/ld/InputFiles.h 2015-01-11 22:43:08.000000000 +0100 |
6002 |
-@@ -46,6 +46,14 @@ |
6003 |
- #include <pthread.h> |
6004 |
- #endif |
6005 |
- |
6006 |
-+#ifdef __GLIBCXX__ |
6007 |
-+#include <tr1/unordered_map> |
6008 |
-+#define UNORDERED_MAP tr1::unordered_map |
6009 |
-+#else |
6010 |
-+#include <unordered_map> |
6011 |
-+#define UNORDERED_MAP unordered_map |
6012 |
-+#endif |
6013 |
-+ |
6014 |
- #include <vector> |
6015 |
- |
6016 |
- #include "Options.h" |
6017 |
-@@ -107,7 +115,7 @@ |
6018 |
- static void parseWorkerThread(InputFiles *inputFiles); |
6019 |
- void startThread(void (*threadFunc)(InputFiles *)) const; |
6020 |
- |
6021 |
-- typedef std::unordered_map<const char*, ld::dylib::File*, CStringHash, CStringEquals> InstallNameToDylib; |
6022 |
-+ typedef std::UNORDERED_MAP<const char*, ld::dylib::File*, CStringHash, CStringEquals> InstallNameToDylib; |
6023 |
- |
6024 |
- const Options& _options; |
6025 |
- std::vector<ld::File*> _inputFiles; |
6026 |
-diff -ur ld64-236.3.orig/src/ld/LinkEditClassic.hpp ld64-236.3/src/ld/LinkEditClassic.hpp |
6027 |
---- ld64-236.3.orig/src/ld/LinkEditClassic.hpp 2014-04-05 00:42:29.000000000 +0200 |
6028 |
-+++ ld64-236.3/src/ld/LinkEditClassic.hpp 2015-01-11 22:44:04.000000000 +0100 |
6029 |
-@@ -31,8 +31,13 @@ |
6030 |
- #include <limits.h> |
6031 |
- #include <unistd.h> |
6032 |
- |
6033 |
--#include <vector> |
6034 |
-+#ifdef __GLIBCXX__ |
6035 |
-+#include <tr1/unordered_map> |
6036 |
-+#define UNORDERED_MAP tr1::unordered_map |
6037 |
-+#else |
6038 |
- #include <unordered_map> |
6039 |
-+#define UNORDERED_MAP unordered_map |
6040 |
-+#endif |
6041 |
- |
6042 |
- #include "Options.h" |
6043 |
- #include "ld.hpp" |
6044 |
-@@ -92,7 +97,7 @@ |
6045 |
- |
6046 |
- private: |
6047 |
- enum { kBufferSize = 0x01000000 }; |
6048 |
-- typedef std::unordered_map<const char*, int32_t, CStringHash, CStringEquals> StringToOffset; |
6049 |
-+ typedef std::UNORDERED_MAP<const char*, int32_t, CStringHash, CStringEquals> StringToOffset; |
6050 |
- |
6051 |
- const uint32_t _pointerSize; |
6052 |
- std::vector<char*> _fullBuffers; |
6053 |
-diff -ur ld64-236.3.orig/src/ld/Options.cpp ld64-236.3/src/ld/Options.cpp |
6054 |
---- ld64-236.3.orig/src/ld/Options.cpp 2015-01-11 17:35:08.000000000 +0100 |
6055 |
-+++ ld64-236.3/src/ld/Options.cpp 2015-01-11 22:47:34.000000000 +0100 |
6056 |
-@@ -4335,7 +4335,7 @@ |
6057 |
- |
6058 |
- // make sure all required exported symbols exist |
6059 |
- std::vector<const char*> impliedExports; |
6060 |
-- for (NameSet::iterator it=fExportSymbols.regularBegin(); it != fExportSymbols.regularEnd(); ++it) { |
6061 |
-+ for (NameSet::const_iterator it=fExportSymbols.regularBegin(); it != fExportSymbols.regularEnd(); ++it) { |
6062 |
- const char* name = *it; |
6063 |
- const int len = strlen(name); |
6064 |
- if ( (strcmp(&name[len-3], ".eh") == 0) || (strncmp(name, ".objc_category_name_", 20) == 0) ) { |
6065 |
-@@ -4367,7 +4367,7 @@ |
6066 |
- } |
6067 |
- |
6068 |
- // make sure all required re-exported symbols exist |
6069 |
-- for (NameSet::iterator it=fReExportSymbols.regularBegin(); it != fReExportSymbols.regularEnd(); ++it) { |
6070 |
-+ for (NameSet::const_iterator it=fReExportSymbols.regularBegin(); it != fReExportSymbols.regularEnd(); ++it) { |
6071 |
- fInitialUndefines.push_back(*it); |
6072 |
- } |
6073 |
- |
6074 |
-diff -ur ld64-236.3.orig/src/ld/Options.h ld64-236.3/src/ld/Options.h |
6075 |
---- ld64-236.3.orig/src/ld/Options.h 2014-04-05 00:42:29.000000000 +0200 |
6076 |
-+++ ld64-236.3/src/ld/Options.h 2015-01-11 22:44:00.000000000 +0100 |
6077 |
-@@ -30,8 +30,17 @@ |
6078 |
- #include <mach/machine.h> |
6079 |
- |
6080 |
- #include <vector> |
6081 |
-+#ifdef __GLIBCXX__ |
6082 |
-+#include <tr1/unordered_set> |
6083 |
-+#include <tr1/unordered_map> |
6084 |
-+#define UNORDERED_MAP tr1::unordered_map |
6085 |
-+#define UNORDERED_SET tr1::unordered_set |
6086 |
-+#else |
6087 |
- #include <unordered_set> |
6088 |
- #include <unordered_map> |
6089 |
-+#define UNORDERED_MAP unordered_map |
6090 |
-+#define UNORDERED_SET unordered_set |
6091 |
-+#endif |
6092 |
- |
6093 |
- #include "ld.hpp" |
6094 |
- #include "Snapshot.h" |
6095 |
-@@ -376,8 +385,8 @@ |
6096 |
- const std::vector<SectionRename>& sectionRenames() const { return fSectionRenames; } |
6097 |
- |
6098 |
- private: |
6099 |
-- typedef std::unordered_map<const char*, unsigned int, ld::CStringHash, ld::CStringEquals> NameToOrder; |
6100 |
-- typedef std::unordered_set<const char*, ld::CStringHash, ld::CStringEquals> NameSet; |
6101 |
-+ typedef std::UNORDERED_MAP<const char*, unsigned int, ld::CStringHash, ld::CStringEquals> NameToOrder; |
6102 |
-+ typedef std::UNORDERED_SET<const char*, ld::CStringHash, ld::CStringEquals> NameSet; |
6103 |
- enum ExportMode { kExportDefault, kExportSome, kDontExportSome }; |
6104 |
- enum LibrarySearchMode { kSearchDylibAndArchiveInEachDir, kSearchAllDirsForDylibsThenAllDirsForArchives }; |
6105 |
- enum InterposeMode { kInterposeNone, kInterposeAllExternal, kInterposeSome }; |
6106 |
-@@ -389,8 +398,8 @@ |
6107 |
- bool containsNonWildcard(const char*) const; |
6108 |
- bool empty() const { return fRegular.empty() && fWildCard.empty(); } |
6109 |
- bool hasWildCards() const { return !fWildCard.empty(); } |
6110 |
-- NameSet::iterator regularBegin() const { return fRegular.begin(); } |
6111 |
-- NameSet::iterator regularEnd() const { return fRegular.end(); } |
6112 |
-+ NameSet::const_iterator regularBegin() const { return fRegular.begin(); } |
6113 |
-+ NameSet::const_iterator regularEnd() const { return fRegular.end(); } |
6114 |
- void remove(const NameSet&); |
6115 |
- private: |
6116 |
- static bool hasWildCards(const char*); |
6117 |
-diff -ur ld64-236.3.orig/src/ld/OutputFile.cpp ld64-236.3/src/ld/OutputFile.cpp |
6118 |
---- ld64-236.3.orig/src/ld/OutputFile.cpp 2015-01-11 17:35:08.000000000 +0100 |
6119 |
-+++ ld64-236.3/src/ld/OutputFile.cpp 2015-01-12 00:24:43.000000000 +0100 |
6120 |
-@@ -50,7 +50,13 @@ |
6121 |
- #include <vector> |
6122 |
- #include <list> |
6123 |
- #include <algorithm> |
6124 |
-+#ifdef __GLIBCXX__ |
6125 |
-+#include <tr1/unordered_set> |
6126 |
-+#define UNORDERED_SET tr1::unordered_set |
6127 |
-+#else |
6128 |
- #include <unordered_set> |
6129 |
-+#define UNORDERED_SET unordered_set |
6130 |
-+#endif |
6131 |
- |
6132 |
- #include <CommonCrypto/CommonDigest.h> |
6133 |
- #include <AvailabilityMacros.h> |
6134 |
-@@ -4699,7 +4705,7 @@ |
6135 |
- const char* filename = NULL; |
6136 |
- bool wroteStartSO = false; |
6137 |
- state.stabs.reserve(atomsNeedingDebugNotes.size()*4); |
6138 |
-- std::unordered_set<const char*, CStringHash, CStringEquals> seenFiles; |
6139 |
-+ std::UNORDERED_SET<const char*, CStringHash, CStringEquals> seenFiles; |
6140 |
- for (std::vector<const ld::Atom*>::iterator it=atomsNeedingDebugNotes.begin(); it != atomsNeedingDebugNotes.end(); it++) { |
6141 |
- const ld::Atom* atom = *it; |
6142 |
- const ld::File* atomFile = atom->file(); |
6143 |
-diff -ur ld64-236.3.orig/src/ld/Resolver.h ld64-236.3/src/ld/Resolver.h |
6144 |
---- ld64-236.3.orig/src/ld/Resolver.h 2014-04-05 00:42:29.000000000 +0200 |
6145 |
-+++ ld64-236.3/src/ld/Resolver.h 2015-01-11 22:49:14.000000000 +0100 |
6146 |
-@@ -42,7 +42,13 @@ |
6147 |
- #include <mach-o/dyld.h> |
6148 |
- |
6149 |
- #include <vector> |
6150 |
-+#ifdef __GLIBCXX__ |
6151 |
-+#include <tr1/unordered_set> |
6152 |
-+#define UNORDERED_SET tr1::unordered_set |
6153 |
-+#else |
6154 |
- #include <unordered_set> |
6155 |
-+#define UNORDERED_SET unordered_set |
6156 |
-+#endif |
6157 |
- |
6158 |
- #include "Options.h" |
6159 |
- #include "ld.hpp" |
6160 |
-@@ -103,7 +109,7 @@ |
6161 |
- void doLinkerOption(const std::vector<const char*>& linkerOption, const char* fileName); |
6162 |
- void dumpAtoms(); |
6163 |
- |
6164 |
-- typedef std::unordered_set<const char*, CStringHash, CStringEquals> StringSet; |
6165 |
-+ typedef std::UNORDERED_SET<const char*, CStringHash, CStringEquals> StringSet; |
6166 |
- |
6167 |
- class NotLive { |
6168 |
- public: |
6169 |
-diff -ur ld64-236.3.orig/src/ld/SymbolTable.h ld64-236.3/src/ld/SymbolTable.h |
6170 |
---- ld64-236.3.orig/src/ld/SymbolTable.h 2014-04-05 00:42:29.000000000 +0200 |
6171 |
-+++ ld64-236.3/src/ld/SymbolTable.h 2015-01-11 22:46:19.000000000 +0100 |
6172 |
-@@ -42,7 +42,13 @@ |
6173 |
- #include <mach-o/dyld.h> |
6174 |
- |
6175 |
- #include <vector> |
6176 |
-+#ifdef __GLIBCXX__ |
6177 |
-+#include <tr1/unordered_map> |
6178 |
-+#define UNORDERED_MAP tr1::unordered_map |
6179 |
-+#else |
6180 |
- #include <unordered_map> |
6181 |
-+#define UNORDERED_MAP unordered_map |
6182 |
-+#endif |
6183 |
- |
6184 |
- #include "Options.h" |
6185 |
- #include "ld.hpp" |
6186 |
-@@ -57,38 +63,38 @@ |
6187 |
- typedef uint32_t IndirectBindingSlot; |
6188 |
- |
6189 |
- private: |
6190 |
-- typedef std::unordered_map<const char*, IndirectBindingSlot, CStringHash, CStringEquals> NameToSlot; |
6191 |
-+ typedef std::UNORDERED_MAP<const char*, IndirectBindingSlot, CStringHash, CStringEquals> NameToSlot; |
6192 |
- |
6193 |
- class ContentFuncs { |
6194 |
- public: |
6195 |
- size_t operator()(const ld::Atom*) const; |
6196 |
- bool operator()(const ld::Atom* left, const ld::Atom* right) const; |
6197 |
- }; |
6198 |
-- typedef std::unordered_map<const ld::Atom*, IndirectBindingSlot, ContentFuncs, ContentFuncs> ContentToSlot; |
6199 |
-+ typedef std::UNORDERED_MAP<const ld::Atom*, IndirectBindingSlot, ContentFuncs, ContentFuncs> ContentToSlot; |
6200 |
- |
6201 |
- class ReferencesHashFuncs { |
6202 |
- public: |
6203 |
- size_t operator()(const ld::Atom*) const; |
6204 |
- bool operator()(const ld::Atom* left, const ld::Atom* right) const; |
6205 |
- }; |
6206 |
-- typedef std::unordered_map<const ld::Atom*, IndirectBindingSlot, ReferencesHashFuncs, ReferencesHashFuncs> ReferencesToSlot; |
6207 |
-+ typedef std::UNORDERED_MAP<const ld::Atom*, IndirectBindingSlot, ReferencesHashFuncs, ReferencesHashFuncs> ReferencesToSlot; |
6208 |
- |
6209 |
- class CStringHashFuncs { |
6210 |
- public: |
6211 |
- size_t operator()(const ld::Atom*) const; |
6212 |
- bool operator()(const ld::Atom* left, const ld::Atom* right) const; |
6213 |
- }; |
6214 |
-- typedef std::unordered_map<const ld::Atom*, IndirectBindingSlot, CStringHashFuncs, CStringHashFuncs> CStringToSlot; |
6215 |
-+ typedef std::UNORDERED_MAP<const ld::Atom*, IndirectBindingSlot, CStringHashFuncs, CStringHashFuncs> CStringToSlot; |
6216 |
- |
6217 |
- class UTF16StringHashFuncs { |
6218 |
- public: |
6219 |
- size_t operator()(const ld::Atom*) const; |
6220 |
- bool operator()(const ld::Atom* left, const ld::Atom* right) const; |
6221 |
- }; |
6222 |
-- typedef std::unordered_map<const ld::Atom*, IndirectBindingSlot, UTF16StringHashFuncs, UTF16StringHashFuncs> UTF16StringToSlot; |
6223 |
-+ typedef std::UNORDERED_MAP<const ld::Atom*, IndirectBindingSlot, UTF16StringHashFuncs, UTF16StringHashFuncs> UTF16StringToSlot; |
6224 |
- |
6225 |
- typedef std::map<IndirectBindingSlot, const char*> SlotToName; |
6226 |
-- typedef std::unordered_map<const char*, CStringToSlot*, CStringHash, CStringEquals> NameToMap; |
6227 |
-+ typedef std::UNORDERED_MAP<const char*, CStringToSlot*, CStringHash, CStringEquals> NameToMap; |
6228 |
- |
6229 |
- typedef std::vector<const ld::Atom *> DuplicatedSymbolAtomList; |
6230 |
- typedef std::map<const char *, DuplicatedSymbolAtomList * > DuplicateSymbols; |
6231 |
-diff -ur ld64-236.3.orig/src/ld/ld.cpp ld64-236.3/src/ld/ld.cpp |
6232 |
---- ld64-236.3.orig/src/ld/ld.cpp 2015-01-11 17:35:08.000000000 +0100 |
6233 |
-+++ ld64-236.3/src/ld/ld.cpp 2015-01-11 22:42:58.000000000 +0100 |
6234 |
-@@ -54,7 +54,13 @@ |
6235 |
- #include <vector> |
6236 |
- #include <list> |
6237 |
- #include <algorithm> |
6238 |
-+#ifdef __GLIBCXX__ |
6239 |
-+#include <tr1/unordered_map> |
6240 |
-+#define UNORDERED_MAP tr1::unordered_map |
6241 |
-+#else |
6242 |
- #include <unordered_map> |
6243 |
-+#define UNORDERED_MAP unordered_map |
6244 |
-+#endif |
6245 |
- #include <cxxabi.h> |
6246 |
- |
6247 |
- #include "Options.h" |
6248 |
-@@ -150,7 +156,7 @@ |
6249 |
- struct SectionEquals { |
6250 |
- bool operator()(const ld::Section* left, const ld::Section* right) const; |
6251 |
- }; |
6252 |
-- typedef std::unordered_map<const ld::Section*, FinalSection*, SectionHash, SectionEquals> SectionInToOut; |
6253 |
-+ typedef std::UNORDERED_MAP<const ld::Section*, FinalSection*, SectionHash, SectionEquals> SectionInToOut; |
6254 |
- |
6255 |
- |
6256 |
- SectionInToOut _sectionInToFinalMap; |
6257 |
-diff -ur ld64-236.3.orig/src/ld/ld.hpp ld64-236.3/src/ld/ld.hpp |
6258 |
---- ld64-236.3.orig/src/ld/ld.hpp 2014-04-05 00:42:29.000000000 +0200 |
6259 |
-+++ ld64-236.3/src/ld/ld.hpp 2015-01-11 22:42:46.000000000 +0100 |
6260 |
-@@ -32,7 +32,13 @@ |
6261 |
- #include <assert.h> |
6262 |
- |
6263 |
- #include <vector> |
6264 |
-+#ifdef __GLIBCXX__ |
6265 |
-+#include <tr1/unordered_set> |
6266 |
-+#define UNORDERED_SET tr1::unordered_set |
6267 |
-+#else |
6268 |
- #include <unordered_set> |
6269 |
-+#define UNORDERED_SET unordered_set |
6270 |
-+#endif |
6271 |
- |
6272 |
- #include "configure.h" |
6273 |
- |
6274 |
-@@ -821,7 +827,7 @@ |
6275 |
- bool operator()(const char* left, const char* right) const { return (strcmp(left, right) == 0); } |
6276 |
- }; |
6277 |
- |
6278 |
--typedef std::unordered_set<const char*, ld::CStringHash, ld::CStringEquals> CStringSet; |
6279 |
-+typedef std::UNORDERED_SET<const char*, ld::CStringHash, ld::CStringEquals> CStringSet; |
6280 |
- |
6281 |
- class Internal |
6282 |
- { |
6283 |
-diff -ur ld64-236.3.orig/src/ld/parsers/archive_file.cpp ld64-236.3/src/ld/parsers/archive_file.cpp |
6284 |
---- ld64-236.3.orig/src/ld/parsers/archive_file.cpp 2015-01-11 17:35:08.000000000 +0100 |
6285 |
-+++ ld64-236.3/src/ld/parsers/archive_file.cpp 2015-01-11 22:41:37.000000000 +0100 |
6286 |
-@@ -33,7 +33,13 @@ |
6287 |
- #include <set> |
6288 |
- #include <map> |
6289 |
- #include <algorithm> |
6290 |
-+#ifdef __GLIBCXX__ |
6291 |
-+#include <tr1/unordered_map> |
6292 |
-+#define UNORDERED_MAP tr1::unordered_map |
6293 |
-+#else |
6294 |
- #include <unordered_map> |
6295 |
-+#define UNORDERED_MAP unordered_map |
6296 |
-+#endif |
6297 |
- |
6298 |
- #include "MachOFileAbstraction.hpp" |
6299 |
- #include "Architectures.hpp" |
6300 |
-@@ -116,7 +122,7 @@ |
6301 |
- struct MemberState { ld::relocatable::File* file; const Entry *entry; bool logged; bool loaded; uint32_t index;}; |
6302 |
- bool loadMember(MemberState& state, ld::File::AtomHandler& handler, const char *format, ...) const; |
6303 |
- |
6304 |
-- typedef std::unordered_map<const char*, const struct ranlib*, ld::CStringHash, ld::CStringEquals> NameToEntryMap; |
6305 |
-+ typedef std::UNORDERED_MAP<const char*, const struct ranlib*, ld::CStringHash, ld::CStringEquals> NameToEntryMap; |
6306 |
- |
6307 |
- typedef typename A::P P; |
6308 |
- typedef typename A::P::E E; |
6309 |
-diff -ur ld64-236.3.orig/src/ld/parsers/lto_file.cpp ld64-236.3/src/ld/parsers/lto_file.cpp |
6310 |
---- ld64-236.3.orig/src/ld/parsers/lto_file.cpp 2014-04-05 00:42:29.000000000 +0200 |
6311 |
-+++ ld64-236.3/src/ld/parsers/lto_file.cpp 2015-01-11 22:44:48.000000000 +0100 |
6312 |
-@@ -33,8 +33,17 @@ |
6313 |
- #include <pthread.h> |
6314 |
- #include <mach-o/dyld.h> |
6315 |
- #include <vector> |
6316 |
-+#ifdef __GLIBCXX__ |
6317 |
-+#include <tr1/unordered_set> |
6318 |
-+#include <tr1/unordered_map> |
6319 |
-+#define UNORDERED_MAP tr1::unordered_map |
6320 |
-+#define UNORDERED_SET tr1::unordered_set |
6321 |
-+#else |
6322 |
- #include <unordered_set> |
6323 |
- #include <unordered_map> |
6324 |
-+#define UNORDERED_MAP unordered_map |
6325 |
-+#define UNORDERED_SET unordered_set |
6326 |
-+#endif |
6327 |
- |
6328 |
- #include "MachOFileAbstraction.hpp" |
6329 |
- #include "Architectures.hpp" |
6330 |
-@@ -217,8 +226,8 @@ |
6331 |
- static void ltoDiagnosticHandler(lto_codegen_diagnostic_severity_t, const char*, void*); |
6332 |
- #endif |
6333 |
- |
6334 |
-- typedef std::unordered_set<const char*, ld::CStringHash, ld::CStringEquals> CStringSet; |
6335 |
-- typedef std::unordered_map<const char*, Atom*, ld::CStringHash, ld::CStringEquals> CStringToAtom; |
6336 |
-+ typedef std::UNORDERED_SET<const char*, ld::CStringHash, ld::CStringEquals> CStringSet; |
6337 |
-+ typedef std::UNORDERED_MAP<const char*, Atom*, ld::CStringHash, ld::CStringEquals> CStringToAtom; |
6338 |
- |
6339 |
- class AtomSyncer : public ld::File::AtomHandler { |
6340 |
- public: |
6341 |
-diff -ur ld64-236.3.orig/src/ld/parsers/macho_dylib_file.cpp ld64-236.3/src/ld/parsers/macho_dylib_file.cpp |
6342 |
---- ld64-236.3.orig/src/ld/parsers/macho_dylib_file.cpp 2015-01-11 17:35:08.000000000 +0100 |
6343 |
-+++ ld64-236.3/src/ld/parsers/macho_dylib_file.cpp 2015-01-11 22:45:17.000000000 +0100 |
6344 |
-@@ -34,8 +34,17 @@ |
6345 |
- #include <vector> |
6346 |
- #include <set> |
6347 |
- #include <algorithm> |
6348 |
--#include <unordered_map> |
6349 |
-+#ifdef __GLIBCXX__ |
6350 |
-+#include <tr1/unordered_set> |
6351 |
-+#include <tr1/unordered_map> |
6352 |
-+#define UNORDERED_MAP tr1::unordered_map |
6353 |
-+#define UNORDERED_SET tr1::unordered_set |
6354 |
-+#else |
6355 |
- #include <unordered_set> |
6356 |
-+#include <unordered_map> |
6357 |
-+#define UNORDERED_MAP unordered_map |
6358 |
-+#define UNORDERED_SET unordered_set |
6359 |
-+#endif |
6360 |
- |
6361 |
- #include "Architectures.hpp" |
6362 |
- #include "MachOFileAbstraction.hpp" |
6363 |
-@@ -189,8 +198,8 @@ |
6364 |
- }; |
6365 |
- }; |
6366 |
- struct AtomAndWeak { ld::Atom* atom; bool weakDef; bool tlv; pint_t address; }; |
6367 |
-- typedef std::unordered_map<const char*, AtomAndWeak, ld::CStringHash, ld::CStringEquals> NameToAtomMap; |
6368 |
-- typedef std::unordered_set<const char*, CStringHash, ld::CStringEquals> NameSet; |
6369 |
-+ typedef std::UNORDERED_MAP<const char*, AtomAndWeak, ld::CStringHash, ld::CStringEquals> NameToAtomMap; |
6370 |
-+ typedef std::UNORDERED_SET<const char*, CStringHash, ld::CStringEquals> NameSet; |
6371 |
- |
6372 |
- struct Dependent { const char* path; File<A>* dylib; bool reExport; }; |
6373 |
- |
6374 |
-@@ -548,14 +557,18 @@ |
6375 |
- if ( _s_logHashtable ) fprintf(stderr, "ld: building hashtable of %u toc entries for %s\n", dynamicInfo->nextdefsym(), this->path()); |
6376 |
- const macho_nlist<P>* start = &symbolTable[dynamicInfo->iextdefsym()]; |
6377 |
- const macho_nlist<P>* end = &start[dynamicInfo->nextdefsym()]; |
6378 |
-+#ifndef __GLIBCXX__ |
6379 |
- _atoms.reserve(dynamicInfo->nextdefsym()); // set initial bucket count |
6380 |
-+#endif |
6381 |
- for (const macho_nlist<P>* sym=start; sym < end; ++sym) { |
6382 |
- this->addSymbol(&strings[sym->n_strx()], (sym->n_desc() & N_WEAK_DEF) != 0, false, sym->n_value()); |
6383 |
- } |
6384 |
- } |
6385 |
- else { |
6386 |
- int32_t count = dynamicInfo->ntoc(); |
6387 |
-+#ifndef __GLIBCXX__ |
6388 |
- _atoms.reserve(count); // set initial bucket count |
6389 |
-+#endif |
6390 |
- if ( _s_logHashtable ) fprintf(stderr, "ld: building hashtable of %u entries for %s\n", count, this->path()); |
6391 |
- const struct dylib_table_of_contents* toc = (dylib_table_of_contents*)(fileContent + dynamicInfo->tocoff()); |
6392 |
- for (int32_t i = 0; i < count; ++i) { |
6393 |
-diff -ur ld64-236.3.orig/src/ld/parsers/macho_relocatable_file.cpp ld64-236.3/src/ld/parsers/macho_relocatable_file.cpp |
6394 |
---- ld64-236.3.orig/src/ld/parsers/macho_relocatable_file.cpp 2014-04-05 00:42:29.000000000 +0200 |
6395 |
-+++ ld64-236.3/src/ld/parsers/macho_relocatable_file.cpp 2015-01-11 23:08:13.000000000 +0100 |
6396 |
-@@ -62,7 +62,7 @@ |
6397 |
- // forward reference |
6398 |
- template <typename A> class Parser; |
6399 |
- template <typename A> class Atom; |
6400 |
--template <typename A> class Section; |
6401 |
-+template <typename A> class MRFSection; |
6402 |
- template <typename A> class CFISection; |
6403 |
- template <typename A> class CUSection; |
6404 |
- |
6405 |
-@@ -100,14 +100,14 @@ |
6406 |
- const uint8_t* fileContent() { return _fileContent; } |
6407 |
- private: |
6408 |
- friend class Atom<A>; |
6409 |
-- friend class Section<A>; |
6410 |
-+ friend class MRFSection<A>; |
6411 |
- friend class Parser<A>; |
6412 |
- friend class CFISection<A>::OAS; |
6413 |
- |
6414 |
- typedef typename A::P P; |
6415 |
- |
6416 |
- const uint8_t* _fileContent; |
6417 |
-- Section<A>** _sectionsArray; |
6418 |
-+ MRFSection<A>** _sectionsArray; |
6419 |
- uint8_t* _atomsArray; |
6420 |
- uint32_t _sectionsArrayCount; |
6421 |
- uint32_t _atomsArrayCount; |
6422 |
-@@ -129,14 +129,14 @@ |
6423 |
- |
6424 |
- |
6425 |
- template <typename A> |
6426 |
--class Section : public ld::Section |
6427 |
-+class MRFSection : public ld::Section |
6428 |
- { |
6429 |
- public: |
6430 |
- typedef typename A::P::uint_t pint_t; |
6431 |
- typedef typename A::P P; |
6432 |
- typedef typename A::P::E E; |
6433 |
- |
6434 |
-- virtual ~Section() { } |
6435 |
-+ virtual ~MRFSection() { } |
6436 |
- class File<A>& file() const { return _file; } |
6437 |
- const macho_section<P>* machoSection() const { return _machOSection; } |
6438 |
- uint32_t sectionNum(class Parser<A>&) const; |
6439 |
-@@ -160,10 +160,10 @@ |
6440 |
- static const char* makeSectionName(const macho_section<typename A::P>* s); |
6441 |
- |
6442 |
- protected: |
6443 |
-- Section(File<A>& f, const macho_section<typename A::P>* s) |
6444 |
-+ MRFSection(File<A>& f, const macho_section<typename A::P>* s) |
6445 |
- : ld::Section(makeSegmentName(s), makeSectionName(s), sectionType(s)), |
6446 |
- _file(f), _machOSection(s), _beginAtoms(NULL), _endAtoms(NULL), _hasAliases(false) { } |
6447 |
-- Section(File<A>& f, const char* segName, const char* sectName, ld::Section::Type t, bool hidden=false) |
6448 |
-+ MRFSection(File<A>& f, const char* segName, const char* sectName, ld::Section::Type t, bool hidden=false) |
6449 |
- : ld::Section(segName, sectName, t, hidden), _file(f), _machOSection(NULL), |
6450 |
- _beginAtoms(NULL), _endAtoms(NULL), _hasAliases(false) { } |
6451 |
- |
6452 |
-@@ -186,11 +186,11 @@ |
6453 |
- |
6454 |
- |
6455 |
- template <typename A> |
6456 |
--class CFISection : public Section<A> |
6457 |
-+class CFISection : public MRFSection<A> |
6458 |
- { |
6459 |
- public: |
6460 |
- CFISection(Parser<A>& parser, File<A>& f, const macho_section<typename A::P>* s) |
6461 |
-- : Section<A>(f, s) { } |
6462 |
-+ : MRFSection<A>(f, s) { } |
6463 |
- uint32_t cfiCount(); |
6464 |
- |
6465 |
- virtual ld::Atom::ContentType contentType() { return ld::Atom::typeCFI; } |
6466 |
-@@ -250,11 +250,11 @@ |
6467 |
- |
6468 |
- |
6469 |
- template <typename A> |
6470 |
--class CUSection : public Section<A> |
6471 |
-+class CUSection : public MRFSection<A> |
6472 |
- { |
6473 |
- public: |
6474 |
- CUSection(Parser<A>& parser, File<A>& f, const macho_section<typename A::P>* s) |
6475 |
-- : Section<A>(f, s) { } |
6476 |
-+ : MRFSection<A>(f, s) { } |
6477 |
- |
6478 |
- typedef typename A::P::uint_t pint_t; |
6479 |
- typedef typename A::P P; |
6480 |
-@@ -291,11 +291,11 @@ |
6481 |
- |
6482 |
- |
6483 |
- template <typename A> |
6484 |
--class TentativeDefinitionSection : public Section<A> |
6485 |
-+class TentativeDefinitionSection : public MRFSection<A> |
6486 |
- { |
6487 |
- public: |
6488 |
- TentativeDefinitionSection(Parser<A>& parser, File<A>& f) |
6489 |
-- : Section<A>(f, "__DATA", "__comm/tent", ld::Section::typeTentativeDefs) {} |
6490 |
-+ : MRFSection<A>(f, "__DATA", "__comm/tent", ld::Section::typeTentativeDefs) {} |
6491 |
- |
6492 |
- virtual ld::Atom::ContentType contentType() { return ld::Atom::typeZeroFill; } |
6493 |
- virtual bool addFollowOnFixups() const { return false; } |
6494 |
-@@ -313,11 +313,11 @@ |
6495 |
- |
6496 |
- |
6497 |
- template <typename A> |
6498 |
--class AbsoluteSymbolSection : public Section<A> |
6499 |
-+class AbsoluteSymbolSection : public MRFSection<A> |
6500 |
- { |
6501 |
- public: |
6502 |
- AbsoluteSymbolSection(Parser<A>& parser, File<A>& f) |
6503 |
-- : Section<A>(f, "__DATA", "__abs", ld::Section::typeAbsoluteSymbols, true) {} |
6504 |
-+ : MRFSection<A>(f, "__DATA", "__abs", ld::Section::typeAbsoluteSymbols, true) {} |
6505 |
- |
6506 |
- virtual ld::Atom::ContentType contentType() { return ld::Atom::typeUnclassified; } |
6507 |
- virtual bool dontDeadStrip() { return false; } |
6508 |
-@@ -339,7 +339,7 @@ |
6509 |
- |
6510 |
- |
6511 |
- template <typename A> |
6512 |
--class SymboledSection : public Section<A> |
6513 |
-+class SymboledSection : public MRFSection<A> |
6514 |
- { |
6515 |
- public: |
6516 |
- SymboledSection(Parser<A>& parser, File<A>& f, const macho_section<typename A::P>* s); |
6517 |
-@@ -371,11 +371,11 @@ |
6518 |
- |
6519 |
- |
6520 |
- template <typename A> |
6521 |
--class ImplicitSizeSection : public Section<A> |
6522 |
-+class ImplicitSizeSection : public MRFSection<A> |
6523 |
- { |
6524 |
- public: |
6525 |
- ImplicitSizeSection(Parser<A>& parser, File<A>& f, const macho_section<typename A::P>* s) |
6526 |
-- : Section<A>(f, s) { } |
6527 |
-+ : MRFSection<A>(f, s) { } |
6528 |
- virtual uint32_t computeAtomCount(class Parser<A>& parser, struct Parser<A>::LabelAndCFIBreakIterator& it, const struct Parser<A>::CFI_CU_InfoArrays&); |
6529 |
- virtual uint32_t appendAtoms(class Parser<A>& parser, uint8_t* buffer, struct Parser<A>::LabelAndCFIBreakIterator& it, const struct Parser<A>::CFI_CU_InfoArrays&); |
6530 |
- protected: |
6531 |
-@@ -709,8 +709,8 @@ |
6532 |
- |
6533 |
- public: |
6534 |
- // methods for all atoms from mach-o object file |
6535 |
-- Section<A>& sect() const { return (Section<A>&)section(); } |
6536 |
-- File<A>& machofile() const { return ((Section<A>*)(this->_section))->file(); } |
6537 |
-+ MRFSection<A>& sect() const { return (MRFSection<A>&)section(); } |
6538 |
-+ File<A>& machofile() const { return ((MRFSection<A>*)(this->_section))->file(); } |
6539 |
- void setFixupsRange(uint32_t s, uint32_t c); |
6540 |
- void setUnwindInfoRange(uint32_t s, uint32_t c); |
6541 |
- void extendUnwindInfoRange(); |
6542 |
-@@ -727,7 +727,7 @@ |
6543 |
- typedef typename A::P::E E; |
6544 |
- typedef typename A::P::uint_t pint_t; |
6545 |
- // constuct via all attributes |
6546 |
-- Atom(Section<A>& sct, const char* nm, pint_t addr, uint64_t sz, |
6547 |
-+ Atom(MRFSection<A>& sct, const char* nm, pint_t addr, uint64_t sz, |
6548 |
- ld::Atom::Definition d, ld::Atom::Combine c, ld::Atom::Scope s, |
6549 |
- ld::Atom::ContentType ct, ld::Atom::SymbolTableInclusion i, |
6550 |
- bool dds, bool thumb, bool al, ld::Atom::Alignment a) |
6551 |
-@@ -737,7 +737,7 @@ |
6552 |
- _unwindInfoStartIndex(0), _fixupsCount(0), |
6553 |
- _lineInfoCount(0), _unwindInfoCount(0) { } |
6554 |
- // construct via symbol table entry |
6555 |
-- Atom(Section<A>& sct, Parser<A>& parser, const macho_nlist<P>& sym, |
6556 |
-+ Atom(MRFSection<A>& sct, Parser<A>& parser, const macho_nlist<P>& sym, |
6557 |
- uint64_t sz, bool alias=false) |
6558 |
- : ld::Atom((ld::Section&)sct, parser.definitionFromSymbol(sym), |
6559 |
- parser.combineFromSymbol(sym), parser.scopeFromSymbol(sym), |
6560 |
-@@ -760,7 +760,7 @@ |
6561 |
- |
6562 |
- private: |
6563 |
- friend class Parser<A>; |
6564 |
-- friend class Section<A>; |
6565 |
-+ friend class MRFSection<A>; |
6566 |
- friend class CStringSection<A>; |
6567 |
- friend class AbsoluteSymbolSection<A>; |
6568 |
- |
6569 |
-@@ -991,8 +991,8 @@ |
6570 |
- uint32_t undefinedStartIndex() { return _undefinedStartIndex; } |
6571 |
- uint32_t undefinedEndIndex() { return _undefinedEndIndex; } |
6572 |
- void addFixup(FixupInAtom f) { _allFixups.push_back(f); } |
6573 |
-- Section<A>* sectionForNum(unsigned int sectNum); |
6574 |
-- Section<A>* sectionForAddress(pint_t addr); |
6575 |
-+ MRFSection<A>* sectionForNum(unsigned int sectNum); |
6576 |
-+ MRFSection<A>* sectionForAddress(pint_t addr); |
6577 |
- Atom<A>* findAtomByAddress(pint_t addr); |
6578 |
- Atom<A>* findAtomByAddressOrNullIfStub(pint_t addr); |
6579 |
- Atom<A>* findAtomByAddressOrLocalTargetOfStub(pint_t addr, uint32_t* offsetInAtom); |
6580 |
-@@ -1034,7 +1034,7 @@ |
6581 |
- : sortedSymbolIndexes(ssa), sortedSymbolCount(ssc), cfiStartsArray(cfisa), |
6582 |
- cfiStartsCount(cfisc), fileHasOverlappingSymbols(ols), |
6583 |
- newSection(false), cfiIndex(0), symIndex(0) {} |
6584 |
-- bool next(Parser<A>& parser, const Section<A>& sect, uint32_t sectNum, pint_t startAddr, pint_t endAddr, |
6585 |
-+ bool next(Parser<A>& parser, const MRFSection<A>& sect, uint32_t sectNum, pint_t startAddr, pint_t endAddr, |
6586 |
- pint_t* addr, pint_t* size, const macho_nlist<P>** sym); |
6587 |
- pint_t peek(Parser<A>& parser, pint_t startAddr, pint_t endAddr); |
6588 |
- void beginSection() { newSection = true; symIndex = 0; } |
6589 |
-@@ -1063,7 +1063,7 @@ |
6590 |
- |
6591 |
- |
6592 |
- private: |
6593 |
-- friend class Section<A>; |
6594 |
-+ friend class MRFSection<A>; |
6595 |
- |
6596 |
- enum SectionType { sectionTypeIgnore, sectionTypeLiteral4, sectionTypeLiteral8, sectionTypeLiteral16, |
6597 |
- sectionTypeNonLazy, sectionTypeCFI, sectionTypeCString, sectionTypeCStringPointer, |
6598 |
-@@ -1404,7 +1404,7 @@ |
6599 |
- // was becuase of a label, the symbol). Returns false when no more chunks. |
6600 |
- // |
6601 |
- template <typename A> |
6602 |
--bool Parser<A>::LabelAndCFIBreakIterator::next(Parser<A>& parser, const Section<A>& sect, uint32_t sectNum, pint_t startAddr, pint_t endAddr, |
6603 |
-+bool Parser<A>::LabelAndCFIBreakIterator::next(Parser<A>& parser, const MRFSection<A>& sect, uint32_t sectNum, pint_t startAddr, pint_t endAddr, |
6604 |
- pint_t* addr, pint_t* size, const macho_nlist<P>** symbol) |
6605 |
- { |
6606 |
- // may not be a label on start of section, but need atom demarcation there |
6607 |
-@@ -1590,7 +1590,7 @@ |
6608 |
- uint32_t sortedSymbolIndexes[_symbolsInSections]; |
6609 |
- this->makeSortedSymbolsArray(sortedSymbolIndexes, sortedSectionIndexes); |
6610 |
- |
6611 |
-- // allocate Section<A> object for each mach-o section |
6612 |
-+ // allocate MRFSection<A> object for each mach-o section |
6613 |
- makeSections(); |
6614 |
- |
6615 |
- // if it exists, do special early parsing of __compact_unwind section |
6616 |
-@@ -1687,7 +1687,7 @@ |
6617 |
- #endif |
6618 |
- } |
6619 |
- |
6620 |
-- Section<A>** sections = _file->_sectionsArray; |
6621 |
-+ MRFSection<A>** sections = _file->_sectionsArray; |
6622 |
- uint32_t sectionsCount = _file->_sectionsArrayCount; |
6623 |
- |
6624 |
- // figure out how many atoms will be allocated and allocate |
6625 |
-@@ -2208,11 +2208,11 @@ |
6626 |
- _file->_objConstraint = ld::File::objcConstraintRetainRelease; |
6627 |
- if ( sect->size() > 8 ) { |
6628 |
- warning("section %s/%s has unexpectedly large size %llu in %s", |
6629 |
-- sect->segname(), Section<A>::makeSectionName(sect), sect->size(), _file->path()); |
6630 |
-+ sect->segname(), MRFSection<A>::makeSectionName(sect), sect->size(), _file->path()); |
6631 |
- } |
6632 |
- } |
6633 |
- else { |
6634 |
-- warning("can't parse %s/%s section in %s", sect->segname(), Section<A>::makeSectionName(sect), _file->path()); |
6635 |
-+ warning("can't parse %s/%s section in %s", sect->segname(), MRFSection<A>::makeSectionName(sect), _file->path()); |
6636 |
- } |
6637 |
- continue; |
6638 |
- } |
6639 |
-@@ -2308,24 +2308,24 @@ |
6640 |
- // sort by address (mach-o object files don't aways have sections sorted) |
6641 |
- ::qsort(machOSects, count, sizeof(MachOSectionAndSectionClass<P>), MachOSectionAndSectionClass<P>::sorter); |
6642 |
- |
6643 |
-- // we will synthesize a dummy Section<A> object for tentative definitions |
6644 |
-+ // we will synthesize a dummy MRFSection<A> object for tentative definitions |
6645 |
- if ( _tentativeDefinitionCount > 0 ) { |
6646 |
- totalSectionsSize += sizeof(TentativeDefinitionSection<A>); |
6647 |
- machOSects[count++].type = sectionTypeTentativeDefinitions; |
6648 |
- } |
6649 |
- |
6650 |
-- // we will synthesize a dummy Section<A> object for Absolute symbols |
6651 |
-+ // we will synthesize a dummy MRFSection<A> object for Absolute symbols |
6652 |
- if ( _absoluteSymbolCount > 0 ) { |
6653 |
- totalSectionsSize += sizeof(AbsoluteSymbolSection<A>); |
6654 |
- machOSects[count++].type = sectionTypeAbsoluteSymbols; |
6655 |
- } |
6656 |
- |
6657 |
- // allocate one block for all Section objects as well as pointers to each |
6658 |
-- uint8_t* space = new uint8_t[totalSectionsSize+count*sizeof(Section<A>*)]; |
6659 |
-- _file->_sectionsArray = (Section<A>**)space; |
6660 |
-+ uint8_t* space = new uint8_t[totalSectionsSize+count*sizeof(MRFSection<A>*)]; |
6661 |
-+ _file->_sectionsArray = (MRFSection<A>**)space; |
6662 |
- _file->_sectionsArrayCount = count; |
6663 |
-- Section<A>** objects = _file->_sectionsArray; |
6664 |
-- space += count*sizeof(Section<A>*); |
6665 |
-+ MRFSection<A>** objects = _file->_sectionsArray; |
6666 |
-+ space += count*sizeof(MRFSection<A>*); |
6667 |
- for (uint32_t i=0; i < count; ++i) { |
6668 |
- switch ( machOSects[i].type ) { |
6669 |
- case sectionTypeIgnore: |
6670 |
-@@ -2413,7 +2413,7 @@ |
6671 |
- |
6672 |
- |
6673 |
- template <typename A> |
6674 |
--Section<A>* Parser<A>::sectionForAddress(typename A::P::uint_t addr) |
6675 |
-+MRFSection<A>* Parser<A>::sectionForAddress(typename A::P::uint_t addr) |
6676 |
- { |
6677 |
- for (uint32_t i=0; i < _file->_sectionsArrayCount; ++i ) { |
6678 |
- const macho_section<typename A::P>* sect = _file->_sectionsArray[i]->machoSection(); |
6679 |
-@@ -2440,7 +2440,7 @@ |
6680 |
- } |
6681 |
- |
6682 |
- template <typename A> |
6683 |
--Section<A>* Parser<A>::sectionForNum(unsigned int num) |
6684 |
-+MRFSection<A>* Parser<A>::sectionForNum(unsigned int num) |
6685 |
- { |
6686 |
- for (uint32_t i=0; i < _file->_sectionsArrayCount; ++i ) { |
6687 |
- const macho_section<typename A::P>* sect = _file->_sectionsArray[i]->machoSection(); |
6688 |
-@@ -2456,7 +2456,7 @@ |
6689 |
- template <typename A> |
6690 |
- Atom<A>* Parser<A>::findAtomByAddress(pint_t addr) |
6691 |
- { |
6692 |
-- Section<A>* section = this->sectionForAddress(addr); |
6693 |
-+ MRFSection<A>* section = this->sectionForAddress(addr); |
6694 |
- return section->findAtomByAddress(addr); |
6695 |
- } |
6696 |
- |
6697 |
-@@ -2513,7 +2513,7 @@ |
6698 |
- target.addend = 0; |
6699 |
- return; |
6700 |
- } |
6701 |
-- Section<A>* section = this->sectionForAddress(addr); |
6702 |
-+ MRFSection<A>* section = this->sectionForAddress(addr); |
6703 |
- target.atom = section->findAtomByAddress(addr); |
6704 |
- target.addend = addr - target.atom->_objAddress; |
6705 |
- target.weakImport = false; |
6706 |
-@@ -2561,7 +2561,7 @@ |
6707 |
- } |
6708 |
- return; |
6709 |
- } |
6710 |
-- Section<A>* section = this->sectionForNum(sectNum); |
6711 |
-+ MRFSection<A>* section = this->sectionForNum(sectNum); |
6712 |
- target.atom = section->findAtomByAddress(addr); |
6713 |
- if ( target.atom == NULL ) { |
6714 |
- typedef typename A::P::sint_t sint_t; |
6715 |
-@@ -3723,7 +3723,7 @@ |
6716 |
- } |
6717 |
- |
6718 |
- template <typename A> |
6719 |
--const char* Section<A>::makeSegmentName(const macho_section<typename A::P>* sect) |
6720 |
-+const char* MRFSection<A>::makeSegmentName(const macho_section<typename A::P>* sect) |
6721 |
- { |
6722 |
- // mach-o section record only has room for 16-byte seg/sect names |
6723 |
- // so a 16-byte name has no trailing zero |
6724 |
-@@ -3736,7 +3736,7 @@ |
6725 |
- } |
6726 |
- |
6727 |
- template <typename A> |
6728 |
--const char* Section<A>::makeSectionName(const macho_section<typename A::P>* sect) |
6729 |
-+const char* MRFSection<A>::makeSectionName(const macho_section<typename A::P>* sect) |
6730 |
- { |
6731 |
- const char* name = sect->sectname(); |
6732 |
- if ( strlen(name) < 16 ) |
6733 |
-@@ -3770,13 +3770,13 @@ |
6734 |
- } |
6735 |
- |
6736 |
- template <typename A> |
6737 |
--bool Section<A>::readable(const macho_section<typename A::P>* sect) |
6738 |
-+bool MRFSection<A>::readable(const macho_section<typename A::P>* sect) |
6739 |
- { |
6740 |
- return true; |
6741 |
- } |
6742 |
- |
6743 |
- template <typename A> |
6744 |
--bool Section<A>::writable(const macho_section<typename A::P>* sect) |
6745 |
-+bool MRFSection<A>::writable(const macho_section<typename A::P>* sect) |
6746 |
- { |
6747 |
- // mach-o .o files do not contain segment permissions |
6748 |
- // we just know TEXT is special |
6749 |
-@@ -3784,7 +3784,7 @@ |
6750 |
- } |
6751 |
- |
6752 |
- template <typename A> |
6753 |
--bool Section<A>::exectuable(const macho_section<typename A::P>* sect) |
6754 |
-+bool MRFSection<A>::exectuable(const macho_section<typename A::P>* sect) |
6755 |
- { |
6756 |
- // mach-o .o files do not contain segment permissions |
6757 |
- // we just know TEXT is special |
6758 |
-@@ -3793,7 +3793,7 @@ |
6759 |
- |
6760 |
- |
6761 |
- template <typename A> |
6762 |
--ld::Section::Type Section<A>::sectionType(const macho_section<typename A::P>* sect) |
6763 |
-+ld::Section::Type MRFSection<A>::sectionType(const macho_section<typename A::P>* sect) |
6764 |
- { |
6765 |
- switch ( sect->flags() & SECTION_TYPE ) { |
6766 |
- case S_ZEROFILL: |
6767 |
-@@ -3871,7 +3871,7 @@ |
6768 |
- |
6769 |
- |
6770 |
- template <typename A> |
6771 |
--Atom<A>* Section<A>::findContentAtomByAddress(pint_t addr, class Atom<A>* start, class Atom<A>* end) |
6772 |
-+Atom<A>* MRFSection<A>::findContentAtomByAddress(pint_t addr, class Atom<A>* start, class Atom<A>* end) |
6773 |
- { |
6774 |
- // do a binary search of atom array |
6775 |
- uint32_t atomCount = end - start; |
6776 |
-@@ -3903,7 +3903,7 @@ |
6777 |
- } |
6778 |
- |
6779 |
- template <typename A> |
6780 |
--ld::Atom::Alignment Section<A>::alignmentForAddress(pint_t addr) |
6781 |
-+ld::Atom::Alignment MRFSection<A>::alignmentForAddress(pint_t addr) |
6782 |
- { |
6783 |
- const uint32_t sectionAlignment = this->_machOSection->align(); |
6784 |
- uint32_t modulus = (addr % (1 << sectionAlignment)); |
6785 |
-@@ -3913,7 +3913,7 @@ |
6786 |
- } |
6787 |
- |
6788 |
- template <typename A> |
6789 |
--uint32_t Section<A>::sectionNum(class Parser<A>& parser) const |
6790 |
-+uint32_t MRFSection<A>::sectionNum(class Parser<A>& parser) const |
6791 |
- { |
6792 |
- if ( _machOSection == NULL ) |
6793 |
- return 0; |
6794 |
-@@ -4481,7 +4481,7 @@ |
6795 |
- else { |
6796 |
- const pint_t* content = (pint_t*)(this->file().fileContent() + this->_machOSection->offset() + reloc->r_address()); |
6797 |
- pint_t personalityAddr = *content; |
6798 |
-- Section<x86_64>* personalitySection = parser.sectionForAddress(personalityAddr); |
6799 |
-+ MRFSection<x86_64>* personalitySection = parser.sectionForAddress(personalityAddr); |
6800 |
- assert((personalitySection->type() == ld::Section::typeCode) && "personality column in __compact_unwind section is not pointer to function"); |
6801 |
- // atoms may not be constructed yet, so scan symbol table for labels |
6802 |
- const char* name = parser.scanSymbolTableForAddress(personalityAddr); |
6803 |
-@@ -4501,7 +4501,7 @@ |
6804 |
- // support __LD, __compact_unwind personality entries which are pointer to personality non-lazy pointer |
6805 |
- const pint_t* content = (pint_t*)(this->file().fileContent() + this->_machOSection->offset() + reloc->r_address()); |
6806 |
- pint_t nlPointerAddr = *content; |
6807 |
-- Section<x86>* nlSection = parser.sectionForAddress(nlPointerAddr); |
6808 |
-+ MRFSection<x86>* nlSection = parser.sectionForAddress(nlPointerAddr); |
6809 |
- if ( nlSection->type() == ld::Section::typeCode ) { |
6810 |
- // personality function is defined in this .o file, so this is a direct reference to it |
6811 |
- // atoms may not be constructed yet, so scan symbol table for labels |
6812 |
-@@ -4528,7 +4528,7 @@ |
6813 |
- else { |
6814 |
- const pint_t* content = (pint_t*)(this->file().fileContent() + this->_machOSection->offset() + reloc->r_address()); |
6815 |
- pint_t personalityAddr = *content; |
6816 |
-- Section<arm64>* personalitySection = parser.sectionForAddress(personalityAddr); |
6817 |
-+ MRFSection<arm64>* personalitySection = parser.sectionForAddress(personalityAddr); |
6818 |
- assert((personalitySection->type() == ld::Section::typeCode) && "personality column in __compact_unwind section is not pointer to function"); |
6819 |
- // atoms may not be constructed yet, so scan symbol table for labels |
6820 |
- const char* name = parser.scanSymbolTableForAddress(personalityAddr); |
6821 |
-@@ -4681,7 +4681,7 @@ |
6822 |
- |
6823 |
- template <typename A> |
6824 |
- SymboledSection<A>::SymboledSection(Parser<A>& parser, File<A>& f, const macho_section<typename A::P>* s) |
6825 |
-- : Section<A>(f, s), _type(ld::Atom::typeUnclassified) |
6826 |
-+ : MRFSection<A>(f, s), _type(ld::Atom::typeUnclassified) |
6827 |
- { |
6828 |
- switch ( s->flags() & SECTION_TYPE ) { |
6829 |
- case S_ZEROFILL: |
6830 |
-@@ -4727,7 +4727,7 @@ |
6831 |
- if ( ! this->_file.canScatterAtoms() ) |
6832 |
- return true; |
6833 |
- // call inherited |
6834 |
-- return Section<A>::dontDeadStrip(); |
6835 |
-+ return MRFSection<A>::dontDeadStrip(); |
6836 |
- } |
6837 |
- return false; |
6838 |
- } |
6839 |
-@@ -5572,7 +5572,7 @@ |
6840 |
- |
6841 |
- |
6842 |
- template <> |
6843 |
--uint32_t Section<x86_64>::x86_64PcRelOffset(uint8_t r_type) |
6844 |
-+uint32_t MRFSection<x86_64>::x86_64PcRelOffset(uint8_t r_type) |
6845 |
- { |
6846 |
- switch ( r_type ) { |
6847 |
- case X86_64_RELOC_SIGNED: |
6848 |
-@@ -5589,7 +5589,7 @@ |
6849 |
- |
6850 |
- |
6851 |
- template <> |
6852 |
--bool Section<x86_64>::addRelocFixup(class Parser<x86_64>& parser, const macho_relocation_info<P>* reloc) |
6853 |
-+bool MRFSection<x86_64>::addRelocFixup(class Parser<x86_64>& parser, const macho_relocation_info<P>* reloc) |
6854 |
- { |
6855 |
- const macho_section<P>* sect = this->machoSection(); |
6856 |
- uint64_t srcAddr = sect->addr() + reloc->r_address(); |
6857 |
-@@ -5796,7 +5796,7 @@ |
6858 |
- |
6859 |
- |
6860 |
- template <> |
6861 |
--bool Section<x86>::addRelocFixup(class Parser<x86>& parser, const macho_relocation_info<P>* reloc) |
6862 |
-+bool MRFSection<x86>::addRelocFixup(class Parser<x86>& parser, const macho_relocation_info<P>* reloc) |
6863 |
- { |
6864 |
- const macho_section<P>* sect = this->machoSection(); |
6865 |
- uint32_t srcAddr; |
6866 |
-@@ -6037,7 +6037,7 @@ |
6867 |
- |
6868 |
- #if SUPPORT_ARCH_arm_any |
6869 |
- template <> |
6870 |
--bool Section<arm>::addRelocFixup(class Parser<arm>& parser, const macho_relocation_info<P>* reloc) |
6871 |
-+bool MRFSection<arm>::addRelocFixup(class Parser<arm>& parser, const macho_relocation_info<P>* reloc) |
6872 |
- { |
6873 |
- const macho_section<P>* sect = this->machoSection(); |
6874 |
- bool result = false; |
6875 |
-@@ -6495,7 +6495,7 @@ |
6876 |
- |
6877 |
- #if SUPPORT_ARCH_arm64 |
6878 |
- template <> |
6879 |
--bool Section<arm64>::addRelocFixup(class Parser<arm64>& parser, const macho_relocation_info<P>* reloc) |
6880 |
-+bool MRFSection<arm64>::addRelocFixup(class Parser<arm64>& parser, const macho_relocation_info<P>* reloc) |
6881 |
- { |
6882 |
- bool result = false; |
6883 |
- Parser<arm64>::SourceLocation src; |
6884 |
-@@ -6893,7 +6893,7 @@ |
6885 |
- |
6886 |
- #if SUPPORT_ARCH_arm64 |
6887 |
- template <> |
6888 |
--void Section<arm64>::addLOH(class Parser<arm64>& parser, int kind, int count, const uint64_t addrs[]) { |
6889 |
-+void MRFSection<arm64>::addLOH(class Parser<arm64>& parser, int kind, int count, const uint64_t addrs[]) { |
6890 |
- switch (kind) { |
6891 |
- case LOH_ARM64_ADRP_ADRP: |
6892 |
- case LOH_ARM64_ADRP_LDR: |
6893 |
-@@ -6948,18 +6948,18 @@ |
6894 |
- extra.info.delta2 = (count > 1) ? ((addrs[1] - lowestAddress) >> 2) : 0; |
6895 |
- extra.info.delta3 = (count > 2) ? ((addrs[2] - lowestAddress) >> 2) : 0; |
6896 |
- extra.info.delta4 = (count > 3) ? ((addrs[3] - lowestAddress) >> 2) : 0; |
6897 |
-- typename Parser<arm64>::SourceLocation src(inAtom, lowestAddress- inAtom->objectAddress()); |
6898 |
-+ Parser<arm64>::SourceLocation src(inAtom, lowestAddress- inAtom->objectAddress()); |
6899 |
- parser.addFixup(src, ld::Fixup::k1of1, ld::Fixup::kindLinkerOptimizationHint, extra.addend); |
6900 |
- } |
6901 |
- #endif |
6902 |
- |
6903 |
- template <typename A> |
6904 |
--void Section<A>::addLOH(class Parser<A>& parser, int kind, int count, const uint64_t addrs[]) { |
6905 |
-+void MRFSection<A>::addLOH(class Parser<A>& parser, int kind, int count, const uint64_t addrs[]) { |
6906 |
- |
6907 |
- } |
6908 |
- |
6909 |
- template <typename A> |
6910 |
--void Section<A>::makeFixups(class Parser<A>& parser, const struct Parser<A>::CFI_CU_InfoArrays&) |
6911 |
-+void MRFSection<A>::makeFixups(class Parser<A>& parser, const struct Parser<A>::CFI_CU_InfoArrays&) |
6912 |
- { |
6913 |
- const macho_section<P>* sect = this->machoSection(); |
6914 |
- const macho_relocation_info<P>* relocs = (macho_relocation_info<P>*)(file().fileContent() + sect->reloff()); |
6915 |
-@@ -6970,7 +6970,7 @@ |
6916 |
- ++r; // skip next |
6917 |
- } |
6918 |
- catch (const char* msg) { |
6919 |
-- throwf("in section %s,%s reloc %u: %s", sect->segname(), Section<A>::makeSectionName(sect), r, msg); |
6920 |
-+ throwf("in section %s,%s reloc %u: %s", sect->segname(), MRFSection<A>::makeSectionName(sect), r, msg); |
6921 |
- } |
6922 |
- } |
6923 |
- |
6924 |
-diff -ur ld64-236.3.orig/src/ld/passes/dtrace_dof.cpp ld64-236.3/src/ld/passes/dtrace_dof.cpp |
6925 |
---- ld64-236.3.orig/src/ld/passes/dtrace_dof.cpp 2014-04-05 00:42:29.000000000 +0200 |
6926 |
-+++ ld64-236.3/src/ld/passes/dtrace_dof.cpp 2015-01-12 00:27:58.000000000 +0100 |
6927 |
-@@ -30,8 +30,17 @@ |
6928 |
- |
6929 |
- #include <vector> |
6930 |
- #include <map> |
6931 |
-+#ifdef __GLIBCXX__ |
6932 |
-+#include <tr1/unordered_map> |
6933 |
-+#include <tr1/unordered_set> |
6934 |
-+#define UNORDERED_MAP tr1::unordered_map |
6935 |
-+#define UNORDERED_SET tr1::unordered_set |
6936 |
-+#else |
6937 |
- #include <unordered_map> |
6938 |
- #include <unordered_set> |
6939 |
-+#define UNORDERED_MAP unordered_map |
6940 |
-+#define UNORDERED_SET unordered_set |
6941 |
-+#endif |
6942 |
- |
6943 |
- #include "ld.hpp" |
6944 |
- #include "MachOFileAbstraction.hpp" |
6945 |
-@@ -111,8 +120,8 @@ |
6946 |
- uint32_t offset; |
6947 |
- const char* probeName; |
6948 |
- }; |
6949 |
--typedef std::unordered_map<const char*, std::vector<DTraceProbeInfo>, CStringHash, CStringEquals> ProviderToProbes; |
6950 |
--typedef std::unordered_set<const char*, CStringHash, CStringEquals> CStringSet; |
6951 |
-+typedef std::UNORDERED_MAP<const char*, std::vector<DTraceProbeInfo>, CStringHash, CStringEquals> ProviderToProbes; |
6952 |
-+typedef std::UNORDERED_SET<const char*, CStringHash, CStringEquals> CStringSet; |
6953 |
- |
6954 |
- |
6955 |
- |
6956 |
-diff -ur ld64-236.3.orig/src/ld/passes/order.cpp ld64-236.3/src/ld/passes/order.cpp |
6957 |
---- ld64-236.3.orig/src/ld/passes/order.cpp 2014-04-05 00:42:29.000000000 +0200 |
6958 |
-+++ ld64-236.3/src/ld/passes/order.cpp 2015-01-11 22:45:57.000000000 +0100 |
6959 |
-@@ -32,7 +32,13 @@ |
6960 |
- #include <vector> |
6961 |
- #include <map> |
6962 |
- #include <set> |
6963 |
-+#ifdef __GLIBCXX__ |
6964 |
-+#include <tr1/unordered_map> |
6965 |
-+#define UNORDERED_MAP tr1::unordered_map |
6966 |
-+#else |
6967 |
- #include <unordered_map> |
6968 |
-+#define UNORDERED_MAP unordered_map |
6969 |
-+#endif |
6970 |
- |
6971 |
- #include "ld.hpp" |
6972 |
- #include "order.h" |
6973 |
-@@ -84,7 +90,7 @@ |
6974 |
- const Layout& _layout; |
6975 |
- }; |
6976 |
- |
6977 |
-- typedef std::unordered_map<const char*, const ld::Atom*, CStringHash, CStringEquals> NameToAtom; |
6978 |
-+ typedef std::UNORDERED_MAP<const char*, const ld::Atom*, CStringHash, CStringEquals> NameToAtom; |
6979 |
- |
6980 |
- typedef std::map<const ld::Atom*, const ld::Atom*> AtomToAtom; |
6981 |
- |
6982 |
-diff -ur ld64-236.3.orig/src/other/dyldinfo.cpp ld64-236.3/src/other/dyldinfo.cpp |
6983 |
---- ld64-236.3.orig/src/other/dyldinfo.cpp 2014-04-05 00:42:29.000000000 +0200 |
6984 |
-+++ ld64-236.3/src/other/dyldinfo.cpp 2015-01-12 00:27:33.000000000 +0100 |
6985 |
-@@ -33,7 +33,6 @@ |
6986 |
- |
6987 |
- #include <vector> |
6988 |
- #include <set> |
6989 |
--#include <unordered_set> |
6990 |
- |
6991 |
- #include "configure.h" |
6992 |
- #include "MachOFileAbstraction.hpp" |
6993 |
-diff -ur ld64-236.3.orig/src/other/machochecker.cpp ld64-236.3/src/other/machochecker.cpp |
6994 |
---- ld64-236.3.orig/src/other/machochecker.cpp 2014-04-05 00:42:29.000000000 +0200 |
6995 |
-+++ ld64-236.3/src/other/machochecker.cpp 2015-01-11 22:46:37.000000000 +0100 |
6996 |
-@@ -33,7 +33,13 @@ |
6997 |
- |
6998 |
- #include <vector> |
6999 |
- #include <set> |
7000 |
-+#ifdef __GLIBCXX__ |
7001 |
-+#include <tr1/unordered_set> |
7002 |
-+#define UNORDERED_SET tr1::unordered_set |
7003 |
-+#else |
7004 |
- #include <unordered_set> |
7005 |
-+#define UNORDERED_SET unordered_set |
7006 |
-+#endif |
7007 |
- |
7008 |
- #include "configure.h" |
7009 |
- |
7010 |
-@@ -124,7 +130,7 @@ |
7011 |
- bool operator()(const char* left, const char* right) const { return (strcmp(left, right) == 0); } |
7012 |
- }; |
7013 |
- |
7014 |
-- typedef std::unordered_set<const char*, CStringHash, CStringEquals> StringSet; |
7015 |
-+ typedef std::UNORDERED_SET<const char*, CStringHash, CStringEquals> StringSet; |
7016 |
- |
7017 |
- MachOChecker(const uint8_t* fileContent, uint32_t fileLength, const char* path); |
7018 |
- void checkMachHeader(); |
7019 |
-diff -ur ld64-236.3.orig/src/other/unwinddump.cpp ld64-236.3/src/other/unwinddump.cpp |
7020 |
---- ld64-236.3.orig/src/other/unwinddump.cpp 2014-04-05 00:42:29.000000000 +0200 |
7021 |
-+++ ld64-236.3/src/other/unwinddump.cpp 2015-01-11 23:58:00.000000000 +0100 |
7022 |
-@@ -33,7 +33,6 @@ |
7023 |
- |
7024 |
- #include <vector> |
7025 |
- #include <set> |
7026 |
--#include <unordered_set> |
7027 |
- |
7028 |
- #include "configure.h" |
7029 |
- #include "MachOFileAbstraction.hpp" |
7030 |
|
7031 |
diff --git a/sys-devel/binutils-apple/files/ld64-236.3-missing-cputypes.patch b/sys-devel/binutils-apple/files/ld64-236.3-missing-cputypes.patch |
7032 |
deleted file mode 100644 |
7033 |
index 29b50f6..0000000 |
7034 |
--- a/sys-devel/binutils-apple/files/ld64-236.3-missing-cputypes.patch |
7035 |
+++ /dev/null |
7036 |
@@ -1,10 +0,0 @@ |
7037 |
---- ld64-236.3/src/include/mach/machine.h.orig 2015-01-24 13:22:36.000000000 +0100 |
7038 |
-+++ ld64-236.3/src/include/mach/machine.h 2015-01-24 13:22:51.000000000 +0100 |
7039 |
-@@ -233,6 +233,7 @@ |
7040 |
- */ |
7041 |
- |
7042 |
- #define CPU_SUBTYPE_I386_ALL ((cpu_subtype_t) 3) |
7043 |
-+#define CPU_SUBTYPE_X86_ALL CPU_SUBTYPE_I386_ALL |
7044 |
- #define CPU_SUBTYPE_X86_64_ALL CPU_SUBTYPE_I386_ALL |
7045 |
- #define CPU_SUBTYPE_386 ((cpu_subtype_t) 3) |
7046 |
- #define CPU_SUBTYPE_486 ((cpu_subtype_t) 4) |
7047 |
|
7048 |
diff --git a/sys-devel/binutils-apple/files/ld64-236.3-noarm.patch b/sys-devel/binutils-apple/files/ld64-236.3-noarm.patch |
7049 |
deleted file mode 100644 |
7050 |
index 5a235ec..0000000 |
7051 |
--- a/sys-devel/binutils-apple/files/ld64-236.3-noarm.patch |
7052 |
+++ /dev/null |
7053 |
@@ -1,1236 +0,0 @@ |
7054 |
-Fully conditionalise arm support so it can be disabled on 10.4. |
7055 |
- |
7056 |
---- ld64-236.3/src/ld/HeaderAndLoadCommands.hpp.orig 2015-01-23 06:55:36.000000000 +0100 |
7057 |
-+++ ld64-236.3/src/ld/HeaderAndLoadCommands.hpp 2015-01-23 06:56:04.000000000 +0100 |
7058 |
-@@ -605,8 +605,12 @@ |
7059 |
- |
7060 |
- template <> uint32_t HeaderAndLoadCommandsAtom<x86>::cpuType() const { return CPU_TYPE_I386; } |
7061 |
- template <> uint32_t HeaderAndLoadCommandsAtom<x86_64>::cpuType() const { return CPU_TYPE_X86_64; } |
7062 |
-+#if SUPPORT_ARCH_arm_any |
7063 |
- template <> uint32_t HeaderAndLoadCommandsAtom<arm>::cpuType() const { return CPU_TYPE_ARM; } |
7064 |
-+#endif |
7065 |
-+#if SUPPORT_ARCH_arm64 |
7066 |
- template <> uint32_t HeaderAndLoadCommandsAtom<arm64>::cpuType() const { return CPU_TYPE_ARM64; } |
7067 |
-+#endif |
7068 |
- |
7069 |
- |
7070 |
- |
7071 |
-@@ -625,17 +629,21 @@ |
7072 |
- return _state.cpuSubType; |
7073 |
- } |
7074 |
- |
7075 |
-+#if SUPPORT_ARCH_arm_any |
7076 |
- template <> |
7077 |
- uint32_t HeaderAndLoadCommandsAtom<arm>::cpuSubType() const |
7078 |
- { |
7079 |
- return _state.cpuSubType; |
7080 |
- } |
7081 |
-+#endif |
7082 |
- |
7083 |
-+#if SUPPORT_ARCH_arm64 |
7084 |
- template <> |
7085 |
- uint32_t HeaderAndLoadCommandsAtom<arm64>::cpuSubType() const |
7086 |
- { |
7087 |
- return CPU_SUBTYPE_ARM64_ALL; |
7088 |
- } |
7089 |
-+#endif |
7090 |
- |
7091 |
- |
7092 |
- |
7093 |
---- ld64-236.3/src/ld/LinkEdit.hpp.orig 2015-01-23 06:55:36.000000000 +0100 |
7094 |
-+++ ld64-236.3/src/ld/LinkEdit.hpp 2015-01-23 06:56:04.000000000 +0100 |
7095 |
-@@ -1595,6 +1595,7 @@ |
7096 |
- for (ld::Fixup::iterator fit = atom->fixupsBegin(); fit != atom->fixupsEnd(); ++fit) { |
7097 |
- if ( fit->kind != ld::Fixup::kindLinkerOptimizationHint) |
7098 |
- continue; |
7099 |
-+#if SUPPORT_ARCH_arm64 |
7100 |
- ld::Fixup::LOH_arm64 extra; |
7101 |
- extra.addend = fit->u.addend; |
7102 |
- _encodedData.append_uleb128(extra.info.kind); |
7103 |
-@@ -1606,6 +1607,7 @@ |
7104 |
- _encodedData.append_uleb128((extra.info.delta3 << 2) + fit->offsetInAtom + address); |
7105 |
- if ( extra.info.count > 2 ) |
7106 |
- _encodedData.append_uleb128((extra.info.delta4 << 2) + fit->offsetInAtom + address); |
7107 |
-+#endif |
7108 |
- } |
7109 |
- } |
7110 |
- } |
7111 |
---- ld64-236.3/src/ld/Options.cpp.orig 2015-01-23 06:55:36.000000000 +0100 |
7112 |
-+++ ld64-236.3/src/ld/Options.cpp 2015-01-23 07:05:43.000000000 +0100 |
7113 |
-@@ -567,8 +567,13 @@ |
7114 |
- #endif |
7115 |
- } |
7116 |
- break; |
7117 |
-+#if SUPPORT_ARCH_arm_any |
7118 |
- case CPU_TYPE_ARM: |
7119 |
-+#endif |
7120 |
-+#if SUPPORT_ARCH_arm64 |
7121 |
- case CPU_TYPE_ARM64: |
7122 |
-+#endif |
7123 |
-+#if SUPPORT_ARCH_arm_any || SUPPORT_ARCH_arm64 |
7124 |
- if ( (fMacVersionMin == ld::macVersionUnset) && (fIOSVersionMin == ld::iOSVersionUnset) && (fOutputKind != Options::kObjectFile) ) { |
7125 |
- #if defined(DEFAULT_IPHONEOS_MIN_VERSION) |
7126 |
- warning("-ios_version_min not specified, assuming " DEFAULT_IPHONEOS_MIN_VERSION); |
7127 |
-@@ -579,6 +584,7 @@ |
7128 |
- #endif |
7129 |
- } |
7130 |
- break; |
7131 |
-+#endif |
7132 |
- } |
7133 |
- #ifdef SUPPORT_SNAPSHOTS |
7134 |
- fLinkSnapshot.recordArch(fArchitectureName); |
7135 |
-@@ -1649,9 +1655,11 @@ |
7136 |
- symbolStart = NULL; |
7137 |
- } |
7138 |
- else if ( strncmp(symbolStart, "arm:", 4) == 0 ) { |
7139 |
-+#if SUPPORT_ARCH_arm_any |
7140 |
- if ( fArchitecture == CPU_TYPE_ARM ) |
7141 |
- symbolStart = &symbolStart[4]; |
7142 |
- else |
7143 |
-+#endif |
7144 |
- symbolStart = NULL; |
7145 |
- } |
7146 |
- if ( symbolStart != NULL ) { |
7147 |
-@@ -3483,6 +3491,7 @@ |
7148 |
- #endif |
7149 |
- } |
7150 |
- break; |
7151 |
-+#if SUPPORT_ARCH_arm_any |
7152 |
- case CPU_TYPE_ARM: |
7153 |
- if ( (fOutputKind != Options::kObjectFile) && (fOutputKind != Options::kPreload) ) { |
7154 |
- #if defined(DEFAULT_IPHONEOS_MIN_VERSION) |
7155 |
-@@ -3494,6 +3503,7 @@ |
7156 |
- #endif |
7157 |
- } |
7158 |
- break; |
7159 |
-+#endif |
7160 |
- default: |
7161 |
- // architecture will be infered later by examining .o files |
7162 |
- break; |
7163 |
-@@ -3516,12 +3526,14 @@ |
7164 |
- fMacVersionMin = ld::mac10_4; |
7165 |
- } |
7166 |
- break; |
7167 |
-+#if SUPPORT_ARCH_arm64 |
7168 |
- case CPU_TYPE_ARM64: |
7169 |
- if ( fIOSVersionMin < ld::iOS_7_0 ) { |
7170 |
- //warning("-mios_version_min should be 7.0 or later for arm64"); |
7171 |
- fIOSVersionMin = ld::iOS_7_0; |
7172 |
- } |
7173 |
- break; |
7174 |
-+#endif |
7175 |
- } |
7176 |
- |
7177 |
- // default to adding functions start for dynamic code, static code must opt-in |
7178 |
-@@ -3561,6 +3573,7 @@ |
7179 |
- fAllowTextRelocs = true; |
7180 |
- fUndefinedTreatment = kUndefinedDynamicLookup; |
7181 |
- break; |
7182 |
-+#if SUPPORT_ARCH_arm64 |
7183 |
- case CPU_TYPE_ARM64: |
7184 |
- // arm64 uses new MH_KEXT_BUNDLE type |
7185 |
- fMakeCompressedDyldInfo = false; |
7186 |
-@@ -3569,6 +3582,8 @@ |
7187 |
- fKextsUseStubs = true; |
7188 |
- fUndefinedTreatment = kUndefinedDynamicLookup; |
7189 |
- break; |
7190 |
-+#endif |
7191 |
-+#if SUPPORT_ARCH_arm_any |
7192 |
- case CPU_TYPE_ARM: |
7193 |
- if ( fIOSVersionMin >= ld::iOS_5_0 ) { |
7194 |
- // iOS 5.0 and later use new MH_KEXT_BUNDLE type |
7195 |
-@@ -3580,6 +3595,7 @@ |
7196 |
- fUndefinedTreatment = kUndefinedDynamicLookup; |
7197 |
- break; |
7198 |
- } |
7199 |
-+#endif |
7200 |
- // else use object file |
7201 |
- case CPU_TYPE_I386: |
7202 |
- // use .o files |
7203 |
-@@ -3632,6 +3648,7 @@ |
7204 |
- if ( fSplitSegs && (fBaseWritableAddress-fBaseAddress != 0x10000000) ) |
7205 |
- fBaseWritableAddress = fBaseAddress + 0x10000000; |
7206 |
- break; |
7207 |
-+#if SUPPORT_ARCH_arm_any |
7208 |
- case CPU_TYPE_ARM: |
7209 |
- if ( fOutputKind != Options::kDynamicLibrary ) { |
7210 |
- fSplitSegs = false; |
7211 |
-@@ -3642,6 +3659,7 @@ |
7212 |
- fBaseWritableAddress = fBaseAddress + 0x08000000; |
7213 |
- } |
7214 |
- break; |
7215 |
-+#endif |
7216 |
- default: |
7217 |
- fSplitSegs = false; |
7218 |
- fBaseAddress = 0; |
7219 |
-@@ -3656,6 +3674,7 @@ |
7220 |
- break; |
7221 |
- case CPU_TYPE_X86_64: |
7222 |
- break; |
7223 |
-+#if SUPPORT_ARCH_arm_any |
7224 |
- case CPU_TYPE_ARM: |
7225 |
- switch ( fOutputKind ) { |
7226 |
- case Options::kDynamicExecutable: |
7227 |
-@@ -3678,6 +3697,7 @@ |
7228 |
- fBaseAddress = 0; |
7229 |
- } |
7230 |
- break; |
7231 |
-+#endif |
7232 |
- } |
7233 |
- |
7234 |
- // <rdar://problem/6138961> -r implies no prebinding for all architectures |
7235 |
-@@ -3723,6 +3743,7 @@ |
7236 |
- case CPU_TYPE_X86_64: |
7237 |
- fPrebind = false; |
7238 |
- break; |
7239 |
-+#if SUPPORT_ARCH_arm_any |
7240 |
- case CPU_TYPE_ARM: |
7241 |
- switch ( fOutputKind ) { |
7242 |
- case Options::kDynamicExecutable: |
7243 |
-@@ -3740,6 +3761,7 @@ |
7244 |
- break; |
7245 |
- } |
7246 |
- break; |
7247 |
-+#endif |
7248 |
- } |
7249 |
- } |
7250 |
- |
7251 |
-@@ -3766,10 +3788,12 @@ |
7252 |
- case CPU_TYPE_I386: |
7253 |
- if ( fIOSVersionMin != ld::iOSVersionUnset ) // simulator never needs modules |
7254 |
- break; |
7255 |
-+#if SUPPORT_ARCH_arm_any |
7256 |
- case CPU_TYPE_ARM: |
7257 |
- if ( fPrebind ) |
7258 |
- fNeedsModuleTable = true; // redo_prebinding requires a module table |
7259 |
- break; |
7260 |
-+#endif |
7261 |
- } |
7262 |
- } |
7263 |
- |
7264 |
-@@ -3993,7 +3993,9 @@ |
7265 |
- switch ( fArchitecture ) { |
7266 |
- case CPU_TYPE_I386: |
7267 |
- case CPU_TYPE_X86_64: |
7268 |
-+#if SUPPORT_ARCH_arm64 |
7269 |
- case CPU_TYPE_ARM64: |
7270 |
-+#endif |
7271 |
- switch ( fOutputKind ) { |
7272 |
- case Options::kObjectFile: |
7273 |
- case Options::kStaticExecutable: |
7274 |
-@@ -4010,10 +4012,12 @@ |
7275 |
- break; |
7276 |
- } |
7277 |
- break; |
7278 |
-+#if SUPPORT_ARCH_arm_any |
7279 |
- case CPU_TYPE_ARM: |
7280 |
- fAddCompactUnwindEncoding = false; |
7281 |
- fRemoveDwarfUnwindIfCompactExists = false; |
7282 |
- break; |
7283 |
-+#endif |
7284 |
- case 0: |
7285 |
- // if -arch is missing, assume we don't want compact unwind info |
7286 |
- fAddCompactUnwindEncoding = false; |
7287 |
-@@ -3815,7 +3843,15 @@ |
7288 |
- // only iOS main executables should be encrypted |
7289 |
- if ( fOutputKind != Options::kDynamicExecutable ) |
7290 |
- fEncryptable = false; |
7291 |
-- if ( (fArchitecture != CPU_TYPE_ARM) && (fArchitecture != CPU_TYPE_ARM64) ) |
7292 |
-+ if ( |
7293 |
-+#if SUPPORT_ARCH_arm_any |
7294 |
-+ (fArchitecture != CPU_TYPE_ARM) && |
7295 |
-+#endif |
7296 |
-+#if SUPPORT_ARCH_arm64 |
7297 |
-+ (fArchitecture != CPU_TYPE_ARM64) && |
7298 |
-+#endif |
7299 |
-+ 1 |
7300 |
-+ ) |
7301 |
- fEncryptable = false; |
7302 |
- |
7303 |
- // don't move inits in dyld because dyld wants certain |
7304 |
-@@ -3867,11 +3903,15 @@ |
7305 |
- |
7306 |
- // only ARM and x86_64 enforces that cpu-sub-types must match |
7307 |
- switch ( fArchitecture ) { |
7308 |
-+#if SUPPORT_ARCH_arm_any |
7309 |
- case CPU_TYPE_ARM: |
7310 |
-+#endif |
7311 |
- case CPU_TYPE_X86_64: |
7312 |
- break; |
7313 |
- case CPU_TYPE_I386: |
7314 |
-+#if SUPPORT_ARCH_arm64 |
7315 |
- case CPU_TYPE_ARM64: |
7316 |
-+#endif |
7317 |
- fAllowCpuSubtypeMismatches = true; |
7318 |
- break; |
7319 |
- } |
7320 |
-@@ -3917,6 +3957,7 @@ |
7321 |
- fPositionIndependentExecutable = true; |
7322 |
- } |
7323 |
- |
7324 |
-+#if SUPPORT_ARCH_arm_any |
7325 |
- // armv7 for iOS4.3 defaults to PIE |
7326 |
- if ( (fArchitecture == CPU_TYPE_ARM) |
7327 |
- && fArchSupportsThumb2 |
7328 |
-@@ -3924,15 +3965,18 @@ |
7329 |
- && (fIOSVersionMin >= ld::iOS_4_3) ) { |
7330 |
- fPositionIndependentExecutable = true; |
7331 |
- } |
7332 |
-+#endif |
7333 |
- |
7334 |
- // -no_pie anywhere on command line disable PIE |
7335 |
- if ( fDisablePositionIndependentExecutable ) |
7336 |
- fPositionIndependentExecutable = false; |
7337 |
- |
7338 |
-+#if SUPPORT_ARCH_arm64 |
7339 |
- // arm64 is always PIE |
7340 |
- if ( (fArchitecture == CPU_TYPE_ARM64) && (fOutputKind == kDynamicExecutable) ) { |
7341 |
- fPositionIndependentExecutable = true; |
7342 |
- } |
7343 |
-+#endif |
7344 |
- |
7345 |
- // set fOutputSlidable |
7346 |
- switch ( fOutputKind ) { |
7347 |
-@@ -3958,9 +4002,11 @@ |
7348 |
- if ( fMacVersionMin >= ld::mac10_7 ) { |
7349 |
- fTLVSupport = true; |
7350 |
- } |
7351 |
-+#if SUPPORT_ARCH_arm64 |
7352 |
- else if ( (fArchitecture == CPU_TYPE_ARM64) && (fIOSVersionMin >= 0x00080000) ) { |
7353 |
- fTLVSupport = true; |
7354 |
- } |
7355 |
-+#endif |
7356 |
- |
7357 |
- // default to adding version load command for dynamic code, static code must opt-in |
7358 |
- switch ( fOutputKind ) { |
7359 |
-@@ -4149,6 +4195,7 @@ |
7360 |
- } |
7361 |
- |
7362 |
- // <rdar://problem/12258065> ARM64 needs 16KB page size for user land code |
7363 |
-+#if SUPPORT_ARCH_arm64 |
7364 |
- if ( fArchitecture == CPU_TYPE_ARM64 ) { |
7365 |
- if ( fSegmentAlignment == 4096 ) { |
7366 |
- switch ( fOutputKind ) { |
7367 |
-@@ -4166,6 +4213,7 @@ |
7368 |
- } |
7369 |
- } |
7370 |
- } |
7371 |
-+#endif |
7372 |
- |
7373 |
- // <rdar://problem/13624134> linker should not convert dwarf unwind if .o file has compact unwind section |
7374 |
- switch ( fOutputKind ) { |
7375 |
-@@ -4267,12 +4315,16 @@ |
7376 |
- if ( fStackAddr != 0 ) { |
7377 |
- switch (fArchitecture) { |
7378 |
- case CPU_TYPE_I386: |
7379 |
-+#if SUPPORT_ARCH_arm_any |
7380 |
- case CPU_TYPE_ARM: |
7381 |
-+#endif |
7382 |
- if ( fStackAddr > 0xFFFFFFFFULL ) |
7383 |
- throw "-stack_addr must be < 4G for 32-bit processes"; |
7384 |
- break; |
7385 |
- case CPU_TYPE_X86_64: |
7386 |
-+#if SUPPORT_ARCH_arm64 |
7387 |
- case CPU_TYPE_ARM64: |
7388 |
-+#endif |
7389 |
- break; |
7390 |
- } |
7391 |
- if ( (fStackAddr & -4096) != fStackAddr ) |
7392 |
-@@ -4293,6 +4345,7 @@ |
7393 |
- if ( (fStackAddr > 0xB0000000ULL) && ((fStackAddr-fStackSize) < 0xB0000000ULL) ) |
7394 |
- warning("custom stack placement overlaps and will disable shared region"); |
7395 |
- break; |
7396 |
-+#if SUPPORT_ARCH_arm_any |
7397 |
- case CPU_TYPE_ARM: |
7398 |
- if ( fStackSize > 0x2F000000 ) |
7399 |
- throw "-stack_size must be < 752MB"; |
7400 |
-@@ -4301,11 +4354,13 @@ |
7401 |
- if ( fStackAddr > 0x30000000ULL) |
7402 |
- throw "-stack_addr must be < 0x30000000 for arm"; |
7403 |
- break; |
7404 |
-+#endif |
7405 |
- case CPU_TYPE_X86_64: |
7406 |
- if ( fStackAddr == 0 ) { |
7407 |
- fStackAddr = 0x00007FFF5C000000ULL; |
7408 |
- } |
7409 |
- break; |
7410 |
-+#if SUPPORT_ARCH_arm64 |
7411 |
- case CPU_TYPE_ARM64: |
7412 |
- if ( fStackSize > 0x20000000 ) |
7413 |
- throw "-stack_size must be < 512MB"; |
7414 |
-@@ -4313,6 +4368,7 @@ |
7415 |
- fStackAddr = 0x120000000ULL; |
7416 |
- } |
7417 |
- break; |
7418 |
-+#endif |
7419 |
- } |
7420 |
- if ( (fStackSize & -4096) != fStackSize ) |
7421 |
- throw "-stack_size must be multiples of 4K"; |
7422 |
-@@ -4422,8 +4478,12 @@ |
7423 |
- alterObjC1ClassNamesToObjC2 = true; |
7424 |
- break; |
7425 |
- case CPU_TYPE_X86_64: |
7426 |
-+#if SUPPORT_ARCH_arm_any |
7427 |
- case CPU_TYPE_ARM: |
7428 |
-+#endif |
7429 |
-+#if SUPPORT_ARCH_arm64 |
7430 |
- case CPU_TYPE_ARM64: |
7431 |
-+#endif |
7432 |
- alterObjC1ClassNamesToObjC2 = true; |
7433 |
- break; |
7434 |
- } |
7435 |
-@@ -4799,11 +4799,15 @@ |
7436 |
- // zero page size not specified on command line, set default |
7437 |
- switch (fArchitecture) { |
7438 |
- case CPU_TYPE_I386: |
7439 |
-+#if SUPPORT_ARCH_arm_any |
7440 |
- case CPU_TYPE_ARM: |
7441 |
-+#endif |
7442 |
- // first 4KB for 32-bit architectures |
7443 |
- fZeroPageSize = 0x1000; |
7444 |
- break; |
7445 |
-+#if SUPPORT_ARCH_arm64 |
7446 |
- case CPU_TYPE_ARM64: |
7447 |
-+#endif |
7448 |
- case CPU_TYPE_X86_64: |
7449 |
- // first 4GB for x86_64 on all OS's |
7450 |
- fZeroPageSize = 0x100000000ULL; |
7451 |
-@@ -4621,9 +4685,11 @@ |
7452 |
- |
7453 |
- // -force_cpusubtype_ALL is not supported for ARM |
7454 |
- if ( fForceSubtypeAll ) { |
7455 |
-+#if SUPPORT_ARCH_arm_any |
7456 |
- if ( fArchitecture == CPU_TYPE_ARM ) { |
7457 |
- warning("-force_cpusubtype_ALL will become unsupported for ARM architectures"); |
7458 |
- } |
7459 |
-+#endif |
7460 |
- } |
7461 |
- |
7462 |
- // -reexported_symbols_list can only be used with -dynamiclib |
7463 |
---- ld64-236.3/src/ld/OutputFile.cpp.orig 2015-01-23 06:55:36.000000000 +0100 |
7464 |
-+++ ld64-236.3/src/ld/OutputFile.cpp 2015-01-23 06:56:04.000000000 +0100 |
7465 |
-@@ -629,7 +629,12 @@ |
7466 |
- // is encoded in mach-o the same as: |
7467 |
- // .long _foo + 0x40000000 |
7468 |
- // so if _foo lays out to 0xC0000100, the first is ok, but the second is not. |
7469 |
-- if ( (_options.architecture() == CPU_TYPE_ARM) || (_options.architecture() == CPU_TYPE_I386) ) { |
7470 |
-+ if ( |
7471 |
-+#if SUPPORT_ARCH_arm_any |
7472 |
-+ (_options.architecture() == CPU_TYPE_ARM) || |
7473 |
-+#endif |
7474 |
-+ (_options.architecture() == CPU_TYPE_I386) || |
7475 |
-+ 0) { |
7476 |
- // Unlikely userland code does funky stuff like this, so warn for them, but not warn for -preload or -static |
7477 |
- if ( (_options.outputKind() != Options::kPreload) && (_options.outputKind() != Options::kStaticExecutable) ) { |
7478 |
- warning("32-bit absolute address out of range (0x%08llX max is 4GB): from %s + 0x%08X (0x%08llX) to 0x%08llX", |
7479 |
-@@ -1229,22 +1234,26 @@ |
7480 |
- return false; |
7481 |
- const ld::Fixup* f; |
7482 |
- switch ( fixup->kind ) { |
7483 |
-+#if SUPPORT_ARCH_arm64 |
7484 |
- case ld::Fixup::kindStoreTargetAddressARM64Page21: |
7485 |
- return !mustBeGOT; |
7486 |
- case ld::Fixup::kindStoreTargetAddressARM64GOTLoadPage21: |
7487 |
- case ld::Fixup::kindStoreTargetAddressARM64GOTLeaPage21: |
7488 |
- return true; |
7489 |
-+#endif |
7490 |
- case ld::Fixup::kindSetTargetAddress: |
7491 |
- f = fixup; |
7492 |
- do { |
7493 |
- ++f; |
7494 |
- } while ( ! f->lastInCluster() ); |
7495 |
- switch (f->kind ) { |
7496 |
-+#if SUPPORT_ARCH_arm64 |
7497 |
- case ld::Fixup::kindStoreARM64Page21: |
7498 |
- return !mustBeGOT; |
7499 |
- case ld::Fixup::kindStoreARM64GOTLoadPage21: |
7500 |
- case ld::Fixup::kindStoreARM64GOTLeaPage21: |
7501 |
- return true; |
7502 |
-+#endif |
7503 |
- default: |
7504 |
- break; |
7505 |
- } |
7506 |
-@@ -1261,22 +1270,26 @@ |
7507 |
- return false; |
7508 |
- const ld::Fixup* f; |
7509 |
- switch ( fixup->kind ) { |
7510 |
-+#if SUPPORT_ARCH_arm64 |
7511 |
- case ld::Fixup::kindStoreTargetAddressARM64PageOff12: |
7512 |
- return !mustBeGOT; |
7513 |
- case ld::Fixup::kindStoreTargetAddressARM64GOTLoadPageOff12: |
7514 |
- case ld::Fixup::kindStoreTargetAddressARM64GOTLeaPageOff12: |
7515 |
- return true; |
7516 |
-+#endif |
7517 |
- case ld::Fixup::kindSetTargetAddress: |
7518 |
- f = fixup; |
7519 |
- do { |
7520 |
- ++f; |
7521 |
- } while ( ! f->lastInCluster() ); |
7522 |
- switch (f->kind ) { |
7523 |
-+#if SUPPORT_ARCH_arm64 |
7524 |
- case ld::Fixup::kindStoreARM64PageOff12: |
7525 |
- return !mustBeGOT; |
7526 |
- case ld::Fixup::kindStoreARM64GOTLoadPageOff12: |
7527 |
- case ld::Fixup::kindStoreARM64GOTLeaPageOff12: |
7528 |
- return true; |
7529 |
-+#endif |
7530 |
- default: |
7531 |
- break; |
7532 |
- } |
7533 |
-@@ -1311,7 +1324,9 @@ |
7534 |
- std::map<uint32_t, const Fixup*> usedByHints; |
7535 |
- for (ld::Fixup::iterator fit = atom->fixupsBegin(), end=atom->fixupsEnd(); fit != end; ++fit) { |
7536 |
- uint8_t* fixUpLocation = &buffer[fit->offsetInAtom]; |
7537 |
-+#if SUPPORT_ARCH_arm64 |
7538 |
- ld::Fixup::LOH_arm64 lohExtra; |
7539 |
-+#endif |
7540 |
- switch ( (ld::Fixup::Kind)(fit->kind) ) { |
7541 |
- case ld::Fixup::kindNone: |
7542 |
- case ld::Fixup::kindNoneFollowOn: |
7543 |
-@@ -1570,6 +1585,7 @@ |
7544 |
- break; |
7545 |
- case ld::Fixup::kindLinkerOptimizationHint: |
7546 |
- // expand table of address/offsets used by hints |
7547 |
-+#if SUPPORT_ARCH_arm64 |
7548 |
- lohExtra.addend = fit->u.addend; |
7549 |
- usedByHints[fit->offsetInAtom + (lohExtra.info.delta1 << 2)] = NULL; |
7550 |
- if ( lohExtra.info.count > 0 ) |
7551 |
-@@ -1578,6 +1594,7 @@ |
7552 |
- usedByHints[fit->offsetInAtom + (lohExtra.info.delta3 << 2)] = NULL; |
7553 |
- if ( lohExtra.info.count > 2 ) |
7554 |
- usedByHints[fit->offsetInAtom + (lohExtra.info.delta4 << 2)] = NULL; |
7555 |
-+#endif |
7556 |
- break; |
7557 |
- case ld::Fixup::kindStoreTargetAddressLittleEndian32: |
7558 |
- accumulator = addressOf(state, fit, &toTarget); |
7559 |
-@@ -2057,6 +2074,7 @@ |
7560 |
- //uint8_t loadSize, destReg; |
7561 |
- //uint32_t scaledOffset; |
7562 |
- //uint32_t imm12; |
7563 |
-+#if SUPPORT_ARCH_arm64 |
7564 |
- ld::Fixup::LOH_arm64 alt; |
7565 |
- alt.addend = fit->u.addend; |
7566 |
- setInfo(state, atom, buffer, usedByHints, fit->offsetInAtom, (alt.info.delta1 << 2), &infoA); |
7567 |
-@@ -2415,6 +2433,7 @@ |
7568 |
- fprintf(stderr, "unknown hint kind %d alt.info.kind at 0x%08llX\n", alt.info.kind, infoA.instructionAddress); |
7569 |
- break; |
7570 |
- } |
7571 |
-+#endif |
7572 |
- } |
7573 |
- // apply hints pass 2 |
7574 |
- for (ld::Fixup::iterator fit = atom->fixupsBegin(), end=atom->fixupsEnd(); fit != end; ++fit) { |
7575 |
-@@ -2422,6 +2441,7 @@ |
7576 |
- continue; |
7577 |
- InstructionInfo infoA; |
7578 |
- InstructionInfo infoB; |
7579 |
-+#if SUPPORT_ARCH_arm64 |
7580 |
- ld::Fixup::LOH_arm64 alt; |
7581 |
- alt.addend = fit->u.addend; |
7582 |
- setInfo(state, atom, buffer, usedByHints, fit->offsetInAtom, (alt.info.delta1 << 2), &infoA); |
7583 |
-@@ -2453,6 +2473,7 @@ |
7584 |
- } |
7585 |
- break; |
7586 |
- } |
7587 |
-+#endif |
7588 |
- } |
7589 |
- } |
7590 |
- |
7591 |
-@@ -2469,6 +2490,7 @@ |
7592 |
- for (uint8_t* p=from; p < to; ++p) |
7593 |
- *p = 0x90; |
7594 |
- break; |
7595 |
-+#if SUPPORT_ARCH_arm_any |
7596 |
- case CPU_TYPE_ARM: |
7597 |
- if ( thumb ) { |
7598 |
- for (uint8_t* p=from; p < to; p += 2) |
7599 |
-@@ -2479,6 +2501,7 @@ |
7600 |
- OSWriteLittleInt32((uint32_t*)p, 0, 0xe1a00000); |
7601 |
- } |
7602 |
- break; |
7603 |
-+#endif |
7604 |
- default: |
7605 |
- for (uint8_t* p=from; p < to; ++p) |
7606 |
- *p = 0x00; |
7607 |
-@@ -2807,7 +2830,11 @@ |
7608 |
- |
7609 |
- // in -r mode, clarify symbolTableNotInFinalLinkedImages |
7610 |
- if ( _options.outputKind() == Options::kObjectFile ) { |
7611 |
-- if ( (_options.architecture() == CPU_TYPE_X86_64) || (_options.architecture() == CPU_TYPE_ARM64) ) { |
7612 |
-+ if ( (_options.architecture() == CPU_TYPE_X86_64) || |
7613 |
-+#if SUPPORT_ARCH_arm64 |
7614 |
-+ (_options.architecture() == CPU_TYPE_ARM64) || |
7615 |
-+#endif |
7616 |
-+ 0 ) { |
7617 |
- // x86_64 .o files need labels on anonymous literal strings |
7618 |
- if ( (sect->type() == ld::Section::typeCString) && (atom->combine() == ld::Atom::combineByNameAndContent) ) { |
7619 |
- (const_cast<ld::Atom*>(atom))->setSymbolTableInclusion(ld::Atom::symbolTableIn); |
7620 |
-@@ -4030,8 +4057,10 @@ |
7621 |
- if ( _options.sharedRegionEligible() ) { |
7622 |
- // <rdar://problem/13287063> when range checking, ignore high byte of arm64 addends |
7623 |
- uint64_t checkAddend = addend; |
7624 |
-+#if SUPPORT_ARCH_arm64 |
7625 |
- if ( _options.architecture() == CPU_TYPE_ARM64 ) |
7626 |
- checkAddend &= 0x0FFFFFFFFFFFFFFFULL; |
7627 |
-+#endif |
7628 |
- if ( checkAddend != 0 ) { |
7629 |
- // make sure the addend does not cause the pointer to point outside the target's segment |
7630 |
- // if it does, update_dyld_shared_cache will not be able to put this dylib into the shared cache |
7631 |
-@@ -4238,12 +4267,17 @@ |
7632 |
- |
7633 |
- bool OutputFile::useExternalSectionReloc(const ld::Atom* atom, const ld::Atom* target, ld::Fixup* fixupWithTarget) |
7634 |
- { |
7635 |
-- if ( (_options.architecture() == CPU_TYPE_X86_64) || (_options.architecture() == CPU_TYPE_ARM64) ) { |
7636 |
-+ if ( (_options.architecture() == CPU_TYPE_X86_64) || |
7637 |
-+#if SUPPORT_ARCH_arm64 |
7638 |
-+ (_options.architecture() == CPU_TYPE_ARM64) || |
7639 |
-+#endif |
7640 |
-+ 0) { |
7641 |
- // x86_64 and ARM64 use external relocations for everthing that has a symbol |
7642 |
- return ( target->symbolTableInclusion() != ld::Atom::symbolTableNotIn ); |
7643 |
- } |
7644 |
- |
7645 |
- // <rdar://problem/9513487> support arm branch interworking in -r mode |
7646 |
-+#if SUPPORT_ARCH_arm_any |
7647 |
- if ( (_options.architecture() == CPU_TYPE_ARM) && (_options.outputKind() == Options::kObjectFile) ) { |
7648 |
- if ( atom->isThumb() != target->isThumb() ) { |
7649 |
- switch ( fixupWithTarget->kind ) { |
7650 |
-@@ -4257,6 +4291,7 @@ |
7651 |
- } |
7652 |
- } |
7653 |
- } |
7654 |
-+#endif |
7655 |
- |
7656 |
- if ( (_options.architecture() == CPU_TYPE_I386) && (_options.outputKind() == Options::kObjectFile) ) { |
7657 |
- if ( target->contentType() == ld::Atom::typeTLV ) |
7658 |
-@@ -4324,7 +4359,11 @@ |
7659 |
- bool minusTargetUsesExternalReloc = (minusTarget != NULL) && this->useExternalSectionReloc(atom, minusTarget, fixupWithMinusTarget); |
7660 |
- |
7661 |
- // in x86_64 and arm64 .o files an external reloc means the content contains just the addend |
7662 |
-- if ( (_options.architecture() == CPU_TYPE_X86_64) ||(_options.architecture() == CPU_TYPE_ARM64) ) { |
7663 |
-+ if ( (_options.architecture() == CPU_TYPE_X86_64) || |
7664 |
-+#if SUPPORT_ARCH_arm64 |
7665 |
-+ (_options.architecture() == CPU_TYPE_ARM64) || |
7666 |
-+#endif |
7667 |
-+ 0 ) { |
7668 |
- if ( targetUsesExternalReloc ) { |
7669 |
- fixupWithTarget->contentAddendOnly = true; |
7670 |
- fixupWithStore->contentAddendOnly = true; |
7671 |
---- ld64-236.3/src/ld/parsers/archive_file.cpp.orig 2015-01-23 06:55:36.000000000 +0100 |
7672 |
-+++ ld64-236.3/src/ld/parsers/archive_file.cpp 2015-01-23 06:56:04.000000000 +0100 |
7673 |
-@@ -232,8 +232,12 @@ |
7674 |
- |
7675 |
- template <> cpu_type_t File<x86>::architecture() { return CPU_TYPE_I386; } |
7676 |
- template <> cpu_type_t File<x86_64>::architecture() { return CPU_TYPE_X86_64; } |
7677 |
-+#if SUPPORT_ARCH_arm_any |
7678 |
- template <> cpu_type_t File<arm>::architecture() { return CPU_TYPE_ARM; } |
7679 |
-+#endif |
7680 |
-+#if SUPPORT_ARCH_arm64 |
7681 |
- template <> cpu_type_t File<arm64>::architecture() { return CPU_TYPE_ARM64; } |
7682 |
-+#endif |
7683 |
- |
7684 |
- |
7685 |
- template <typename A> |
7686 |
---- ld64-236.3/src/ld/parsers/macho_dylib_file.cpp.orig 2015-01-23 06:55:36.000000000 +0100 |
7687 |
-+++ ld64-236.3/src/ld/parsers/macho_dylib_file.cpp 2015-01-23 07:01:27.000000000 +0100 |
7688 |
-@@ -250,11 +250,15 @@ |
7689 |
- bool File<A>::_s_logHashtable = false; |
7690 |
- |
7691 |
- template <> const char* File<x86_64>::objCInfoSegmentName() { return "__DATA"; } |
7692 |
-+#if SUPPORT_ARCH_arm_any |
7693 |
- template <> const char* File<arm>::objCInfoSegmentName() { return "__DATA"; } |
7694 |
-+#endif |
7695 |
- template <typename A> const char* File<A>::objCInfoSegmentName() { return "__OBJC"; } |
7696 |
- |
7697 |
- template <> const char* File<x86_64>::objCInfoSectionName() { return "__objc_imageinfo"; } |
7698 |
-+#if SUPPORT_ARCH_arm_any |
7699 |
- template <> const char* File<arm>::objCInfoSectionName() { return "__objc_imageinfo"; } |
7700 |
-+#endif |
7701 |
- template <typename A> const char* File<A>::objCInfoSectionName() { return "__image_info"; } |
7702 |
- |
7703 |
- template <typename A> |
7704 |
-@@ -1006,6 +1010,7 @@ |
7705 |
- } |
7706 |
- } |
7707 |
- |
7708 |
-+#if SUPPORT_ARCH_arm_any |
7709 |
- template <> |
7710 |
- bool Parser<arm>::validFile(const uint8_t* fileContent, bool executableOrDyliborBundle) |
7711 |
- { |
7712 |
-@@ -1032,9 +1037,11 @@ |
7713 |
- return false; |
7714 |
- } |
7715 |
- } |
7716 |
-+#endif |
7717 |
- |
7718 |
- |
7719 |
- |
7720 |
-+#if SUPPORT_ARCH_arm64 |
7721 |
- template <> |
7722 |
- bool Parser<arm64>::validFile(const uint8_t* fileContent, bool executableOrDyliborBundle) |
7723 |
- { |
7724 |
-@@ -1061,6 +1068,7 @@ |
7725 |
- return false; |
7726 |
- } |
7727 |
- } |
7728 |
-+#endif |
7729 |
- |
7730 |
- |
7731 |
- bool isDylibFile(const uint8_t* fileContent, cpu_type_t* result, cpu_subtype_t* subResult) |
7732 |
-@@ -1084,17 +1084,21 @@ |
7733 |
- *subResult = CPU_SUBTYPE_X86_ALL; |
7734 |
- return true; |
7735 |
- } |
7736 |
-+#if SUPPORT_ARCH_arm_any |
7737 |
- if ( Parser<arm>::validFile(fileContent, false) ) { |
7738 |
- *result = CPU_TYPE_ARM; |
7739 |
- const macho_header<Pointer32<LittleEndian> >* header = (const macho_header<Pointer32<LittleEndian> >*)fileContent; |
7740 |
- *subResult = header->cpusubtype(); |
7741 |
- return true; |
7742 |
- } |
7743 |
-+#endif |
7744 |
-+#if SUPPORT_ARCH_arm64 |
7745 |
- if ( Parser<arm64>::validFile(fileContent, false) ) { |
7746 |
- *result = CPU_TYPE_ARM64; |
7747 |
- *subResult = CPU_SUBTYPE_ARM64_ALL; |
7748 |
- return true; |
7749 |
- } |
7750 |
-+#endif |
7751 |
- #ifdef SUPPORT_ARCH_ppc |
7752 |
- if ( Parser<ppc>::validFile(fileContent, false) ) { |
7753 |
- *result = CPU_TYPE_POWERPC; |
7754 |
-@@ -1123,6 +1135,7 @@ |
7755 |
- return "x86_64"; |
7756 |
- } |
7757 |
- |
7758 |
-+#if SUPPORT_ARCH_arm_any |
7759 |
- template <> |
7760 |
- const char* Parser<arm>::fileKind(const uint8_t* fileContent) |
7761 |
- { |
7762 |
-@@ -1138,6 +1151,7 @@ |
7763 |
- } |
7764 |
- return "arm???"; |
7765 |
- } |
7766 |
-+#endif |
7767 |
- |
7768 |
- #if SUPPORT_ARCH_arm64 |
7769 |
- template <> |
7770 |
-@@ -1163,9 +1177,11 @@ |
7771 |
- if ( Parser<x86>::validFile(fileContent, true) ) { |
7772 |
- return Parser<x86>::fileKind(fileContent); |
7773 |
- } |
7774 |
-+#if SUPPORT_ARCH_arm_any |
7775 |
- if ( Parser<arm>::validFile(fileContent, true) ) { |
7776 |
- return Parser<arm>::fileKind(fileContent); |
7777 |
- } |
7778 |
-+#endif |
7779 |
- #if SUPPORT_ARCH_arm64 |
7780 |
- if ( Parser<arm64>::validFile(fileContent, false) ) { |
7781 |
- return Parser<arm64>::fileKind(fileContent); |
7782 |
---- ld64-236.3/src/ld/parsers/macho_relocatable_file.cpp.orig 2015-01-23 06:55:36.000000000 +0100 |
7783 |
-+++ ld64-236.3/src/ld/parsers/macho_relocatable_file.cpp 2015-01-23 07:02:23.000000000 +0100 |
7784 |
-@@ -861,6 +861,7 @@ |
7785 |
- } |
7786 |
- } |
7787 |
- |
7788 |
-+#if SUPPORT_ARCH_arm_any |
7789 |
- template <> |
7790 |
- void Atom<arm>::verifyAlignment(const macho_section<P>&) const |
7791 |
- { |
7792 |
-@@ -869,6 +870,7 @@ |
7793 |
- warning("ARM function not 4-byte aligned: %s from %s", this->name(), this->file()->path()); |
7794 |
- } |
7795 |
- } |
7796 |
-+#endif |
7797 |
- |
7798 |
- #if SUPPORT_ARCH_arm64 |
7799 |
- template <> |
7800 |
-@@ -1218,6 +1220,7 @@ |
7801 |
- return true; |
7802 |
- } |
7803 |
- |
7804 |
-+#if SUPPORT_ARCH_arm_any |
7805 |
- template <> |
7806 |
- bool Parser<arm>::validFile(const uint8_t* fileContent, bool subtypeMustMatch, cpu_subtype_t subtype) |
7807 |
- { |
7808 |
-@@ -1238,8 +1241,10 @@ |
7809 |
- } |
7810 |
- return true; |
7811 |
- } |
7812 |
-+#endif |
7813 |
- |
7814 |
- |
7815 |
-+#if SUPPORT_ARCH_arm64 |
7816 |
- template <> |
7817 |
- bool Parser<arm64>::validFile(const uint8_t* fileContent, bool subtypeMustMatch, cpu_subtype_t subtype) |
7818 |
- { |
7819 |
-@@ -1252,6 +1257,7 @@ |
7820 |
- return false; |
7821 |
- return true; |
7822 |
- } |
7823 |
-+#endif |
7824 |
- |
7825 |
- |
7826 |
- template <> |
7827 |
-@@ -1276,6 +1282,7 @@ |
7828 |
- return "x86_64"; |
7829 |
- } |
7830 |
- |
7831 |
-+#if SUPPORT_ARCH_arm_any |
7832 |
- template <> |
7833 |
- const char* Parser<arm>::fileKind(const uint8_t* fileContent) |
7834 |
- { |
7835 |
-@@ -1291,6 +1298,7 @@ |
7836 |
- } |
7837 |
- return "arm???"; |
7838 |
- } |
7839 |
-+#endif |
7840 |
- |
7841 |
- #if SUPPORT_ARCH_arm64 |
7842 |
- template <> |
7843 |
-@@ -1802,8 +1810,12 @@ |
7844 |
- |
7845 |
- template <> uint8_t Parser<x86>::loadCommandSizeMask() { return 0x03; } |
7846 |
- template <> uint8_t Parser<x86_64>::loadCommandSizeMask() { return 0x07; } |
7847 |
-+#if SUPPORT_ARCH_arm_any |
7848 |
- template <> uint8_t Parser<arm>::loadCommandSizeMask() { return 0x03; } |
7849 |
-+#endif |
7850 |
-+#if SUPPORT_ARCH_arm64 |
7851 |
- template <> uint8_t Parser<arm64>::loadCommandSizeMask() { return 0x07; } |
7852 |
-+#endif |
7853 |
- |
7854 |
- template <typename A> |
7855 |
- bool Parser<A>::parseLoadCommands() |
7856 |
-@@ -3921,8 +3933,10 @@ |
7857 |
- return 1 + (this->_machOSection - parser.firstMachOSection()); |
7858 |
- } |
7859 |
- |
7860 |
-+#if SUPPORT_ARCH_arm_any |
7861 |
- // arm does not have zero cost exceptions |
7862 |
- template <> uint32_t CFISection<arm>::cfiCount() { return 0; } |
7863 |
-+#endif |
7864 |
- |
7865 |
- template <typename A> |
7866 |
- uint32_t CFISection<A>::cfiCount() |
7867 |
-@@ -4050,6 +4064,7 @@ |
7868 |
- |
7869 |
- |
7870 |
- |
7871 |
-+#if SUPPORT_ARCH_arm_any |
7872 |
- template <> |
7873 |
- void CFISection<arm>::cfiParse(class Parser<arm>& parser, uint8_t* buffer, |
7874 |
- libunwind::CFI_Atom_Info<CFISection<arm>::OAS>::CFI_Atom_Info cfiArray[], |
7875 |
-@@ -4058,6 +4073,7 @@ |
7876 |
- // arm does not use zero cost exceptions |
7877 |
- assert(count == 0); |
7878 |
- } |
7879 |
-+#endif |
7880 |
- |
7881 |
- template <> |
7882 |
- void CFISection<arm64>::cfiParse(class Parser<arm64>& parser, uint8_t* buffer, |
7883 |
-@@ -4159,8 +4175,12 @@ |
7884 |
- |
7885 |
- template <> bool CFISection<x86_64>::bigEndian() { return false; } |
7886 |
- template <> bool CFISection<x86>::bigEndian() { return false; } |
7887 |
-+#if SUPPORT_ARCH_arm_any |
7888 |
- template <> bool CFISection<arm>::bigEndian() { return false; } |
7889 |
-+#endif |
7890 |
-+#if SUPPORT_ARCH_arm64 |
7891 |
- template <> bool CFISection<arm64>::bigEndian() { return false; } |
7892 |
-+#endif |
7893 |
- |
7894 |
- |
7895 |
- template <> |
7896 |
-@@ -5077,11 +5097,13 @@ |
7897 |
- return ld::Fixup::kindStoreLittleEndian32; |
7898 |
- } |
7899 |
- |
7900 |
-+#if SUPPORT_ARCH_arm_any |
7901 |
- template <> |
7902 |
- ld::Fixup::Kind NonLazyPointerSection<arm>::fixupKind() |
7903 |
- { |
7904 |
- return ld::Fixup::kindStoreLittleEndian32; |
7905 |
- } |
7906 |
-+#endif |
7907 |
- |
7908 |
- template <> |
7909 |
- ld::Fixup::Kind NonLazyPointerSection<arm64>::fixupKind() |
7910 |
-@@ -7170,10 +7192,14 @@ |
7911 |
- return ( mach_o::relocatable::Parser<x86_64>::validFile(fileContent) ); |
7912 |
- case CPU_TYPE_I386: |
7913 |
- return ( mach_o::relocatable::Parser<x86>::validFile(fileContent) ); |
7914 |
-+#if SUPPORT_ARCH_arm_any |
7915 |
- case CPU_TYPE_ARM: |
7916 |
- return ( mach_o::relocatable::Parser<arm>::validFile(fileContent, opts.objSubtypeMustMatch, opts.subType) ); |
7917 |
-+#endif |
7918 |
-+#if SUPPORT_ARCH_arm64 |
7919 |
- case CPU_TYPE_ARM64: |
7920 |
- return ( mach_o::relocatable::Parser<arm64>::validFile(fileContent, opts.objSubtypeMustMatch, opts.subType) ); |
7921 |
-+#endif |
7922 |
- } |
7923 |
- return false; |
7924 |
- } |
7925 |
-@@ -7194,17 +7220,21 @@ |
7926 |
- *subResult = CPU_SUBTYPE_X86_ALL; |
7927 |
- return true; |
7928 |
- } |
7929 |
-+#if SUPPORT_ARCH_arm_any |
7930 |
- if ( mach_o::relocatable::Parser<arm>::validFile(fileContent, false, 0) ) { |
7931 |
- *result = CPU_TYPE_ARM; |
7932 |
- const macho_header<Pointer32<LittleEndian> >* header = (const macho_header<Pointer32<LittleEndian> >*)fileContent; |
7933 |
- *subResult = header->cpusubtype(); |
7934 |
- return true; |
7935 |
- } |
7936 |
-+#endif |
7937 |
-+#if SUPPORT_ARCH_arm_any |
7938 |
- if ( mach_o::relocatable::Parser<arm64>::validFile(fileContent, false, 0) ) { |
7939 |
- *result = CPU_TYPE_ARM64; |
7940 |
- *subResult = CPU_SUBTYPE_ARM64_ALL; |
7941 |
- return true; |
7942 |
- } |
7943 |
-+#endif |
7944 |
- return false; |
7945 |
- } |
7946 |
- |
7947 |
-@@ -7219,9 +7249,11 @@ |
7948 |
- if ( mach_o::relocatable::Parser<x86>::validFile(fileContent) ) { |
7949 |
- return mach_o::relocatable::Parser<x86>::fileKind(fileContent); |
7950 |
- } |
7951 |
-+#if SUPPORT_ARCH_arm_any |
7952 |
- if ( mach_o::relocatable::Parser<arm>::validFile(fileContent, false, 0) ) { |
7953 |
- return mach_o::relocatable::Parser<arm>::fileKind(fileContent); |
7954 |
- } |
7955 |
-+#endif |
7956 |
- return NULL; |
7957 |
- } |
7958 |
- |
7959 |
-@@ -7233,9 +7265,11 @@ |
7960 |
- if ( mach_o::relocatable::Parser<x86_64>::validFile(fileContent) ) { |
7961 |
- return mach_o::relocatable::Parser<x86_64>::hasObjC2Categories(fileContent); |
7962 |
- } |
7963 |
-+#if SUPPORT_ARCH_arm_any |
7964 |
- else if ( mach_o::relocatable::Parser<arm>::validFile(fileContent, false, 0) ) { |
7965 |
- return mach_o::relocatable::Parser<arm>::hasObjC2Categories(fileContent); |
7966 |
- } |
7967 |
-+#endif |
7968 |
- else if ( mach_o::relocatable::Parser<x86>::validFile(fileContent, false, 0) ) { |
7969 |
- return mach_o::relocatable::Parser<x86>::hasObjC2Categories(fileContent); |
7970 |
- } |
7971 |
---- ld64-236.3/src/ld/passes/branch_island.cpp.orig 2015-01-23 06:55:36.000000000 +0100 |
7972 |
-+++ ld64-236.3/src/ld/passes/branch_island.cpp 2015-01-23 06:56:04.000000000 +0100 |
7973 |
-@@ -284,6 +284,7 @@ |
7974 |
- static uint64_t textSizeWhenMightNeedBranchIslands(const Options& opts, bool seenThumbBranch) |
7975 |
- { |
7976 |
- switch ( opts.architecture() ) { |
7977 |
-+#if SUPPORT_ARCH_arm_any |
7978 |
- case CPU_TYPE_ARM: |
7979 |
- if ( ! seenThumbBranch ) |
7980 |
- return 32000000; // ARM can branch +/- 32MB |
7981 |
-@@ -292,6 +293,7 @@ |
7982 |
- else |
7983 |
- return 4000000; // thumb1 can branch +/- 4MB |
7984 |
- break; |
7985 |
-+#endif |
7986 |
- } |
7987 |
- assert(0 && "unexpected architecture"); |
7988 |
- return 0x100000000LL; |
7989 |
-@@ -301,6 +303,7 @@ |
7990 |
- static uint64_t maxDistanceBetweenIslands(const Options& opts, bool seenThumbBranch) |
7991 |
- { |
7992 |
- switch ( opts.architecture() ) { |
7993 |
-+#if SUPPORT_ARCH_arm_any |
7994 |
- case CPU_TYPE_ARM: |
7995 |
- if ( ! seenThumbBranch ) |
7996 |
- return 30*1024*1024; // 2MB of branch islands per 32MB |
7997 |
-@@ -309,6 +312,7 @@ |
7998 |
- else |
7999 |
- return 3500000; // 0.5MB of branch islands per 4MB |
8000 |
- break; |
8001 |
-+#endif |
8002 |
- } |
8003 |
- assert(0 && "unexpected architecture"); |
8004 |
- return 0x100000000LL; |
8005 |
-@@ -653,8 +657,10 @@ |
8006 |
- |
8007 |
- // only ARM needs branch islands |
8008 |
- switch ( opts.architecture() ) { |
8009 |
-+#if SUPPORT_ARCH_arm_any |
8010 |
- case CPU_TYPE_ARM: |
8011 |
- break; |
8012 |
-+#endif |
8013 |
- default: |
8014 |
- return; |
8015 |
- } |
8016 |
---- ld64-236.3/src/ld/passes/branch_shim.cpp.orig 2015-01-23 06:55:36.000000000 +0100 |
8017 |
-+++ ld64-236.3/src/ld/passes/branch_shim.cpp 2015-01-23 06:56:04.000000000 +0100 |
8018 |
-@@ -276,6 +276,9 @@ |
8019 |
- // |
8020 |
- void doPass(const Options& opts, ld::Internal& state) |
8021 |
- { |
8022 |
-+#if !SUPPORT_ARCH_arm_any |
8023 |
-+ return; |
8024 |
-+#else |
8025 |
- // only make branch shims in final linked images |
8026 |
- if ( opts.outputKind() == Options::kObjectFile ) |
8027 |
- return; |
8028 |
-@@ -386,6 +389,7 @@ |
8029 |
- // append all new shims to end of __text |
8030 |
- sect->atoms.insert(sect->atoms.end(), shims.begin(), shims.end()); |
8031 |
- } |
8032 |
-+#endif |
8033 |
- } |
8034 |
- |
8035 |
- |
8036 |
---- ld64-236.3/src/ld/passes/dtrace_dof.cpp.orig 2015-01-23 06:55:36.000000000 +0100 |
8037 |
-+++ ld64-236.3/src/ld/passes/dtrace_dof.cpp 2015-01-23 06:56:04.000000000 +0100 |
8038 |
-@@ -179,8 +179,12 @@ |
8039 |
- switch ( opts.architecture() ) { |
8040 |
- case CPU_TYPE_I386: |
8041 |
- case CPU_TYPE_X86_64: |
8042 |
-+#if SUPPORT_ARCH_arm_any |
8043 |
- case CPU_TYPE_ARM: |
8044 |
-+#endif |
8045 |
-+#if SUPPORT_ARCH_arm64 |
8046 |
- case CPU_TYPE_ARM64: |
8047 |
-+#endif |
8048 |
- storeKind = ld::Fixup::kindStoreLittleEndian32; |
8049 |
- break; |
8050 |
- default: |
8051 |
---- ld64-236.3/src/ld/passes/stubs/stubs.cpp.orig 2015-01-23 06:55:36.000000000 +0100 |
8052 |
-+++ ld64-236.3/src/ld/passes/stubs/stubs.cpp 2015-01-23 06:56:04.000000000 +0100 |
8053 |
-@@ -324,9 +324,11 @@ |
8054 |
- if ( _options.outputKind() != Options::kDynamicLibrary ) |
8055 |
- throwf("resolver functions (%s) can only be used in dylibs", atom->name()); |
8056 |
- if ( !_options.makeCompressedDyldInfo() ) { |
8057 |
-+#if SUPPORT_ARCH_arm_any |
8058 |
- if ( _options.architecture() == CPU_TYPE_ARM ) |
8059 |
- throwf("resolver functions (%s) can only be used when targeting iOS 4.2 or later", atom->name()); |
8060 |
- else |
8061 |
-+#endif |
8062 |
- throwf("resolver functions (%s) can only be used when targeting Mac OS X 10.6 or later", atom->name()); |
8063 |
- } |
8064 |
- stubFor[atom] = NULL; |
8065 |
-@@ -354,6 +356,7 @@ |
8066 |
- throw "symbol dyld_stub_binding_helper not found, normally in crt1.o/dylib1.o/bundle1.o"; |
8067 |
- |
8068 |
- // disable arm close stubs in some cases |
8069 |
-+#if SUPPORT_ARCH_arm_any |
8070 |
- if ( _architecture == CPU_TYPE_ARM ) { |
8071 |
- if ( codeSize > 4*1024*1024 ) |
8072 |
- _largeText = true; |
8073 |
-@@ -377,6 +380,7 @@ |
8074 |
- } |
8075 |
- } |
8076 |
- } |
8077 |
-+#endif |
8078 |
- |
8079 |
- // make stub atoms |
8080 |
- for (std::map<const ld::Atom*,ld::Atom*>::iterator it = stubFor.begin(); it != stubFor.end(); ++it) { |
8081 |
---- ld64-236.3/src/ld/Resolver.cpp.orig 2015-01-23 06:55:36.000000000 +0100 |
8082 |
-+++ ld64-236.3/src/ld/Resolver.cpp 2015-01-23 06:56:04.000000000 +0100 |
8083 |
-@@ -396,6 +396,7 @@ |
8084 |
- // update cpu-sub-type |
8085 |
- cpu_subtype_t nextObjectSubType = file.cpuSubType(); |
8086 |
- switch ( _options.architecture() ) { |
8087 |
-+#if SUPPORT_ARCH_arm_any |
8088 |
- case CPU_TYPE_ARM: |
8089 |
- if ( _options.subArchitecture() != nextObjectSubType ) { |
8090 |
- if ( (_options.subArchitecture() == CPU_SUBTYPE_ARM_ALL) && _options.forceCpuSubtypeAll() ) { |
8091 |
-@@ -414,6 +415,7 @@ |
8092 |
- } |
8093 |
- } |
8094 |
- break; |
8095 |
-+#endif |
8096 |
- |
8097 |
- case CPU_TYPE_I386: |
8098 |
- _internal.cpuSubType = CPU_SUBTYPE_I386_ALL; |
8099 |
---- ld64-236.3/src/other/machochecker.cpp.orig 2015-01-23 06:55:36.000000000 +0100 |
8100 |
-+++ ld64-236.3/src/other/machochecker.cpp 2015-01-23 06:56:04.000000000 +0100 |
8101 |
-@@ -252,6 +252,7 @@ |
8102 |
- return false; |
8103 |
- } |
8104 |
- |
8105 |
-+#if SUPPORT_ARCH_arm_any |
8106 |
- template <> |
8107 |
- bool MachOChecker<arm>::validFile(const uint8_t* fileContent) |
8108 |
- { |
8109 |
-@@ -269,6 +270,7 @@ |
8110 |
- } |
8111 |
- return false; |
8112 |
- } |
8113 |
-+#endif |
8114 |
- |
8115 |
- #if SUPPORT_ARCH_arm64 |
8116 |
- template <> |
8117 |
-@@ -294,7 +296,9 @@ |
8118 |
- template <> uint8_t MachOChecker<ppc64>::loadCommandSizeMask() { return 0x07; } |
8119 |
- template <> uint8_t MachOChecker<x86>::loadCommandSizeMask() { return 0x03; } |
8120 |
- template <> uint8_t MachOChecker<x86_64>::loadCommandSizeMask() { return 0x07; } |
8121 |
-+#if SUPPORT_ARCH_arm_any |
8122 |
- template <> uint8_t MachOChecker<arm>::loadCommandSizeMask() { return 0x03; } |
8123 |
-+#endif |
8124 |
- #if SUPPORT_ARCH_arm64 |
8125 |
- template <> uint8_t MachOChecker<arm64>::loadCommandSizeMask() { return 0x07; } |
8126 |
- #endif |
8127 |
-@@ -324,11 +328,13 @@ |
8128 |
- return threadInfo->thread_register(7); |
8129 |
- } |
8130 |
- |
8131 |
-+#if SUPPORT_ARCH_arm_any |
8132 |
- template <> |
8133 |
- arm::P::uint_t MachOChecker<arm>::getInitialStackPointer(const macho_thread_command<arm::P>* threadInfo) |
8134 |
- { |
8135 |
- return threadInfo->thread_register(13); |
8136 |
- } |
8137 |
-+#endif |
8138 |
- |
8139 |
- #if SUPPORT_ARCH_arm64 |
8140 |
- template <> |
8141 |
-@@ -362,11 +368,13 @@ |
8142 |
- return threadInfo->thread_register(16); |
8143 |
- } |
8144 |
- |
8145 |
-+#if SUPPORT_ARCH_arm_any |
8146 |
- template <> |
8147 |
- arm::P::uint_t MachOChecker<arm>::getEntryPoint(const macho_thread_command<arm::P>* threadInfo) |
8148 |
- { |
8149 |
- return threadInfo->thread_register(15); |
8150 |
- } |
8151 |
-+#endif |
8152 |
- |
8153 |
- #if SUPPORT_ARCH_arm64 |
8154 |
- template <> |
8155 |
-@@ -1025,6 +1033,7 @@ |
8156 |
- return fFirstWritableSegment->vmaddr(); |
8157 |
- } |
8158 |
- |
8159 |
-+#if SUPPORT_ARCH_arm_any |
8160 |
- template <> |
8161 |
- arm::P::uint_t MachOChecker<arm>::relocBase() |
8162 |
- { |
8163 |
-@@ -1033,6 +1042,7 @@ |
8164 |
- else |
8165 |
- return fFirstSegment->vmaddr(); |
8166 |
- } |
8167 |
-+#endif |
8168 |
- |
8169 |
- #if SUPPORT_ARCH_arm64 |
8170 |
- template <> |
8171 |
---- ld64-236.3/src/other/ObjectDump.cpp.orig 2015-01-23 06:55:36.000000000 +0100 |
8172 |
-+++ ld64-236.3/src/other/ObjectDump.cpp 2015-01-23 06:56:04.000000000 +0100 |
8173 |
-@@ -806,6 +806,7 @@ |
8174 |
- case ld::Fixup::kindStoreThumbHigh16: |
8175 |
- printf(", then store high-16 in Thumb movt"); |
8176 |
- break; |
8177 |
-+#if SUPPORT_ARCH_arm64 |
8178 |
- case ld::Fixup::kindStoreARM64Branch26: |
8179 |
- printf(", then store as ARM64 26-bit pcrel branch"); |
8180 |
- break; |
8181 |
-@@ -839,6 +840,7 @@ |
8182 |
- case ld::Fixup::kindStoreARM64PCRelToGOT: |
8183 |
- printf(", then store as 32-bit delta to GOT entry"); |
8184 |
- break; |
8185 |
-+#endif |
8186 |
- case ld::Fixup::kindDtraceExtra: |
8187 |
- printf("dtrace static probe extra info"); |
8188 |
- break; |
8189 |
-@@ -983,6 +985,7 @@ |
8190 |
- case ld::Fixup::kindSetTargetTLVTemplateOffsetLittleEndian64: |
8191 |
- printf("tlv template offset of %s", referenceTargetAtomName(ref)); |
8192 |
- break; |
8193 |
-+#if SUPPORT_ARCH_arm64 |
8194 |
- case ld::Fixup::kindStoreTargetAddressARM64Branch26: |
8195 |
- printf("ARM64 store 26-bit pcrel branch to %s", referenceTargetAtomName(ref)); |
8196 |
- break; |
8197 |
-@@ -1010,6 +1013,7 @@ |
8198 |
- case ld::Fixup::kindStoreTargetAddressARM64GOTLeaPageOff12: |
8199 |
- printf("ARM64 store 12-bit page offset of lea of %s", referenceTargetAtomName(ref)); |
8200 |
- break; |
8201 |
-+#endif |
8202 |
- //default: |
8203 |
- // printf("unknown fixup"); |
8204 |
- // break; |
8205 |
---- ld64-236.3/src/other/rebase.cpp.orig 2015-01-23 06:55:36.000000000 +0100 |
8206 |
-+++ ld64-236.3/src/other/rebase.cpp 2015-01-23 06:56:04.000000000 +0100 |
8207 |
-@@ -160,9 +160,11 @@ |
8208 |
- case CPU_TYPE_X86_64: |
8209 |
- fRebasers.push_back(new Rebaser<x86_64>(&p[fileOffset])); |
8210 |
- break; |
8211 |
-+#if SUPPORT_ARCH_arm_any |
8212 |
- case CPU_TYPE_ARM: |
8213 |
- fRebasers.push_back(new Rebaser<arm>(&p[fileOffset])); |
8214 |
- break; |
8215 |
-+#endif |
8216 |
- default: |
8217 |
- throw "unknown file format"; |
8218 |
- } |
8219 |
-@@ -186,9 +188,11 @@ |
8220 |
- else if ( (OSSwapLittleToHostInt32(mh->magic) == MH_MAGIC_64) && (OSSwapLittleToHostInt32(mh->cputype) == CPU_TYPE_X86_64)) { |
8221 |
- fRebasers.push_back(new Rebaser<x86_64>(mh)); |
8222 |
- } |
8223 |
-+#if SUPPORT_ARCH_arm_any |
8224 |
- else if ( (OSSwapLittleToHostInt32(mh->magic) == MH_MAGIC) && (OSSwapLittleToHostInt32(mh->cputype) == CPU_TYPE_ARM)) { |
8225 |
- fRebasers.push_back(new Rebaser<arm>(mh)); |
8226 |
- } |
8227 |
-+#endif |
8228 |
- else { |
8229 |
- throw "unknown file format"; |
8230 |
- } |
8231 |
-@@ -236,7 +240,9 @@ |
8232 |
- template <> cpu_type_t Rebaser<ppc64>::getArchitecture() const { return CPU_TYPE_POWERPC64; } |
8233 |
- template <> cpu_type_t Rebaser<x86>::getArchitecture() const { return CPU_TYPE_I386; } |
8234 |
- template <> cpu_type_t Rebaser<x86_64>::getArchitecture() const { return CPU_TYPE_X86_64; } |
8235 |
-+#if SUPPORT_ARCH_arm_any |
8236 |
- template <> cpu_type_t Rebaser<arm>::getArchitecture() const { return CPU_TYPE_ARM; } |
8237 |
-+#endif |
8238 |
- |
8239 |
- template <typename A> |
8240 |
- uint64_t Rebaser<A>::getBaseAddress() const |
8241 |
-@@ -875,8 +881,10 @@ |
8242 |
- return "i386"; |
8243 |
- case CPU_TYPE_X86_64: |
8244 |
- return "x86_64"; |
8245 |
-+#if SUPPORT_ARCH_arm_any |
8246 |
- case CPU_TYPE_ARM: |
8247 |
- return "arm"; |
8248 |
-+#endif |
8249 |
- } |
8250 |
- return "unknown"; |
8251 |
- } |
8252 |
-@@ -969,6 +977,7 @@ |
8253 |
- else if ( arch == CPU_TYPE_X86_64 ) { |
8254 |
- return 0x200000000ULL; |
8255 |
- } |
8256 |
-+#if SUPPORT_ARCH_arm_any |
8257 |
- else if ( arch == CPU_TYPE_ARM ) { |
8258 |
- // place dylibs below dyld |
8259 |
- uint64_t topAddr = 0x2FE00000; |
8260 |
-@@ -977,6 +986,7 @@ |
8261 |
- throwf("total size of images (0x%X) does not fit below 0x2FE00000", totalSize); |
8262 |
- return topAddr - totalSize; |
8263 |
- } |
8264 |
-+#endif |
8265 |
- else |
8266 |
- throw "unknown architecture"; |
8267 |
- } |
8268 |
-@@ -1043,7 +1053,9 @@ |
8269 |
- onlyArchs.insert(CPU_TYPE_POWERPC64); |
8270 |
- onlyArchs.insert(CPU_TYPE_I386); |
8271 |
- onlyArchs.insert(CPU_TYPE_X86_64); |
8272 |
-+#if SUPPORT_ARCH_arm_any |
8273 |
- onlyArchs.insert(CPU_TYPE_ARM); |
8274 |
-+#endif |
8275 |
- } |
8276 |
- |
8277 |
- // scan files and collect sizes |
8278 |
---- ld64-236.3/src/other/unwinddump.cpp.orig 2015-01-23 06:55:36.000000000 +0100 |
8279 |
-+++ ld64-236.3/src/other/unwinddump.cpp 2015-01-23 07:03:16.000000000 +0100 |
8280 |
-@@ -97,7 +97,9 @@ |
8281 |
- |
8282 |
- template <> const char* UnwindPrinter<x86>::archName() { return "i386"; } |
8283 |
- template <> const char* UnwindPrinter<x86_64>::archName() { return "x86_64"; } |
8284 |
-+#if SUPPORT_ARCH_arm_any |
8285 |
- template <> const char* UnwindPrinter<arm>::archName() { return "arm"; } |
8286 |
-+#endif |
8287 |
- #if SUPPORT_ARCH_arm64 |
8288 |
- template <> const char* UnwindPrinter<arm64>::archName() { return "arm64"; } |
8289 |
- #endif |
8290 |
|
8291 |
diff --git a/sys-devel/binutils-apple/files/ld64-236.3-nolto.patch b/sys-devel/binutils-apple/files/ld64-236.3-nolto.patch |
8292 |
deleted file mode 100644 |
8293 |
index 5d68c37..0000000 |
8294 |
--- a/sys-devel/binutils-apple/files/ld64-236.3-nolto.patch |
8295 |
+++ /dev/null |
8296 |
@@ -1,219 +0,0 @@ |
8297 |
-Allow to fully disable LTO |
8298 |
- |
8299 |
---- ld64-236.3/src/ld/InputFiles.cpp |
8300 |
-+++ ld64-236.3/src/ld/InputFiles.cpp |
8301 |
-@@ -59,7 +59,9 @@ |
8302 |
- #include "macho_relocatable_file.h" |
8303 |
- #include "macho_dylib_file.h" |
8304 |
- #include "archive_file.h" |
8305 |
-+#ifdef LTO |
8306 |
- #include "lto_file.h" |
8307 |
-+#endif |
8308 |
- #include "opaque_section_file.h" |
8309 |
- #include "MachOFileAbstraction.hpp" |
8310 |
- #include "Snapshot.h" |
8311 |
-@@ -187,9 +189,11 @@ |
8312 |
- if ( result != NULL ) |
8313 |
- return result; |
8314 |
- |
8315 |
-+#ifdef LTO |
8316 |
- result = lto::archName(p, len); |
8317 |
- if ( result != NULL ) |
8318 |
- return result; |
8319 |
-+#endif |
8320 |
- |
8321 |
- if ( strncmp((const char*)p, "!<arch>\n", 8) == 0 ) |
8322 |
- return "archive"; |
8323 |
-@@ -292,6 +296,7 @@ |
8324 |
- return objResult; |
8325 |
- } |
8326 |
- |
8327 |
-+#ifdef LTO |
8328 |
- // see if it is an llvm object file |
8329 |
- objResult = lto::parse(p, len, info.path, info.modTime, info.ordinal, _options.architecture(), _options.subArchitecture(), _options.logAllFiles(), _options.verboseOptimizationHints()); |
8330 |
- if ( objResult != NULL ) { |
8331 |
-@@ -299,6 +304,7 @@ |
8332 |
- OSAtomicIncrement32(&_totalObjectLoaded); |
8333 |
- return objResult; |
8334 |
- } |
8335 |
-+#endif |
8336 |
- |
8337 |
- // see if it is a dynamic library |
8338 |
- ld::dylib::File* dylibResult = mach_o::dylib::parse(p, len, info.path, info.modTime, _options, info.ordinal, info.options.fBundleLoader, indirectDylib); |
8339 |
-@@ -322,6 +328,7 @@ |
8340 |
- return archiveResult; |
8341 |
- } |
8342 |
- |
8343 |
-+#ifdef LTO |
8344 |
- // does not seem to be any valid linker input file, check LTO misconfiguration problems |
8345 |
- if ( lto::archName((uint8_t*)p, len) != NULL ) { |
8346 |
- if ( lto::libLTOisLoaded() ) { |
8347 |
-@@ -349,6 +356,7 @@ |
8348 |
- throwf("could not process llvm bitcode object file, because %s could not be loaded", libLTO); |
8349 |
- } |
8350 |
- } |
8351 |
-+#endif |
8352 |
- |
8353 |
- // error handling |
8354 |
- if ( ((fat_header*)p)->magic == OSSwapBigToHostInt32(FAT_MAGIC) ) { |
8355 |
---- ld64-236.3/src/ld/ld.cpp |
8356 |
-+++ ld64-236.3/src/ld/ld.cpp |
8357 |
-@@ -91,7 +91,9 @@ |
8358 |
- #include "parsers/archive_file.h" |
8359 |
- #include "parsers/macho_relocatable_file.h" |
8360 |
- #include "parsers/macho_dylib_file.h" |
8361 |
-+#ifdef LTO |
8362 |
- #include "parsers/lto_file.h" |
8363 |
-+#endif |
8364 |
- #include "parsers/opaque_section_file.h" |
8365 |
- |
8366 |
- |
8367 |
---- ld64-236.3/src/ld/Options.cpp |
8368 |
-+++ ld64-236.3/src/ld/Options.cpp |
8369 |
-@@ -41,10 +41,13 @@ |
8370 |
- #include "MachOFileAbstraction.hpp" |
8371 |
- #include "Snapshot.h" |
8372 |
- |
8373 |
-+ |
8374 |
-+#ifdef LTO |
8375 |
- // upward dependency on lto::version() |
8376 |
- namespace lto { |
8377 |
- extern const char* version(); |
8378 |
- } |
8379 |
-+#endif |
8380 |
- |
8381 |
- // magic to place command line in crash reports |
8382 |
- const int crashreporterBufferSize = 2000; |
8383 |
-@@ -3179,9 +3182,11 @@ |
8384 |
- fprintf(stderr, "configured to support archs: %s\n", ALL_SUPPORTED_ARCHS); |
8385 |
- // if only -v specified, exit cleanly |
8386 |
- if ( argc == 2 ) { |
8387 |
-+#ifdef LTO |
8388 |
- const char* ltoVers = lto::version(); |
8389 |
- if ( ltoVers != NULL ) |
8390 |
- fprintf(stderr, "LTO support using: %s\n", ltoVers); |
8391 |
-+#endif |
8392 |
- exit(0); |
8393 |
- } |
8394 |
- } |
8395 |
---- ld64-236.3/src/ld/parsers/archive_file.cpp |
8396 |
-+++ ld64-236.3/src/ld/parsers/archive_file.cpp |
8397 |
-@@ -45,7 +45,9 @@ |
8398 |
- #include "Architectures.hpp" |
8399 |
- |
8400 |
- #include "macho_relocatable_file.h" |
8401 |
-+#ifdef LTO |
8402 |
- #include "lto_file.h" |
8403 |
-+#endif |
8404 |
- #include "archive_file.h" |
8405 |
- |
8406 |
- |
8407 |
-@@ -97,8 +99,10 @@ |
8408 |
- private: |
8409 |
- static bool validMachOFile(const uint8_t* fileContent, uint64_t fileLength, |
8410 |
- const mach_o::relocatable::ParserOptions& opts); |
8411 |
-+#ifdef LTO |
8412 |
- static bool validLTOFile(const uint8_t* fileContent, uint64_t fileLength, |
8413 |
- const mach_o::relocatable::ParserOptions& opts); |
8414 |
-+#endif |
8415 |
- static cpu_type_t architecture(); |
8416 |
- |
8417 |
- class Entry : ar_hdr |
8418 |
-@@ -242,11 +246,13 @@ |
8419 |
- return mach_o::relocatable::isObjectFile(fileContent, fileLength, opts); |
8420 |
- } |
8421 |
- |
8422 |
-+#ifdef LTO |
8423 |
- template <typename A> |
8424 |
- bool File<A>::validLTOFile(const uint8_t* fileContent, uint64_t fileLength, const mach_o::relocatable::ParserOptions& opts) |
8425 |
- { |
8426 |
- return lto::isObjectFile(fileContent, fileLength, opts.architecture, opts.subType); |
8427 |
- } |
8428 |
-+#endif |
8429 |
- |
8430 |
- |
8431 |
- |
8432 |
-@@ -267,7 +273,11 @@ |
8433 |
- if ( (p==start) && ((strcmp(memberName, SYMDEF_SORTED) == 0) || (strcmp(memberName, SYMDEF) == 0)) ) |
8434 |
- continue; |
8435 |
- // archive is valid if first .o file is valid |
8436 |
-- return (validMachOFile(p->content(), p->contentSize(), opts) || validLTOFile(p->content(), p->contentSize(), opts)); |
8437 |
-+ return (validMachOFile(p->content(), p->contentSize(), opts) |
8438 |
-+#ifdef LTO |
8439 |
-+ || validLTOFile(p->content(), p->contentSize(), opts) |
8440 |
-+#endif |
8441 |
-+ ); |
8442 |
- } |
8443 |
- // empty archive |
8444 |
- return true; |
8445 |
-@@ -388,6 +398,7 @@ |
8446 |
- _instantiatedEntries[member] = state; |
8447 |
- return _instantiatedEntries[member]; |
8448 |
- } |
8449 |
-+#ifdef LTO |
8450 |
- // see if member is llvm bitcode file |
8451 |
- result = lto::parse(member->content(), member->contentSize(), |
8452 |
- mPath, member->modificationTime(), ordinal, |
8453 |
-@@ -397,6 +408,7 @@ |
8454 |
- _instantiatedEntries[member] = state; |
8455 |
- return _instantiatedEntries[member]; |
8456 |
- } |
8457 |
-+#endif |
8458 |
- |
8459 |
- throwf("archive member '%s' with length %d is not mach-o or llvm bitcode", memberName, member->contentSize()); |
8460 |
- } |
8461 |
---- ld64-236.3/src/ld/Resolver.cpp |
8462 |
-+++ ld64-236.3/src/ld/Resolver.cpp |
8463 |
-@@ -56,7 +56,9 @@ |
8464 |
- #include "InputFiles.h" |
8465 |
- #include "SymbolTable.h" |
8466 |
- #include "Resolver.h" |
8467 |
-+#ifdef LTO |
8468 |
- #include "parsers/lto_file.h" |
8469 |
-+#endif |
8470 |
- |
8471 |
- |
8472 |
- namespace ld { |
8473 |
-@@ -1438,6 +1440,7 @@ |
8474 |
- |
8475 |
- void Resolver::linkTimeOptimize() |
8476 |
- { |
8477 |
-+#ifdef LTO |
8478 |
- // only do work here if some llvm obj files where loaded |
8479 |
- if ( ! _haveLLVMObjs ) |
8480 |
- return; |
8481 |
-@@ -1535,6 +1538,9 @@ |
8482 |
- // check new code does not override some dylib |
8483 |
- this->checkDylibSymbolCollisions(); |
8484 |
- } |
8485 |
-+#else |
8486 |
-+ return; |
8487 |
-+#endif |
8488 |
- } |
8489 |
- |
8490 |
- |
8491 |
---- ld64-236.3/src/other/ObjectDump.cpp |
8492 |
-+++ ld64-236.3/src/other/ObjectDump.cpp |
8493 |
-@@ -33,7 +33,9 @@ |
8494 |
- |
8495 |
- #include "MachOFileAbstraction.hpp" |
8496 |
- #include "parsers/macho_relocatable_file.h" |
8497 |
-+#ifdef LTO |
8498 |
- #include "parsers/lto_file.h" |
8499 |
-+#endif |
8500 |
- |
8501 |
- static bool sDumpContent= true; |
8502 |
- static bool sDumpStabs = false; |
8503 |
-@@ -1249,10 +1251,12 @@ |
8504 |
- if ( objResult != NULL ) |
8505 |
- return objResult; |
8506 |
- |
8507 |
-+#ifdef LTO |
8508 |
- // see if it is an llvm object file |
8509 |
- objResult = lto::parse(p, fileLen, path, stat_buf.st_mtime, ld::File::Ordinal::NullOrdinal(), sPreferredArch, sPreferredSubArch, false, true); |
8510 |
- if ( objResult != NULL ) |
8511 |
- return objResult; |
8512 |
-+#endif |
8513 |
- |
8514 |
- throwf("not a mach-o object file: %s", path); |
8515 |
- #else |
8516 |
|
8517 |
diff --git a/sys-devel/binutils-apple/files/ld64-236.3-noppc.patch b/sys-devel/binutils-apple/files/ld64-236.3-noppc.patch |
8518 |
deleted file mode 100644 |
8519 |
index 85e9d94..0000000 |
8520 |
--- a/sys-devel/binutils-apple/files/ld64-236.3-noppc.patch |
8521 |
+++ /dev/null |
8522 |
@@ -1,26 +0,0 @@ |
8523 |
-Allow to fully disable powerpc. |
8524 |
- |
8525 |
---- ld64-236.3/src/ld/parsers/macho_dylib_file.cpp.orig 2015-01-23 17:59:55.000000000 +0100 |
8526 |
-+++ ld64-236.3/src/ld/parsers/macho_dylib_file.cpp 2015-01-23 18:00:04.000000000 +0100 |
8527 |
-@@ -1095,17 +1095,21 @@ |
8528 |
- *subResult = CPU_SUBTYPE_ARM64_ALL; |
8529 |
- return true; |
8530 |
- } |
8531 |
-+#ifdef SUPPORT_ARCH_ppc |
8532 |
- if ( Parser<ppc>::validFile(fileContent, false) ) { |
8533 |
- *result = CPU_TYPE_POWERPC; |
8534 |
- const macho_header<Pointer32<BigEndian> >* header = (const macho_header<Pointer32<BigEndian> >*)fileContent; |
8535 |
- *subResult = header->cpusubtype(); |
8536 |
- return true; |
8537 |
- } |
8538 |
-+#endif |
8539 |
-+#ifdef SUPPORT_ARCH_ppc64 |
8540 |
- if ( Parser<ppc64>::validFile(fileContent, false) ) { |
8541 |
- *result = CPU_TYPE_POWERPC64; |
8542 |
- *subResult = CPU_SUBTYPE_POWERPC_ALL; |
8543 |
- return true; |
8544 |
- } |
8545 |
-+#endif |
8546 |
- return false; |
8547 |
- } |
8548 |
- |
8549 |
|
8550 |
diff --git a/sys-devel/binutils-apple/files/ld64-236.3-nosnapshots.patch b/sys-devel/binutils-apple/files/ld64-236.3-nosnapshots.patch |
8551 |
deleted file mode 100644 |
8552 |
index aa75a03..0000000 |
8553 |
--- a/sys-devel/binutils-apple/files/ld64-236.3-nosnapshots.patch |
8554 |
+++ /dev/null |
8555 |
@@ -1,644 +0,0 @@ |
8556 |
-Allow to disable snapshot support because of missing Block API on OS X < 10.6. |
8557 |
- |
8558 |
---- ld64-236.3/src/ld/ld.cpp.orig 2015-01-16 14:49:49.000000000 -0800 |
8559 |
-+++ ld64-236.3/src/ld/ld.cpp 2015-01-16 14:50:42.000000000 -0800 |
8560 |
-@@ -1072,11 +1072,13 @@ |
8561 |
- // implement assert() function to print out a backtrace before aborting |
8562 |
- void __assert_rtn(const char* func, const char* file, int line, const char* failedexpr) |
8563 |
- { |
8564 |
-+#ifdef SUPPORT_SNAPSHOTS |
8565 |
- Snapshot *snapshot = Snapshot::globalSnapshot; |
8566 |
- |
8567 |
- snapshot->setSnapshotMode(Snapshot::SNAPSHOT_DEBUG); |
8568 |
- snapshot->createSnapshot(); |
8569 |
- snapshot->recordAssertionMessage("Assertion failed: (%s), function %s, file %s, line %d.\n", failedexpr, func, file, line); |
8570 |
-+#endif |
8571 |
- |
8572 |
- void* callStack[128]; |
8573 |
- int depth = ::backtrace(callStack, 128); |
8574 |
-@@ -1094,9 +1096,13 @@ |
8575 |
- } |
8576 |
- long offset = (uintptr_t)callStack[i] - (uintptr_t)info.dli_saddr; |
8577 |
- fprintf(stderr, "%d %p %s + %ld\n", i, callStack[i], symboName, offset); |
8578 |
-+#ifdef SUPPORT_SNAPSHOTS |
8579 |
- snapshot->recordAssertionMessage("%d %p %s + %ld\n", i, callStack[i], symboName, offset); |
8580 |
-+#endif |
8581 |
- } |
8582 |
-+#ifdef SUPPORT_SNAPSHOTS |
8583 |
- fprintf(stderr, "A linker snapshot was created at:\n\t%s\n", snapshot->rootDir()); |
8584 |
-+#endif |
8585 |
- fprintf(stderr, "ld: Assertion failed: (%s), function %s, file %s, line %d.\n", failedexpr, func, file, line); |
8586 |
- exit(1); |
8587 |
- } |
8588 |
---- ld64-236.3/src/ld/Options.cpp.orig 2015-01-16 14:49:49.000000000 -0800 |
8589 |
-+++ ld64-236.3/src/ld/Options.cpp 2015-01-16 14:50:42.000000000 -0800 |
8590 |
-@@ -182,7 +182,11 @@ |
8591 |
- fGenerateDtraceDOF(true), fAllowBranchIslands(true), |
8592 |
- fDebugInfoStripping(kDebugInfoMinimal), fTraceOutputFile(NULL), |
8593 |
- fMacVersionMin(ld::macVersionUnset), fIOSVersionMin(ld::iOSVersionUnset), |
8594 |
-- fSaveTempFiles(false), fSnapshotRequested(false), fPipelineFifo(NULL), |
8595 |
-+ fSaveTempFiles(false), |
8596 |
-+#ifdef SUPPORT_SNAPSHOTS |
8597 |
-+ fSnapshotRequested(false), |
8598 |
-+#endif |
8599 |
-+ fPipelineFifo(NULL), |
8600 |
- fDependencyInfoPath(NULL), fDependencyFileDescriptor(-1) |
8601 |
- { |
8602 |
- this->checkForClassic(argc, argv); |
8603 |
-@@ -577,7 +581,9 @@ |
8604 |
- } |
8605 |
- break; |
8606 |
- } |
8607 |
-+#ifdef SUPPORT_SNAPSHOTS |
8608 |
- fLinkSnapshot.recordArch(fArchitectureName); |
8609 |
-+#endif |
8610 |
- // only use compressed LINKEDIT for: |
8611 |
- // Mac OS X 10.6 or later |
8612 |
- // iOS 3.1 or later |
8613 |
-@@ -1822,8 +1828,10 @@ |
8614 |
- // |
8615 |
- void Options::parse(int argc, const char* argv[]) |
8616 |
- { |
8617 |
-+#ifdef SUPPORT_SNAPSHOTS |
8618 |
- // Store the original args in the link snapshot. |
8619 |
- fLinkSnapshot.recordRawArgs(argc, argv); |
8620 |
-+#endif |
8621 |
- |
8622 |
- // pass one builds search list from -L and -F options |
8623 |
- this->buildSearchPaths(argc, argv); |
8624 |
-@@ -1836,17 +1844,21 @@ |
8625 |
- const char* arg = argv[i]; |
8626 |
- |
8627 |
- if ( arg[0] == '-' ) { |
8628 |
-+#ifdef SUPPORT_SNAPSHOTS |
8629 |
- // by default, copy one arg to the snapshot link command, and do no file copying |
8630 |
- int snapshotArgIndex = i; |
8631 |
- int snapshotArgCount = -1; // -1 means compute count based on change in index |
8632 |
- int snapshotFileArgIndex = -1; // -1 means no data file parameter to arg |
8633 |
-+#endif |
8634 |
- |
8635 |
- // Since we don't care about the files passed, just the option names, we do this here. |
8636 |
- if (fPrintOptions) |
8637 |
- fprintf (stderr, "[Logging ld64 options]\t%s\n", arg); |
8638 |
- |
8639 |
- if ( (arg[1] == 'L') || (arg[1] == 'F') ) { |
8640 |
-+#ifdef SUPPORT_SNAPSHOTS |
8641 |
- snapshotArgCount = 0; // stripped out of link snapshot |
8642 |
-+#endif |
8643 |
- if (arg[2] == '\0') |
8644 |
- ++i; |
8645 |
- // previously handled by buildSearchPaths() |
8646 |
-@@ -1893,12 +1905,16 @@ |
8647 |
- fOutputKind = kKextBundle; |
8648 |
- } |
8649 |
- else if ( strcmp(arg, "-o") == 0 ) { |
8650 |
-- snapshotArgCount = 0; |
8651 |
- fOutputFile = argv[++i]; |
8652 |
-+#ifdef SUPPORT_SNAPSHOTS |
8653 |
-+ snapshotArgCount = 0; |
8654 |
- fLinkSnapshot.setSnapshotName(fOutputFile); |
8655 |
-+#endif |
8656 |
- } |
8657 |
- else if ( strncmp(arg, "-lazy-l", 7) == 0 ) { |
8658 |
-+#ifdef SUPPORT_SNAPSHOTS |
8659 |
- snapshotArgCount = 0; |
8660 |
-+#endif |
8661 |
- FileInfo info = findLibrary(&arg[7], true); |
8662 |
- info.options.fLazyLoad = true; |
8663 |
- info.ordinal = ld::File::Ordinal::makeArgOrdinal((uint16_t)i); |
8664 |
-@@ -1906,13 +1922,17 @@ |
8665 |
- fUsingLazyDylibLinking = true; |
8666 |
- } |
8667 |
- else if ( strcmp(arg, "-lto_library") == 0 ) { |
8668 |
-+#ifdef SUPPORT_SNAPSHOTS |
8669 |
- snapshotFileArgIndex = 1; |
8670 |
-+#endif |
8671 |
- fOverridePathlibLTO = argv[++i]; |
8672 |
- if ( fOverridePathlibLTO == NULL ) |
8673 |
- throw "missing argument to -lto_library"; |
8674 |
- } |
8675 |
- else if ( (arg[1] == 'l') && (strncmp(arg,"-lazy_",6) !=0) ) { |
8676 |
-+#ifdef SUPPORT_SNAPSHOTS |
8677 |
- snapshotArgCount = 0; |
8678 |
-+#endif |
8679 |
- FileInfo info = findLibrary(&arg[2]); |
8680 |
- info.ordinal = ld::File::Ordinal::makeArgOrdinal((uint16_t)i); |
8681 |
- addLibrary(info); |
8682 |
-@@ -1920,8 +1940,10 @@ |
8683 |
- // This causes a dylib to be weakly bound at |
8684 |
- // link time. This corresponds to weak_import. |
8685 |
- else if ( strncmp(arg, "-weak-l", 7) == 0 ) { |
8686 |
-+#ifdef SUPPORT_SNAPSHOTS |
8687 |
- // SNAPSHOT FIXME: what should we do for link snapshots? (ignore for now) |
8688 |
- snapshotArgCount = 0; |
8689 |
-+#endif |
8690 |
- FileInfo info = findLibrary(&arg[7]); |
8691 |
- info.options.fWeakImport = true; |
8692 |
- info.ordinal = ld::File::Ordinal::makeArgOrdinal((uint16_t)i); |
8693 |
-@@ -1979,12 +2001,16 @@ |
8694 |
- else if ( strcmp(arg, "-sectorder") == 0 ) { |
8695 |
- if ( (argv[i+1]==NULL) || (argv[i+2]==NULL) || (argv[i+3]==NULL) ) |
8696 |
- throw "-sectorder missing <segment> <section> <file-path>"; |
8697 |
-+#ifdef SUPPORT_SNAPSHOTS |
8698 |
- snapshotFileArgIndex = 3; |
8699 |
-+#endif |
8700 |
- parseSectionOrderFile(argv[i+1], argv[i+2], argv[i+3]); |
8701 |
- i += 3; |
8702 |
- } |
8703 |
- else if ( strcmp(arg, "-order_file") == 0 ) { |
8704 |
-+#ifdef SUPPORT_SNAPSHOTS |
8705 |
- snapshotFileArgIndex = 1; |
8706 |
-+#endif |
8707 |
- parseOrderFile(argv[++i], false); |
8708 |
- } |
8709 |
- else if ( strcmp(arg, "-order_file_statistics") == 0 ) { |
8710 |
-@@ -1995,7 +2021,9 @@ |
8711 |
- else if ( (strcmp(arg, "-sectcreate") == 0) || (strcmp(arg, "-segcreate") == 0) ) { |
8712 |
- if ( (argv[i+1]==NULL) || (argv[i+2]==NULL) || (argv[i+3]==NULL) ) |
8713 |
- throw "-sectcreate missing <segment> <section> <file-path>"; |
8714 |
-+#ifdef SUPPORT_SNAPSHOTS |
8715 |
- snapshotFileArgIndex = 3; |
8716 |
-+#endif |
8717 |
- addSection(argv[i+1], argv[i+2], argv[i+3]); |
8718 |
- i += 3; |
8719 |
- } |
8720 |
-@@ -2024,7 +2052,9 @@ |
8721 |
- } |
8722 |
- // Same as -@ from the FSF linker. |
8723 |
- else if ( strcmp(arg, "-filelist") == 0 ) { |
8724 |
-+#ifdef SUPPORT_SNAPSHOTS |
8725 |
- snapshotArgCount = 0; |
8726 |
-+#endif |
8727 |
- const char* path = argv[++i]; |
8728 |
- if ( (path == NULL) || (path[0] == '-') ) |
8729 |
- throw "-filelist missing <path>"; |
8730 |
-@@ -2051,7 +2081,9 @@ |
8731 |
- } |
8732 |
- } |
8733 |
- else if ( strcmp(arg, "-interposable_list") == 0 ) { |
8734 |
-+#ifdef SUPPORT_SNAPSHOTS |
8735 |
- snapshotFileArgIndex = 1; |
8736 |
-+#endif |
8737 |
- fInterposeMode = kInterposeSome; |
8738 |
- loadExportFile(argv[++i], "-interposable_list", fInterposeList); |
8739 |
- } |
8740 |
-@@ -2060,14 +2092,18 @@ |
8741 |
- fInterposeMode = kInterposeNone; |
8742 |
- } |
8743 |
- else if ( strcmp(arg, "-exported_symbols_list") == 0 ) { |
8744 |
-+#ifdef SUPPORT_SNAPSHOTS |
8745 |
- snapshotFileArgIndex = 1; |
8746 |
-+#endif |
8747 |
- if ( fExportMode == kDontExportSome ) |
8748 |
- throw "can't use -exported_symbols_list and -unexported_symbols_list"; |
8749 |
- fExportMode = kExportSome; |
8750 |
- loadExportFile(argv[++i], "-exported_symbols_list", fExportSymbols); |
8751 |
- } |
8752 |
- else if ( strcmp(arg, "-unexported_symbols_list") == 0 ) { |
8753 |
-+#ifdef SUPPORT_SNAPSHOTS |
8754 |
- snapshotFileArgIndex = 1; |
8755 |
-+#endif |
8756 |
- if ( fExportMode == kExportSome ) |
8757 |
- throw "can't use -unexported_symbols_list and -exported_symbols_list"; |
8758 |
- fExportMode = kDontExportSome; |
8759 |
-@@ -2086,14 +2122,18 @@ |
8760 |
- fDontExportSymbols.insert(argv[++i]); |
8761 |
- } |
8762 |
- else if ( strcmp(arg, "-non_global_symbols_no_strip_list") == 0 ) { |
8763 |
-+#ifdef SUPPORT_SNAPSHOTS |
8764 |
- snapshotFileArgIndex = 1; |
8765 |
-+#endif |
8766 |
- if ( fLocalSymbolHandling == kLocalSymbolsSelectiveExclude ) |
8767 |
- throw "can't use -non_global_symbols_no_strip_list and -non_global_symbols_strip_list"; |
8768 |
- fLocalSymbolHandling = kLocalSymbolsSelectiveInclude; |
8769 |
- loadExportFile(argv[++i], "-non_global_symbols_no_strip_list", fLocalSymbolsIncluded); |
8770 |
- } |
8771 |
- else if ( strcmp(arg, "-non_global_symbols_strip_list") == 0 ) { |
8772 |
-+#ifdef SUPPORT_SNAPSHOTS |
8773 |
- snapshotFileArgIndex = 1; |
8774 |
-+#endif |
8775 |
- if ( fLocalSymbolHandling == kLocalSymbolsSelectiveInclude ) |
8776 |
- throw "can't use -non_global_symbols_no_strip_list and -non_global_symbols_strip_list"; |
8777 |
- fLocalSymbolHandling = kLocalSymbolsSelectiveExclude; |
8778 |
-@@ -2109,16 +2149,20 @@ |
8779 |
- } |
8780 |
- // Similar to -weak-l but uses the absolute path name to the library. |
8781 |
- else if ( strcmp(arg, "-weak_library") == 0 ) { |
8782 |
-+#ifdef SUPPORT_SNAPSHOTS |
8783 |
- // SNAPSHOT FIXME: what should we do for link snapshots? (ignore for now) |
8784 |
- snapshotArgCount = 0; |
8785 |
-+#endif |
8786 |
- FileInfo info = findFile(argv[++i]); |
8787 |
- info.options.fWeakImport = true; |
8788 |
- info.ordinal = ld::File::Ordinal::makeArgOrdinal((uint16_t)i); |
8789 |
- addLibrary(info); |
8790 |
- } |
8791 |
- else if ( strcmp(arg, "-lazy_library") == 0 ) { |
8792 |
-+#ifdef SUPPORT_SNAPSHOTS |
8793 |
- // SNAPSHOT FIXME: what should we do for link snapshots? (ignore for now) |
8794 |
- snapshotArgCount = 0; |
8795 |
-+#endif |
8796 |
- FileInfo info = findFile(argv[++i]); |
8797 |
- info.options.fLazyLoad = true; |
8798 |
- info.ordinal = ld::File::Ordinal::makeArgOrdinal((uint16_t)i); |
8799 |
-@@ -2126,22 +2170,28 @@ |
8800 |
- fUsingLazyDylibLinking = true; |
8801 |
- } |
8802 |
- else if ( strcmp(arg, "-framework") == 0 ) { |
8803 |
-+#ifdef SUPPORT_SNAPSHOTS |
8804 |
- snapshotArgCount = 0; |
8805 |
-+#endif |
8806 |
- FileInfo info = findFramework(argv[++i]); |
8807 |
- info.ordinal = ld::File::Ordinal::makeArgOrdinal((uint16_t)i); |
8808 |
- addLibrary(info); |
8809 |
- } |
8810 |
- else if ( strcmp(arg, "-weak_framework") == 0 ) { |
8811 |
-+#ifdef SUPPORT_SNAPSHOTS |
8812 |
- // SNAPSHOT FIXME: what should we do for link snapshots? (ignore for now) |
8813 |
- snapshotArgCount = 0; |
8814 |
-+#endif |
8815 |
- FileInfo info = findFramework(argv[++i]); |
8816 |
- info.options.fWeakImport = true; |
8817 |
- info.ordinal = ld::File::Ordinal::makeArgOrdinal((uint16_t)i); |
8818 |
- addLibrary(info); |
8819 |
- } |
8820 |
- else if ( strcmp(arg, "-lazy_framework") == 0 ) { |
8821 |
-+#ifdef SUPPORT_SNAPSHOTS |
8822 |
- // SNAPSHOT FIXME: what should we do for link snapshots? (ignore for now) |
8823 |
- snapshotArgCount = 0; |
8824 |
-+#endif |
8825 |
- FileInfo info = findFramework(argv[++i]); |
8826 |
- info.options.fLazyLoad = true; |
8827 |
- info.ordinal = ld::File::Ordinal::makeArgOrdinal((uint16_t)i); |
8828 |
-@@ -2219,8 +2269,10 @@ |
8829 |
- // This should probably be deprecated when we respect -L and -F |
8830 |
- // when searching for libraries. |
8831 |
- else if ( strcmp(arg, "-dylib_file") == 0 ) { |
8832 |
-+#ifdef SUPPORT_SNAPSHOTS |
8833 |
- // ignore for snapshot because a stub dylib will be created in the snapshot |
8834 |
- snapshotArgCount = 0; |
8835 |
-+#endif |
8836 |
- addDylibOverride(argv[++i]); |
8837 |
- } |
8838 |
- // What to expand @executable_path to if found in dependent dylibs |
8839 |
-@@ -2277,7 +2329,9 @@ |
8840 |
- } |
8841 |
- // ??? Deprecate when we get rid of basing at build time. |
8842 |
- else if ( strcmp(arg, "-seg_addr_table") == 0 ) { |
8843 |
-+#ifdef SUPPORT_SNAPSHOTS |
8844 |
- snapshotFileArgIndex = 1; |
8845 |
-+#endif |
8846 |
- const char* name = argv[++i]; |
8847 |
- if ( name == NULL ) |
8848 |
- throw "-seg_addr_table missing argument"; |
8849 |
-@@ -2341,7 +2395,9 @@ |
8850 |
- i += 2; |
8851 |
- } |
8852 |
- else if ( strcmp(arg, "-bundle_loader") == 0 ) { |
8853 |
-+#ifdef SUPPORT_SNAPSHOTS |
8854 |
- snapshotFileArgIndex = 1; |
8855 |
-+#endif |
8856 |
- fBundleLoader = argv[++i]; |
8857 |
- if ( (fBundleLoader == NULL) || (fBundleLoader[0] == '-') ) |
8858 |
- throw "-bundle_loader missing <path>"; |
8859 |
-@@ -2573,7 +2629,9 @@ |
8860 |
- // previously handled by buildSearchPaths() |
8861 |
- } |
8862 |
- else if ( strcmp(arg, "-syslibroot") == 0 ) { |
8863 |
-+#ifdef SUPPORT_SNAPSHOTS |
8864 |
- snapshotArgCount = 0; |
8865 |
-+#endif |
8866 |
- ++i; |
8867 |
- // previously handled by buildSearchPaths() |
8868 |
- } |
8869 |
-@@ -2584,7 +2642,9 @@ |
8870 |
- fUUIDMode = kUUIDRandom; |
8871 |
- } |
8872 |
- else if ( strcmp(arg, "-dtrace") == 0 ) { |
8873 |
-+#ifdef SUPPORT_SNAPSHOTS |
8874 |
- snapshotFileArgIndex = 1; |
8875 |
-+#endif |
8876 |
- const char* name = argv[++i]; |
8877 |
- if ( name == NULL ) |
8878 |
- throw "-dtrace missing argument"; |
8879 |
-@@ -2607,7 +2667,9 @@ |
8880 |
- fAliases.push_back(pair); |
8881 |
- } |
8882 |
- else if ( strcmp(arg, "-alias_list") == 0 ) { |
8883 |
-+#ifdef SUPPORT_SNAPSHOTS |
8884 |
- snapshotFileArgIndex = 1; |
8885 |
-+#endif |
8886 |
- parseAliasFile(argv[++i]); |
8887 |
- } |
8888 |
- else if ( strcmp(arg, "-save-temps") == 0 ) { |
8889 |
-@@ -2638,48 +2700,60 @@ |
8890 |
- fDisablePositionIndependentExecutable = true; |
8891 |
- } |
8892 |
- else if ( strncmp(arg, "-reexport-l", 11) == 0 ) { |
8893 |
-+#ifdef SUPPORT_SNAPSHOTS |
8894 |
- // SNAPSHOT FIXME: what should we do for link snapshots? (ignore for now) |
8895 |
- snapshotArgCount = 0; |
8896 |
-+#endif |
8897 |
- FileInfo info = findLibrary(&arg[11], true); |
8898 |
- info.options.fReExport = true; |
8899 |
- info.ordinal = ld::File::Ordinal::makeArgOrdinal((uint16_t)i); |
8900 |
- addLibrary(info); |
8901 |
- } |
8902 |
- else if ( strcmp(arg, "-reexport_library") == 0 ) { |
8903 |
-+#ifdef SUPPORT_SNAPSHOTS |
8904 |
- // SNAPSHOT FIXME: what should we do for link snapshots? (ignore for now) |
8905 |
- snapshotArgCount = 0; |
8906 |
-+#endif |
8907 |
- FileInfo info = findFile(argv[++i]); |
8908 |
- info.options.fReExport = true; |
8909 |
- info.ordinal = ld::File::Ordinal::makeArgOrdinal((uint16_t)i); |
8910 |
- addLibrary(info); |
8911 |
- } |
8912 |
- else if ( strcmp(arg, "-reexport_framework") == 0 ) { |
8913 |
-+#ifdef SUPPORT_SNAPSHOTS |
8914 |
- // SNAPSHOT FIXME: what should we do for link snapshots? (ignore for now) |
8915 |
- snapshotArgCount = 0; |
8916 |
-+#endif |
8917 |
- FileInfo info = findFramework(argv[++i]); |
8918 |
- info.options.fReExport = true; |
8919 |
- info.ordinal = ld::File::Ordinal::makeArgOrdinal((uint16_t)i); |
8920 |
- addLibrary(info); |
8921 |
- } |
8922 |
- else if ( strncmp(arg, "-upward-l", 9) == 0 ) { |
8923 |
-+#ifdef SUPPORT_SNAPSHOTS |
8924 |
- // SNAPSHOT FIXME: what should we do for link snapshots? (ignore for now) |
8925 |
- snapshotArgCount = 0; |
8926 |
-+#endif |
8927 |
- FileInfo info = findLibrary(&arg[9], true); |
8928 |
- info.options.fUpward = true; |
8929 |
- info.ordinal = ld::File::Ordinal::makeArgOrdinal((uint16_t)i); |
8930 |
- addLibrary(info); |
8931 |
- } |
8932 |
- else if ( strcmp(arg, "-upward_library") == 0 ) { |
8933 |
-+#ifdef SUPPORT_SNAPSHOTS |
8934 |
- // SNAPSHOT FIXME: what should we do for link snapshots? (ignore for now) |
8935 |
- snapshotArgCount = 0; |
8936 |
-+#endif |
8937 |
- FileInfo info = findFile(argv[++i]); |
8938 |
- info.options.fUpward = true; |
8939 |
- info.ordinal = ld::File::Ordinal::makeArgOrdinal((uint16_t)i); |
8940 |
- addLibrary(info); |
8941 |
- } |
8942 |
- else if ( strcmp(arg, "-upward_framework") == 0 ) { |
8943 |
-+#ifdef SUPPORT_SNAPSHOTS |
8944 |
- // SNAPSHOT FIXME: what should we do for link snapshots? (ignore for now) |
8945 |
- snapshotArgCount = 0; |
8946 |
-+#endif |
8947 |
- FileInfo info = findFramework(argv[++i]); |
8948 |
- info.options.fUpward = true; |
8949 |
- info.ordinal = ld::File::Ordinal::makeArgOrdinal((uint16_t)i); |
8950 |
-@@ -2733,7 +2807,9 @@ |
8951 |
- fMarkDeadStrippableDylib = true; |
8952 |
- } |
8953 |
- else if ( strcmp(arg, "-exported_symbols_order") == 0 ) { |
8954 |
-+#ifdef SUPPORT_SNAPSHOTS |
8955 |
- snapshotFileArgIndex = 1; |
8956 |
-+#endif |
8957 |
- loadSymbolOrderFile(argv[++i], fExportSymbolsOrder); |
8958 |
- } |
8959 |
- else if ( strcmp(arg, "-no_compact_linkedit") == 0 ) { |
8960 |
-@@ -2825,11 +2901,15 @@ |
8961 |
- fObjcCategoryMerging = false; |
8962 |
- } |
8963 |
- else if ( strcmp(arg, "-force_symbols_weak_list") == 0 ) { |
8964 |
-+#ifdef SUPPORT_SNAPSHOTS |
8965 |
- snapshotFileArgIndex = 1; |
8966 |
-+#endif |
8967 |
- loadExportFile(argv[++i], "-force_symbols_weak_list", fForceWeakSymbols); |
8968 |
- } |
8969 |
- else if ( strcmp(arg, "-force_symbols_not_weak_list") == 0 ) { |
8970 |
-+#ifdef SUPPORT_SNAPSHOTS |
8971 |
- snapshotFileArgIndex = 1; |
8972 |
-+#endif |
8973 |
- loadExportFile(argv[++i], "-force_symbols_not_weak_list", fForceNotWeakSymbols); |
8974 |
- } |
8975 |
- else if ( strcmp(arg, "-force_symbol_weak") == 0 ) { |
8976 |
-@@ -2845,7 +2925,9 @@ |
8977 |
- fForceNotWeakSymbols.insert(symbol); |
8978 |
- } |
8979 |
- else if ( strcmp(arg, "-reexported_symbols_list") == 0 ) { |
8980 |
-+#ifdef SUPPORT_SNAPSHOTS |
8981 |
- snapshotFileArgIndex = 1; |
8982 |
-+#endif |
8983 |
- if ( fExportMode == kExportSome ) |
8984 |
- throw "can't use -exported_symbols_list and -reexported_symbols_list"; |
8985 |
- loadExportFile(argv[++i], "-reexported_symbols_list", fReExportSymbols); |
8986 |
-@@ -2861,6 +2943,7 @@ |
8987 |
- else if ( strcmp(arg, "-page_align_data_atoms") == 0 ) { |
8988 |
- fPageAlignDataAtoms = true; |
8989 |
- } |
8990 |
-+#ifdef SUPPORT_SNAPSHOTS |
8991 |
- else if (strcmp(arg, "-debug_snapshot") == 0) { |
8992 |
- fLinkSnapshot.setSnapshotMode(Snapshot::SNAPSHOT_DEBUG); |
8993 |
- fSnapshotRequested = true; |
8994 |
-@@ -2873,6 +2956,7 @@ |
8995 |
- fLinkSnapshot.setSnapshotPath(path); |
8996 |
- fSnapshotRequested = true; |
8997 |
- } |
8998 |
-+#endif |
8999 |
- else if ( strcmp(arg, "-new_main") == 0 ) { |
9000 |
- fEntryPointLoadCommandForceOn = true; |
9001 |
- } |
9002 |
-@@ -2914,7 +2998,9 @@ |
9003 |
- fExportDynamic = true; |
9004 |
- } |
9005 |
- else if ( strcmp(arg, "-force_symbols_coalesce_list") == 0 ) { |
9006 |
-+#ifdef SUPPORT_SNAPSHOTS |
9007 |
- snapshotFileArgIndex = 1; |
9008 |
-+#endif |
9009 |
- loadExportFile(argv[++i], "-force_symbols_coalesce_list", fForceCoalesceSymbols); |
9010 |
- } |
9011 |
- else if ( strcmp(arg, "-add_linker_option") == 0 ) { |
9012 |
-@@ -2984,10 +3070,12 @@ |
9013 |
- throwf("unknown option: %s", arg); |
9014 |
- } |
9015 |
- |
9016 |
-+#ifdef SUPPORT_SNAPSHOTS |
9017 |
- if (snapshotArgCount == -1) |
9018 |
- snapshotArgCount = i-snapshotArgIndex+1; |
9019 |
- if (snapshotArgCount > 0) |
9020 |
- fLinkSnapshot.addSnapshotLinkArg(snapshotArgIndex, snapshotArgCount, snapshotFileArgIndex); |
9021 |
-+#endif |
9022 |
- } |
9023 |
- else { |
9024 |
- FileInfo info = findFile(arg); |
9025 |
-@@ -3006,8 +3096,10 @@ |
9026 |
- addLibrary(info); |
9027 |
- } |
9028 |
- |
9029 |
-+#ifdef SUPPORT_SNAPSHOTS |
9030 |
- if (fSnapshotRequested) |
9031 |
- fLinkSnapshot.createSnapshot(); |
9032 |
-+#endif |
9033 |
- } |
9034 |
- |
9035 |
- |
9036 |
-@@ -3270,6 +3362,7 @@ |
9037 |
- if ( customDyldPath != NULL ) |
9038 |
- fDyldInstallPath = customDyldPath; |
9039 |
- |
9040 |
-+#ifdef SUPPORT_SNAPSHOTS |
9041 |
- const char* debugArchivePath = getenv("LD_DEBUG_SNAPSHOT"); |
9042 |
- if (debugArchivePath != NULL) { |
9043 |
- fLinkSnapshot.setSnapshotMode(Snapshot::SNAPSHOT_DEBUG); |
9044 |
-@@ -3277,6 +3370,7 @@ |
9045 |
- fLinkSnapshot.setSnapshotPath(debugArchivePath); |
9046 |
- fSnapshotRequested = true; |
9047 |
- } |
9048 |
-+#endif |
9049 |
- |
9050 |
- const char* pipeFdString = getenv("LD_PIPELINE_FIFO"); |
9051 |
- if (pipeFdString != NULL) { |
9052 |
-@@ -4133,7 +4227,9 @@ |
9053 |
- if ( strcmp(&lastSlash[1], subUmbrella) == 0 ) { |
9054 |
- info.options.fReExport = true; |
9055 |
- found = true; |
9056 |
-+#ifdef SUPPORT_SNAPSHOTS |
9057 |
- fLinkSnapshot.recordSubUmbrella(info.path); |
9058 |
-+#endif |
9059 |
- break; |
9060 |
- } |
9061 |
- } |
9062 |
-@@ -4156,7 +4252,9 @@ |
9063 |
- if ( strncmp(&lastSlash[1], subLibrary, dot-lastSlash-1) == 0 ) { |
9064 |
- info.options.fReExport = true; |
9065 |
- found = true; |
9066 |
-+#ifdef SUPPORT_SNAPSHOTS |
9067 |
- fLinkSnapshot.recordSubLibrary(info.path); |
9068 |
-+#endif |
9069 |
- break; |
9070 |
- } |
9071 |
- } |
9072 |
---- ld64-236.3/src/ld/Options.h.orig 2015-01-16 14:49:49.000000000 -0800 |
9073 |
-+++ ld64-236.3/src/ld/Options.h 2015-01-16 14:50:42.000000000 -0800 |
9074 |
-@@ -48,7 +48,9 @@ |
9075 |
- extern void throwf (const char* format, ...) __attribute__ ((noreturn,format(printf, 1, 2))); |
9076 |
- extern void warning(const char* format, ...) __attribute__((format(printf, 1, 2))); |
9077 |
- |
9078 |
-+#ifdef SUPPORT_SNAPSHOTS |
9079 |
- class Snapshot; |
9080 |
-+#endif |
9081 |
- |
9082 |
- class LibraryOptions |
9083 |
- { |
9084 |
-@@ -362,7 +364,9 @@ |
9085 |
- bool forceWeakNonWildCard(const char* symbolName) const; |
9086 |
- bool forceNotWeakNonWildcard(const char* symbolName) const; |
9087 |
- bool forceCoalesce(const char* symbolName) const; |
9088 |
-+#ifdef SUPPORT_SNAPSHOTS |
9089 |
- Snapshot& snapshot() const { return fLinkSnapshot; } |
9090 |
-+#endif |
9091 |
- bool errorBecauseOfWarnings() const; |
9092 |
- bool needsThreadLoadCommand() const { return fNeedsThreadLoadCommand; } |
9093 |
- bool needsEntryPointLoadCommand() const { return fEntryPointLoadCommand; } |
9094 |
-@@ -640,8 +644,10 @@ |
9095 |
- std::vector< std::vector<const char*> > fLinkerOptions; |
9096 |
- std::vector<SectionRename> fSectionRenames; |
9097 |
- bool fSaveTempFiles; |
9098 |
-+#ifdef SUPPORT_SNAPSHOTS |
9099 |
- mutable Snapshot fLinkSnapshot; |
9100 |
- bool fSnapshotRequested; |
9101 |
-+#endif |
9102 |
- const char* fPipelineFifo; |
9103 |
- const char* fDependencyInfoPath; |
9104 |
- mutable int fDependencyFileDescriptor; |
9105 |
---- ld64-236.3/src/ld/Snapshot.cpp.orig 2015-01-16 14:51:58.000000000 -0800 |
9106 |
-+++ ld64-236.3/src/ld/Snapshot.cpp 2015-01-16 14:50:42.000000000 -0800 |
9107 |
-@@ -6,6 +6,9 @@ |
9108 |
- // Copyright (c) 2011 Apple Inc. All rights reserved. |
9109 |
- // |
9110 |
- |
9111 |
-+#include "Snapshot.h" |
9112 |
-+ |
9113 |
-+#ifdef SUPPORT_SNAPSHOTS |
9114 |
- #include <string.h> |
9115 |
- #include <unistd.h> |
9116 |
- #include <stdio.h> |
9117 |
-@@ -17,7 +20,6 @@ |
9118 |
- #include <time.h> |
9119 |
- #include <Block.h> |
9120 |
- |
9121 |
--#include "Snapshot.h" |
9122 |
- #include "Options.h" |
9123 |
- |
9124 |
- #include "compile_stubs.h" |
9125 |
-@@ -538,3 +538,5 @@ |
9126 |
- } |
9127 |
- } |
9128 |
- } |
9129 |
-+ |
9130 |
-+#endif /* SUPPORT_SNAPSHOT */ |
9131 |
---- ld64-236.3/src/ld/Snapshot.h.orig 2015-01-23 07:59:55.000000000 +0100 |
9132 |
-+++ ld64-236.3/src/ld/Snapshot.h 2015-01-23 07:58:14.000000000 +0100 |
9133 |
-@@ -8,6 +8,8 @@ |
9134 |
- |
9135 |
- #ifndef ld64_Snapshot_h |
9136 |
- #define ld64_Snapshot_h |
9137 |
-+ |
9138 |
-+#ifdef SUPPORT_SNAPSHOTS |
9139 |
- #include <stdint.h> |
9140 |
- #include <string.h> |
9141 |
- #include <map> |
9142 |
-@@ -151,3 +153,5 @@ |
9143 |
- }; |
9144 |
- |
9145 |
- #endif |
9146 |
-+ |
9147 |
-+#endif |
9148 |
---- ld64-236.3/src/ld/InputFiles.cpp.orig 2015-01-16 14:54:33.000000000 -0800 |
9149 |
-+++ ld64-236.3/src/ld/InputFiles.cpp 2015-01-16 14:55:37.000000000 -0800 |
9150 |
-@@ -1101,7 +1101,9 @@ |
9151 |
- case ld::File::Reloc: |
9152 |
- { |
9153 |
- ld::relocatable::File* reloc = (ld::relocatable::File*)file; |
9154 |
-+#ifdef SUPPORT_SNAPSHOTS |
9155 |
- _options.snapshot().recordObjectFile(reloc->path()); |
9156 |
-+#endif |
9157 |
- if ( _options.dumpDependencyInfo() ) |
9158 |
- _options.dumpDependency(Options::depObjectFile, reloc->path()); |
9159 |
- } |
9160 |
-@@ -1201,7 +1203,9 @@ |
9161 |
- if ( dylibFile->justInTimeforEachAtom(name, handler) ) { |
9162 |
- // we found a definition in this dylib |
9163 |
- // done, unless it is a weak definition in which case we keep searching |
9164 |
-+#ifdef SUPPORT_SNAPSHOTS |
9165 |
- _options.snapshot().recordDylibSymbol(dylibFile, name); |
9166 |
-+#endif |
9167 |
- if ( !dylibFile->hasWeakExternals() || !dylibFile->hasWeakDefinition(name)) { |
9168 |
- return true; |
9169 |
- } |
9170 |
-@@ -1215,7 +1219,9 @@ |
9171 |
- if ( archiveFile->justInTimeDataOnlyforEachAtom(name, handler) ) { |
9172 |
- if ( _options.traceArchives() ) |
9173 |
- logArchive(archiveFile); |
9174 |
-+#ifdef SUPPORT_SNAPSHOTS |
9175 |
- _options.snapshot().recordArchive(archiveFile->path()); |
9176 |
-+#endif |
9177 |
- // found data definition in static library, done |
9178 |
- return true; |
9179 |
- } |
9180 |
-@@ -1224,7 +1230,9 @@ |
9181 |
- if ( archiveFile->justInTimeforEachAtom(name, handler) ) { |
9182 |
- if ( _options.traceArchives() ) |
9183 |
- logArchive(archiveFile); |
9184 |
-+#ifdef SUPPORT_SNAPSHOTS |
9185 |
- _options.snapshot().recordArchive(archiveFile->path()); |
9186 |
-+#endif |
9187 |
- // found definition in static library, done |
9188 |
- return true; |
9189 |
- } |
9190 |
-@@ -1251,7 +1259,9 @@ |
9191 |
- if ( dylibFile->justInTimeforEachAtom(name, handler) ) { |
9192 |
- // we found a definition in this dylib |
9193 |
- // done, unless it is a weak definition in which case we keep searching |
9194 |
-+#ifdef SUPPORT_SNAPSHOTS |
9195 |
- _options.snapshot().recordDylibSymbol(dylibFile, name); |
9196 |
-+#endif |
9197 |
- if ( !dylibFile->hasWeakExternals() || !dylibFile->hasWeakDefinition(name)) { |
9198 |
- return true; |
9199 |
- } |
9200 |
|
9201 |
diff --git a/sys-devel/binutils-apple/files/ld64-241.9-arm64-cputype.patch b/sys-devel/binutils-apple/files/ld64-241.9-arm64-cputype.patch |
9202 |
deleted file mode 100644 |
9203 |
index dd0a6f2..0000000 |
9204 |
--- a/sys-devel/binutils-apple/files/ld64-241.9-arm64-cputype.patch |
9205 |
+++ /dev/null |
9206 |
@@ -1,17 +0,0 @@ |
9207 |
-Remove redefinitions of CPU types that cause warnings and mask that some |
9208 |
-platform isn't actually supported on a host version. |
9209 |
- |
9210 |
-diff -ur ld64-241.9/src/abstraction/MachOFileAbstraction.hpp work/ld64-241.9/src/abstraction/MachOFileAbstraction.hpp |
9211 |
---- ld64-241.9/src/abstraction/MachOFileAbstraction.hpp 2014-11-04 00:30:51.000000000 +0100 |
9212 |
-+++ ld64-241.9/src/abstraction/MachOFileAbstraction.hpp 2015-01-22 21:31:58.000000000 +0100 |
9213 |
-@@ -253,10 +253,6 @@ |
9214 |
- |
9215 |
- |
9216 |
- |
9217 |
--// hack until arm64 headers are worked out |
9218 |
--#define CPU_TYPE_ARM64 (CPU_TYPE_ARM | CPU_ARCH_ABI64) |
9219 |
--#define CPU_SUBTYPE_ARM64_ALL 0 |
9220 |
--#define CPU_SUBTYPE_ARM64_V8 1 |
9221 |
- |
9222 |
- #define ARM64_RELOC_UNSIGNED 0 // for pointers |
9223 |
- #define ARM64_RELOC_SUBTRACTOR 1 // must be followed by a ARM64_RELOC_UNSIGNED |
9224 |
|
9225 |
diff --git a/sys-devel/binutils-apple/files/ld64-241.9-atomic-volatile.patch b/sys-devel/binutils-apple/files/ld64-241.9-atomic-volatile.patch |
9226 |
deleted file mode 100644 |
9227 |
index 294b05f..0000000 |
9228 |
--- a/sys-devel/binutils-apple/files/ld64-241.9-atomic-volatile.patch |
9229 |
+++ /dev/null |
9230 |
@@ -1,27 +0,0 @@ |
9231 |
-OSAtmicAdd and friends don't expect volatile parameters on OS X < 10.5. |
9232 |
- |
9233 |
-diff -ur ld64-241.9/src/ld/InputFiles.h ld64-241.9/src/ld/InputFiles.h |
9234 |
---- ld64-241.9/src/ld/InputFiles.h 2015-01-22 20:59:47.000000000 +0100 |
9235 |
-+++ ld64-241.9/src/ld/InputFiles.h 2015-01-22 20:19:51.000000000 +0100 |
9236 |
-@@ -86,11 +86,16 @@ |
9237 |
- void createIndirectDylibs(); |
9238 |
- |
9239 |
- // for -print_statistics |
9240 |
-- volatile int64_t _totalObjectSize; |
9241 |
-- volatile int64_t _totalArchiveSize; |
9242 |
-- volatile int32_t _totalObjectLoaded; |
9243 |
-- volatile int32_t _totalArchivesLoaded; |
9244 |
-- volatile int32_t _totalDylibsLoaded; |
9245 |
-+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050 |
9246 |
-+#define LD_ATOMIC_VOLATILE volatile |
9247 |
-+#else |
9248 |
-+#define LD_ATOMIC_VOLATILE |
9249 |
-+#endif |
9250 |
-+ LD_ATOMIC_VOLATILE int64_t _totalObjectSize; |
9251 |
-+ LD_ATOMIC_VOLATILE int64_t _totalArchiveSize; |
9252 |
-+ LD_ATOMIC_VOLATILE int32_t _totalObjectLoaded; |
9253 |
-+ LD_ATOMIC_VOLATILE int32_t _totalArchivesLoaded; |
9254 |
-+ LD_ATOMIC_VOLATILE int32_t _totalDylibsLoaded; |
9255 |
- |
9256 |
- |
9257 |
- private: |
9258 |
|
9259 |
diff --git a/sys-devel/binutils-apple/files/ld64-241.9-cc_md5.patch b/sys-devel/binutils-apple/files/ld64-241.9-cc_md5.patch |
9260 |
deleted file mode 100644 |
9261 |
index 833fec2..0000000 |
9262 |
--- a/sys-devel/binutils-apple/files/ld64-241.9-cc_md5.patch |
9263 |
+++ /dev/null |
9264 |
@@ -1,24 +0,0 @@ |
9265 |
-Provide CC_MD5 on OS X < 10.5. |
9266 |
- |
9267 |
---- ld64-241.9/src/ld/OutputFile.cpp 2015-01-22 23:20:33.000000000 +0100 |
9268 |
-+++ ld64-241.9/src/ld/OutputFile.cpp 2015-01-22 23:26:02.000000000 +0100 |
9269 |
-@@ -71,6 +71,19 @@ |
9270 |
- #include "LinkEdit.hpp" |
9271 |
- #include "LinkEditClassic.hpp" |
9272 |
- |
9273 |
-+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050 |
9274 |
-+/* CC_MD5 missing on < 10.5 - provide replacement */ |
9275 |
-+unsigned char *CC_MD5(const void *data, CC_LONG len, unsigned char *md) { |
9276 |
-+ CC_MD5_CTX ctx; |
9277 |
-+ if(md == NULL) |
9278 |
-+ return NULL; |
9279 |
-+ |
9280 |
-+ CC_MD5_Init(&ctx); |
9281 |
-+ CC_MD5_Update(&ctx, data, len); |
9282 |
-+ CC_MD5_Final(md, &ctx); |
9283 |
-+ return md; |
9284 |
-+} |
9285 |
-+#endif |
9286 |
- |
9287 |
- namespace ld { |
9288 |
- namespace tool { |
9289 |
|
9290 |
diff --git a/sys-devel/binutils-apple/files/ld64-241.9-extraneous-includes.patch b/sys-devel/binutils-apple/files/ld64-241.9-extraneous-includes.patch |
9291 |
deleted file mode 100644 |
9292 |
index f1fbbd8..0000000 |
9293 |
--- a/sys-devel/binutils-apple/files/ld64-241.9-extraneous-includes.patch |
9294 |
+++ /dev/null |
9295 |
@@ -1,13 +0,0 @@ |
9296 |
-Remove unneeded and sometimes missing headers. |
9297 |
- |
9298 |
-diff -ur ld64-241.9/src/ld/Options.cpp work/ld64-241.9/src/ld/Options.cpp |
9299 |
---- ld64-241.9/src/ld/Options.cpp 2015-01-22 21:42:04.000000000 +0100 |
9300 |
-+++ ld64-241.9/src/ld/Options.cpp 2015-01-22 21:45:15.000000000 +0100 |
9301 |
-@@ -31,7 +31,6 @@ |
9302 |
- #include <fcntl.h> |
9303 |
- #include <errno.h> |
9304 |
- #include <string.h> |
9305 |
--#include <spawn.h> |
9306 |
- #include <cxxabi.h> |
9307 |
- #include <Availability.h> |
9308 |
- |
9309 |
|
9310 |
diff --git a/sys-devel/binutils-apple/files/ld64-241.9-gcc.patch b/sys-devel/binutils-apple/files/ld64-241.9-gcc.patch |
9311 |
deleted file mode 100644 |
9312 |
index 06b735b..0000000 |
9313 |
--- a/sys-devel/binutils-apple/files/ld64-241.9-gcc.patch |
9314 |
+++ /dev/null |
9315 |
@@ -1,1029 +0,0 @@ |
9316 |
-Provide c++11 headers from tr1 include directory and namespace. |
9317 |
- |
9318 |
-Work around weird namespacing bug in gcc-4.2.1 where class ld::Section |
9319 |
-conflicts with template mach_o::relocatable::Section by renaming the latter to |
9320 |
-MRFSection (could possibly be done using sed from ebuild or avoided by figuring |
9321 |
-out, what's actually going on with those namespaces). |
9322 |
- |
9323 |
---- ./ld64-241.9/src/ld/InputFiles.h.gcc 2014-09-11 00:24:46.000000000 +0200 |
9324 |
-+++ ./ld64-241.9/src/ld/InputFiles.h 2015-01-12 22:12:18.000000000 +0100 |
9325 |
-@@ -46,6 +46,14 @@ |
9326 |
- #include <pthread.h> |
9327 |
- #endif |
9328 |
- |
9329 |
-+#ifdef __GLIBCXX__ |
9330 |
-+#include <tr1/unordered_map> |
9331 |
-+#define UNORDERED_MAP tr1::unordered_map |
9332 |
-+#else |
9333 |
-+#include <unordered_map> |
9334 |
-+#define UNORDERED_MAP unordered_map |
9335 |
-+#endif |
9336 |
-+ |
9337 |
- #include <vector> |
9338 |
- |
9339 |
- #include "Options.h" |
9340 |
-@@ -107,7 +115,7 @@ |
9341 |
- static void parseWorkerThread(InputFiles *inputFiles); |
9342 |
- void startThread(void (*threadFunc)(InputFiles *)) const; |
9343 |
- |
9344 |
-- typedef std::unordered_map<const char*, ld::dylib::File*, CStringHash, CStringEquals> InstallNameToDylib; |
9345 |
-+ typedef std::UNORDERED_MAP<const char*, ld::dylib::File*, CStringHash, CStringEquals> InstallNameToDylib; |
9346 |
- |
9347 |
- const Options& _options; |
9348 |
- std::vector<ld::File*> _inputFiles; |
9349 |
---- ./ld64-241.9/src/ld/ld.cpp.gcc 2014-09-11 00:24:46.000000000 +0200 |
9350 |
-+++ ./ld64-241.9/src/ld/ld.cpp 2015-01-12 22:12:18.000000000 +0100 |
9351 |
-@@ -54,7 +54,13 @@ |
9352 |
- #include <vector> |
9353 |
- #include <list> |
9354 |
- #include <algorithm> |
9355 |
-+#ifdef __GLIBCXX__ |
9356 |
-+#include <tr1/unordered_map> |
9357 |
-+#define UNORDERED_MAP tr1::unordered_map |
9358 |
-+#else |
9359 |
- #include <unordered_map> |
9360 |
-+#define UNORDERED_MAP unordered_map |
9361 |
-+#endif |
9362 |
- #include <cxxabi.h> |
9363 |
- |
9364 |
- #include "Options.h" |
9365 |
-@@ -149,7 +155,7 @@ |
9366 |
- struct SectionEquals { |
9367 |
- bool operator()(const ld::Section* left, const ld::Section* right) const; |
9368 |
- }; |
9369 |
-- typedef std::unordered_map<const ld::Section*, FinalSection*, SectionHash, SectionEquals> SectionInToOut; |
9370 |
-+ typedef std::UNORDERED_MAP<const ld::Section*, FinalSection*, SectionHash, SectionEquals> SectionInToOut; |
9371 |
- |
9372 |
- |
9373 |
- SectionInToOut _sectionInToFinalMap; |
9374 |
---- ./ld64-241.9/src/ld/ld.hpp.gcc 2014-09-11 00:24:46.000000000 +0200 |
9375 |
-+++ ./ld64-241.9/src/ld/ld.hpp 2015-01-12 22:12:18.000000000 +0100 |
9376 |
-@@ -32,7 +32,13 @@ |
9377 |
- #include <assert.h> |
9378 |
- |
9379 |
- #include <vector> |
9380 |
-+#ifdef __GLIBCXX__ |
9381 |
-+#include <tr1/unordered_set> |
9382 |
-+#define UNORDERED_SET tr1::unordered_set |
9383 |
-+#else |
9384 |
- #include <unordered_set> |
9385 |
-+#define UNORDERED_SET unordered_set |
9386 |
-+#endif |
9387 |
- |
9388 |
- #include "configure.h" |
9389 |
- |
9390 |
-@@ -822,7 +828,7 @@ |
9391 |
- bool operator()(const char* left, const char* right) const { return (strcmp(left, right) == 0); } |
9392 |
- }; |
9393 |
- |
9394 |
--typedef std::unordered_set<const char*, ld::CStringHash, ld::CStringEquals> CStringSet; |
9395 |
-+typedef std::UNORDERED_SET<const char*, ld::CStringHash, ld::CStringEquals> CStringSet; |
9396 |
- |
9397 |
- class Internal |
9398 |
- { |
9399 |
---- ./ld64-241.9/src/ld/LinkEditClassic.hpp.gcc 2014-09-11 00:24:46.000000000 +0200 |
9400 |
-+++ ./ld64-241.9/src/ld/LinkEditClassic.hpp 2015-01-12 22:12:18.000000000 +0100 |
9401 |
-@@ -31,8 +31,13 @@ |
9402 |
- #include <limits.h> |
9403 |
- #include <unistd.h> |
9404 |
- |
9405 |
--#include <vector> |
9406 |
-+#ifdef __GLIBCXX__ |
9407 |
-+#include <tr1/unordered_map> |
9408 |
-+#define UNORDERED_MAP tr1::unordered_map |
9409 |
-+#else |
9410 |
- #include <unordered_map> |
9411 |
-+#define UNORDERED_MAP unordered_map |
9412 |
-+#endif |
9413 |
- |
9414 |
- #include "Options.h" |
9415 |
- #include "ld.hpp" |
9416 |
-@@ -92,7 +97,7 @@ |
9417 |
- |
9418 |
- private: |
9419 |
- enum { kBufferSize = 0x01000000 }; |
9420 |
-- typedef std::unordered_map<const char*, int32_t, CStringHash, CStringEquals> StringToOffset; |
9421 |
-+ typedef std::UNORDERED_MAP<const char*, int32_t, CStringHash, CStringEquals> StringToOffset; |
9422 |
- |
9423 |
- const uint32_t _pointerSize; |
9424 |
- std::vector<char*> _fullBuffers; |
9425 |
---- ./ld64-241.9/src/ld/Options.cpp.gcc 2014-11-04 00:25:08.000000000 +0100 |
9426 |
-+++ ./ld64-241.9/src/ld/Options.cpp 2015-01-12 22:12:18.000000000 +0100 |
9427 |
-@@ -4548,7 +4548,7 @@ |
9428 |
- |
9429 |
- // make sure all required exported symbols exist |
9430 |
- std::vector<const char*> impliedExports; |
9431 |
-- for (NameSet::iterator it=fExportSymbols.regularBegin(); it != fExportSymbols.regularEnd(); ++it) { |
9432 |
-+ for (NameSet::const_iterator it=fExportSymbols.regularBegin(); it != fExportSymbols.regularEnd(); ++it) { |
9433 |
- const char* name = *it; |
9434 |
- const int len = strlen(name); |
9435 |
- if ( (strcmp(&name[len-3], ".eh") == 0) || (strncmp(name, ".objc_category_name_", 20) == 0) ) { |
9436 |
-@@ -4580,7 +4580,7 @@ |
9437 |
- } |
9438 |
- |
9439 |
- // make sure all required re-exported symbols exist |
9440 |
-- for (NameSet::iterator it=fReExportSymbols.regularBegin(); it != fReExportSymbols.regularEnd(); ++it) { |
9441 |
-+ for (NameSet::const_iterator it=fReExportSymbols.regularBegin(); it != fReExportSymbols.regularEnd(); ++it) { |
9442 |
- fInitialUndefines.push_back(*it); |
9443 |
- } |
9444 |
- |
9445 |
---- ./ld64-241.9/src/ld/Options.h.gcc 2014-11-04 00:29:32.000000000 +0100 |
9446 |
-+++ ./ld64-241.9/src/ld/Options.h 2015-01-12 22:12:18.000000000 +0100 |
9447 |
-@@ -30,8 +30,17 @@ |
9448 |
- #include <mach/machine.h> |
9449 |
- |
9450 |
- #include <vector> |
9451 |
-+#ifdef __GLIBCXX__ |
9452 |
-+#include <tr1/unordered_set> |
9453 |
-+#include <tr1/unordered_map> |
9454 |
-+#define UNORDERED_MAP tr1::unordered_map |
9455 |
-+#define UNORDERED_SET tr1::unordered_set |
9456 |
-+#else |
9457 |
- #include <unordered_set> |
9458 |
- #include <unordered_map> |
9459 |
-+#define UNORDERED_MAP unordered_map |
9460 |
-+#define UNORDERED_SET unordered_set |
9461 |
-+#endif |
9462 |
- |
9463 |
- #include "ld.hpp" |
9464 |
- #include "Snapshot.h" |
9465 |
-@@ -396,8 +405,8 @@ |
9466 |
- bool moveRwSymbol(const char* symName, const char* filePath, const char*& seg, bool& wildCardMatch) const; |
9467 |
- |
9468 |
- private: |
9469 |
-- typedef std::unordered_map<const char*, unsigned int, ld::CStringHash, ld::CStringEquals> NameToOrder; |
9470 |
-- typedef std::unordered_set<const char*, ld::CStringHash, ld::CStringEquals> NameSet; |
9471 |
-+ typedef std::UNORDERED_MAP<const char*, unsigned int, ld::CStringHash, ld::CStringEquals> NameToOrder; |
9472 |
-+ typedef std::UNORDERED_SET<const char*, ld::CStringHash, ld::CStringEquals> NameSet; |
9473 |
- enum ExportMode { kExportDefault, kExportSome, kDontExportSome }; |
9474 |
- enum LibrarySearchMode { kSearchDylibAndArchiveInEachDir, kSearchAllDirsForDylibsThenAllDirsForArchives }; |
9475 |
- enum InterposeMode { kInterposeNone, kInterposeAllExternal, kInterposeSome }; |
9476 |
-@@ -410,8 +419,8 @@ |
9477 |
- bool containsNonWildcard(const char*) const; |
9478 |
- bool empty() const { return fRegular.empty() && fWildCard.empty(); } |
9479 |
- bool hasWildCards() const { return !fWildCard.empty(); } |
9480 |
-- NameSet::iterator regularBegin() const { return fRegular.begin(); } |
9481 |
-- NameSet::iterator regularEnd() const { return fRegular.end(); } |
9482 |
-+ NameSet::const_iterator regularBegin() const { return fRegular.begin(); } |
9483 |
-+ NameSet::const_iterator regularEnd() const { return fRegular.end(); } |
9484 |
- void remove(const NameSet&); |
9485 |
- private: |
9486 |
- static bool hasWildCards(const char*); |
9487 |
---- ./ld64-241.9/src/ld/OutputFile.cpp.gcc 2014-09-11 00:24:46.000000000 +0200 |
9488 |
-+++ ./ld64-241.9/src/ld/OutputFile.cpp 2015-01-12 22:12:18.000000000 +0100 |
9489 |
-@@ -50,7 +50,13 @@ |
9490 |
- #include <vector> |
9491 |
- #include <list> |
9492 |
- #include <algorithm> |
9493 |
-+#ifdef __GLIBCXX__ |
9494 |
-+#include <tr1/unordered_set> |
9495 |
-+#define UNORDERED_SET tr1::unordered_set |
9496 |
-+#else |
9497 |
- #include <unordered_set> |
9498 |
-+#define UNORDERED_SET unordered_set |
9499 |
-+#endif |
9500 |
- |
9501 |
- #include <CommonCrypto/CommonDigest.h> |
9502 |
- #include <AvailabilityMacros.h> |
9503 |
-@@ -4748,7 +4754,7 @@ |
9504 |
- const char* filename = NULL; |
9505 |
- bool wroteStartSO = false; |
9506 |
- state.stabs.reserve(atomsNeedingDebugNotes.size()*4); |
9507 |
-- std::unordered_set<const char*, CStringHash, CStringEquals> seenFiles; |
9508 |
-+ std::UNORDERED_SET<const char*, CStringHash, CStringEquals> seenFiles; |
9509 |
- for (std::vector<const ld::Atom*>::iterator it=atomsNeedingDebugNotes.begin(); it != atomsNeedingDebugNotes.end(); it++) { |
9510 |
- const ld::Atom* atom = *it; |
9511 |
- const ld::File* atomFile = atom->file(); |
9512 |
---- ./ld64-241.9/src/ld/parsers/archive_file.cpp.gcc 2014-09-11 00:24:46.000000000 +0200 |
9513 |
-+++ ./ld64-241.9/src/ld/parsers/archive_file.cpp 2015-01-12 22:12:18.000000000 +0100 |
9514 |
-@@ -33,7 +33,13 @@ |
9515 |
- #include <set> |
9516 |
- #include <map> |
9517 |
- #include <algorithm> |
9518 |
-+#ifdef __GLIBCXX__ |
9519 |
-+#include <tr1/unordered_map> |
9520 |
-+#define UNORDERED_MAP tr1::unordered_map |
9521 |
-+#else |
9522 |
- #include <unordered_map> |
9523 |
-+#define UNORDERED_MAP unordered_map |
9524 |
-+#endif |
9525 |
- |
9526 |
- #include "MachOFileAbstraction.hpp" |
9527 |
- #include "Architectures.hpp" |
9528 |
-@@ -112,7 +118,7 @@ |
9529 |
- struct MemberState { ld::relocatable::File* file; const Entry *entry; bool logged; bool loaded; uint32_t index;}; |
9530 |
- bool loadMember(MemberState& state, ld::File::AtomHandler& handler, const char *format, ...) const; |
9531 |
- |
9532 |
-- typedef std::unordered_map<const char*, const struct ranlib*, ld::CStringHash, ld::CStringEquals> NameToEntryMap; |
9533 |
-+ typedef std::UNORDERED_MAP<const char*, const struct ranlib*, ld::CStringHash, ld::CStringEquals> NameToEntryMap; |
9534 |
- |
9535 |
- typedef typename A::P P; |
9536 |
- typedef typename A::P::E E; |
9537 |
---- ./ld64-241.9/src/ld/parsers/lto_file.cpp.gcc 2014-11-04 00:59:51.000000000 +0100 |
9538 |
-+++ ./ld64-241.9/src/ld/parsers/lto_file.cpp 2015-01-12 22:12:18.000000000 +0100 |
9539 |
-@@ -33,8 +33,17 @@ |
9540 |
- #include <pthread.h> |
9541 |
- #include <mach-o/dyld.h> |
9542 |
- #include <vector> |
9543 |
-+#ifdef __GLIBCXX__ |
9544 |
-+#include <tr1/unordered_set> |
9545 |
-+#include <tr1/unordered_map> |
9546 |
-+#define UNORDERED_MAP tr1::unordered_map |
9547 |
-+#define UNORDERED_SET tr1::unordered_set |
9548 |
-+#else |
9549 |
- #include <unordered_set> |
9550 |
- #include <unordered_map> |
9551 |
-+#define UNORDERED_MAP unordered_map |
9552 |
-+#define UNORDERED_SET unordered_set |
9553 |
-+#endif |
9554 |
- |
9555 |
- #include "MachOFileAbstraction.hpp" |
9556 |
- #include "Architectures.hpp" |
9557 |
-@@ -218,8 +227,8 @@ |
9558 |
- static void ltoDiagnosticHandler(lto_codegen_diagnostic_severity_t, const char*, void*); |
9559 |
- #endif |
9560 |
- |
9561 |
-- typedef std::unordered_set<const char*, ld::CStringHash, ld::CStringEquals> CStringSet; |
9562 |
-- typedef std::unordered_map<const char*, Atom*, ld::CStringHash, ld::CStringEquals> CStringToAtom; |
9563 |
-+ typedef std::UNORDERED_SET<const char*, ld::CStringHash, ld::CStringEquals> CStringSet; |
9564 |
-+ typedef std::UNORDERED_MAP<const char*, Atom*, ld::CStringHash, ld::CStringEquals> CStringToAtom; |
9565 |
- |
9566 |
- class AtomSyncer : public ld::File::AtomHandler { |
9567 |
- public: |
9568 |
---- ./ld64-241.9/src/ld/parsers/macho_dylib_file.cpp.gcc 2014-09-11 00:24:46.000000000 +0200 |
9569 |
-+++ ./ld64-241.9/src/ld/parsers/macho_dylib_file.cpp 2015-01-12 22:12:18.000000000 +0100 |
9570 |
-@@ -34,8 +34,17 @@ |
9571 |
- #include <vector> |
9572 |
- #include <set> |
9573 |
- #include <algorithm> |
9574 |
--#include <unordered_map> |
9575 |
-+#ifdef __GLIBCXX__ |
9576 |
-+#include <tr1/unordered_set> |
9577 |
-+#include <tr1/unordered_map> |
9578 |
-+#define UNORDERED_MAP tr1::unordered_map |
9579 |
-+#define UNORDERED_SET tr1::unordered_set |
9580 |
-+#else |
9581 |
- #include <unordered_set> |
9582 |
-+#include <unordered_map> |
9583 |
-+#define UNORDERED_MAP unordered_map |
9584 |
-+#define UNORDERED_SET unordered_set |
9585 |
-+#endif |
9586 |
- |
9587 |
- #include "Architectures.hpp" |
9588 |
- #include "MachOFileAbstraction.hpp" |
9589 |
-@@ -193,8 +202,8 @@ |
9590 |
- }; |
9591 |
- }; |
9592 |
- struct AtomAndWeak { ld::Atom* atom; bool weakDef; bool tlv; pint_t address; }; |
9593 |
-- typedef std::unordered_map<const char*, AtomAndWeak, ld::CStringHash, ld::CStringEquals> NameToAtomMap; |
9594 |
-- typedef std::unordered_set<const char*, CStringHash, ld::CStringEquals> NameSet; |
9595 |
-+ typedef std::UNORDERED_MAP<const char*, AtomAndWeak, ld::CStringHash, ld::CStringEquals> NameToAtomMap; |
9596 |
-+ typedef std::UNORDERED_SET<const char*, CStringHash, ld::CStringEquals> NameSet; |
9597 |
- |
9598 |
- struct Dependent { const char* path; File<A>* dylib; bool reExport; }; |
9599 |
- |
9600 |
-@@ -562,14 +571,18 @@ |
9601 |
- if ( _s_logHashtable ) fprintf(stderr, "ld: building hashtable of %u toc entries for %s\n", dynamicInfo->nextdefsym(), this->path()); |
9602 |
- const macho_nlist<P>* start = &symbolTable[dynamicInfo->iextdefsym()]; |
9603 |
- const macho_nlist<P>* end = &start[dynamicInfo->nextdefsym()]; |
9604 |
-+#ifndef __GLIBCXX__ |
9605 |
- _atoms.reserve(dynamicInfo->nextdefsym()); // set initial bucket count |
9606 |
-+#endif |
9607 |
- for (const macho_nlist<P>* sym=start; sym < end; ++sym) { |
9608 |
- this->addSymbol(&strings[sym->n_strx()], (sym->n_desc() & N_WEAK_DEF) != 0, false, sym->n_value()); |
9609 |
- } |
9610 |
- } |
9611 |
- else { |
9612 |
- int32_t count = dynamicInfo->ntoc(); |
9613 |
-+#ifndef __GLIBCXX__ |
9614 |
- _atoms.reserve(count); // set initial bucket count |
9615 |
-+#endif |
9616 |
- if ( _s_logHashtable ) fprintf(stderr, "ld: building hashtable of %u entries for %s\n", count, this->path()); |
9617 |
- const struct dylib_table_of_contents* toc = (dylib_table_of_contents*)(fileContent + dynamicInfo->tocoff()); |
9618 |
- for (int32_t i = 0; i < count; ++i) { |
9619 |
---- ./ld64-241.9/src/ld/parsers/macho_relocatable_file.cpp.gcc 2014-11-04 00:57:10.000000000 +0100 |
9620 |
-+++ ./ld64-241.9/src/ld/parsers/macho_relocatable_file.cpp 2015-01-12 22:22:53.000000000 +0100 |
9621 |
-@@ -62,7 +62,7 @@ |
9622 |
- // forward reference |
9623 |
- template <typename A> class Parser; |
9624 |
- template <typename A> class Atom; |
9625 |
--template <typename A> class Section; |
9626 |
-+template <typename A> class MRFSection; |
9627 |
- template <typename A> class CFISection; |
9628 |
- template <typename A> class CUSection; |
9629 |
- |
9630 |
-@@ -102,14 +102,14 @@ |
9631 |
- const uint8_t* fileContent() { return _fileContent; } |
9632 |
- private: |
9633 |
- friend class Atom<A>; |
9634 |
-- friend class Section<A>; |
9635 |
-+ friend class MRFSection<A>; |
9636 |
- friend class Parser<A>; |
9637 |
- friend class CFISection<A>::OAS; |
9638 |
- |
9639 |
- typedef typename A::P P; |
9640 |
- |
9641 |
- const uint8_t* _fileContent; |
9642 |
-- Section<A>** _sectionsArray; |
9643 |
-+ MRFSection<A>** _sectionsArray; |
9644 |
- uint8_t* _atomsArray; |
9645 |
- uint8_t* _aliasAtomsArray; |
9646 |
- uint32_t _sectionsArrayCount; |
9647 |
-@@ -134,14 +134,14 @@ |
9648 |
- |
9649 |
- |
9650 |
- template <typename A> |
9651 |
--class Section : public ld::Section |
9652 |
-+class MRFSection : public ld::Section |
9653 |
- { |
9654 |
- public: |
9655 |
- typedef typename A::P::uint_t pint_t; |
9656 |
- typedef typename A::P P; |
9657 |
- typedef typename A::P::E E; |
9658 |
- |
9659 |
-- virtual ~Section() { } |
9660 |
-+ virtual ~MRFSection() { } |
9661 |
- class File<A>& file() const { return _file; } |
9662 |
- const macho_section<P>* machoSection() const { return _machOSection; } |
9663 |
- uint32_t sectionNum(class Parser<A>&) const; |
9664 |
-@@ -165,10 +165,10 @@ |
9665 |
- static const char* makeSectionName(const macho_section<typename A::P>* s); |
9666 |
- |
9667 |
- protected: |
9668 |
-- Section(File<A>& f, const macho_section<typename A::P>* s) |
9669 |
-+ MRFSection(File<A>& f, const macho_section<typename A::P>* s) |
9670 |
- : ld::Section(makeSegmentName(s), makeSectionName(s), sectionType(s)), |
9671 |
- _file(f), _machOSection(s), _beginAtoms(NULL), _endAtoms(NULL), _hasAliases(false) { } |
9672 |
-- Section(File<A>& f, const char* segName, const char* sectName, ld::Section::Type t, bool hidden=false) |
9673 |
-+ MRFSection(File<A>& f, const char* segName, const char* sectName, ld::Section::Type t, bool hidden=false) |
9674 |
- : ld::Section(segName, sectName, t, hidden), _file(f), _machOSection(NULL), |
9675 |
- _beginAtoms(NULL), _endAtoms(NULL), _hasAliases(false) { } |
9676 |
- |
9677 |
-@@ -192,11 +192,11 @@ |
9678 |
- |
9679 |
- |
9680 |
- template <typename A> |
9681 |
--class CFISection : public Section<A> |
9682 |
-+class CFISection : public MRFSection<A> |
9683 |
- { |
9684 |
- public: |
9685 |
- CFISection(Parser<A>& parser, File<A>& f, const macho_section<typename A::P>* s) |
9686 |
-- : Section<A>(f, s) { } |
9687 |
-+ : MRFSection<A>(f, s) { } |
9688 |
- uint32_t cfiCount(Parser<A>& parser); |
9689 |
- |
9690 |
- virtual ld::Atom::ContentType contentType() { return ld::Atom::typeCFI; } |
9691 |
-@@ -256,11 +256,11 @@ |
9692 |
- |
9693 |
- |
9694 |
- template <typename A> |
9695 |
--class CUSection : public Section<A> |
9696 |
-+class CUSection : public MRFSection<A> |
9697 |
- { |
9698 |
- public: |
9699 |
- CUSection(Parser<A>& parser, File<A>& f, const macho_section<typename A::P>* s) |
9700 |
-- : Section<A>(f, s) { } |
9701 |
-+ : MRFSection<A>(f, s) { } |
9702 |
- |
9703 |
- typedef typename A::P::uint_t pint_t; |
9704 |
- typedef typename A::P P; |
9705 |
-@@ -297,11 +297,11 @@ |
9706 |
- |
9707 |
- |
9708 |
- template <typename A> |
9709 |
--class TentativeDefinitionSection : public Section<A> |
9710 |
-+class TentativeDefinitionSection : public MRFSection<A> |
9711 |
- { |
9712 |
- public: |
9713 |
- TentativeDefinitionSection(Parser<A>& parser, File<A>& f) |
9714 |
-- : Section<A>(f, "__DATA", "__comm/tent", ld::Section::typeTentativeDefs) {} |
9715 |
-+ : MRFSection<A>(f, "__DATA", "__comm/tent", ld::Section::typeTentativeDefs) {} |
9716 |
- |
9717 |
- virtual ld::Atom::ContentType contentType() { return ld::Atom::typeZeroFill; } |
9718 |
- virtual bool addFollowOnFixups() const { return false; } |
9719 |
-@@ -319,11 +319,11 @@ |
9720 |
- |
9721 |
- |
9722 |
- template <typename A> |
9723 |
--class AbsoluteSymbolSection : public Section<A> |
9724 |
-+class AbsoluteSymbolSection : public MRFSection<A> |
9725 |
- { |
9726 |
- public: |
9727 |
- AbsoluteSymbolSection(Parser<A>& parser, File<A>& f) |
9728 |
-- : Section<A>(f, "__DATA", "__abs", ld::Section::typeAbsoluteSymbols, true) {} |
9729 |
-+ : MRFSection<A>(f, "__DATA", "__abs", ld::Section::typeAbsoluteSymbols, true) {} |
9730 |
- |
9731 |
- virtual ld::Atom::ContentType contentType() { return ld::Atom::typeUnclassified; } |
9732 |
- virtual bool dontDeadStrip() { return false; } |
9733 |
-@@ -345,7 +345,7 @@ |
9734 |
- |
9735 |
- |
9736 |
- template <typename A> |
9737 |
--class SymboledSection : public Section<A> |
9738 |
-+class SymboledSection : public MRFSection<A> |
9739 |
- { |
9740 |
- public: |
9741 |
- SymboledSection(Parser<A>& parser, File<A>& f, const macho_section<typename A::P>* s); |
9742 |
-@@ -377,11 +377,11 @@ |
9743 |
- |
9744 |
- |
9745 |
- template <typename A> |
9746 |
--class ImplicitSizeSection : public Section<A> |
9747 |
-+class ImplicitSizeSection : public MRFSection<A> |
9748 |
- { |
9749 |
- public: |
9750 |
- ImplicitSizeSection(Parser<A>& parser, File<A>& f, const macho_section<typename A::P>* s) |
9751 |
-- : Section<A>(f, s) { } |
9752 |
-+ : MRFSection<A>(f, s) { } |
9753 |
- virtual uint32_t computeAtomCount(class Parser<A>& parser, struct Parser<A>::LabelAndCFIBreakIterator& it, const struct Parser<A>::CFI_CU_InfoArrays&); |
9754 |
- virtual uint32_t appendAtoms(class Parser<A>& parser, uint8_t* buffer, struct Parser<A>::LabelAndCFIBreakIterator& it, const struct Parser<A>::CFI_CU_InfoArrays&); |
9755 |
- protected: |
9756 |
-@@ -715,8 +715,8 @@ |
9757 |
- |
9758 |
- public: |
9759 |
- // methods for all atoms from mach-o object file |
9760 |
-- Section<A>& sect() const { return (Section<A>&)section(); } |
9761 |
-- File<A>& machofile() const { return ((Section<A>*)(this->_section))->file(); } |
9762 |
-+ MRFSection<A>& sect() const { return (MRFSection<A>&)section(); } |
9763 |
-+ File<A>& machofile() const { return ((MRFSection<A>*)(this->_section))->file(); } |
9764 |
- void setFixupsRange(uint32_t s, uint32_t c); |
9765 |
- void setUnwindInfoRange(uint32_t s, uint32_t c); |
9766 |
- void extendUnwindInfoRange(); |
9767 |
-@@ -733,7 +733,7 @@ |
9768 |
- typedef typename A::P::E E; |
9769 |
- typedef typename A::P::uint_t pint_t; |
9770 |
- // constuct via all attributes |
9771 |
-- Atom(Section<A>& sct, const char* nm, pint_t addr, uint64_t sz, |
9772 |
-+ Atom(MRFSection<A>& sct, const char* nm, pint_t addr, uint64_t sz, |
9773 |
- ld::Atom::Definition d, ld::Atom::Combine c, ld::Atom::Scope s, |
9774 |
- ld::Atom::ContentType ct, ld::Atom::SymbolTableInclusion i, |
9775 |
- bool dds, bool thumb, bool al, ld::Atom::Alignment a) |
9776 |
-@@ -743,7 +743,7 @@ |
9777 |
- _unwindInfoStartIndex(0), _fixupsCount(0), |
9778 |
- _lineInfoCount(0), _unwindInfoCount(0) { } |
9779 |
- // construct via symbol table entry |
9780 |
-- Atom(Section<A>& sct, Parser<A>& parser, const macho_nlist<P>& sym, |
9781 |
-+ Atom(MRFSection<A>& sct, Parser<A>& parser, const macho_nlist<P>& sym, |
9782 |
- uint64_t sz, bool alias=false) |
9783 |
- : ld::Atom((ld::Section&)sct, parser.definitionFromSymbol(sym), |
9784 |
- parser.combineFromSymbol(sym), parser.scopeFromSymbol(sym), |
9785 |
-@@ -766,7 +766,7 @@ |
9786 |
- |
9787 |
- private: |
9788 |
- friend class Parser<A>; |
9789 |
-- friend class Section<A>; |
9790 |
-+ friend class MRFSection<A>; |
9791 |
- friend class CStringSection<A>; |
9792 |
- friend class AbsoluteSymbolSection<A>; |
9793 |
- |
9794 |
-@@ -1031,8 +1031,8 @@ |
9795 |
- uint32_t undefinedStartIndex() { return _undefinedStartIndex; } |
9796 |
- uint32_t undefinedEndIndex() { return _undefinedEndIndex; } |
9797 |
- void addFixup(FixupInAtom f) { _allFixups.push_back(f); } |
9798 |
-- Section<A>* sectionForNum(unsigned int sectNum); |
9799 |
-- Section<A>* sectionForAddress(pint_t addr); |
9800 |
-+ MRFSection<A>* sectionForNum(unsigned int sectNum); |
9801 |
-+ MRFSection<A>* sectionForAddress(pint_t addr); |
9802 |
- Atom<A>* findAtomByAddress(pint_t addr); |
9803 |
- Atom<A>* findAtomByAddressOrNullIfStub(pint_t addr); |
9804 |
- Atom<A>* findAtomByAddressOrLocalTargetOfStub(pint_t addr, uint32_t* offsetInAtom); |
9805 |
-@@ -1074,7 +1074,7 @@ |
9806 |
- : sortedSymbolIndexes(ssa), sortedSymbolCount(ssc), cfiStartsArray(cfisa), |
9807 |
- cfiStartsCount(cfisc), fileHasOverlappingSymbols(ols), |
9808 |
- newSection(false), cfiIndex(0), symIndex(0) {} |
9809 |
-- bool next(Parser<A>& parser, const Section<A>& sect, uint32_t sectNum, pint_t startAddr, pint_t endAddr, |
9810 |
-+ bool next(Parser<A>& parser, const MRFSection<A>& sect, uint32_t sectNum, pint_t startAddr, pint_t endAddr, |
9811 |
- pint_t* addr, pint_t* size, const macho_nlist<P>** sym); |
9812 |
- pint_t peek(Parser<A>& parser, pint_t startAddr, pint_t endAddr); |
9813 |
- void beginSection() { newSection = true; symIndex = 0; } |
9814 |
-@@ -1103,7 +1103,7 @@ |
9815 |
- |
9816 |
- |
9817 |
- private: |
9818 |
-- friend class Section<A>; |
9819 |
-+ friend class MRFSection<A>; |
9820 |
- |
9821 |
- enum SectionType { sectionTypeIgnore, sectionTypeLiteral4, sectionTypeLiteral8, sectionTypeLiteral16, |
9822 |
- sectionTypeNonLazy, sectionTypeCFI, sectionTypeCString, sectionTypeCStringPointer, |
9823 |
-@@ -1448,7 +1448,7 @@ |
9824 |
- // was becuase of a label, the symbol). Returns false when no more chunks. |
9825 |
- // |
9826 |
- template <typename A> |
9827 |
--bool Parser<A>::LabelAndCFIBreakIterator::next(Parser<A>& parser, const Section<A>& sect, uint32_t sectNum, pint_t startAddr, pint_t endAddr, |
9828 |
-+bool Parser<A>::LabelAndCFIBreakIterator::next(Parser<A>& parser, const MRFSection<A>& sect, uint32_t sectNum, pint_t startAddr, pint_t endAddr, |
9829 |
- pint_t* addr, pint_t* size, const macho_nlist<P>** symbol) |
9830 |
- { |
9831 |
- // may not be a label on start of section, but need atom demarcation there |
9832 |
-@@ -1600,7 +1600,7 @@ |
9833 |
- } |
9834 |
- |
9835 |
- template <> |
9836 |
--typename arm::P::uint_t Parser<arm>::realAddr(typename arm::P::uint_t addr) |
9837 |
-+arm::P::uint_t Parser<arm>::realAddr(arm::P::uint_t addr) |
9838 |
- { |
9839 |
- return addr & (-2); |
9840 |
- } |
9841 |
-@@ -1646,7 +1646,7 @@ |
9842 |
- uint32_t sortedSymbolIndexes[_symbolsInSections]; |
9843 |
- this->makeSortedSymbolsArray(sortedSymbolIndexes, sortedSectionIndexes); |
9844 |
- |
9845 |
-- // allocate Section<A> object for each mach-o section |
9846 |
-+ // allocate MRFSection<A> object for each mach-o section |
9847 |
- makeSections(); |
9848 |
- |
9849 |
- // if it exists, do special early parsing of __compact_unwind section |
9850 |
-@@ -1743,7 +1743,7 @@ |
9851 |
- #endif |
9852 |
- } |
9853 |
- |
9854 |
-- Section<A>** sections = _file->_sectionsArray; |
9855 |
-+ MRFSection<A>** sections = _file->_sectionsArray; |
9856 |
- uint32_t sectionsCount = _file->_sectionsArrayCount; |
9857 |
- |
9858 |
- // figure out how many atoms will be allocated and allocate |
9859 |
-@@ -2306,11 +2306,11 @@ |
9860 |
- _file->_swiftVersion = ((flags >> 8) & 0xFF); |
9861 |
- if ( sect->size() > 8 ) { |
9862 |
- warning("section %s/%s has unexpectedly large size %llu in %s", |
9863 |
-- sect->segname(), Section<A>::makeSectionName(sect), sect->size(), _file->path()); |
9864 |
-+ sect->segname(), MRFSection<A>::makeSectionName(sect), sect->size(), _file->path()); |
9865 |
- } |
9866 |
- } |
9867 |
- else { |
9868 |
-- warning("can't parse %s/%s section in %s", sect->segname(), Section<A>::makeSectionName(sect), _file->path()); |
9869 |
-+ warning("can't parse %s/%s section in %s", sect->segname(), MRFSection<A>::makeSectionName(sect), _file->path()); |
9870 |
- } |
9871 |
- continue; |
9872 |
- } |
9873 |
-@@ -2406,24 +2406,24 @@ |
9874 |
- // sort by address (mach-o object files don't aways have sections sorted) |
9875 |
- ::qsort(machOSects, count, sizeof(MachOSectionAndSectionClass<P>), MachOSectionAndSectionClass<P>::sorter); |
9876 |
- |
9877 |
-- // we will synthesize a dummy Section<A> object for tentative definitions |
9878 |
-+ // we will synthesize a dummy MRFSection<A> object for tentative definitions |
9879 |
- if ( _tentativeDefinitionCount > 0 ) { |
9880 |
- totalSectionsSize += sizeof(TentativeDefinitionSection<A>); |
9881 |
- machOSects[count++].type = sectionTypeTentativeDefinitions; |
9882 |
- } |
9883 |
- |
9884 |
-- // we will synthesize a dummy Section<A> object for Absolute symbols |
9885 |
-+ // we will synthesize a dummy MRFSection<A> object for Absolute symbols |
9886 |
- if ( _absoluteSymbolCount > 0 ) { |
9887 |
- totalSectionsSize += sizeof(AbsoluteSymbolSection<A>); |
9888 |
- machOSects[count++].type = sectionTypeAbsoluteSymbols; |
9889 |
- } |
9890 |
- |
9891 |
- // allocate one block for all Section objects as well as pointers to each |
9892 |
-- uint8_t* space = new uint8_t[totalSectionsSize+count*sizeof(Section<A>*)]; |
9893 |
-- _file->_sectionsArray = (Section<A>**)space; |
9894 |
-+ uint8_t* space = new uint8_t[totalSectionsSize+count*sizeof(MRFSection<A>*)]; |
9895 |
-+ _file->_sectionsArray = (MRFSection<A>**)space; |
9896 |
- _file->_sectionsArrayCount = count; |
9897 |
-- Section<A>** objects = _file->_sectionsArray; |
9898 |
-- space += count*sizeof(Section<A>*); |
9899 |
-+ MRFSection<A>** objects = _file->_sectionsArray; |
9900 |
-+ space += count*sizeof(MRFSection<A>*); |
9901 |
- for (uint32_t i=0; i < count; ++i) { |
9902 |
- switch ( machOSects[i].type ) { |
9903 |
- case sectionTypeIgnore: |
9904 |
-@@ -2511,7 +2511,7 @@ |
9905 |
- |
9906 |
- |
9907 |
- template <typename A> |
9908 |
--Section<A>* Parser<A>::sectionForAddress(typename A::P::uint_t addr) |
9909 |
-+MRFSection<A>* Parser<A>::sectionForAddress(typename A::P::uint_t addr) |
9910 |
- { |
9911 |
- for (uint32_t i=0; i < _file->_sectionsArrayCount; ++i ) { |
9912 |
- const macho_section<typename A::P>* sect = _file->_sectionsArray[i]->machoSection(); |
9913 |
-@@ -2538,7 +2538,7 @@ |
9914 |
- } |
9915 |
- |
9916 |
- template <typename A> |
9917 |
--Section<A>* Parser<A>::sectionForNum(unsigned int num) |
9918 |
-+MRFSection<A>* Parser<A>::sectionForNum(unsigned int num) |
9919 |
- { |
9920 |
- for (uint32_t i=0; i < _file->_sectionsArrayCount; ++i ) { |
9921 |
- const macho_section<typename A::P>* sect = _file->_sectionsArray[i]->machoSection(); |
9922 |
-@@ -2554,7 +2554,7 @@ |
9923 |
- template <typename A> |
9924 |
- Atom<A>* Parser<A>::findAtomByAddress(pint_t addr) |
9925 |
- { |
9926 |
-- Section<A>* section = this->sectionForAddress(addr); |
9927 |
-+ MRFSection<A>* section = this->sectionForAddress(addr); |
9928 |
- return section->findAtomByAddress(addr); |
9929 |
- } |
9930 |
- |
9931 |
-@@ -2611,7 +2611,7 @@ |
9932 |
- target.addend = 0; |
9933 |
- return; |
9934 |
- } |
9935 |
-- Section<A>* section = this->sectionForAddress(addr); |
9936 |
-+ MRFSection<A>* section = this->sectionForAddress(addr); |
9937 |
- target.atom = section->findAtomByAddress(addr); |
9938 |
- target.addend = addr - target.atom->_objAddress; |
9939 |
- target.weakImport = false; |
9940 |
-@@ -2659,7 +2659,7 @@ |
9941 |
- } |
9942 |
- return; |
9943 |
- } |
9944 |
-- Section<A>* section = this->sectionForNum(sectNum); |
9945 |
-+ MRFSection<A>* section = this->sectionForNum(sectNum); |
9946 |
- target.atom = section->findAtomByAddress(addr); |
9947 |
- if ( target.atom == NULL ) { |
9948 |
- typedef typename A::P::sint_t sint_t; |
9949 |
-@@ -3867,7 +3867,7 @@ |
9950 |
- } |
9951 |
- |
9952 |
- template <typename A> |
9953 |
--const char* Section<A>::makeSegmentName(const macho_section<typename A::P>* sect) |
9954 |
-+const char* MRFSection<A>::makeSegmentName(const macho_section<typename A::P>* sect) |
9955 |
- { |
9956 |
- // mach-o section record only has room for 16-byte seg/sect names |
9957 |
- // so a 16-byte name has no trailing zero |
9958 |
-@@ -3880,7 +3880,7 @@ |
9959 |
- } |
9960 |
- |
9961 |
- template <typename A> |
9962 |
--const char* Section<A>::makeSectionName(const macho_section<typename A::P>* sect) |
9963 |
-+const char* MRFSection<A>::makeSectionName(const macho_section<typename A::P>* sect) |
9964 |
- { |
9965 |
- const char* name = sect->sectname(); |
9966 |
- if ( strlen(name) < 16 ) |
9967 |
-@@ -3914,13 +3914,13 @@ |
9968 |
- } |
9969 |
- |
9970 |
- template <typename A> |
9971 |
--bool Section<A>::readable(const macho_section<typename A::P>* sect) |
9972 |
-+bool MRFSection<A>::readable(const macho_section<typename A::P>* sect) |
9973 |
- { |
9974 |
- return true; |
9975 |
- } |
9976 |
- |
9977 |
- template <typename A> |
9978 |
--bool Section<A>::writable(const macho_section<typename A::P>* sect) |
9979 |
-+bool MRFSection<A>::writable(const macho_section<typename A::P>* sect) |
9980 |
- { |
9981 |
- // mach-o .o files do not contain segment permissions |
9982 |
- // we just know TEXT is special |
9983 |
-@@ -3928,7 +3928,7 @@ |
9984 |
- } |
9985 |
- |
9986 |
- template <typename A> |
9987 |
--bool Section<A>::exectuable(const macho_section<typename A::P>* sect) |
9988 |
-+bool MRFSection<A>::exectuable(const macho_section<typename A::P>* sect) |
9989 |
- { |
9990 |
- // mach-o .o files do not contain segment permissions |
9991 |
- // we just know TEXT is special |
9992 |
-@@ -3937,7 +3937,7 @@ |
9993 |
- |
9994 |
- |
9995 |
- template <typename A> |
9996 |
--ld::Section::Type Section<A>::sectionType(const macho_section<typename A::P>* sect) |
9997 |
-+ld::Section::Type MRFSection<A>::sectionType(const macho_section<typename A::P>* sect) |
9998 |
- { |
9999 |
- switch ( sect->flags() & SECTION_TYPE ) { |
10000 |
- case S_ZEROFILL: |
10001 |
-@@ -4015,7 +4015,7 @@ |
10002 |
- |
10003 |
- |
10004 |
- template <typename A> |
10005 |
--Atom<A>* Section<A>::findContentAtomByAddress(pint_t addr, class Atom<A>* start, class Atom<A>* end) |
10006 |
-+Atom<A>* MRFSection<A>::findContentAtomByAddress(pint_t addr, class Atom<A>* start, class Atom<A>* end) |
10007 |
- { |
10008 |
- // do a binary search of atom array |
10009 |
- uint32_t atomCount = end - start; |
10010 |
-@@ -4047,7 +4047,7 @@ |
10011 |
- } |
10012 |
- |
10013 |
- template <typename A> |
10014 |
--ld::Atom::Alignment Section<A>::alignmentForAddress(pint_t addr) |
10015 |
-+ld::Atom::Alignment MRFSection<A>::alignmentForAddress(pint_t addr) |
10016 |
- { |
10017 |
- const uint32_t sectionAlignment = this->_machOSection->align(); |
10018 |
- uint32_t modulus = (addr % (1 << sectionAlignment)); |
10019 |
-@@ -4057,7 +4057,7 @@ |
10020 |
- } |
10021 |
- |
10022 |
- template <typename A> |
10023 |
--uint32_t Section<A>::sectionNum(class Parser<A>& parser) const |
10024 |
-+uint32_t MRFSection<A>::sectionNum(class Parser<A>& parser) const |
10025 |
- { |
10026 |
- if ( _machOSection == NULL ) |
10027 |
- return 0; |
10028 |
-@@ -4650,7 +4650,7 @@ |
10029 |
- // support __LD, __compact_unwind personality entries which are pointer to personality non-lazy pointer |
10030 |
- const pint_t* content = (pint_t*)(this->file().fileContent() + this->_machOSection->offset() + reloc->r_address()); |
10031 |
- pint_t nlPointerAddr = *content; |
10032 |
-- Section<x86>* nlSection = parser.sectionForAddress(nlPointerAddr); |
10033 |
-+ MRFSection<x86>* nlSection = parser.sectionForAddress(nlPointerAddr); |
10034 |
- if ( nlSection->type() == ld::Section::typeCode ) { |
10035 |
- // personality function is defined in this .o file, so this is a direct reference to it |
10036 |
- // atoms may not be constructed yet, so scan symbol table for labels |
10037 |
-@@ -4677,7 +4677,7 @@ |
10038 |
- else { |
10039 |
- const pint_t* content = (pint_t*)(this->file().fileContent() + this->_machOSection->offset() + reloc->r_address()); |
10040 |
- pint_t personalityAddr = *content; |
10041 |
-- Section<arm64>* personalitySection = parser.sectionForAddress(personalityAddr); |
10042 |
-+ MRFSection<arm64>* personalitySection = parser.sectionForAddress(personalityAddr); |
10043 |
- assert((personalitySection->type() == ld::Section::typeCode) && "personality column in __compact_unwind section is not pointer to function"); |
10044 |
- // atoms may not be constructed yet, so scan symbol table for labels |
10045 |
- const char* name = parser.scanSymbolTableForAddress(personalityAddr); |
10046 |
-@@ -4831,7 +4831,7 @@ |
10047 |
- |
10048 |
- template <typename A> |
10049 |
- SymboledSection<A>::SymboledSection(Parser<A>& parser, File<A>& f, const macho_section<typename A::P>* s) |
10050 |
-- : Section<A>(f, s), _type(ld::Atom::typeUnclassified) |
10051 |
-+ : MRFSection<A>(f, s), _type(ld::Atom::typeUnclassified) |
10052 |
- { |
10053 |
- switch ( s->flags() & SECTION_TYPE ) { |
10054 |
- case S_ZEROFILL: |
10055 |
-@@ -4877,7 +4877,7 @@ |
10056 |
- if ( ! this->_file.canScatterAtoms() ) |
10057 |
- return true; |
10058 |
- // call inherited |
10059 |
-- return Section<A>::dontDeadStrip(); |
10060 |
-+ return MRFSection<A>::dontDeadStrip(); |
10061 |
- } |
10062 |
- return false; |
10063 |
- } |
10064 |
-@@ -5724,7 +5724,7 @@ |
10065 |
- |
10066 |
- |
10067 |
- template <> |
10068 |
--uint32_t Section<x86_64>::x86_64PcRelOffset(uint8_t r_type) |
10069 |
-+uint32_t MRFSection<x86_64>::x86_64PcRelOffset(uint8_t r_type) |
10070 |
- { |
10071 |
- switch ( r_type ) { |
10072 |
- case X86_64_RELOC_SIGNED: |
10073 |
-@@ -5741,7 +5741,7 @@ |
10074 |
- |
10075 |
- |
10076 |
- template <> |
10077 |
--bool Section<x86_64>::addRelocFixup(class Parser<x86_64>& parser, const macho_relocation_info<P>* reloc) |
10078 |
-+bool MRFSection<x86_64>::addRelocFixup(class Parser<x86_64>& parser, const macho_relocation_info<P>* reloc) |
10079 |
- { |
10080 |
- const macho_section<P>* sect = this->machoSection(); |
10081 |
- uint64_t srcAddr = sect->addr() + reloc->r_address(); |
10082 |
-@@ -5948,7 +5948,7 @@ |
10083 |
- |
10084 |
- |
10085 |
- template <> |
10086 |
--bool Section<x86>::addRelocFixup(class Parser<x86>& parser, const macho_relocation_info<P>* reloc) |
10087 |
-+bool MRFSection<x86>::addRelocFixup(class Parser<x86>& parser, const macho_relocation_info<P>* reloc) |
10088 |
- { |
10089 |
- const macho_section<P>* sect = this->machoSection(); |
10090 |
- uint32_t srcAddr; |
10091 |
-@@ -6189,7 +6189,7 @@ |
10092 |
- |
10093 |
- #if SUPPORT_ARCH_arm_any |
10094 |
- template <> |
10095 |
--bool Section<arm>::addRelocFixup(class Parser<arm>& parser, const macho_relocation_info<P>* reloc) |
10096 |
-+bool MRFSection<arm>::addRelocFixup(class Parser<arm>& parser, const macho_relocation_info<P>* reloc) |
10097 |
- { |
10098 |
- const macho_section<P>* sect = this->machoSection(); |
10099 |
- bool result = false; |
10100 |
-@@ -6656,7 +6656,7 @@ |
10101 |
- |
10102 |
- #if SUPPORT_ARCH_arm64 |
10103 |
- template <> |
10104 |
--bool Section<arm64>::addRelocFixup(class Parser<arm64>& parser, const macho_relocation_info<P>* reloc) |
10105 |
-+bool MRFSection<arm64>::addRelocFixup(class Parser<arm64>& parser, const macho_relocation_info<P>* reloc) |
10106 |
- { |
10107 |
- bool result = false; |
10108 |
- Parser<arm64>::SourceLocation src; |
10109 |
-@@ -7054,7 +7054,7 @@ |
10110 |
- |
10111 |
- #if SUPPORT_ARCH_arm64 |
10112 |
- template <> |
10113 |
--void Section<arm64>::addLOH(class Parser<arm64>& parser, int kind, int count, const uint64_t addrs[]) { |
10114 |
-+void MRFSection<arm64>::addLOH(class Parser<arm64>& parser, int kind, int count, const uint64_t addrs[]) { |
10115 |
- switch (kind) { |
10116 |
- case LOH_ARM64_ADRP_ADRP: |
10117 |
- case LOH_ARM64_ADRP_LDR: |
10118 |
-@@ -7109,18 +7109,18 @@ |
10119 |
- extra.info.delta2 = (count > 1) ? ((addrs[1] - lowestAddress) >> 2) : 0; |
10120 |
- extra.info.delta3 = (count > 2) ? ((addrs[2] - lowestAddress) >> 2) : 0; |
10121 |
- extra.info.delta4 = (count > 3) ? ((addrs[3] - lowestAddress) >> 2) : 0; |
10122 |
-- typename Parser<arm64>::SourceLocation src(inAtom, lowestAddress- inAtom->objectAddress()); |
10123 |
-+ Parser<arm64>::SourceLocation src(inAtom, lowestAddress- inAtom->objectAddress()); |
10124 |
- parser.addFixup(src, ld::Fixup::k1of1, ld::Fixup::kindLinkerOptimizationHint, extra.addend); |
10125 |
- } |
10126 |
- #endif |
10127 |
- |
10128 |
- template <typename A> |
10129 |
--void Section<A>::addLOH(class Parser<A>& parser, int kind, int count, const uint64_t addrs[]) { |
10130 |
-+void MRFSection<A>::addLOH(class Parser<A>& parser, int kind, int count, const uint64_t addrs[]) { |
10131 |
- |
10132 |
- } |
10133 |
- |
10134 |
- template <typename A> |
10135 |
--void Section<A>::makeFixups(class Parser<A>& parser, const struct Parser<A>::CFI_CU_InfoArrays&) |
10136 |
-+void MRFSection<A>::makeFixups(class Parser<A>& parser, const struct Parser<A>::CFI_CU_InfoArrays&) |
10137 |
- { |
10138 |
- const macho_section<P>* sect = this->machoSection(); |
10139 |
- const macho_relocation_info<P>* relocs = (macho_relocation_info<P>*)(file().fileContent() + sect->reloff()); |
10140 |
-@@ -7131,7 +7131,7 @@ |
10141 |
- ++r; // skip next |
10142 |
- } |
10143 |
- catch (const char* msg) { |
10144 |
-- throwf("in section %s,%s reloc %u: %s", sect->segname(), Section<A>::makeSectionName(sect), r, msg); |
10145 |
-+ throwf("in section %s,%s reloc %u: %s", sect->segname(), MRFSection<A>::makeSectionName(sect), r, msg); |
10146 |
- } |
10147 |
- } |
10148 |
- |
10149 |
-@@ -7157,7 +7157,7 @@ |
10150 |
- } |
10151 |
- if ( !this->_altEntries.empty() && !this->addFollowOnFixups() ) { |
10152 |
- if ( _altEntries.count(_beginAtoms) != 0 ) |
10153 |
-- warning("N_ALT_ENTRY bit set on first atom in section %s/%s", sect->segname(), Section<A>::makeSectionName(sect)); |
10154 |
-+ warning("N_ALT_ENTRY bit set on first atom in section %s/%s", sect->segname(), MRFSection<A>::makeSectionName(sect)); |
10155 |
- |
10156 |
- Atom<A>* end = &_endAtoms[-1]; |
10157 |
- for(Atom<A>* p = _beginAtoms; p < end; ++p) { |
10158 |
---- ./ld64-241.9/src/ld/passes/dtrace_dof.cpp.gcc 2014-09-11 00:24:46.000000000 +0200 |
10159 |
-+++ ./ld64-241.9/src/ld/passes/dtrace_dof.cpp 2015-01-12 22:12:18.000000000 +0100 |
10160 |
-@@ -30,8 +30,17 @@ |
10161 |
- |
10162 |
- #include <vector> |
10163 |
- #include <map> |
10164 |
-+#ifdef __GLIBCXX__ |
10165 |
-+#include <tr1/unordered_map> |
10166 |
-+#include <tr1/unordered_set> |
10167 |
-+#define UNORDERED_MAP tr1::unordered_map |
10168 |
-+#define UNORDERED_SET tr1::unordered_set |
10169 |
-+#else |
10170 |
- #include <unordered_map> |
10171 |
- #include <unordered_set> |
10172 |
-+#define UNORDERED_MAP unordered_map |
10173 |
-+#define UNORDERED_SET unordered_set |
10174 |
-+#endif |
10175 |
- |
10176 |
- #include "ld.hpp" |
10177 |
- #include "MachOFileAbstraction.hpp" |
10178 |
-@@ -111,8 +120,8 @@ |
10179 |
- uint32_t offset; |
10180 |
- const char* probeName; |
10181 |
- }; |
10182 |
--typedef std::unordered_map<const char*, std::vector<DTraceProbeInfo>, CStringHash, CStringEquals> ProviderToProbes; |
10183 |
--typedef std::unordered_set<const char*, CStringHash, CStringEquals> CStringSet; |
10184 |
-+typedef std::UNORDERED_MAP<const char*, std::vector<DTraceProbeInfo>, CStringHash, CStringEquals> ProviderToProbes; |
10185 |
-+typedef std::UNORDERED_SET<const char*, CStringHash, CStringEquals> CStringSet; |
10186 |
- |
10187 |
- |
10188 |
- |
10189 |
---- ./ld64-241.9/src/ld/passes/order.cpp.gcc 2014-09-11 00:24:46.000000000 +0200 |
10190 |
-+++ ./ld64-241.9/src/ld/passes/order.cpp 2015-01-12 22:12:18.000000000 +0100 |
10191 |
-@@ -32,7 +32,13 @@ |
10192 |
- #include <vector> |
10193 |
- #include <map> |
10194 |
- #include <set> |
10195 |
-+#ifdef __GLIBCXX__ |
10196 |
-+#include <tr1/unordered_map> |
10197 |
-+#define UNORDERED_MAP tr1::unordered_map |
10198 |
-+#else |
10199 |
- #include <unordered_map> |
10200 |
-+#define UNORDERED_MAP unordered_map |
10201 |
-+#endif |
10202 |
- |
10203 |
- #include "ld.hpp" |
10204 |
- #include "order.h" |
10205 |
-@@ -85,7 +91,7 @@ |
10206 |
- ld::Internal& _state; |
10207 |
- }; |
10208 |
- |
10209 |
-- typedef std::unordered_map<const char*, const ld::Atom*, CStringHash, CStringEquals> NameToAtom; |
10210 |
-+ typedef std::UNORDERED_MAP<const char*, const ld::Atom*, CStringHash, CStringEquals> NameToAtom; |
10211 |
- |
10212 |
- typedef std::map<const ld::Atom*, const ld::Atom*> AtomToAtom; |
10213 |
- |
10214 |
---- ./ld64-241.9/src/ld/Resolver.h.gcc 2014-09-11 00:24:46.000000000 +0200 |
10215 |
-+++ ./ld64-241.9/src/ld/Resolver.h 2015-01-12 22:12:18.000000000 +0100 |
10216 |
-@@ -42,7 +42,13 @@ |
10217 |
- #include <mach-o/dyld.h> |
10218 |
- |
10219 |
- #include <vector> |
10220 |
-+#ifdef __GLIBCXX__ |
10221 |
-+#include <tr1/unordered_set> |
10222 |
-+#define UNORDERED_SET tr1::unordered_set |
10223 |
-+#else |
10224 |
- #include <unordered_set> |
10225 |
-+#define UNORDERED_SET unordered_set |
10226 |
-+#endif |
10227 |
- |
10228 |
- #include "Options.h" |
10229 |
- #include "ld.hpp" |
10230 |
-@@ -105,7 +111,7 @@ |
10231 |
- void doLinkerOption(const std::vector<const char*>& linkerOption, const char* fileName); |
10232 |
- void dumpAtoms(); |
10233 |
- |
10234 |
-- typedef std::unordered_set<const char*, CStringHash, CStringEquals> StringSet; |
10235 |
-+ typedef std::UNORDERED_SET<const char*, CStringHash, CStringEquals> StringSet; |
10236 |
- |
10237 |
- class NotLive { |
10238 |
- public: |
10239 |
---- ./ld64-241.9/src/ld/SymbolTable.h.gcc 2014-09-11 00:24:46.000000000 +0200 |
10240 |
-+++ ./ld64-241.9/src/ld/SymbolTable.h 2015-01-12 22:12:18.000000000 +0100 |
10241 |
-@@ -42,7 +42,13 @@ |
10242 |
- #include <mach-o/dyld.h> |
10243 |
- |
10244 |
- #include <vector> |
10245 |
-+#ifdef __GLIBCXX__ |
10246 |
-+#include <tr1/unordered_map> |
10247 |
-+#define UNORDERED_MAP tr1::unordered_map |
10248 |
-+#else |
10249 |
- #include <unordered_map> |
10250 |
-+#define UNORDERED_MAP unordered_map |
10251 |
-+#endif |
10252 |
- |
10253 |
- #include "Options.h" |
10254 |
- #include "ld.hpp" |
10255 |
-@@ -57,38 +63,38 @@ |
10256 |
- typedef uint32_t IndirectBindingSlot; |
10257 |
- |
10258 |
- private: |
10259 |
-- typedef std::unordered_map<const char*, IndirectBindingSlot, CStringHash, CStringEquals> NameToSlot; |
10260 |
-+ typedef std::UNORDERED_MAP<const char*, IndirectBindingSlot, CStringHash, CStringEquals> NameToSlot; |
10261 |
- |
10262 |
- class ContentFuncs { |
10263 |
- public: |
10264 |
- size_t operator()(const ld::Atom*) const; |
10265 |
- bool operator()(const ld::Atom* left, const ld::Atom* right) const; |
10266 |
- }; |
10267 |
-- typedef std::unordered_map<const ld::Atom*, IndirectBindingSlot, ContentFuncs, ContentFuncs> ContentToSlot; |
10268 |
-+ typedef std::UNORDERED_MAP<const ld::Atom*, IndirectBindingSlot, ContentFuncs, ContentFuncs> ContentToSlot; |
10269 |
- |
10270 |
- class ReferencesHashFuncs { |
10271 |
- public: |
10272 |
- size_t operator()(const ld::Atom*) const; |
10273 |
- bool operator()(const ld::Atom* left, const ld::Atom* right) const; |
10274 |
- }; |
10275 |
-- typedef std::unordered_map<const ld::Atom*, IndirectBindingSlot, ReferencesHashFuncs, ReferencesHashFuncs> ReferencesToSlot; |
10276 |
-+ typedef std::UNORDERED_MAP<const ld::Atom*, IndirectBindingSlot, ReferencesHashFuncs, ReferencesHashFuncs> ReferencesToSlot; |
10277 |
- |
10278 |
- class CStringHashFuncs { |
10279 |
- public: |
10280 |
- size_t operator()(const ld::Atom*) const; |
10281 |
- bool operator()(const ld::Atom* left, const ld::Atom* right) const; |
10282 |
- }; |
10283 |
-- typedef std::unordered_map<const ld::Atom*, IndirectBindingSlot, CStringHashFuncs, CStringHashFuncs> CStringToSlot; |
10284 |
-+ typedef std::UNORDERED_MAP<const ld::Atom*, IndirectBindingSlot, CStringHashFuncs, CStringHashFuncs> CStringToSlot; |
10285 |
- |
10286 |
- class UTF16StringHashFuncs { |
10287 |
- public: |
10288 |
- size_t operator()(const ld::Atom*) const; |
10289 |
- bool operator()(const ld::Atom* left, const ld::Atom* right) const; |
10290 |
- }; |
10291 |
-- typedef std::unordered_map<const ld::Atom*, IndirectBindingSlot, UTF16StringHashFuncs, UTF16StringHashFuncs> UTF16StringToSlot; |
10292 |
-+ typedef std::UNORDERED_MAP<const ld::Atom*, IndirectBindingSlot, UTF16StringHashFuncs, UTF16StringHashFuncs> UTF16StringToSlot; |
10293 |
- |
10294 |
- typedef std::map<IndirectBindingSlot, const char*> SlotToName; |
10295 |
-- typedef std::unordered_map<const char*, CStringToSlot*, CStringHash, CStringEquals> NameToMap; |
10296 |
-+ typedef std::UNORDERED_MAP<const char*, CStringToSlot*, CStringHash, CStringEquals> NameToMap; |
10297 |
- |
10298 |
- typedef std::vector<const ld::Atom *> DuplicatedSymbolAtomList; |
10299 |
- typedef std::map<const char *, DuplicatedSymbolAtomList * > DuplicateSymbols; |
10300 |
---- ./ld64-241.9/src/other/dyldinfo.cpp.gcc 2014-09-11 00:24:46.000000000 +0200 |
10301 |
-+++ ./ld64-241.9/src/other/dyldinfo.cpp 2015-01-12 22:12:18.000000000 +0100 |
10302 |
-@@ -33,7 +33,6 @@ |
10303 |
- |
10304 |
- #include <vector> |
10305 |
- #include <set> |
10306 |
--#include <unordered_set> |
10307 |
- |
10308 |
- #include "configure.h" |
10309 |
- #include "MachOFileAbstraction.hpp" |
10310 |
---- ./ld64-241.9/src/other/machochecker.cpp.gcc 2014-09-11 00:24:46.000000000 +0200 |
10311 |
-+++ ./ld64-241.9/src/other/machochecker.cpp 2015-01-12 22:12:18.000000000 +0100 |
10312 |
-@@ -33,7 +33,13 @@ |
10313 |
- |
10314 |
- #include <vector> |
10315 |
- #include <set> |
10316 |
-+#ifdef __GLIBCXX__ |
10317 |
-+#include <tr1/unordered_set> |
10318 |
-+#define UNORDERED_SET tr1::unordered_set |
10319 |
-+#else |
10320 |
- #include <unordered_set> |
10321 |
-+#define UNORDERED_SET unordered_set |
10322 |
-+#endif |
10323 |
- |
10324 |
- #include "configure.h" |
10325 |
- |
10326 |
-@@ -124,7 +130,7 @@ |
10327 |
- bool operator()(const char* left, const char* right) const { return (strcmp(left, right) == 0); } |
10328 |
- }; |
10329 |
- |
10330 |
-- typedef std::unordered_set<const char*, CStringHash, CStringEquals> StringSet; |
10331 |
-+ typedef std::UNORDERED_SET<const char*, CStringHash, CStringEquals> StringSet; |
10332 |
- |
10333 |
- MachOChecker(const uint8_t* fileContent, uint32_t fileLength, const char* path); |
10334 |
- void checkMachHeader(); |
10335 |
---- ./ld64-241.9/src/other/unwinddump.cpp.gcc 2014-11-04 00:56:18.000000000 +0100 |
10336 |
-+++ ./ld64-241.9/src/other/unwinddump.cpp 2015-01-12 22:12:18.000000000 +0100 |
10337 |
-@@ -33,7 +33,6 @@ |
10338 |
- |
10339 |
- #include <vector> |
10340 |
- #include <set> |
10341 |
--#include <unordered_set> |
10342 |
- |
10343 |
- #include "configure.h" |
10344 |
- #include "MachOFileAbstraction.hpp" |
10345 |
|
10346 |
diff --git a/sys-devel/binutils-apple/files/ld64-241.9-get-comm-align.patch b/sys-devel/binutils-apple/files/ld64-241.9-get-comm-align.patch |
10347 |
deleted file mode 100644 |
10348 |
index 58579f0..0000000 |
10349 |
--- a/sys-devel/binutils-apple/files/ld64-241.9-get-comm-align.patch |
10350 |
+++ /dev/null |
10351 |
@@ -1,30 +0,0 @@ |
10352 |
-Provide macros [GS]ET_COMM_ALIGN if it's missing (<= 10.4). |
10353 |
- |
10354 |
---- ld64-241.9/src/ld/parsers/macho_relocatable_file.cpp 2015-01-22 22:23:11.000000000 +0100 |
10355 |
-+++ ld64-241.9/src/ld/parsers/macho_relocatable_file.cpp 2015-01-22 22:28:03.000000000 +0100 |
10356 |
-@@ -51,6 +51,10 @@ |
10357 |
- #include "macho_relocatable_file.h" |
10358 |
- |
10359 |
- |
10360 |
-+/* missing on < 10.5 */ |
10361 |
-+#if !defined(GET_COMM_ALIGN) |
10362 |
-+#define GET_COMM_ALIGN(n_desc) (((n_desc) >> 8) & 0x0f) |
10363 |
-+#endif |
10364 |
- |
10365 |
- extern void throwf(const char* format, ...) __attribute__ ((noreturn,format(printf, 1, 2))); |
10366 |
- extern void warning(const char* format, ...) __attribute__((format(printf, 1, 2))); |
10367 |
---- Gentoo/tmp/var/tmp/portage/sys-devel/binutils-apple-6.1/work/ld64-241.9/src/ld/LinkEditClassic.hpp 2015-01-22 22:29:14.000000000 +0100 |
10368 |
-+++ ld64-241.9/src/ld/LinkEditClassic.hpp 2015-01-22 22:31:23.000000000 +0100 |
10369 |
-@@ -39,6 +39,12 @@ |
10370 |
- #define UNORDERED_MAP unordered_map |
10371 |
- #endif |
10372 |
- |
10373 |
-+#if !defined(SET_COMM_ALIGN) |
10374 |
-+/* missing on < 10.5 */ |
10375 |
-+#define SET_COMM_ALIGN(n_desc,align) \ |
10376 |
-+ (n_desc) = (((n_desc) & 0xf0ff) | (((align) & 0x0f) << 8)) |
10377 |
-+#endif |
10378 |
-+ |
10379 |
- #include "Options.h" |
10380 |
- #include "ld.hpp" |
10381 |
- #include "Architectures.hpp" |
10382 |
|
10383 |
diff --git a/sys-devel/binutils-apple/files/ld64-241.9-lto-noremarks.patch b/sys-devel/binutils-apple/files/ld64-241.9-lto-noremarks.patch |
10384 |
deleted file mode 100644 |
10385 |
index d4667ab..0000000 |
10386 |
--- a/sys-devel/binutils-apple/files/ld64-241.9-lto-noremarks.patch |
10387 |
+++ /dev/null |
10388 |
@@ -1,107 +0,0 @@ |
10389 |
-Shut up ld64 by default when using LTO. |
10390 |
- |
10391 |
-diff -ru ld64-241.9.orig/src/ld/Options.cpp ld64-241.9/src/ld/Options.cpp |
10392 |
---- ld64-241.9.orig/src/ld/Options.cpp 2015-02-02 22:14:29.000000000 +0100 |
10393 |
-+++ ld64-241.9/src/ld/Options.cpp 2015-02-02 22:15:41.000000000 +0100 |
10394 |
-@@ -183,6 +183,9 @@ |
10395 |
- fDebugInfoStripping(kDebugInfoMinimal), fTraceOutputFile(NULL), |
10396 |
- fMacVersionMin(ld::macVersionUnset), fIOSVersionMin(ld::iOSVersionUnset), |
10397 |
- fSaveTempFiles(false), |
10398 |
-+#ifdef LTO |
10399 |
-+ fVerboseLTORemarks(false), |
10400 |
-+#endif |
10401 |
- #ifdef SUPPORT_SNAPSHOTS |
10402 |
- fSnapshotRequested(false), |
10403 |
- #endif |
10404 |
-@@ -3138,6 +3141,11 @@ |
10405 |
- else if ( strcmp(arg, "-ignore_optimization_hints") == 0 ) { |
10406 |
- fIgnoreOptimizationHints = true; |
10407 |
- } |
10408 |
-+#ifdef LTO |
10409 |
-+ else if ( strcmp(arg, "-verbose_lto_remarks") == 0 ) { |
10410 |
-+ fVerboseLTORemarks = true; |
10411 |
-+ } |
10412 |
-+#endif |
10413 |
- else if ( strcmp(arg, "-no_dtrace_dof") == 0 ) { |
10414 |
- fGenerateDtraceDOF = false; |
10415 |
- } |
10416 |
-Only in ld64-241.9/src/ld: Options.cpp~ |
10417 |
-diff -ru ld64-241.9.orig/src/ld/Options.h ld64-241.9/src/ld/Options.h |
10418 |
---- ld64-241.9.orig/src/ld/Options.h 2015-02-02 22:14:29.000000000 +0100 |
10419 |
-+++ ld64-241.9/src/ld/Options.h 2015-02-02 22:16:36.000000000 +0100 |
10420 |
-@@ -381,6 +381,9 @@ |
10421 |
- bool forceWeakNonWildCard(const char* symbolName) const; |
10422 |
- bool forceNotWeakNonWildcard(const char* symbolName) const; |
10423 |
- bool forceCoalesce(const char* symbolName) const; |
10424 |
-+#ifdef LTO |
10425 |
-+ bool verboseLTORemarks() const { return fVerboseLTORemarks; } |
10426 |
-+#endif |
10427 |
- #ifdef SUPPORT_SNAPSHOTS |
10428 |
- Snapshot& snapshot() const { return fLinkSnapshot; } |
10429 |
- #endif |
10430 |
-@@ -681,6 +684,9 @@ |
10431 |
- std::vector<SymbolsMove> fSymbolsMovesCode; |
10432 |
- std::vector<SymbolsMove> fSymbolsMovesZeroFill; |
10433 |
- bool fSaveTempFiles; |
10434 |
-+#ifdef LTO |
10435 |
-+ bool fVerboseLTORemarks; |
10436 |
-+#endif |
10437 |
- #ifdef SUPPORT_SNAPSHOTS |
10438 |
- mutable Snapshot fLinkSnapshot; |
10439 |
- bool fSnapshotRequested; |
10440 |
-Only in ld64-241.9/src/ld: Options.h~ |
10441 |
-diff -ru ld64-241.9.orig/src/ld/Resolver.cpp ld64-241.9/src/ld/Resolver.cpp |
10442 |
---- ld64-241.9.orig/src/ld/Resolver.cpp 2015-02-02 22:14:29.000000000 +0100 |
10443 |
-+++ ld64-241.9/src/ld/Resolver.cpp 2015-02-02 22:17:16.000000000 +0100 |
10444 |
-@@ -1559,6 +1559,7 @@ |
10445 |
- optOpt.mcpu = _options.mcpuLTO(); |
10446 |
- optOpt.llvmOptions = &_options.llvmOptions(); |
10447 |
- optOpt.initialUndefines = &_options.initialUndefines(); |
10448 |
-+ optOpt.verboseLTORemarks = _options.verboseLTORemarks(); |
10449 |
- |
10450 |
- std::vector<const ld::Atom*> newAtoms; |
10451 |
- std::vector<const char*> additionalUndefines; |
10452 |
-Only in ld64-241.9/src/ld: Resolver.cpp~ |
10453 |
-diff -ru ld64-241.9.orig/src/ld/parsers/lto_file.cpp ld64-241.9/src/ld/parsers/lto_file.cpp |
10454 |
---- ld64-241.9.orig/src/ld/parsers/lto_file.cpp 2015-02-02 22:14:29.000000000 +0100 |
10455 |
-+++ ld64-241.9/src/ld/parsers/lto_file.cpp 2015-02-02 22:18:27.000000000 +0100 |
10456 |
-@@ -489,13 +489,17 @@ |
10457 |
- |
10458 |
- |
10459 |
- #if LTO_API_VERSION >= 7 |
10460 |
--void Parser::ltoDiagnosticHandler(lto_codegen_diagnostic_severity_t severity, const char* message, void*) |
10461 |
-+void Parser::ltoDiagnosticHandler(lto_codegen_diagnostic_severity_t severity, const char* message, void* data) |
10462 |
- { |
10463 |
- switch ( severity ) { |
10464 |
- #if LTO_API_VERSION >= 10 |
10465 |
- case LTO_DS_REMARK: |
10466 |
-+ { |
10467 |
-+ const OptimizeOptions* options = (const OptimizeOptions*)data; |
10468 |
-+ if (options->verboseLTORemarks) |
10469 |
- fprintf(stderr, "ld: LTO remark: %s\n", message); |
10470 |
- break; |
10471 |
-+ } |
10472 |
- #endif |
10473 |
- case LTO_DS_NOTE: |
10474 |
- case LTO_DS_WARNING: |
10475 |
-@@ -530,7 +533,7 @@ |
10476 |
- // create optimizer and add each Reader |
10477 |
- lto_code_gen_t generator = ::lto_codegen_create(); |
10478 |
- #if LTO_API_VERSION >= 7 |
10479 |
-- lto_codegen_set_diagnostic_handler(generator, ltoDiagnosticHandler, NULL); |
10480 |
-+ lto_codegen_set_diagnostic_handler(generator, ltoDiagnosticHandler, (void*)&options); |
10481 |
- #endif |
10482 |
- |
10483 |
- // <rdar://problem/12379604> The order that files are merged must match command line order |
10484 |
-Only in ld64-241.9/src/ld/parsers: lto_file.cpp~ |
10485 |
-diff -ru ld64-241.9.orig/src/ld/parsers/lto_file.h ld64-241.9/src/ld/parsers/lto_file.h |
10486 |
---- ld64-241.9.orig/src/ld/parsers/lto_file.h 2015-02-02 22:14:29.000000000 +0100 |
10487 |
-+++ ld64-241.9/src/ld/parsers/lto_file.h 2015-02-02 22:18:57.000000000 +0100 |
10488 |
-@@ -61,6 +61,7 @@ |
10489 |
- const char* mcpu; |
10490 |
- const std::vector<const char*>* llvmOptions; |
10491 |
- const std::vector<const char*>* initialUndefines; |
10492 |
-+ bool verboseLTORemarks; |
10493 |
- }; |
10494 |
- |
10495 |
- extern bool optimize( const std::vector<const ld::Atom*>& allAtoms, |
10496 |
|
10497 |
diff --git a/sys-devel/binutils-apple/files/ld64-241.9-noarm.patch b/sys-devel/binutils-apple/files/ld64-241.9-noarm.patch |
10498 |
deleted file mode 100644 |
10499 |
index 24d2884..0000000 |
10500 |
--- a/sys-devel/binutils-apple/files/ld64-241.9-noarm.patch |
10501 |
+++ /dev/null |
10502 |
@@ -1,1288 +0,0 @@ |
10503 |
-Fully conditionalise arm support so it can be disabled on 10.4. |
10504 |
- |
10505 |
-diff -ur ld64-241.9/src/abstraction/MachOFileAbstraction.hpp ld64-241.9/src/abstraction/MachOFileAbstraction.hpp |
10506 |
---- ld64-241.9/src/abstraction/MachOFileAbstraction.hpp 2014-11-04 00:30:51.000000000 +0100 |
10507 |
-+++ ld64-241.9/src/abstraction/MachOFileAbstraction.hpp 2015-01-22 05:53:13.000000000 +0100 |
10508 |
-diff -ur ld64-241.9/src/ld/HeaderAndLoadCommands.hpp ld64-241.9/src/ld/HeaderAndLoadCommands.hpp |
10509 |
---- ld64-241.9/src/ld/HeaderAndLoadCommands.hpp 2014-09-11 00:24:46.000000000 +0200 |
10510 |
-+++ ld64-241.9/src/ld/HeaderAndLoadCommands.hpp 2015-01-22 06:46:10.000000000 +0100 |
10511 |
-@@ -607,8 +607,12 @@ |
10512 |
- |
10513 |
- template <> uint32_t HeaderAndLoadCommandsAtom<x86>::cpuType() const { return CPU_TYPE_I386; } |
10514 |
- template <> uint32_t HeaderAndLoadCommandsAtom<x86_64>::cpuType() const { return CPU_TYPE_X86_64; } |
10515 |
-+#if SUPPORT_ARCH_arm_any |
10516 |
- template <> uint32_t HeaderAndLoadCommandsAtom<arm>::cpuType() const { return CPU_TYPE_ARM; } |
10517 |
-+#endif |
10518 |
-+#if SUPPORT_ARCH_arm64 |
10519 |
- template <> uint32_t HeaderAndLoadCommandsAtom<arm64>::cpuType() const { return CPU_TYPE_ARM64; } |
10520 |
-+#endif |
10521 |
- |
10522 |
- |
10523 |
- |
10524 |
-@@ -627,17 +631,21 @@ |
10525 |
- return _state.cpuSubType; |
10526 |
- } |
10527 |
- |
10528 |
-+#if SUPPORT_ARCH_arm_any |
10529 |
- template <> |
10530 |
- uint32_t HeaderAndLoadCommandsAtom<arm>::cpuSubType() const |
10531 |
- { |
10532 |
- return _state.cpuSubType; |
10533 |
- } |
10534 |
-+#endif |
10535 |
- |
10536 |
-+#if SUPPORT_ARCH_arm64 |
10537 |
- template <> |
10538 |
- uint32_t HeaderAndLoadCommandsAtom<arm64>::cpuSubType() const |
10539 |
- { |
10540 |
- return CPU_SUBTYPE_ARM64_ALL; |
10541 |
- } |
10542 |
-+#endif |
10543 |
- |
10544 |
- |
10545 |
- |
10546 |
-diff -ur ld64-241.9/src/ld/LinkEdit.hpp ld64-241.9/src/ld/LinkEdit.hpp |
10547 |
---- ld64-241.9/src/ld/LinkEdit.hpp 2015-01-22 20:59:47.000000000 +0100 |
10548 |
-+++ ld64-241.9/src/ld/LinkEdit.hpp 2015-01-22 05:32:47.000000000 +0100 |
10549 |
-@@ -1595,6 +1595,7 @@ |
10550 |
- for (ld::Fixup::iterator fit = atom->fixupsBegin(); fit != atom->fixupsEnd(); ++fit) { |
10551 |
- if ( fit->kind != ld::Fixup::kindLinkerOptimizationHint) |
10552 |
- continue; |
10553 |
-+#if SUPPORT_ARCH_arm64 |
10554 |
- ld::Fixup::LOH_arm64 extra; |
10555 |
- extra.addend = fit->u.addend; |
10556 |
- _encodedData.append_uleb128(extra.info.kind); |
10557 |
-@@ -1606,6 +1607,7 @@ |
10558 |
- _encodedData.append_uleb128((extra.info.delta3 << 2) + fit->offsetInAtom + address); |
10559 |
- if ( extra.info.count > 2 ) |
10560 |
- _encodedData.append_uleb128((extra.info.delta4 << 2) + fit->offsetInAtom + address); |
10561 |
-+#endif |
10562 |
- } |
10563 |
- } |
10564 |
- } |
10565 |
-diff -ur ld64-241.9/src/ld/Options.cpp ld64-241.9/src/ld/Options.cpp |
10566 |
---- ld64-241.9/src/ld/Options.cpp 2015-01-22 20:59:48.000000000 +0100 |
10567 |
-+++ ld64-241.9/src/ld/Options.cpp 2015-01-22 20:52:17.000000000 +0100 |
10568 |
-@@ -580,8 +580,13 @@ |
10569 |
- #endif |
10570 |
- } |
10571 |
- break; |
10572 |
-+#if SUPPORT_ARCH_arm_any |
10573 |
- case CPU_TYPE_ARM: |
10574 |
-+#endif |
10575 |
-+#if SUPPORT_ARCH_arm64 |
10576 |
- case CPU_TYPE_ARM64: |
10577 |
-+#endif |
10578 |
-+#if SUPPORT_ARCH_arm_any || SUPPORT_ARCH_arm64 |
10579 |
- if ( (fMacVersionMin == ld::macVersionUnset) && (fIOSVersionMin == ld::iOSVersionUnset) && (fOutputKind != Options::kObjectFile) ) { |
10580 |
- #if defined(DEFAULT_IPHONEOS_MIN_VERSION) |
10581 |
- warning("-ios_version_min not specified, assuming " DEFAULT_IPHONEOS_MIN_VERSION); |
10582 |
-@@ -592,6 +597,7 @@ |
10583 |
- #endif |
10584 |
- } |
10585 |
- break; |
10586 |
-+#endif |
10587 |
- } |
10588 |
- #ifdef SUPPORT_SNAPSHOTS |
10589 |
- fLinkSnapshot.recordArch(fArchitectureName); |
10590 |
-@@ -1683,9 +1689,11 @@ |
10591 |
- symbolStart = NULL; |
10592 |
- } |
10593 |
- else if ( strncmp(symbolStart, "arm:", 4) == 0 ) { |
10594 |
-+#if SUPPORT_ARCH_arm_any |
10595 |
- if ( fArchitecture == CPU_TYPE_ARM ) |
10596 |
- symbolStart = &symbolStart[4]; |
10597 |
- else |
10598 |
-+#endif |
10599 |
- symbolStart = NULL; |
10600 |
- } |
10601 |
- if ( symbolStart != NULL ) { |
10602 |
-@@ -3668,6 +3676,7 @@ |
10603 |
- #endif |
10604 |
- } |
10605 |
- break; |
10606 |
-+#if SUPPORT_ARCH_arm_any |
10607 |
- case CPU_TYPE_ARM: |
10608 |
- if ( (fOutputKind != Options::kObjectFile) && (fOutputKind != Options::kPreload) ) { |
10609 |
- #if defined(DEFAULT_IPHONEOS_MIN_VERSION) |
10610 |
-@@ -3679,6 +3688,7 @@ |
10611 |
- #endif |
10612 |
- } |
10613 |
- break; |
10614 |
-+#endif |
10615 |
- default: |
10616 |
- // architecture will be infered later by examining .o files |
10617 |
- break; |
10618 |
-@@ -3701,12 +3711,14 @@ |
10619 |
- fMacVersionMin = ld::mac10_4; |
10620 |
- } |
10621 |
- break; |
10622 |
-+#if SUPPORT_ARCH_arm64 |
10623 |
- case CPU_TYPE_ARM64: |
10624 |
- if ( fIOSVersionMin < ld::iOS_7_0 ) { |
10625 |
- //warning("-mios_version_min should be 7.0 or later for arm64"); |
10626 |
- fIOSVersionMin = ld::iOS_7_0; |
10627 |
- } |
10628 |
- break; |
10629 |
-+#endif |
10630 |
- } |
10631 |
- |
10632 |
- // default to adding functions start for dynamic code, static code must opt-in |
10633 |
-@@ -3746,6 +3758,7 @@ |
10634 |
- fAllowTextRelocs = true; |
10635 |
- fUndefinedTreatment = kUndefinedDynamicLookup; |
10636 |
- break; |
10637 |
-+#if SUPPORT_ARCH_arm64 |
10638 |
- case CPU_TYPE_ARM64: |
10639 |
- // arm64 uses new MH_KEXT_BUNDLE type |
10640 |
- fMakeCompressedDyldInfo = false; |
10641 |
-@@ -3754,6 +3767,8 @@ |
10642 |
- fKextsUseStubs = true; |
10643 |
- fUndefinedTreatment = kUndefinedDynamicLookup; |
10644 |
- break; |
10645 |
-+#endif |
10646 |
-+#if SUPPORT_ARCH_arm_any |
10647 |
- case CPU_TYPE_ARM: |
10648 |
- if ( fIOSVersionMin >= ld::iOS_5_0 ) { |
10649 |
- // iOS 5.0 and later use new MH_KEXT_BUNDLE type |
10650 |
-@@ -3765,6 +3780,7 @@ |
10651 |
- fUndefinedTreatment = kUndefinedDynamicLookup; |
10652 |
- break; |
10653 |
- } |
10654 |
-+#endif |
10655 |
- // else use object file |
10656 |
- case CPU_TYPE_I386: |
10657 |
- // use .o files |
10658 |
-@@ -3817,6 +3833,7 @@ |
10659 |
- if ( fSplitSegs && (fBaseWritableAddress-fBaseAddress != 0x10000000) ) |
10660 |
- fBaseWritableAddress = fBaseAddress + 0x10000000; |
10661 |
- break; |
10662 |
-+#if SUPPORT_ARCH_arm_any |
10663 |
- case CPU_TYPE_ARM: |
10664 |
- if ( fOutputKind != Options::kDynamicLibrary ) { |
10665 |
- fSplitSegs = false; |
10666 |
-@@ -3827,6 +3844,7 @@ |
10667 |
- fBaseWritableAddress = fBaseAddress + 0x08000000; |
10668 |
- } |
10669 |
- break; |
10670 |
-+#endif |
10671 |
- default: |
10672 |
- fSplitSegs = false; |
10673 |
- fBaseAddress = 0; |
10674 |
-@@ -3841,6 +3859,7 @@ |
10675 |
- break; |
10676 |
- case CPU_TYPE_X86_64: |
10677 |
- break; |
10678 |
-+#if SUPPORT_ARCH_arm_any |
10679 |
- case CPU_TYPE_ARM: |
10680 |
- switch ( fOutputKind ) { |
10681 |
- case Options::kDynamicExecutable: |
10682 |
-@@ -3863,6 +3882,7 @@ |
10683 |
- fBaseAddress = 0; |
10684 |
- } |
10685 |
- break; |
10686 |
-+#endif |
10687 |
- } |
10688 |
- |
10689 |
- // <rdar://problem/6138961> -r implies no prebinding for all architectures |
10690 |
-@@ -3908,6 +3928,7 @@ |
10691 |
- case CPU_TYPE_X86_64: |
10692 |
- fPrebind = false; |
10693 |
- break; |
10694 |
-+#if SUPPORT_ARCH_arm_any |
10695 |
- case CPU_TYPE_ARM: |
10696 |
- switch ( fOutputKind ) { |
10697 |
- case Options::kDynamicExecutable: |
10698 |
-@@ -3925,6 +3946,7 @@ |
10699 |
- break; |
10700 |
- } |
10701 |
- break; |
10702 |
-+#endif |
10703 |
- } |
10704 |
- } |
10705 |
- |
10706 |
-@@ -3951,10 +3973,12 @@ |
10707 |
- case CPU_TYPE_I386: |
10708 |
- if ( fIOSVersionMin != ld::iOSVersionUnset ) // simulator never needs modules |
10709 |
- break; |
10710 |
-+#if SUPPORT_ARCH_arm_any |
10711 |
- case CPU_TYPE_ARM: |
10712 |
- if ( fPrebind ) |
10713 |
- fNeedsModuleTable = true; // redo_prebinding requires a module table |
10714 |
- break; |
10715 |
-+#endif |
10716 |
- } |
10717 |
- } |
10718 |
- |
10719 |
-@@ -3993,7 +3993,9 @@ |
10720 |
- switch ( fArchitecture ) { |
10721 |
- case CPU_TYPE_I386: |
10722 |
- case CPU_TYPE_X86_64: |
10723 |
-+#if SUPPORT_ARCH_arm64 |
10724 |
- case CPU_TYPE_ARM64: |
10725 |
-+#endif |
10726 |
- switch ( fOutputKind ) { |
10727 |
- case Options::kObjectFile: |
10728 |
- case Options::kStaticExecutable: |
10729 |
-@@ -4010,10 +4012,12 @@ |
10730 |
- break; |
10731 |
- } |
10732 |
- break; |
10733 |
-+#if SUPPORT_ARCH_arm_any |
10734 |
- case CPU_TYPE_ARM: |
10735 |
- fAddCompactUnwindEncoding = false; |
10736 |
- fRemoveDwarfUnwindIfCompactExists = false; |
10737 |
- break; |
10738 |
-+#endif |
10739 |
- case 0: |
10740 |
- // if -arch is missing, assume we don't want compact unwind info |
10741 |
- fAddCompactUnwindEncoding = false; |
10742 |
-@@ -4015,7 +4043,15 @@ |
10743 |
- fEncryptable = false; |
10744 |
- break; |
10745 |
- } |
10746 |
-- if ( (fArchitecture != CPU_TYPE_ARM) && (fArchitecture != CPU_TYPE_ARM64) ) |
10747 |
-+ if ( |
10748 |
-+#if SUPPORT_ARCH_arm_any |
10749 |
-+ (fArchitecture != CPU_TYPE_ARM) && |
10750 |
-+#endif |
10751 |
-+#if SUPPORT_ARCH_arm64 |
10752 |
-+ (fArchitecture != CPU_TYPE_ARM64) && |
10753 |
-+#endif |
10754 |
-+ 1 |
10755 |
-+ ) |
10756 |
- fEncryptable = false; |
10757 |
- |
10758 |
- // don't move inits in dyld because dyld wants certain |
10759 |
-@@ -4067,11 +4103,15 @@ |
10760 |
- |
10761 |
- // only ARM and x86_64 enforces that cpu-sub-types must match |
10762 |
- switch ( fArchitecture ) { |
10763 |
-+#if SUPPORT_ARCH_arm_any |
10764 |
- case CPU_TYPE_ARM: |
10765 |
-+#endif |
10766 |
- case CPU_TYPE_X86_64: |
10767 |
- break; |
10768 |
- case CPU_TYPE_I386: |
10769 |
-+#if SUPPORT_ARCH_arm64 |
10770 |
- case CPU_TYPE_ARM64: |
10771 |
-+#endif |
10772 |
- fAllowCpuSubtypeMismatches = true; |
10773 |
- break; |
10774 |
- } |
10775 |
-@@ -4117,6 +4157,7 @@ |
10776 |
- fPositionIndependentExecutable = true; |
10777 |
- } |
10778 |
- |
10779 |
-+#if SUPPORT_ARCH_arm_any |
10780 |
- // armv7 for iOS4.3 defaults to PIE |
10781 |
- if ( (fArchitecture == CPU_TYPE_ARM) |
10782 |
- && fArchSupportsThumb2 |
10783 |
-@@ -4124,6 +4165,7 @@ |
10784 |
- && (fIOSVersionMin >= ld::iOS_4_3) ) { |
10785 |
- fPositionIndependentExecutable = true; |
10786 |
- } |
10787 |
-+#endif |
10788 |
- |
10789 |
- // Simulator defaults to PIE |
10790 |
- if ( fTargetIOSSimulator && (fOutputKind == kDynamicExecutable) ) |
10791 |
-@@ -4133,10 +4175,12 @@ |
10792 |
- if ( fDisablePositionIndependentExecutable ) |
10793 |
- fPositionIndependentExecutable = false; |
10794 |
- |
10795 |
-+#if SUPPORT_ARCH_arm64 |
10796 |
- // arm64 is always PIE |
10797 |
- if ( (fArchitecture == CPU_TYPE_ARM64) && (fOutputKind == kDynamicExecutable) ) { |
10798 |
- fPositionIndependentExecutable = true; |
10799 |
- } |
10800 |
-+#endif |
10801 |
- |
10802 |
- // set fOutputSlidable |
10803 |
- switch ( fOutputKind ) { |
10804 |
-@@ -4162,9 +4206,11 @@ |
10805 |
- if ( fMacVersionMin >= ld::mac10_7 ) { |
10806 |
- fTLVSupport = true; |
10807 |
- } |
10808 |
-+#if SUPPORT_ARCH_arm64 |
10809 |
- else if ( (fArchitecture == CPU_TYPE_ARM64) && (fIOSVersionMin >= ld::iOS_8_0) ) { |
10810 |
- fTLVSupport = true; |
10811 |
- } |
10812 |
-+#endif |
10813 |
- |
10814 |
- // default to adding version load command for dynamic code, static code must opt-in |
10815 |
- switch ( fOutputKind ) { |
10816 |
-@@ -4369,9 +4415,15 @@ |
10817 |
- // <rdar://problem/12258065> ARM64 needs 16KB page size for user land code |
10818 |
- // <rdar://problem/15974532> make armv7[s] use 16KB pages in user land code for iOS 8 or later |
10819 |
- if ( fSegmentAlignment == 4096 ) { |
10820 |
-- if ( (fArchitecture == CPU_TYPE_ARM64) |
10821 |
-- || ((fArchitecture == CPU_TYPE_ARM) && (fIOSVersionMin >= ld::iOS_8_0) && |
10822 |
-- ((fSubArchitecture == CPU_SUBTYPE_ARM_V7S) || (fSubArchitecture == CPU_SUBTYPE_ARM_V7))) ) { |
10823 |
-+ if ( |
10824 |
-+#if SUPPORT_ARCH_arm64 |
10825 |
-+ (fArchitecture == CPU_TYPE_ARM64) || |
10826 |
-+#endif |
10827 |
-+#if SUPPORT_ARCH_arm_any |
10828 |
-+ ((fArchitecture == CPU_TYPE_ARM) && (fIOSVersionMin >= ld::iOS_8_0) && |
10829 |
-+ ((fSubArchitecture == CPU_SUBTYPE_ARM_V7S) || (fSubArchitecture == CPU_SUBTYPE_ARM_V7))) || |
10830 |
-+#endif |
10831 |
-+ 0) { |
10832 |
- switch ( fOutputKind ) { |
10833 |
- case Options::kDynamicExecutable: |
10834 |
- case Options::kDynamicLibrary: |
10835 |
-@@ -4488,12 +4540,16 @@ |
10836 |
- if ( fStackAddr != 0 ) { |
10837 |
- switch (fArchitecture) { |
10838 |
- case CPU_TYPE_I386: |
10839 |
-+#if SUPPORT_ARCH_arm_any |
10840 |
- case CPU_TYPE_ARM: |
10841 |
-+#endif |
10842 |
- if ( fStackAddr > 0xFFFFFFFFULL ) |
10843 |
- throw "-stack_addr must be < 4G for 32-bit processes"; |
10844 |
- break; |
10845 |
- case CPU_TYPE_X86_64: |
10846 |
-+#if SUPPORT_ARCH_arm64 |
10847 |
- case CPU_TYPE_ARM64: |
10848 |
-+#endif |
10849 |
- break; |
10850 |
- } |
10851 |
- if ( (fStackAddr & -4096) != fStackAddr ) |
10852 |
-@@ -4514,6 +4570,7 @@ |
10853 |
- if ( (fStackAddr > 0xB0000000ULL) && ((fStackAddr-fStackSize) < 0xB0000000ULL) ) |
10854 |
- warning("custom stack placement overlaps and will disable shared region"); |
10855 |
- break; |
10856 |
-+#if SUPPORT_ARCH_arm_any |
10857 |
- case CPU_TYPE_ARM: |
10858 |
- if ( fStackSize > 0x2F000000 ) |
10859 |
- throw "-stack_size must be < 752MB"; |
10860 |
-@@ -4522,11 +4579,13 @@ |
10861 |
- if ( fStackAddr > 0x30000000ULL) |
10862 |
- throw "-stack_addr must be < 0x30000000 for arm"; |
10863 |
- break; |
10864 |
-+#endif |
10865 |
- case CPU_TYPE_X86_64: |
10866 |
- if ( fStackAddr == 0 ) { |
10867 |
- fStackAddr = 0x00007FFF5C000000ULL; |
10868 |
- } |
10869 |
- break; |
10870 |
-+#if SUPPORT_ARCH_arm64 |
10871 |
- case CPU_TYPE_ARM64: |
10872 |
- if ( fStackSize > 0x20000000 ) |
10873 |
- throw "-stack_size must be < 512MB"; |
10874 |
-@@ -4534,6 +4593,7 @@ |
10875 |
- fStackAddr = 0x120000000ULL; |
10876 |
- } |
10877 |
- break; |
10878 |
-+#endif |
10879 |
- } |
10880 |
- if ( (fStackSize & -4096) != fStackSize ) |
10881 |
- throw "-stack_size must be multiples of 4K"; |
10882 |
-@@ -4643,8 +4703,12 @@ |
10883 |
- alterObjC1ClassNamesToObjC2 = true; |
10884 |
- break; |
10885 |
- case CPU_TYPE_X86_64: |
10886 |
-+#if SUPPORT_ARCH_arm_any |
10887 |
- case CPU_TYPE_ARM: |
10888 |
-+#endif |
10889 |
-+#if SUPPORT_ARCH_arm64 |
10890 |
- case CPU_TYPE_ARM64: |
10891 |
-+#endif |
10892 |
- alterObjC1ClassNamesToObjC2 = true; |
10893 |
- break; |
10894 |
- } |
10895 |
-@@ -4799,11 +4799,15 @@ |
10896 |
- // zero page size not specified on command line, set default |
10897 |
- switch (fArchitecture) { |
10898 |
- case CPU_TYPE_I386: |
10899 |
-+#if SUPPORT_ARCH_arm_any |
10900 |
- case CPU_TYPE_ARM: |
10901 |
-+#endif |
10902 |
- // first 4KB for 32-bit architectures |
10903 |
- fZeroPageSize = 0x1000; |
10904 |
- break; |
10905 |
-+#if SUPPORT_ARCH_arm64 |
10906 |
- case CPU_TYPE_ARM64: |
10907 |
-+#endif |
10908 |
- case CPU_TYPE_X86_64: |
10909 |
- // first 4GB for x86_64 on all OS's |
10910 |
- fZeroPageSize = 0x100000000ULL; |
10911 |
-@@ -4842,9 +4910,11 @@ |
10912 |
- |
10913 |
- // -force_cpusubtype_ALL is not supported for ARM |
10914 |
- if ( fForceSubtypeAll ) { |
10915 |
-+#if SUPPORT_ARCH_arm_any |
10916 |
- if ( fArchitecture == CPU_TYPE_ARM ) { |
10917 |
- warning("-force_cpusubtype_ALL will become unsupported for ARM architectures"); |
10918 |
- } |
10919 |
-+#endif |
10920 |
- } |
10921 |
- |
10922 |
- // -reexported_symbols_list can only be used with -dynamiclib |
10923 |
-diff -ur ld64-241.9/src/ld/OutputFile.cpp ld64-241.9/src/ld/OutputFile.cpp |
10924 |
---- ld64-241.9/src/ld/OutputFile.cpp 2015-01-22 20:59:47.000000000 +0100 |
10925 |
-+++ ld64-241.9/src/ld/OutputFile.cpp 2015-01-22 20:16:24.000000000 +0100 |
10926 |
-@@ -631,7 +631,12 @@ |
10927 |
- // is encoded in mach-o the same as: |
10928 |
- // .long _foo + 0x40000000 |
10929 |
- // so if _foo lays out to 0xC0000100, the first is ok, but the second is not. |
10930 |
-- if ( (_options.architecture() == CPU_TYPE_ARM) || (_options.architecture() == CPU_TYPE_I386) ) { |
10931 |
-+ if ( |
10932 |
-+#if SUPPORT_ARCH_arm_any |
10933 |
-+ (_options.architecture() == CPU_TYPE_ARM) || |
10934 |
-+#endif |
10935 |
-+ (_options.architecture() == CPU_TYPE_I386) || |
10936 |
-+ 0) { |
10937 |
- // Unlikely userland code does funky stuff like this, so warn for them, but not warn for -preload or -static |
10938 |
- if ( (_options.outputKind() != Options::kPreload) && (_options.outputKind() != Options::kStaticExecutable) ) { |
10939 |
- warning("32-bit absolute address out of range (0x%08llX max is 4GB): from %s + 0x%08X (0x%08llX) to 0x%08llX", |
10940 |
-@@ -1235,22 +1240,26 @@ |
10941 |
- return false; |
10942 |
- const ld::Fixup* f; |
10943 |
- switch ( fixup->kind ) { |
10944 |
-+#if SUPPORT_ARCH_arm64 |
10945 |
- case ld::Fixup::kindStoreTargetAddressARM64Page21: |
10946 |
- return !mustBeGOT; |
10947 |
- case ld::Fixup::kindStoreTargetAddressARM64GOTLoadPage21: |
10948 |
- case ld::Fixup::kindStoreTargetAddressARM64GOTLeaPage21: |
10949 |
- return true; |
10950 |
-+#endif |
10951 |
- case ld::Fixup::kindSetTargetAddress: |
10952 |
- f = fixup; |
10953 |
- do { |
10954 |
- ++f; |
10955 |
- } while ( ! f->lastInCluster() ); |
10956 |
- switch (f->kind ) { |
10957 |
-+#if SUPPORT_ARCH_arm64 |
10958 |
- case ld::Fixup::kindStoreARM64Page21: |
10959 |
- return !mustBeGOT; |
10960 |
- case ld::Fixup::kindStoreARM64GOTLoadPage21: |
10961 |
- case ld::Fixup::kindStoreARM64GOTLeaPage21: |
10962 |
- return true; |
10963 |
-+#endif |
10964 |
- default: |
10965 |
- break; |
10966 |
- } |
10967 |
-@@ -1267,22 +1276,26 @@ |
10968 |
- return false; |
10969 |
- const ld::Fixup* f; |
10970 |
- switch ( fixup->kind ) { |
10971 |
-+#if SUPPORT_ARCH_arm64 |
10972 |
- case ld::Fixup::kindStoreTargetAddressARM64PageOff12: |
10973 |
- return !mustBeGOT; |
10974 |
- case ld::Fixup::kindStoreTargetAddressARM64GOTLoadPageOff12: |
10975 |
- case ld::Fixup::kindStoreTargetAddressARM64GOTLeaPageOff12: |
10976 |
- return true; |
10977 |
-+#endif |
10978 |
- case ld::Fixup::kindSetTargetAddress: |
10979 |
- f = fixup; |
10980 |
- do { |
10981 |
- ++f; |
10982 |
- } while ( ! f->lastInCluster() ); |
10983 |
- switch (f->kind ) { |
10984 |
-+#if SUPPORT_ARCH_arm64 |
10985 |
- case ld::Fixup::kindStoreARM64PageOff12: |
10986 |
- return !mustBeGOT; |
10987 |
- case ld::Fixup::kindStoreARM64GOTLoadPageOff12: |
10988 |
- case ld::Fixup::kindStoreARM64GOTLeaPageOff12: |
10989 |
- return true; |
10990 |
-+#endif |
10991 |
- default: |
10992 |
- break; |
10993 |
- } |
10994 |
-@@ -1318,7 +1331,9 @@ |
10995 |
- std::map<uint32_t, const Fixup*> usedByHints; |
10996 |
- for (ld::Fixup::iterator fit = atom->fixupsBegin(), end=atom->fixupsEnd(); fit != end; ++fit) { |
10997 |
- uint8_t* fixUpLocation = &buffer[fit->offsetInAtom]; |
10998 |
-+#if SUPPORT_ARCH_arm64 |
10999 |
- ld::Fixup::LOH_arm64 lohExtra; |
11000 |
-+#endif |
11001 |
- switch ( (ld::Fixup::Kind)(fit->kind) ) { |
11002 |
- case ld::Fixup::kindNone: |
11003 |
- case ld::Fixup::kindNoneFollowOn: |
11004 |
-@@ -1580,6 +1595,7 @@ |
11005 |
- break; |
11006 |
- case ld::Fixup::kindLinkerOptimizationHint: |
11007 |
- // expand table of address/offsets used by hints |
11008 |
-+#if SUPPORT_ARCH_arm64 |
11009 |
- lohExtra.addend = fit->u.addend; |
11010 |
- usedByHints[fit->offsetInAtom + (lohExtra.info.delta1 << 2)] = NULL; |
11011 |
- if ( lohExtra.info.count > 0 ) |
11012 |
-@@ -1588,6 +1604,7 @@ |
11013 |
- usedByHints[fit->offsetInAtom + (lohExtra.info.delta3 << 2)] = NULL; |
11014 |
- if ( lohExtra.info.count > 2 ) |
11015 |
- usedByHints[fit->offsetInAtom + (lohExtra.info.delta4 << 2)] = NULL; |
11016 |
-+#endif |
11017 |
- break; |
11018 |
- case ld::Fixup::kindStoreTargetAddressLittleEndian32: |
11019 |
- accumulator = addressOf(state, fit, &toTarget); |
11020 |
-@@ -2095,6 +2112,7 @@ |
11021 |
- //uint8_t loadSize, destReg; |
11022 |
- //uint32_t scaledOffset; |
11023 |
- //uint32_t imm12; |
11024 |
-+#if SUPPORT_ARCH_arm64 |
11025 |
- ld::Fixup::LOH_arm64 alt; |
11026 |
- alt.addend = fit->u.addend; |
11027 |
- setInfo(state, atom, buffer, usedByHints, fit->offsetInAtom, (alt.info.delta1 << 2), &infoA); |
11028 |
-@@ -2453,6 +2471,7 @@ |
11029 |
- fprintf(stderr, "unknown hint kind %d alt.info.kind at 0x%08llX\n", alt.info.kind, infoA.instructionAddress); |
11030 |
- break; |
11031 |
- } |
11032 |
-+#endif |
11033 |
- } |
11034 |
- // apply hints pass 2 |
11035 |
- for (ld::Fixup::iterator fit = atom->fixupsBegin(), end=atom->fixupsEnd(); fit != end; ++fit) { |
11036 |
-@@ -2460,6 +2479,7 @@ |
11037 |
- continue; |
11038 |
- InstructionInfo infoA; |
11039 |
- InstructionInfo infoB; |
11040 |
-+#if SUPPORT_ARCH_arm64 |
11041 |
- ld::Fixup::LOH_arm64 alt; |
11042 |
- alt.addend = fit->u.addend; |
11043 |
- setInfo(state, atom, buffer, usedByHints, fit->offsetInAtom, (alt.info.delta1 << 2), &infoA); |
11044 |
-@@ -2491,6 +2511,7 @@ |
11045 |
- } |
11046 |
- break; |
11047 |
- } |
11048 |
-+#endif |
11049 |
- } |
11050 |
- } |
11051 |
- #endif // SUPPORT_ARCH_arm64 |
11052 |
-@@ -2505,6 +2526,7 @@ |
11053 |
- for (uint8_t* p=from; p < to; ++p) |
11054 |
- *p = 0x90; |
11055 |
- break; |
11056 |
-+#if SUPPORT_ARCH_arm_any |
11057 |
- case CPU_TYPE_ARM: |
11058 |
- if ( thumb ) { |
11059 |
- for (uint8_t* p=from; p < to; p += 2) |
11060 |
-@@ -2515,6 +2537,7 @@ |
11061 |
- OSWriteLittleInt32((uint32_t*)p, 0, 0xe1a00000); |
11062 |
- } |
11063 |
- break; |
11064 |
-+#endif |
11065 |
- default: |
11066 |
- for (uint8_t* p=from; p < to; ++p) |
11067 |
- *p = 0x00; |
11068 |
-@@ -2843,7 +2866,11 @@ |
11069 |
- |
11070 |
- // in -r mode, clarify symbolTableNotInFinalLinkedImages |
11071 |
- if ( _options.outputKind() == Options::kObjectFile ) { |
11072 |
-- if ( (_options.architecture() == CPU_TYPE_X86_64) || (_options.architecture() == CPU_TYPE_ARM64) ) { |
11073 |
-+ if ( (_options.architecture() == CPU_TYPE_X86_64) || |
11074 |
-+#if SUPPORT_ARCH_arm64 |
11075 |
-+ (_options.architecture() == CPU_TYPE_ARM64) || |
11076 |
-+#endif |
11077 |
-+ 0 ) { |
11078 |
- // x86_64 .o files need labels on anonymous literal strings |
11079 |
- if ( (sect->type() == ld::Section::typeCString) && (atom->combine() == ld::Atom::combineByNameAndContent) ) { |
11080 |
- (const_cast<ld::Atom*>(atom))->setSymbolTableInclusion(ld::Atom::symbolTableIn); |
11081 |
-@@ -4071,8 +4098,10 @@ |
11082 |
- if ( _options.sharedRegionEligible() ) { |
11083 |
- // <rdar://problem/13287063> when range checking, ignore high byte of arm64 addends |
11084 |
- uint64_t checkAddend = addend; |
11085 |
-+#if SUPPORT_ARCH_arm64 |
11086 |
- if ( _options.architecture() == CPU_TYPE_ARM64 ) |
11087 |
- checkAddend &= 0x0FFFFFFFFFFFFFFFULL; |
11088 |
-+#endif |
11089 |
- if ( checkAddend != 0 ) { |
11090 |
- // make sure the addend does not cause the pointer to point outside the target's segment |
11091 |
- // if it does, update_dyld_shared_cache will not be able to put this dylib into the shared cache |
11092 |
-@@ -4279,12 +4308,17 @@ |
11093 |
- |
11094 |
- bool OutputFile::useExternalSectionReloc(const ld::Atom* atom, const ld::Atom* target, ld::Fixup* fixupWithTarget) |
11095 |
- { |
11096 |
-- if ( (_options.architecture() == CPU_TYPE_X86_64) || (_options.architecture() == CPU_TYPE_ARM64) ) { |
11097 |
-+ if ( (_options.architecture() == CPU_TYPE_X86_64) || |
11098 |
-+#if SUPPORT_ARCH_arm64 |
11099 |
-+ (_options.architecture() == CPU_TYPE_ARM64) || |
11100 |
-+#endif |
11101 |
-+ 0) { |
11102 |
- // x86_64 and ARM64 use external relocations for everthing that has a symbol |
11103 |
- return ( target->symbolTableInclusion() != ld::Atom::symbolTableNotIn ); |
11104 |
- } |
11105 |
- |
11106 |
- // <rdar://problem/9513487> support arm branch interworking in -r mode |
11107 |
-+#if SUPPORT_ARCH_arm_any |
11108 |
- if ( (_options.architecture() == CPU_TYPE_ARM) && (_options.outputKind() == Options::kObjectFile) ) { |
11109 |
- if ( atom->isThumb() != target->isThumb() ) { |
11110 |
- switch ( fixupWithTarget->kind ) { |
11111 |
-@@ -4298,6 +4332,7 @@ |
11112 |
- } |
11113 |
- } |
11114 |
- } |
11115 |
-+#endif |
11116 |
- |
11117 |
- if ( (_options.architecture() == CPU_TYPE_I386) && (_options.outputKind() == Options::kObjectFile) ) { |
11118 |
- if ( target->contentType() == ld::Atom::typeTLV ) |
11119 |
-@@ -4365,7 +4400,11 @@ |
11120 |
- bool minusTargetUsesExternalReloc = (minusTarget != NULL) && this->useExternalSectionReloc(atom, minusTarget, fixupWithMinusTarget); |
11121 |
- |
11122 |
- // in x86_64 and arm64 .o files an external reloc means the content contains just the addend |
11123 |
-- if ( (_options.architecture() == CPU_TYPE_X86_64) ||(_options.architecture() == CPU_TYPE_ARM64) ) { |
11124 |
-+ if ( (_options.architecture() == CPU_TYPE_X86_64) || |
11125 |
-+#if SUPPORT_ARCH_arm64 |
11126 |
-+ (_options.architecture() == CPU_TYPE_ARM64) || |
11127 |
-+#endif |
11128 |
-+ 0 ) { |
11129 |
- if ( targetUsesExternalReloc ) { |
11130 |
- fixupWithTarget->contentAddendOnly = true; |
11131 |
- fixupWithStore->contentAddendOnly = true; |
11132 |
-Only in ld64-241.9/src/ld: OutputFile.o |
11133 |
-diff -ur ld64-241.9/src/ld/Resolver.cpp ld64-241.9/src/ld/Resolver.cpp |
11134 |
---- ld64-241.9/src/ld/Resolver.cpp 2015-01-22 20:59:47.000000000 +0100 |
11135 |
-+++ ld64-241.9/src/ld/Resolver.cpp 2015-01-22 20:30:28.000000000 +0100 |
11136 |
-@@ -431,6 +431,7 @@ |
11137 |
- // update cpu-sub-type |
11138 |
- cpu_subtype_t nextObjectSubType = file.cpuSubType(); |
11139 |
- switch ( _options.architecture() ) { |
11140 |
-+#if SUPPORT_ARCH_arm_any |
11141 |
- case CPU_TYPE_ARM: |
11142 |
- if ( _options.subArchitecture() != nextObjectSubType ) { |
11143 |
- if ( (_options.subArchitecture() == CPU_SUBTYPE_ARM_ALL) && _options.forceCpuSubtypeAll() ) { |
11144 |
-@@ -449,6 +450,7 @@ |
11145 |
- } |
11146 |
- } |
11147 |
- break; |
11148 |
-+#endif |
11149 |
- |
11150 |
- case CPU_TYPE_I386: |
11151 |
- _internal.cpuSubType = CPU_SUBTYPE_I386_ALL; |
11152 |
-diff -ur ld64-241.9/src/ld/parsers/archive_file.cpp ld64-241.9/src/ld/parsers/archive_file.cpp |
11153 |
---- ld64-241.9/src/ld/parsers/archive_file.cpp 2015-01-22 20:59:47.000000000 +0100 |
11154 |
-+++ ld64-241.9/src/ld/parsers/archive_file.cpp 2015-01-22 05:57:03.000000000 +0100 |
11155 |
-@@ -232,8 +232,12 @@ |
11156 |
- |
11157 |
- template <> cpu_type_t File<x86>::architecture() { return CPU_TYPE_I386; } |
11158 |
- template <> cpu_type_t File<x86_64>::architecture() { return CPU_TYPE_X86_64; } |
11159 |
-+#if SUPPORT_ARCH_arm_any |
11160 |
- template <> cpu_type_t File<arm>::architecture() { return CPU_TYPE_ARM; } |
11161 |
-+#endif |
11162 |
-+#if SUPPORT_ARCH_arm64 |
11163 |
- template <> cpu_type_t File<arm64>::architecture() { return CPU_TYPE_ARM64; } |
11164 |
-+#endif |
11165 |
- |
11166 |
- |
11167 |
- template <typename A> |
11168 |
-diff -ur ld64-241.9/src/ld/parsers/macho_dylib_file.cpp ld64-241.9/src/ld/parsers/macho_dylib_file.cpp |
11169 |
---- ld64-241.9/src/ld/parsers/macho_dylib_file.cpp 2015-01-22 20:59:47.000000000 +0100 |
11170 |
-+++ ld64-241.9/src/ld/parsers/macho_dylib_file.cpp 2015-01-22 06:07:53.000000000 +0100 |
11171 |
-@@ -258,11 +258,15 @@ |
11172 |
- bool File<A>::_s_logHashtable = false; |
11173 |
- |
11174 |
- template <> const char* File<x86_64>::objCInfoSegmentName() { return "__DATA"; } |
11175 |
-+#if SUPPORT_ARCH_arm_any |
11176 |
- template <> const char* File<arm>::objCInfoSegmentName() { return "__DATA"; } |
11177 |
-+#endif |
11178 |
- template <typename A> const char* File<A>::objCInfoSegmentName() { return "__OBJC"; } |
11179 |
- |
11180 |
- template <> const char* File<x86_64>::objCInfoSectionName() { return "__objc_imageinfo"; } |
11181 |
-+#if SUPPORT_ARCH_arm_any |
11182 |
- template <> const char* File<arm>::objCInfoSectionName() { return "__objc_imageinfo"; } |
11183 |
-+#endif |
11184 |
- template <typename A> const char* File<A>::objCInfoSectionName() { return "__image_info"; } |
11185 |
- |
11186 |
- template <typename A> |
11187 |
-@@ -1020,6 +1024,7 @@ |
11188 |
- } |
11189 |
- } |
11190 |
- |
11191 |
-+#if SUPPORT_ARCH_arm_any |
11192 |
- template <> |
11193 |
- bool Parser<arm>::validFile(const uint8_t* fileContent, bool executableOrDyliborBundle) |
11194 |
- { |
11195 |
-@@ -1046,9 +1051,11 @@ |
11196 |
- return false; |
11197 |
- } |
11198 |
- } |
11199 |
-+#endif |
11200 |
- |
11201 |
- |
11202 |
- |
11203 |
-+#if SUPPORT_ARCH_arm64 |
11204 |
- template <> |
11205 |
- bool Parser<arm64>::validFile(const uint8_t* fileContent, bool executableOrDyliborBundle) |
11206 |
- { |
11207 |
-@@ -1075,6 +1082,7 @@ |
11208 |
- return false; |
11209 |
- } |
11210 |
- } |
11211 |
-+#endif |
11212 |
- |
11213 |
- |
11214 |
- bool isDylibFile(const uint8_t* fileContent, cpu_type_t* result, cpu_subtype_t* subResult) |
11215 |
-@@ -1090,17 +1098,21 @@ |
11216 |
- *subResult = CPU_SUBTYPE_X86_ALL; |
11217 |
- return true; |
11218 |
- } |
11219 |
-+#if SUPPORT_ARCH_arm_any |
11220 |
- if ( Parser<arm>::validFile(fileContent, false) ) { |
11221 |
- *result = CPU_TYPE_ARM; |
11222 |
- const macho_header<Pointer32<LittleEndian> >* header = (const macho_header<Pointer32<LittleEndian> >*)fileContent; |
11223 |
- *subResult = header->cpusubtype(); |
11224 |
- return true; |
11225 |
- } |
11226 |
-+#endif |
11227 |
-+#if SUPPORT_ARCH_arm64 |
11228 |
- if ( Parser<arm64>::validFile(fileContent, false) ) { |
11229 |
- *result = CPU_TYPE_ARM64; |
11230 |
- *subResult = CPU_SUBTYPE_ARM64_ALL; |
11231 |
- return true; |
11232 |
- } |
11233 |
-+#endif |
11234 |
- return false; |
11235 |
- } |
11236 |
- |
11237 |
-@@ -1126,6 +1138,7 @@ |
11238 |
- return "x86_64"; |
11239 |
- } |
11240 |
- |
11241 |
-+#if SUPPORT_ARCH_arm_any |
11242 |
- template <> |
11243 |
- const char* Parser<arm>::fileKind(const uint8_t* fileContent) |
11244 |
- { |
11245 |
-@@ -1141,6 +1154,7 @@ |
11246 |
- } |
11247 |
- return "arm???"; |
11248 |
- } |
11249 |
-+#endif |
11250 |
- |
11251 |
- #if SUPPORT_ARCH_arm64 |
11252 |
- template <> |
11253 |
-@@ -1166,9 +1180,11 @@ |
11254 |
- if ( Parser<x86>::validFile(fileContent, true) ) { |
11255 |
- return Parser<x86>::fileKind(fileContent); |
11256 |
- } |
11257 |
-+#if SUPPORT_ARCH_arm_any |
11258 |
- if ( Parser<arm>::validFile(fileContent, true) ) { |
11259 |
- return Parser<arm>::fileKind(fileContent); |
11260 |
- } |
11261 |
-+#endif |
11262 |
- #if SUPPORT_ARCH_arm64 |
11263 |
- if ( Parser<arm64>::validFile(fileContent, false) ) { |
11264 |
- return Parser<arm64>::fileKind(fileContent); |
11265 |
-diff -ur ld64-241.9/src/ld/parsers/macho_relocatable_file.cpp ld64-241.9/src/ld/parsers/macho_relocatable_file.cpp |
11266 |
---- ld64-241.9/src/ld/parsers/macho_relocatable_file.cpp 2015-01-22 20:59:47.000000000 +0100 |
11267 |
-+++ ld64-241.9/src/ld/parsers/macho_relocatable_file.cpp 2015-01-22 20:38:57.000000000 +0100 |
11268 |
-@@ -867,6 +867,7 @@ |
11269 |
- } |
11270 |
- } |
11271 |
- |
11272 |
-+#if SUPPORT_ARCH_arm_any |
11273 |
- template <> |
11274 |
- void Atom<arm>::verifyAlignment(const macho_section<P>&) const |
11275 |
- { |
11276 |
-@@ -875,6 +876,7 @@ |
11277 |
- warning("ARM function not 4-byte aligned: %s from %s", this->name(), this->file()->path()); |
11278 |
- } |
11279 |
- } |
11280 |
-+#endif |
11281 |
- |
11282 |
- #if SUPPORT_ARCH_arm64 |
11283 |
- template <> |
11284 |
-@@ -1262,6 +1264,7 @@ |
11285 |
- return true; |
11286 |
- } |
11287 |
- |
11288 |
-+#if SUPPORT_ARCH_arm_any |
11289 |
- template <> |
11290 |
- bool Parser<arm>::validFile(const uint8_t* fileContent, bool subtypeMustMatch, cpu_subtype_t subtype) |
11291 |
- { |
11292 |
-@@ -1282,8 +1285,10 @@ |
11293 |
- } |
11294 |
- return true; |
11295 |
- } |
11296 |
-+#endif |
11297 |
- |
11298 |
- |
11299 |
-+#if SUPPORT_ARCH_arm64 |
11300 |
- template <> |
11301 |
- bool Parser<arm64>::validFile(const uint8_t* fileContent, bool subtypeMustMatch, cpu_subtype_t subtype) |
11302 |
- { |
11303 |
-@@ -1296,6 +1301,7 @@ |
11304 |
- return false; |
11305 |
- return true; |
11306 |
- } |
11307 |
-+#endif |
11308 |
- |
11309 |
- |
11310 |
- template <> |
11311 |
-@@ -1320,6 +1326,7 @@ |
11312 |
- return "x86_64"; |
11313 |
- } |
11314 |
- |
11315 |
-+#if SUPPORT_ARCH_arm_any |
11316 |
- template <> |
11317 |
- const char* Parser<arm>::fileKind(const uint8_t* fileContent) |
11318 |
- { |
11319 |
-@@ -1335,6 +1342,7 @@ |
11320 |
- } |
11321 |
- return "arm???"; |
11322 |
- } |
11323 |
-+#endif |
11324 |
- |
11325 |
- #if SUPPORT_ARCH_arm64 |
11326 |
- template <> |
11327 |
-@@ -1599,11 +1607,13 @@ |
11328 |
- return false; |
11329 |
- } |
11330 |
- |
11331 |
-+#if SUPPORT_ARCH_arm_any |
11332 |
- template <> |
11333 |
- arm::P::uint_t Parser<arm>::realAddr(arm::P::uint_t addr) |
11334 |
- { |
11335 |
- return addr & (-2); |
11336 |
- } |
11337 |
-+#endif |
11338 |
- |
11339 |
- template <typename A> |
11340 |
- typename A::P::uint_t Parser<A>::realAddr(typename A::P::uint_t addr) |
11341 |
-@@ -1867,8 +1877,12 @@ |
11342 |
- |
11343 |
- template <> uint8_t Parser<x86>::loadCommandSizeMask() { return 0x03; } |
11344 |
- template <> uint8_t Parser<x86_64>::loadCommandSizeMask() { return 0x07; } |
11345 |
-+#if SUPPORT_ARCH_arm_any |
11346 |
- template <> uint8_t Parser<arm>::loadCommandSizeMask() { return 0x03; } |
11347 |
-+#endif |
11348 |
-+#if SUPPORT_ARCH_arm64 |
11349 |
- template <> uint8_t Parser<arm64>::loadCommandSizeMask() { return 0x07; } |
11350 |
-+#endif |
11351 |
- |
11352 |
- template <typename A> |
11353 |
- bool Parser<A>::parseLoadCommands() |
11354 |
-@@ -4065,12 +4079,14 @@ |
11355 |
- return 1 + (this->_machOSection - parser.firstMachOSection()); |
11356 |
- } |
11357 |
- |
11358 |
-+#if SUPPORT_ARCH_arm_any |
11359 |
- // arm does not have zero cost exceptions |
11360 |
- template <> |
11361 |
- uint32_t CFISection<arm>::cfiCount(Parser<arm>& parser) |
11362 |
- { |
11363 |
- return 0; |
11364 |
- } |
11365 |
-+#endif |
11366 |
- |
11367 |
- template <typename A> |
11368 |
- uint32_t CFISection<A>::cfiCount(Parser<A>& parser) |
11369 |
-@@ -4198,6 +4214,7 @@ |
11370 |
- |
11371 |
- |
11372 |
- |
11373 |
-+#if SUPPORT_ARCH_arm_any |
11374 |
- template <> |
11375 |
- void CFISection<arm>::cfiParse(class Parser<arm>& parser, uint8_t* buffer, |
11376 |
- libunwind::CFI_Atom_Info<CFISection<arm>::OAS>::CFI_Atom_Info cfiArray[], |
11377 |
-@@ -4206,6 +4223,7 @@ |
11378 |
- // arm does not use zero cost exceptions |
11379 |
- assert(count == 0); |
11380 |
- } |
11381 |
-+#endif |
11382 |
- |
11383 |
- |
11384 |
- |
11385 |
-@@ -4310,8 +4328,12 @@ |
11386 |
- |
11387 |
- template <> bool CFISection<x86_64>::bigEndian() { return false; } |
11388 |
- template <> bool CFISection<x86>::bigEndian() { return false; } |
11389 |
-+#if SUPPORT_ARCH_arm_any |
11390 |
- template <> bool CFISection<arm>::bigEndian() { return false; } |
11391 |
-+#endif |
11392 |
-+#if SUPPORT_ARCH_arm64 |
11393 |
- template <> bool CFISection<arm64>::bigEndian() { return false; } |
11394 |
-+#endif |
11395 |
- |
11396 |
- |
11397 |
- template <> |
11398 |
-@@ -5229,11 +5251,13 @@ |
11399 |
- return ld::Fixup::kindStoreLittleEndian32; |
11400 |
- } |
11401 |
- |
11402 |
-+#if SUPPORT_ARCH_arm_any |
11403 |
- template <> |
11404 |
- ld::Fixup::Kind NonLazyPointerSection<arm>::fixupKind() |
11405 |
- { |
11406 |
- return ld::Fixup::kindStoreLittleEndian32; |
11407 |
- } |
11408 |
-+#endif |
11409 |
- |
11410 |
- template <> |
11411 |
- ld::Fixup::Kind NonLazyPointerSection<arm64>::fixupKind() |
11412 |
-@@ -7346,10 +7370,14 @@ |
11413 |
- return ( mach_o::relocatable::Parser<x86_64>::validFile(fileContent) ); |
11414 |
- case CPU_TYPE_I386: |
11415 |
- return ( mach_o::relocatable::Parser<x86>::validFile(fileContent) ); |
11416 |
-+#if SUPPORT_ARCH_arm_any |
11417 |
- case CPU_TYPE_ARM: |
11418 |
- return ( mach_o::relocatable::Parser<arm>::validFile(fileContent, opts.objSubtypeMustMatch, opts.subType) ); |
11419 |
-+#endif |
11420 |
-+#if SUPPORT_ARCH_arm64 |
11421 |
- case CPU_TYPE_ARM64: |
11422 |
- return ( mach_o::relocatable::Parser<arm64>::validFile(fileContent, opts.objSubtypeMustMatch, opts.subType) ); |
11423 |
-+#endif |
11424 |
- } |
11425 |
- return false; |
11426 |
- } |
11427 |
-@@ -7370,17 +7398,21 @@ |
11428 |
- *subResult = CPU_SUBTYPE_X86_ALL; |
11429 |
- return true; |
11430 |
- } |
11431 |
-+#if SUPPORT_ARCH_arm_any |
11432 |
- if ( mach_o::relocatable::Parser<arm>::validFile(fileContent, false, 0) ) { |
11433 |
- *result = CPU_TYPE_ARM; |
11434 |
- const macho_header<Pointer32<LittleEndian> >* header = (const macho_header<Pointer32<LittleEndian> >*)fileContent; |
11435 |
- *subResult = header->cpusubtype(); |
11436 |
- return true; |
11437 |
- } |
11438 |
-+#endif |
11439 |
-+#if SUPPORT_ARCH_arm_any |
11440 |
- if ( mach_o::relocatable::Parser<arm64>::validFile(fileContent, false, 0) ) { |
11441 |
- *result = CPU_TYPE_ARM64; |
11442 |
- *subResult = CPU_SUBTYPE_ARM64_ALL; |
11443 |
- return true; |
11444 |
- } |
11445 |
-+#endif |
11446 |
- return false; |
11447 |
- } |
11448 |
- |
11449 |
-@@ -7395,9 +7427,11 @@ |
11450 |
- if ( mach_o::relocatable::Parser<x86>::validFile(fileContent) ) { |
11451 |
- return mach_o::relocatable::Parser<x86>::fileKind(fileContent); |
11452 |
- } |
11453 |
-+#if SUPPORT_ARCH_arm_any |
11454 |
- if ( mach_o::relocatable::Parser<arm>::validFile(fileContent, false, 0) ) { |
11455 |
- return mach_o::relocatable::Parser<arm>::fileKind(fileContent); |
11456 |
- } |
11457 |
-+#endif |
11458 |
- return NULL; |
11459 |
- } |
11460 |
- |
11461 |
-@@ -7409,9 +7443,11 @@ |
11462 |
- if ( mach_o::relocatable::Parser<x86_64>::validFile(fileContent) ) { |
11463 |
- return mach_o::relocatable::Parser<x86_64>::hasObjC2Categories(fileContent); |
11464 |
- } |
11465 |
-+#if SUPPORT_ARCH_arm_any |
11466 |
- else if ( mach_o::relocatable::Parser<arm>::validFile(fileContent, false, 0) ) { |
11467 |
- return mach_o::relocatable::Parser<arm>::hasObjC2Categories(fileContent); |
11468 |
- } |
11469 |
-+#endif |
11470 |
- else if ( mach_o::relocatable::Parser<x86>::validFile(fileContent, false, 0) ) { |
11471 |
- return mach_o::relocatable::Parser<x86>::hasObjC2Categories(fileContent); |
11472 |
- } |
11473 |
-diff -ur ld64-241.9/src/ld/passes/branch_island.cpp ld64-241.9/src/ld/passes/branch_island.cpp |
11474 |
---- ld64-241.9/src/ld/passes/branch_island.cpp 2014-09-11 00:24:46.000000000 +0200 |
11475 |
-+++ ld64-241.9/src/ld/passes/branch_island.cpp 2015-01-22 06:23:52.000000000 +0100 |
11476 |
-@@ -285,6 +285,7 @@ |
11477 |
- static uint64_t textSizeWhenMightNeedBranchIslands(const Options& opts, bool seenThumbBranch) |
11478 |
- { |
11479 |
- switch ( opts.architecture() ) { |
11480 |
-+#if SUPPORT_ARCH_arm_any |
11481 |
- case CPU_TYPE_ARM: |
11482 |
- if ( ! seenThumbBranch ) |
11483 |
- return 32000000; // ARM can branch +/- 32MB |
11484 |
-@@ -293,6 +294,7 @@ |
11485 |
- else |
11486 |
- return 4000000; // thumb1 can branch +/- 4MB |
11487 |
- break; |
11488 |
-+#endif |
11489 |
- } |
11490 |
- assert(0 && "unexpected architecture"); |
11491 |
- return 0x100000000LL; |
11492 |
-@@ -302,6 +304,7 @@ |
11493 |
- static uint64_t maxDistanceBetweenIslands(const Options& opts, bool seenThumbBranch) |
11494 |
- { |
11495 |
- switch ( opts.architecture() ) { |
11496 |
-+#if SUPPORT_ARCH_arm_any |
11497 |
- case CPU_TYPE_ARM: |
11498 |
- if ( ! seenThumbBranch ) |
11499 |
- return 30*1024*1024; // 2MB of branch islands per 32MB |
11500 |
-@@ -310,6 +313,7 @@ |
11501 |
- else |
11502 |
- return 3500000; // 0.5MB of branch islands per 4MB |
11503 |
- break; |
11504 |
-+#endif |
11505 |
- } |
11506 |
- assert(0 && "unexpected architecture"); |
11507 |
- return 0x100000000LL; |
11508 |
-@@ -654,8 +658,10 @@ |
11509 |
- |
11510 |
- // only ARM needs branch islands |
11511 |
- switch ( opts.architecture() ) { |
11512 |
-+#if SUPPORT_ARCH_arm_any |
11513 |
- case CPU_TYPE_ARM: |
11514 |
- break; |
11515 |
-+#endif |
11516 |
- default: |
11517 |
- return; |
11518 |
- } |
11519 |
-diff -ur ld64-241.9/src/ld/passes/branch_shim.cpp ld64-241.9/src/ld/passes/branch_shim.cpp |
11520 |
---- ld64-241.9/src/ld/passes/branch_shim.cpp 2014-09-11 00:24:46.000000000 +0200 |
11521 |
-+++ ld64-241.9/src/ld/passes/branch_shim.cpp 2015-01-22 06:33:01.000000000 +0100 |
11522 |
-@@ -276,6 +276,9 @@ |
11523 |
- // |
11524 |
- void doPass(const Options& opts, ld::Internal& state) |
11525 |
- { |
11526 |
-+#if !SUPPORT_ARCH_arm_any |
11527 |
-+ return; |
11528 |
-+#else |
11529 |
- // only make branch shims in final linked images |
11530 |
- if ( opts.outputKind() == Options::kObjectFile ) |
11531 |
- return; |
11532 |
-@@ -386,6 +389,7 @@ |
11533 |
- // append all new shims to end of __text |
11534 |
- sect->atoms.insert(sect->atoms.end(), shims.begin(), shims.end()); |
11535 |
- } |
11536 |
-+#endif |
11537 |
- } |
11538 |
- |
11539 |
- |
11540 |
-diff -ur ld64-241.9/src/ld/passes/dtrace_dof.cpp ld64-241.9/src/ld/passes/dtrace_dof.cpp |
11541 |
---- ld64-241.9/src/ld/passes/dtrace_dof.cpp 2015-01-22 20:59:47.000000000 +0100 |
11542 |
-+++ ld64-241.9/src/ld/passes/dtrace_dof.cpp 2015-01-22 06:33:51.000000000 +0100 |
11543 |
-@@ -179,8 +179,12 @@ |
11544 |
- switch ( opts.architecture() ) { |
11545 |
- case CPU_TYPE_I386: |
11546 |
- case CPU_TYPE_X86_64: |
11547 |
-+#if SUPPORT_ARCH_arm_any |
11548 |
- case CPU_TYPE_ARM: |
11549 |
-+#endif |
11550 |
-+#if SUPPORT_ARCH_arm64 |
11551 |
- case CPU_TYPE_ARM64: |
11552 |
-+#endif |
11553 |
- storeKind = ld::Fixup::kindStoreLittleEndian32; |
11554 |
- break; |
11555 |
- default: |
11556 |
-diff -ur ld64-241.9/src/ld/passes/stubs/stubs.cpp ld64-241.9/src/ld/passes/stubs/stubs.cpp |
11557 |
---- ld64-241.9/src/ld/passes/stubs/stubs.cpp 2014-09-11 00:24:46.000000000 +0200 |
11558 |
-+++ ld64-241.9/src/ld/passes/stubs/stubs.cpp 2015-01-22 06:34:56.000000000 +0100 |
11559 |
-@@ -324,9 +324,11 @@ |
11560 |
- if ( _options.outputKind() != Options::kDynamicLibrary ) |
11561 |
- throwf("resolver functions (%s) can only be used in dylibs", atom->name()); |
11562 |
- if ( !_options.makeCompressedDyldInfo() ) { |
11563 |
-+#if SUPPORT_ARCH_arm_any |
11564 |
- if ( _options.architecture() == CPU_TYPE_ARM ) |
11565 |
- throwf("resolver functions (%s) can only be used when targeting iOS 4.2 or later", atom->name()); |
11566 |
- else |
11567 |
-+#endif |
11568 |
- throwf("resolver functions (%s) can only be used when targeting Mac OS X 10.6 or later", atom->name()); |
11569 |
- } |
11570 |
- stubFor[atom] = NULL; |
11571 |
-@@ -354,6 +356,7 @@ |
11572 |
- throw "symbol dyld_stub_binding_helper not found, normally in crt1.o/dylib1.o/bundle1.o"; |
11573 |
- |
11574 |
- // disable arm close stubs in some cases |
11575 |
-+#if SUPPORT_ARCH_arm_any |
11576 |
- if ( _architecture == CPU_TYPE_ARM ) { |
11577 |
- if ( codeSize > 4*1024*1024 ) |
11578 |
- _largeText = true; |
11579 |
-@@ -377,6 +380,7 @@ |
11580 |
- } |
11581 |
- } |
11582 |
- } |
11583 |
-+#endif |
11584 |
- |
11585 |
- // make stub atoms |
11586 |
- for (std::map<const ld::Atom*,ld::Atom*>::iterator it = stubFor.begin(); it != stubFor.end(); ++it) { |
11587 |
-diff -ur ld64-241.9/src/other/ObjectDump.cpp ld64-241.9/src/other/ObjectDump.cpp |
11588 |
---- ld64-241.9/src/other/ObjectDump.cpp 2015-01-22 20:59:47.000000000 +0100 |
11589 |
-+++ ld64-241.9/src/other/ObjectDump.cpp 2015-01-22 05:32:46.000000000 +0100 |
11590 |
-@@ -806,6 +806,7 @@ |
11591 |
- case ld::Fixup::kindStoreThumbHigh16: |
11592 |
- printf(", then store high-16 in Thumb movt"); |
11593 |
- break; |
11594 |
-+#if SUPPORT_ARCH_arm64 |
11595 |
- case ld::Fixup::kindStoreARM64Branch26: |
11596 |
- printf(", then store as ARM64 26-bit pcrel branch"); |
11597 |
- break; |
11598 |
-@@ -845,6 +846,7 @@ |
11599 |
- case ld::Fixup::kindStoreARM64PCRelToGOT: |
11600 |
- printf(", then store as 32-bit delta to GOT entry"); |
11601 |
- break; |
11602 |
-+#endif |
11603 |
- case ld::Fixup::kindDtraceExtra: |
11604 |
- printf("dtrace static probe extra info"); |
11605 |
- break; |
11606 |
-@@ -989,6 +991,7 @@ |
11607 |
- case ld::Fixup::kindSetTargetTLVTemplateOffsetLittleEndian64: |
11608 |
- printf("tlv template offset of %s", referenceTargetAtomName(ref)); |
11609 |
- break; |
11610 |
-+#if SUPPORT_ARCH_arm64 |
11611 |
- case ld::Fixup::kindStoreTargetAddressARM64Branch26: |
11612 |
- printf("ARM64 store 26-bit pcrel branch to %s", referenceTargetAtomName(ref)); |
11613 |
- break; |
11614 |
-@@ -1022,6 +1025,7 @@ |
11615 |
- case ld::Fixup::kindStoreTargetAddressARM64TLVPLoadNowLeaPageOff12: |
11616 |
- printf("ARM64 store 12-bit page offset of lea for TLV of %s", referenceTargetAtomName(ref)); |
11617 |
- break; |
11618 |
-+#endif |
11619 |
- //default: |
11620 |
- // printf("unknown fixup"); |
11621 |
- // break; |
11622 |
-diff -ur ld64-241.9/src/other/rebase.cpp ld64-241.9/src/other/rebase.cpp |
11623 |
---- ld64-241.9/src/other/rebase.cpp 2014-09-11 00:24:46.000000000 +0200 |
11624 |
-+++ ld64-241.9/src/other/rebase.cpp 2015-01-22 05:46:29.000000000 +0100 |
11625 |
-@@ -160,9 +160,11 @@ |
11626 |
- case CPU_TYPE_X86_64: |
11627 |
- fRebasers.push_back(new Rebaser<x86_64>(&p[fileOffset])); |
11628 |
- break; |
11629 |
-+#if SUPPORT_ARCH_arm_any |
11630 |
- case CPU_TYPE_ARM: |
11631 |
- fRebasers.push_back(new Rebaser<arm>(&p[fileOffset])); |
11632 |
- break; |
11633 |
-+#endif |
11634 |
- default: |
11635 |
- throw "unknown file format"; |
11636 |
- } |
11637 |
-@@ -186,9 +188,11 @@ |
11638 |
- else if ( (OSSwapLittleToHostInt32(mh->magic) == MH_MAGIC_64) && (OSSwapLittleToHostInt32(mh->cputype) == CPU_TYPE_X86_64)) { |
11639 |
- fRebasers.push_back(new Rebaser<x86_64>(mh)); |
11640 |
- } |
11641 |
-+#if SUPPORT_ARCH_arm_any |
11642 |
- else if ( (OSSwapLittleToHostInt32(mh->magic) == MH_MAGIC) && (OSSwapLittleToHostInt32(mh->cputype) == CPU_TYPE_ARM)) { |
11643 |
- fRebasers.push_back(new Rebaser<arm>(mh)); |
11644 |
- } |
11645 |
-+#endif |
11646 |
- else { |
11647 |
- throw "unknown file format"; |
11648 |
- } |
11649 |
-@@ -236,7 +240,9 @@ |
11650 |
- template <> cpu_type_t Rebaser<ppc64>::getArchitecture() const { return CPU_TYPE_POWERPC64; } |
11651 |
- template <> cpu_type_t Rebaser<x86>::getArchitecture() const { return CPU_TYPE_I386; } |
11652 |
- template <> cpu_type_t Rebaser<x86_64>::getArchitecture() const { return CPU_TYPE_X86_64; } |
11653 |
-+#if SUPPORT_ARCH_arm_any |
11654 |
- template <> cpu_type_t Rebaser<arm>::getArchitecture() const { return CPU_TYPE_ARM; } |
11655 |
-+#endif |
11656 |
- |
11657 |
- template <typename A> |
11658 |
- uint64_t Rebaser<A>::getBaseAddress() const |
11659 |
-@@ -875,8 +881,10 @@ |
11660 |
- return "i386"; |
11661 |
- case CPU_TYPE_X86_64: |
11662 |
- return "x86_64"; |
11663 |
-+#if SUPPORT_ARCH_arm_any |
11664 |
- case CPU_TYPE_ARM: |
11665 |
- return "arm"; |
11666 |
-+#endif |
11667 |
- } |
11668 |
- return "unknown"; |
11669 |
- } |
11670 |
-@@ -969,6 +977,7 @@ |
11671 |
- else if ( arch == CPU_TYPE_X86_64 ) { |
11672 |
- return 0x200000000ULL; |
11673 |
- } |
11674 |
-+#if SUPPORT_ARCH_arm_any |
11675 |
- else if ( arch == CPU_TYPE_ARM ) { |
11676 |
- // place dylibs below dyld |
11677 |
- uint64_t topAddr = 0x2FE00000; |
11678 |
-@@ -977,6 +986,7 @@ |
11679 |
- throwf("total size of images (0x%X) does not fit below 0x2FE00000", totalSize); |
11680 |
- return topAddr - totalSize; |
11681 |
- } |
11682 |
-+#endif |
11683 |
- else |
11684 |
- throw "unknown architecture"; |
11685 |
- } |
11686 |
-@@ -1043,7 +1053,9 @@ |
11687 |
- onlyArchs.insert(CPU_TYPE_POWERPC64); |
11688 |
- onlyArchs.insert(CPU_TYPE_I386); |
11689 |
- onlyArchs.insert(CPU_TYPE_X86_64); |
11690 |
-+#if SUPPORT_ARCH_arm_any |
11691 |
- onlyArchs.insert(CPU_TYPE_ARM); |
11692 |
-+#endif |
11693 |
- } |
11694 |
- |
11695 |
- // scan files and collect sizes |
11696 |
-diff -ur ld64-241.9/src/other/unwinddump.cpp ld64-241.9/src/other/unwinddump.cpp |
11697 |
---- ld64-241.9/src/other/unwinddump.cpp 2015-01-22 20:59:47.000000000 +0100 |
11698 |
-+++ ld64-241.9/src/other/unwinddump.cpp 2015-01-22 05:45:28.000000000 +0100 |
11699 |
-@@ -97,7 +97,9 @@ |
11700 |
- |
11701 |
- template <> const char* UnwindPrinter<x86>::archName() { return "i386"; } |
11702 |
- template <> const char* UnwindPrinter<x86_64>::archName() { return "x86_64"; } |
11703 |
-+#if SUPPORT_ARCH_arm_any |
11704 |
- template <> const char* UnwindPrinter<arm>::archName() { return "arm"; } |
11705 |
-+#endif |
11706 |
- #if SUPPORT_ARCH_arm64 |
11707 |
- template <> const char* UnwindPrinter<arm64>::archName() { return "arm64"; } |
11708 |
- #endif |
11709 |
-@@ -1072,7 +1074,9 @@ |
11710 |
- #if SUPPORT_ARCH_arm64 |
11711 |
- onlyArchs.insert(CPU_TYPE_ARM64); |
11712 |
- #endif |
11713 |
-+#if SUPPORT_ARCH_arm_any |
11714 |
- onlyArchs.insert(CPU_TYPE_ARM); |
11715 |
-+#endif |
11716 |
- } |
11717 |
- |
11718 |
- // process each file |
11719 |
---- ld64-241.9/src/other/machochecker.cpp 2015-01-23 01:54:12.000000000 +0100 |
11720 |
-+++ ld64-241.9/src/other/machochecker.cpp 2015-01-23 01:57:11.000000000 +0100 |
11721 |
-@@ -252,6 +252,7 @@ |
11722 |
- return false; |
11723 |
- } |
11724 |
- |
11725 |
-+#if SUPPORT_ARCH_arm_any |
11726 |
- template <> |
11727 |
- bool MachOChecker<arm>::validFile(const uint8_t* fileContent) |
11728 |
- { |
11729 |
-@@ -269,6 +270,7 @@ |
11730 |
- } |
11731 |
- return false; |
11732 |
- } |
11733 |
-+#endif |
11734 |
- |
11735 |
- #if SUPPORT_ARCH_arm64 |
11736 |
- template <> |
11737 |
-@@ -294,7 +296,9 @@ |
11738 |
- template <> uint8_t MachOChecker<ppc64>::loadCommandSizeMask() { return 0x07; } |
11739 |
- template <> uint8_t MachOChecker<x86>::loadCommandSizeMask() { return 0x03; } |
11740 |
- template <> uint8_t MachOChecker<x86_64>::loadCommandSizeMask() { return 0x07; } |
11741 |
-+#if SUPPORT_ARCH_arm_any |
11742 |
- template <> uint8_t MachOChecker<arm>::loadCommandSizeMask() { return 0x03; } |
11743 |
-+#endif |
11744 |
- #if SUPPORT_ARCH_arm64 |
11745 |
- template <> uint8_t MachOChecker<arm64>::loadCommandSizeMask() { return 0x07; } |
11746 |
- #endif |
11747 |
-@@ -324,11 +328,13 @@ |
11748 |
- return threadInfo->thread_register(7); |
11749 |
- } |
11750 |
- |
11751 |
-+#if SUPPORT_ARCH_arm_any |
11752 |
- template <> |
11753 |
- arm::P::uint_t MachOChecker<arm>::getInitialStackPointer(const macho_thread_command<arm::P>* threadInfo) |
11754 |
- { |
11755 |
- return threadInfo->thread_register(13); |
11756 |
- } |
11757 |
-+#endif |
11758 |
- |
11759 |
- #if SUPPORT_ARCH_arm64 |
11760 |
- template <> |
11761 |
-@@ -362,11 +368,13 @@ |
11762 |
- return threadInfo->thread_register(16); |
11763 |
- } |
11764 |
- |
11765 |
-+#if SUPPORT_ARCH_arm_any |
11766 |
- template <> |
11767 |
- arm::P::uint_t MachOChecker<arm>::getEntryPoint(const macho_thread_command<arm::P>* threadInfo) |
11768 |
- { |
11769 |
- return threadInfo->thread_register(15); |
11770 |
- } |
11771 |
-+#endif |
11772 |
- |
11773 |
- #if SUPPORT_ARCH_arm64 |
11774 |
- template <> |
11775 |
-@@ -1025,6 +1033,7 @@ |
11776 |
- return fFirstWritableSegment->vmaddr(); |
11777 |
- } |
11778 |
- |
11779 |
-+#if SUPPORT_ARCH_arm_any |
11780 |
- template <> |
11781 |
- arm::P::uint_t MachOChecker<arm>::relocBase() |
11782 |
- { |
11783 |
-@@ -1033,6 +1042,7 @@ |
11784 |
- else |
11785 |
- return fFirstSegment->vmaddr(); |
11786 |
- } |
11787 |
-+#endif |
11788 |
- |
11789 |
- #if SUPPORT_ARCH_arm64 |
11790 |
- template <> |
11791 |
|
11792 |
diff --git a/sys-devel/binutils-apple/files/ld64-241.9-nosnapshots.patch b/sys-devel/binutils-apple/files/ld64-241.9-nosnapshots.patch |
11793 |
deleted file mode 100644 |
11794 |
index f484111..0000000 |
11795 |
--- a/sys-devel/binutils-apple/files/ld64-241.9-nosnapshots.patch |
11796 |
+++ /dev/null |
11797 |
@@ -1,644 +0,0 @@ |
11798 |
-Allow to disable snapshot support because of missing Block API on OS X < 10.6. |
11799 |
- |
11800 |
---- ld64-241.9/src/ld/InputFiles.cpp.orig 2015-01-16 15:26:31.000000000 -0800 |
11801 |
-+++ ld64-241.9/src/ld/InputFiles.cpp 2015-01-16 15:26:54.000000000 -0800 |
11802 |
-@@ -1144,7 +1144,9 @@ |
11803 |
- case ld::File::Reloc: |
11804 |
- { |
11805 |
- ld::relocatable::File* reloc = (ld::relocatable::File*)file; |
11806 |
-+#ifdef SUPPORT_SNAPSHOTS |
11807 |
- _options.snapshot().recordObjectFile(reloc->path()); |
11808 |
-+#endif |
11809 |
- if ( _options.dumpDependencyInfo() ) |
11810 |
- _options.dumpDependency(Options::depObjectFile, reloc->path()); |
11811 |
- } |
11812 |
-@@ -1244,7 +1246,9 @@ |
11813 |
- if ( dylibFile->justInTimeforEachAtom(name, handler) ) { |
11814 |
- // we found a definition in this dylib |
11815 |
- // done, unless it is a weak definition in which case we keep searching |
11816 |
-+#ifdef SUPPORT_SNAPSHOTS |
11817 |
- _options.snapshot().recordDylibSymbol(dylibFile, name); |
11818 |
-+#endif |
11819 |
- if ( !dylibFile->hasWeakExternals() || !dylibFile->hasWeakDefinition(name)) { |
11820 |
- return true; |
11821 |
- } |
11822 |
-@@ -1258,7 +1262,9 @@ |
11823 |
- if ( archiveFile->justInTimeDataOnlyforEachAtom(name, handler) ) { |
11824 |
- if ( _options.traceArchives() ) |
11825 |
- logArchive(archiveFile); |
11826 |
-+#ifdef SUPPORT_SNAPSHOTS |
11827 |
- _options.snapshot().recordArchive(archiveFile->path()); |
11828 |
-+#endif |
11829 |
- // found data definition in static library, done |
11830 |
- return true; |
11831 |
- } |
11832 |
-@@ -1267,7 +1273,9 @@ |
11833 |
- if ( archiveFile->justInTimeforEachAtom(name, handler) ) { |
11834 |
- if ( _options.traceArchives() ) |
11835 |
- logArchive(archiveFile); |
11836 |
-+#ifdef SUPPORT_SNAPSHOTS |
11837 |
- _options.snapshot().recordArchive(archiveFile->path()); |
11838 |
-+#endif |
11839 |
- // found definition in static library, done |
11840 |
- return true; |
11841 |
- } |
11842 |
-@@ -1294,7 +1302,9 @@ |
11843 |
- if ( dylibFile->justInTimeforEachAtom(name, handler) ) { |
11844 |
- // we found a definition in this dylib |
11845 |
- // done, unless it is a weak definition in which case we keep searching |
11846 |
-+#ifdef SUPPORT_SNAPSHOTS |
11847 |
- _options.snapshot().recordDylibSymbol(dylibFile, name); |
11848 |
-+#endif |
11849 |
- if ( !dylibFile->hasWeakExternals() || !dylibFile->hasWeakDefinition(name)) { |
11850 |
- return true; |
11851 |
- } |
11852 |
---- ld64-241.9/src/ld/ld.cpp.orig 2015-01-16 15:26:32.000000000 -0800 |
11853 |
-+++ ld64-241.9/src/ld/ld.cpp 2015-01-16 15:26:54.000000000 -0800 |
11854 |
-@@ -1180,11 +1180,13 @@ |
11855 |
- // implement assert() function to print out a backtrace before aborting |
11856 |
- void __assert_rtn(const char* func, const char* file, int line, const char* failedexpr) |
11857 |
- { |
11858 |
-+#ifdef SUPPORT_SNAPSHOTS |
11859 |
- Snapshot *snapshot = Snapshot::globalSnapshot; |
11860 |
- |
11861 |
- snapshot->setSnapshotMode(Snapshot::SNAPSHOT_DEBUG); |
11862 |
- snapshot->createSnapshot(); |
11863 |
- snapshot->recordAssertionMessage("Assertion failed: (%s), function %s, file %s, line %d.\n", failedexpr, func, file, line); |
11864 |
-+#endif |
11865 |
- |
11866 |
- void* callStack[128]; |
11867 |
- int depth = ::backtrace(callStack, 128); |
11868 |
-@@ -1202,9 +1204,13 @@ |
11869 |
- } |
11870 |
- long offset = (uintptr_t)callStack[i] - (uintptr_t)info.dli_saddr; |
11871 |
- fprintf(stderr, "%d %p %s + %ld\n", i, callStack[i], symboName, offset); |
11872 |
-+#ifdef SUPPORT_SNAPSHOTS |
11873 |
- snapshot->recordAssertionMessage("%d %p %s + %ld\n", i, callStack[i], symboName, offset); |
11874 |
-+#endif |
11875 |
- } |
11876 |
-+#ifdef SUPPORT_SNAPSHOTS |
11877 |
- fprintf(stderr, "A linker snapshot was created at:\n\t%s\n", snapshot->rootDir()); |
11878 |
-+#endif |
11879 |
- fprintf(stderr, "ld: Assertion failed: (%s), function %s, file %s, line %d.\n", failedexpr, func, file, line); |
11880 |
- exit(1); |
11881 |
- } |
11882 |
---- ld64-241.9/src/ld/Options.cpp.orig 2015-01-16 15:26:32.000000000 -0800 |
11883 |
-+++ ld64-241.9/src/ld/Options.cpp 2015-01-16 15:27:26.000000000 -0800 |
11884 |
-@@ -183,7 +183,11 @@ |
11885 |
- fMarkAppExtensionSafe(false), fCheckAppExtensionSafe(false), fForceLoadSwiftLibs(false), |
11886 |
- fDebugInfoStripping(kDebugInfoMinimal), fTraceOutputFile(NULL), |
11887 |
- fMacVersionMin(ld::macVersionUnset), fIOSVersionMin(ld::iOSVersionUnset), |
11888 |
-- fSaveTempFiles(false), fSnapshotRequested(false), fPipelineFifo(NULL), |
11889 |
-+ fSaveTempFiles(false), |
11890 |
-+#ifdef SUPPORT_SNAPSHOTS |
11891 |
-+ fSnapshotRequested(false), |
11892 |
-+#endif |
11893 |
-+ fPipelineFifo(NULL), |
11894 |
- fDependencyInfoPath(NULL), fDependencyFileDescriptor(-1) |
11895 |
- { |
11896 |
- this->checkForClassic(argc, argv); |
11897 |
-@@ -589,7 +593,9 @@ |
11898 |
- } |
11899 |
- break; |
11900 |
- } |
11901 |
-+#ifdef SUPPORT_SNAPSHOTS |
11902 |
- fLinkSnapshot.recordArch(fArchitectureName); |
11903 |
-+#endif |
11904 |
- // only use compressed LINKEDIT for: |
11905 |
- // Mac OS X 10.6 or later |
11906 |
- // iOS 3.1 or later |
11907 |
-@@ -1908,8 +1914,10 @@ |
11908 |
- // |
11909 |
- void Options::parse(int argc, const char* argv[]) |
11910 |
- { |
11911 |
-+#ifdef SUPPORT_SNAPSHOTS |
11912 |
- // Store the original args in the link snapshot. |
11913 |
- fLinkSnapshot.recordRawArgs(argc, argv); |
11914 |
-+#endif |
11915 |
- |
11916 |
- // pass one builds search list from -L and -F options |
11917 |
- this->buildSearchPaths(argc, argv); |
11918 |
-@@ -1922,17 +1930,21 @@ |
11919 |
- const char* arg = argv[i]; |
11920 |
- |
11921 |
- if ( arg[0] == '-' ) { |
11922 |
-+#ifdef SUPPORT_SNAPSHOTS |
11923 |
- // by default, copy one arg to the snapshot link command, and do no file copying |
11924 |
- int snapshotArgIndex = i; |
11925 |
- int snapshotArgCount = -1; // -1 means compute count based on change in index |
11926 |
- int snapshotFileArgIndex = -1; // -1 means no data file parameter to arg |
11927 |
-+#endif |
11928 |
- |
11929 |
- // Since we don't care about the files passed, just the option names, we do this here. |
11930 |
- if (fPrintOptions) |
11931 |
- fprintf (stderr, "[Logging ld64 options]\t%s\n", arg); |
11932 |
- |
11933 |
- if ( (arg[1] == 'L') || (arg[1] == 'F') ) { |
11934 |
-+#ifdef SUPPORT_SNAPSHOTS |
11935 |
- snapshotArgCount = 0; // stripped out of link snapshot |
11936 |
-+#endif |
11937 |
- if (arg[2] == '\0') |
11938 |
- ++i; |
11939 |
- // previously handled by buildSearchPaths() |
11940 |
-@@ -1979,12 +1991,16 @@ |
11941 |
- fOutputKind = kKextBundle; |
11942 |
- } |
11943 |
- else if ( strcmp(arg, "-o") == 0 ) { |
11944 |
-- snapshotArgCount = 0; |
11945 |
- fOutputFile = argv[++i]; |
11946 |
-+#ifdef SUPPORT_SNAPSHOTS |
11947 |
-+ snapshotArgCount = 0; |
11948 |
- fLinkSnapshot.setSnapshotName(fOutputFile); |
11949 |
-+#endif |
11950 |
- } |
11951 |
- else if ( strncmp(arg, "-lazy-l", 7) == 0 ) { |
11952 |
-+#ifdef SUPPORT_SNAPSHOTS |
11953 |
- snapshotArgCount = 0; |
11954 |
-+#endif |
11955 |
- FileInfo info = findLibrary(&arg[7], true); |
11956 |
- info.options.fLazyLoad = true; |
11957 |
- info.ordinal = ld::File::Ordinal::makeArgOrdinal((uint16_t)i); |
11958 |
-@@ -1992,13 +2008,17 @@ |
11959 |
- fUsingLazyDylibLinking = true; |
11960 |
- } |
11961 |
- else if ( strcmp(arg, "-lto_library") == 0 ) { |
11962 |
-+#ifdef SUPPORT_SNAPSHOTS |
11963 |
- snapshotFileArgIndex = 1; |
11964 |
-+#endif |
11965 |
- fOverridePathlibLTO = argv[++i]; |
11966 |
- if ( fOverridePathlibLTO == NULL ) |
11967 |
- throw "missing argument to -lto_library"; |
11968 |
- } |
11969 |
- else if ( (arg[1] == 'l') && (strncmp(arg,"-lazy_",6) !=0) ) { |
11970 |
-+#ifdef SUPPORT_SNAPSHOTS |
11971 |
- snapshotArgCount = 0; |
11972 |
-+#endif |
11973 |
- FileInfo info = findLibrary(&arg[2]); |
11974 |
- info.ordinal = ld::File::Ordinal::makeArgOrdinal((uint16_t)i); |
11975 |
- addLibrary(info); |
11976 |
-@@ -2006,8 +2026,10 @@ |
11977 |
- // This causes a dylib to be weakly bound at |
11978 |
- // link time. This corresponds to weak_import. |
11979 |
- else if ( strncmp(arg, "-weak-l", 7) == 0 ) { |
11980 |
-+#ifdef SUPPORT_SNAPSHOTS |
11981 |
- // SNAPSHOT FIXME: what should we do for link snapshots? (ignore for now) |
11982 |
- snapshotArgCount = 0; |
11983 |
-+#endif |
11984 |
- FileInfo info = findLibrary(&arg[7]); |
11985 |
- info.options.fWeakImport = true; |
11986 |
- info.ordinal = ld::File::Ordinal::makeArgOrdinal((uint16_t)i); |
11987 |
-@@ -2065,12 +2087,16 @@ |
11988 |
- else if ( strcmp(arg, "-sectorder") == 0 ) { |
11989 |
- if ( (argv[i+1]==NULL) || (argv[i+2]==NULL) || (argv[i+3]==NULL) ) |
11990 |
- throw "-sectorder missing <segment> <section> <file-path>"; |
11991 |
-+#ifdef SUPPORT_SNAPSHOTS |
11992 |
- snapshotFileArgIndex = 3; |
11993 |
-+#endif |
11994 |
- parseSectionOrderFile(argv[i+1], argv[i+2], argv[i+3]); |
11995 |
- i += 3; |
11996 |
- } |
11997 |
- else if ( strcmp(arg, "-order_file") == 0 ) { |
11998 |
-+#ifdef SUPPORT_SNAPSHOTS |
11999 |
- snapshotFileArgIndex = 1; |
12000 |
-+#endif |
12001 |
- parseOrderFile(argv[++i], false); |
12002 |
- } |
12003 |
- else if ( strcmp(arg, "-order_file_statistics") == 0 ) { |
12004 |
-@@ -2081,7 +2107,9 @@ |
12005 |
- else if ( (strcmp(arg, "-sectcreate") == 0) || (strcmp(arg, "-segcreate") == 0) ) { |
12006 |
- if ( (argv[i+1]==NULL) || (argv[i+2]==NULL) || (argv[i+3]==NULL) ) |
12007 |
- throw "-sectcreate missing <segment> <section> <file-path>"; |
12008 |
-+#ifdef SUPPORT_SNAPSHOTS |
12009 |
- snapshotFileArgIndex = 3; |
12010 |
-+#endif |
12011 |
- addSection(argv[i+1], argv[i+2], argv[i+3]); |
12012 |
- i += 3; |
12013 |
- } |
12014 |
-@@ -2110,7 +2138,9 @@ |
12015 |
- } |
12016 |
- // Same as -@ from the FSF linker. |
12017 |
- else if ( strcmp(arg, "-filelist") == 0 ) { |
12018 |
-+#ifdef SUPPORT_SNAPSHOTS |
12019 |
- snapshotArgCount = 0; |
12020 |
-+#endif |
12021 |
- const char* path = argv[++i]; |
12022 |
- if ( (path == NULL) || (path[0] == '-') ) |
12023 |
- throw "-filelist missing <path>"; |
12024 |
-@@ -2137,7 +2167,9 @@ |
12025 |
- } |
12026 |
- } |
12027 |
- else if ( strcmp(arg, "-interposable_list") == 0 ) { |
12028 |
-+#ifdef SUPPORT_SNAPSHOTS |
12029 |
- snapshotFileArgIndex = 1; |
12030 |
-+#endif |
12031 |
- fInterposeMode = kInterposeSome; |
12032 |
- loadExportFile(argv[++i], "-interposable_list", fInterposeList); |
12033 |
- } |
12034 |
-@@ -2146,14 +2178,18 @@ |
12035 |
- fInterposeMode = kInterposeNone; |
12036 |
- } |
12037 |
- else if ( strcmp(arg, "-exported_symbols_list") == 0 ) { |
12038 |
-+#ifdef SUPPORT_SNAPSHOTS |
12039 |
- snapshotFileArgIndex = 1; |
12040 |
-+#endif |
12041 |
- if ( fExportMode == kDontExportSome ) |
12042 |
- throw "can't use -exported_symbols_list and -unexported_symbols_list"; |
12043 |
- fExportMode = kExportSome; |
12044 |
- loadExportFile(argv[++i], "-exported_symbols_list", fExportSymbols); |
12045 |
- } |
12046 |
- else if ( strcmp(arg, "-unexported_symbols_list") == 0 ) { |
12047 |
-+#ifdef SUPPORT_SNAPSHOTS |
12048 |
- snapshotFileArgIndex = 1; |
12049 |
-+#endif |
12050 |
- if ( fExportMode == kExportSome ) |
12051 |
- throw "can't use -unexported_symbols_list and -exported_symbols_list"; |
12052 |
- fExportMode = kDontExportSome; |
12053 |
-@@ -2172,14 +2208,18 @@ |
12054 |
- fDontExportSymbols.insert(argv[++i]); |
12055 |
- } |
12056 |
- else if ( strcmp(arg, "-non_global_symbols_no_strip_list") == 0 ) { |
12057 |
-+#ifdef SUPPORT_SNAPSHOTS |
12058 |
- snapshotFileArgIndex = 1; |
12059 |
-+#endif |
12060 |
- if ( fLocalSymbolHandling == kLocalSymbolsSelectiveExclude ) |
12061 |
- throw "can't use -non_global_symbols_no_strip_list and -non_global_symbols_strip_list"; |
12062 |
- fLocalSymbolHandling = kLocalSymbolsSelectiveInclude; |
12063 |
- loadExportFile(argv[++i], "-non_global_symbols_no_strip_list", fLocalSymbolsIncluded); |
12064 |
- } |
12065 |
- else if ( strcmp(arg, "-non_global_symbols_strip_list") == 0 ) { |
12066 |
-+#ifdef SUPPORT_SNAPSHOTS |
12067 |
- snapshotFileArgIndex = 1; |
12068 |
-+#endif |
12069 |
- if ( fLocalSymbolHandling == kLocalSymbolsSelectiveInclude ) |
12070 |
- throw "can't use -non_global_symbols_no_strip_list and -non_global_symbols_strip_list"; |
12071 |
- fLocalSymbolHandling = kLocalSymbolsSelectiveExclude; |
12072 |
-@@ -2195,16 +2235,20 @@ |
12073 |
- } |
12074 |
- // Similar to -weak-l but uses the absolute path name to the library. |
12075 |
- else if ( strcmp(arg, "-weak_library") == 0 ) { |
12076 |
-+#ifdef SUPPORT_SNAPSHOTS |
12077 |
- // SNAPSHOT FIXME: what should we do for link snapshots? (ignore for now) |
12078 |
- snapshotArgCount = 0; |
12079 |
-+#endif |
12080 |
- FileInfo info = findFile(argv[++i]); |
12081 |
- info.options.fWeakImport = true; |
12082 |
- info.ordinal = ld::File::Ordinal::makeArgOrdinal((uint16_t)i); |
12083 |
- addLibrary(info); |
12084 |
- } |
12085 |
- else if ( strcmp(arg, "-lazy_library") == 0 ) { |
12086 |
-+#ifdef SUPPORT_SNAPSHOTS |
12087 |
- // SNAPSHOT FIXME: what should we do for link snapshots? (ignore for now) |
12088 |
- snapshotArgCount = 0; |
12089 |
-+#endif |
12090 |
- FileInfo info = findFile(argv[++i]); |
12091 |
- info.options.fLazyLoad = true; |
12092 |
- info.ordinal = ld::File::Ordinal::makeArgOrdinal((uint16_t)i); |
12093 |
-@@ -2212,22 +2256,28 @@ |
12094 |
- fUsingLazyDylibLinking = true; |
12095 |
- } |
12096 |
- else if ( strcmp(arg, "-framework") == 0 ) { |
12097 |
-+#ifdef SUPPORT_SNAPSHOTS |
12098 |
- snapshotArgCount = 0; |
12099 |
-+#endif |
12100 |
- FileInfo info = findFramework(argv[++i]); |
12101 |
- info.ordinal = ld::File::Ordinal::makeArgOrdinal((uint16_t)i); |
12102 |
- addLibrary(info); |
12103 |
- } |
12104 |
- else if ( strcmp(arg, "-weak_framework") == 0 ) { |
12105 |
-+#ifdef SUPPORT_SNAPSHOTS |
12106 |
- // SNAPSHOT FIXME: what should we do for link snapshots? (ignore for now) |
12107 |
- snapshotArgCount = 0; |
12108 |
-+#endif |
12109 |
- FileInfo info = findFramework(argv[++i]); |
12110 |
- info.options.fWeakImport = true; |
12111 |
- info.ordinal = ld::File::Ordinal::makeArgOrdinal((uint16_t)i); |
12112 |
- addLibrary(info); |
12113 |
- } |
12114 |
- else if ( strcmp(arg, "-lazy_framework") == 0 ) { |
12115 |
-+#ifdef SUPPORT_SNAPSHOTS |
12116 |
- // SNAPSHOT FIXME: what should we do for link snapshots? (ignore for now) |
12117 |
- snapshotArgCount = 0; |
12118 |
-+#endif |
12119 |
- FileInfo info = findFramework(argv[++i]); |
12120 |
- info.options.fLazyLoad = true; |
12121 |
- info.ordinal = ld::File::Ordinal::makeArgOrdinal((uint16_t)i); |
12122 |
-@@ -2305,8 +2355,10 @@ |
12123 |
- // This should probably be deprecated when we respect -L and -F |
12124 |
- // when searching for libraries. |
12125 |
- else if ( strcmp(arg, "-dylib_file") == 0 ) { |
12126 |
-+#ifdef SUPPORT_SNAPSHOTS |
12127 |
- // ignore for snapshot because a stub dylib will be created in the snapshot |
12128 |
- snapshotArgCount = 0; |
12129 |
-+#endif |
12130 |
- addDylibOverride(argv[++i]); |
12131 |
- } |
12132 |
- // What to expand @executable_path to if found in dependent dylibs |
12133 |
-@@ -2363,7 +2415,9 @@ |
12134 |
- } |
12135 |
- // ??? Deprecate when we get rid of basing at build time. |
12136 |
- else if ( strcmp(arg, "-seg_addr_table") == 0 ) { |
12137 |
-+#ifdef SUPPORT_SNAPSHOTS |
12138 |
- snapshotFileArgIndex = 1; |
12139 |
-+#endif |
12140 |
- const char* name = argv[++i]; |
12141 |
- if ( name == NULL ) |
12142 |
- throw "-seg_addr_table missing argument"; |
12143 |
-@@ -2427,7 +2481,9 @@ |
12144 |
- i += 2; |
12145 |
- } |
12146 |
- else if ( strcmp(arg, "-bundle_loader") == 0 ) { |
12147 |
-+#ifdef SUPPORT_SNAPSHOTS |
12148 |
- snapshotFileArgIndex = 1; |
12149 |
-+#endif |
12150 |
- fBundleLoader = argv[++i]; |
12151 |
- if ( (fBundleLoader == NULL) || (fBundleLoader[0] == '-') ) |
12152 |
- throw "-bundle_loader missing <path>"; |
12153 |
-@@ -2659,7 +2715,9 @@ |
12154 |
- // previously handled by buildSearchPaths() |
12155 |
- } |
12156 |
- else if ( strcmp(arg, "-syslibroot") == 0 ) { |
12157 |
-+#ifdef SUPPORT_SNAPSHOTS |
12158 |
- snapshotArgCount = 0; |
12159 |
-+#endif |
12160 |
- ++i; |
12161 |
- // previously handled by buildSearchPaths() |
12162 |
- } |
12163 |
-@@ -2670,7 +2728,9 @@ |
12164 |
- fUUIDMode = kUUIDRandom; |
12165 |
- } |
12166 |
- else if ( strcmp(arg, "-dtrace") == 0 ) { |
12167 |
-+#ifdef SUPPORT_SNAPSHOTS |
12168 |
- snapshotFileArgIndex = 1; |
12169 |
-+#endif |
12170 |
- const char* name = argv[++i]; |
12171 |
- if ( name == NULL ) |
12172 |
- throw "-dtrace missing argument"; |
12173 |
-@@ -2693,7 +2753,9 @@ |
12174 |
- fAliases.push_back(pair); |
12175 |
- } |
12176 |
- else if ( strcmp(arg, "-alias_list") == 0 ) { |
12177 |
-+#ifdef SUPPORT_SNAPSHOTS |
12178 |
- snapshotFileArgIndex = 1; |
12179 |
-+#endif |
12180 |
- parseAliasFile(argv[++i]); |
12181 |
- } |
12182 |
- else if ( strcmp(arg, "-save-temps") == 0 ) { |
12183 |
-@@ -2724,48 +2786,60 @@ |
12184 |
- fDisablePositionIndependentExecutable = true; |
12185 |
- } |
12186 |
- else if ( strncmp(arg, "-reexport-l", 11) == 0 ) { |
12187 |
-+#ifdef SUPPORT_SNAPSHOTS |
12188 |
- // SNAPSHOT FIXME: what should we do for link snapshots? (ignore for now) |
12189 |
- snapshotArgCount = 0; |
12190 |
-+#endif |
12191 |
- FileInfo info = findLibrary(&arg[11], true); |
12192 |
- info.options.fReExport = true; |
12193 |
- info.ordinal = ld::File::Ordinal::makeArgOrdinal((uint16_t)i); |
12194 |
- addLibrary(info); |
12195 |
- } |
12196 |
- else if ( strcmp(arg, "-reexport_library") == 0 ) { |
12197 |
-+#ifdef SUPPORT_SNAPSHOTS |
12198 |
- // SNAPSHOT FIXME: what should we do for link snapshots? (ignore for now) |
12199 |
- snapshotArgCount = 0; |
12200 |
-+#endif |
12201 |
- FileInfo info = findFile(argv[++i]); |
12202 |
- info.options.fReExport = true; |
12203 |
- info.ordinal = ld::File::Ordinal::makeArgOrdinal((uint16_t)i); |
12204 |
- addLibrary(info); |
12205 |
- } |
12206 |
- else if ( strcmp(arg, "-reexport_framework") == 0 ) { |
12207 |
-+#ifdef SUPPORT_SNAPSHOTS |
12208 |
- // SNAPSHOT FIXME: what should we do for link snapshots? (ignore for now) |
12209 |
- snapshotArgCount = 0; |
12210 |
-+#endif |
12211 |
- FileInfo info = findFramework(argv[++i]); |
12212 |
- info.options.fReExport = true; |
12213 |
- info.ordinal = ld::File::Ordinal::makeArgOrdinal((uint16_t)i); |
12214 |
- addLibrary(info); |
12215 |
- } |
12216 |
- else if ( strncmp(arg, "-upward-l", 9) == 0 ) { |
12217 |
-+#ifdef SUPPORT_SNAPSHOTS |
12218 |
- // SNAPSHOT FIXME: what should we do for link snapshots? (ignore for now) |
12219 |
- snapshotArgCount = 0; |
12220 |
-+#endif |
12221 |
- FileInfo info = findLibrary(&arg[9], true); |
12222 |
- info.options.fUpward = true; |
12223 |
- info.ordinal = ld::File::Ordinal::makeArgOrdinal((uint16_t)i); |
12224 |
- addLibrary(info); |
12225 |
- } |
12226 |
- else if ( strcmp(arg, "-upward_library") == 0 ) { |
12227 |
-+#ifdef SUPPORT_SNAPSHOTS |
12228 |
- // SNAPSHOT FIXME: what should we do for link snapshots? (ignore for now) |
12229 |
- snapshotArgCount = 0; |
12230 |
-+#endif |
12231 |
- FileInfo info = findFile(argv[++i]); |
12232 |
- info.options.fUpward = true; |
12233 |
- info.ordinal = ld::File::Ordinal::makeArgOrdinal((uint16_t)i); |
12234 |
- addLibrary(info); |
12235 |
- } |
12236 |
- else if ( strcmp(arg, "-upward_framework") == 0 ) { |
12237 |
-+#ifdef SUPPORT_SNAPSHOTS |
12238 |
- // SNAPSHOT FIXME: what should we do for link snapshots? (ignore for now) |
12239 |
- snapshotArgCount = 0; |
12240 |
-+#endif |
12241 |
- FileInfo info = findFramework(argv[++i]); |
12242 |
- info.options.fUpward = true; |
12243 |
- info.ordinal = ld::File::Ordinal::makeArgOrdinal((uint16_t)i); |
12244 |
-@@ -2819,7 +2893,9 @@ |
12245 |
- fMarkDeadStrippableDylib = true; |
12246 |
- } |
12247 |
- else if ( strcmp(arg, "-exported_symbols_order") == 0 ) { |
12248 |
-+#ifdef SUPPORT_SNAPSHOTS |
12249 |
- snapshotFileArgIndex = 1; |
12250 |
-+#endif |
12251 |
- loadSymbolOrderFile(argv[++i], fExportSymbolsOrder); |
12252 |
- } |
12253 |
- else if ( strcmp(arg, "-no_compact_linkedit") == 0 ) { |
12254 |
-@@ -2911,11 +2987,15 @@ |
12255 |
- fObjcCategoryMerging = false; |
12256 |
- } |
12257 |
- else if ( strcmp(arg, "-force_symbols_weak_list") == 0 ) { |
12258 |
-+#ifdef SUPPORT_SNAPSHOTS |
12259 |
- snapshotFileArgIndex = 1; |
12260 |
-+#endif |
12261 |
- loadExportFile(argv[++i], "-force_symbols_weak_list", fForceWeakSymbols); |
12262 |
- } |
12263 |
- else if ( strcmp(arg, "-force_symbols_not_weak_list") == 0 ) { |
12264 |
-+#ifdef SUPPORT_SNAPSHOTS |
12265 |
- snapshotFileArgIndex = 1; |
12266 |
-+#endif |
12267 |
- loadExportFile(argv[++i], "-force_symbols_not_weak_list", fForceNotWeakSymbols); |
12268 |
- } |
12269 |
- else if ( strcmp(arg, "-force_symbol_weak") == 0 ) { |
12270 |
-@@ -2931,7 +3011,9 @@ |
12271 |
- fForceNotWeakSymbols.insert(symbol); |
12272 |
- } |
12273 |
- else if ( strcmp(arg, "-reexported_symbols_list") == 0 ) { |
12274 |
-+#ifdef SUPPORT_SNAPSHOTS |
12275 |
- snapshotFileArgIndex = 1; |
12276 |
-+#endif |
12277 |
- if ( fExportMode == kExportSome ) |
12278 |
- throw "can't use -exported_symbols_list and -reexported_symbols_list"; |
12279 |
- loadExportFile(argv[++i], "-reexported_symbols_list", fReExportSymbols); |
12280 |
-@@ -2947,6 +3029,7 @@ |
12281 |
- else if ( strcmp(arg, "-page_align_data_atoms") == 0 ) { |
12282 |
- fPageAlignDataAtoms = true; |
12283 |
- } |
12284 |
-+#ifdef SUPPORT_SNAPSHOTS |
12285 |
- else if (strcmp(arg, "-debug_snapshot") == 0) { |
12286 |
- fLinkSnapshot.setSnapshotMode(Snapshot::SNAPSHOT_DEBUG); |
12287 |
- fSnapshotRequested = true; |
12288 |
-@@ -2959,6 +3042,7 @@ |
12289 |
- fLinkSnapshot.setSnapshotPath(path); |
12290 |
- fSnapshotRequested = true; |
12291 |
- } |
12292 |
-+#endif |
12293 |
- else if ( strcmp(arg, "-new_main") == 0 ) { |
12294 |
- fEntryPointLoadCommandForceOn = true; |
12295 |
- } |
12296 |
-@@ -2993,7 +3077,9 @@ |
12297 |
- fKextsUseStubs = true; |
12298 |
- } |
12299 |
- else if ( strcmp(argv[i], "-dependency_info") == 0 ) { |
12300 |
-+#ifdef SUPPORT_SNAPSHOTS |
12301 |
- snapshotArgCount = 0; |
12302 |
-+#endif |
12303 |
- ++i; |
12304 |
- // previously handled by buildSearchPaths() |
12305 |
- } |
12306 |
-@@ -3001,7 +3087,9 @@ |
12307 |
- fExportDynamic = true; |
12308 |
- } |
12309 |
- else if ( strcmp(arg, "-force_symbols_coalesce_list") == 0 ) { |
12310 |
-+#ifdef SUPPORT_SNAPSHOTS |
12311 |
- snapshotFileArgIndex = 1; |
12312 |
-+#endif |
12313 |
- loadExportFile(argv[++i], "-force_symbols_coalesce_list", fForceCoalesceSymbols); |
12314 |
- } |
12315 |
- else if ( strcmp(arg, "-add_linker_option") == 0 ) { |
12316 |
-@@ -3158,10 +3246,12 @@ |
12317 |
- throwf("unknown option: %s", arg); |
12318 |
- } |
12319 |
- |
12320 |
-+#ifdef SUPPORT_SNAPSHOTS |
12321 |
- if (snapshotArgCount == -1) |
12322 |
- snapshotArgCount = i-snapshotArgIndex+1; |
12323 |
- if (snapshotArgCount > 0) |
12324 |
- fLinkSnapshot.addSnapshotLinkArg(snapshotArgIndex, snapshotArgCount, snapshotFileArgIndex); |
12325 |
-+#endif |
12326 |
- } |
12327 |
- else { |
12328 |
- FileInfo info = findFile(arg); |
12329 |
-@@ -3180,8 +3270,10 @@ |
12330 |
- addLibrary(info); |
12331 |
- } |
12332 |
- |
12333 |
-+#ifdef SUPPORT_SNAPSHOTS |
12334 |
- if (fSnapshotRequested) |
12335 |
- fLinkSnapshot.createSnapshot(); |
12336 |
-+#endif |
12337 |
- } |
12338 |
- |
12339 |
- |
12340 |
-@@ -3452,6 +3544,7 @@ |
12341 |
- if ( customDyldPath != NULL ) |
12342 |
- fDyldInstallPath = customDyldPath; |
12343 |
- |
12344 |
-+#ifdef SUPPORT_SNAPSHOTS |
12345 |
- const char* debugArchivePath = getenv("LD_DEBUG_SNAPSHOT"); |
12346 |
- if (debugArchivePath != NULL) { |
12347 |
- fLinkSnapshot.setSnapshotMode(Snapshot::SNAPSHOT_DEBUG); |
12348 |
-@@ -3459,6 +3552,7 @@ |
12349 |
- fLinkSnapshot.setSnapshotPath(debugArchivePath); |
12350 |
- fSnapshotRequested = true; |
12351 |
- } |
12352 |
-+#endif |
12353 |
- |
12354 |
- const char* pipeFdString = getenv("LD_PIPELINE_FIFO"); |
12355 |
- if (pipeFdString != NULL) { |
12356 |
-@@ -4351,7 +4445,9 @@ |
12357 |
- if ( strcmp(&lastSlash[1], subUmbrella) == 0 ) { |
12358 |
- info.options.fReExport = true; |
12359 |
- found = true; |
12360 |
-+#ifdef SUPPORT_SNAPSHOTS |
12361 |
- fLinkSnapshot.recordSubUmbrella(info.path); |
12362 |
-+#endif |
12363 |
- break; |
12364 |
- } |
12365 |
- } |
12366 |
-@@ -4374,7 +4470,9 @@ |
12367 |
- if ( strncmp(&lastSlash[1], subLibrary, dot-lastSlash-1) == 0 ) { |
12368 |
- info.options.fReExport = true; |
12369 |
- found = true; |
12370 |
-+#ifdef SUPPORT_SNAPSHOTS |
12371 |
- fLinkSnapshot.recordSubLibrary(info.path); |
12372 |
-+#endif |
12373 |
- break; |
12374 |
- } |
12375 |
- } |
12376 |
---- ld64-241.9/src/ld/Options.h.orig 2015-01-16 15:26:32.000000000 -0800 |
12377 |
-+++ ld64-241.9/src/ld/Options.h 2015-01-16 15:26:54.000000000 -0800 |
12378 |
-@@ -48,7 +48,9 @@ |
12379 |
- extern void throwf (const char* format, ...) __attribute__ ((noreturn,format(printf, 1, 2))); |
12380 |
- extern void warning(const char* format, ...) __attribute__((format(printf, 1, 2))); |
12381 |
- |
12382 |
-+#ifdef SUPPORT_SNAPSHOTS |
12383 |
- class Snapshot; |
12384 |
-+#endif |
12385 |
- |
12386 |
- class LibraryOptions |
12387 |
- { |
12388 |
-@@ -379,7 +381,9 @@ |
12389 |
- bool forceWeakNonWildCard(const char* symbolName) const; |
12390 |
- bool forceNotWeakNonWildcard(const char* symbolName) const; |
12391 |
- bool forceCoalesce(const char* symbolName) const; |
12392 |
-+#ifdef SUPPORT_SNAPSHOTS |
12393 |
- Snapshot& snapshot() const { return fLinkSnapshot; } |
12394 |
-+#endif |
12395 |
- bool errorBecauseOfWarnings() const; |
12396 |
- bool needsThreadLoadCommand() const { return fNeedsThreadLoadCommand; } |
12397 |
- bool needsEntryPointLoadCommand() const { return fEntryPointLoadCommand; } |
12398 |
-@@ -677,8 +681,10 @@ |
12399 |
- std::vector<SymbolsMove> fSymbolsMovesCode; |
12400 |
- std::vector<SymbolsMove> fSymbolsMovesZeroFill; |
12401 |
- bool fSaveTempFiles; |
12402 |
-+#ifdef SUPPORT_SNAPSHOTS |
12403 |
- mutable Snapshot fLinkSnapshot; |
12404 |
- bool fSnapshotRequested; |
12405 |
-+#endif |
12406 |
- const char* fPipelineFifo; |
12407 |
- const char* fDependencyInfoPath; |
12408 |
- mutable int fDependencyFileDescriptor; |
12409 |
---- ld64-241.9/src/ld/Snapshot.cpp.orig 2014-09-10 15:24:46.000000000 -0700 |
12410 |
-+++ ld64-241.9/src/ld/Snapshot.cpp 2015-01-16 15:26:54.000000000 -0800 |
12411 |
-@@ -6,6 +6,7 @@ |
12412 |
- // Copyright (c) 2011 Apple Inc. All rights reserved. |
12413 |
- // |
12414 |
- |
12415 |
-+#ifdef SUPPORT_SNAPSHOTS |
12416 |
- #include <string.h> |
12417 |
- #include <unistd.h> |
12418 |
- #include <stdio.h> |
12419 |
-@@ -536,3 +538,5 @@ |
12420 |
- } |
12421 |
- } |
12422 |
- } |
12423 |
-+ |
12424 |
-+#endif /* SUPPORT_SNAPSHOTS */ |
12425 |
---- ld64-236.3/src/ld/Snapshot.h.orig 2015-01-23 07:59:55.000000000 +0100 |
12426 |
-+++ ld64-236.3/src/ld/Snapshot.h 2015-01-23 07:58:14.000000000 +0100 |
12427 |
-@@ -8,6 +8,8 @@ |
12428 |
- |
12429 |
- #ifndef ld64_Snapshot_h |
12430 |
- #define ld64_Snapshot_h |
12431 |
-+ |
12432 |
-+#ifdef SUPPORT_SNAPSHOTS |
12433 |
- #include <stdint.h> |
12434 |
- #include <string.h> |
12435 |
- #include <map> |
12436 |
-@@ -151,3 +153,5 @@ |
12437 |
- }; |
12438 |
- |
12439 |
- #endif |
12440 |
-+ |
12441 |
-+#endif |
12442 |
|
12443 |
diff --git a/sys-devel/binutils-apple/files/ld64-241.9-register-names.patch b/sys-devel/binutils-apple/files/ld64-241.9-register-names.patch |
12444 |
deleted file mode 100644 |
12445 |
index 6b855e5..0000000 |
12446 |
--- a/sys-devel/binutils-apple/files/ld64-241.9-register-names.patch |
12447 |
+++ /dev/null |
12448 |
@@ -1,50 +0,0 @@ |
12449 |
-Force use of old register names on old OS X (< 10.5). |
12450 |
- |
12451 |
-diff -ur ld64-241.9/src/ld/parsers/libunwind/Registers.hpp ld64-241.9/src/ld/parsers/libunwind/Registers.hpp |
12452 |
---- ld64-241.9/src/ld/parsers/libunwind/Registers.hpp 2014-09-11 00:24:46.000000000 +0200 |
12453 |
-+++ ld64-241.9/src/ld/parsers/libunwind/Registers.hpp 2015-01-22 22:16:23.000000000 +0100 |
12454 |
-@@ -40,6 +40,44 @@ |
12455 |
- #include "libunwind.h" |
12456 |
- #include "InternalMacros.h" |
12457 |
- |
12458 |
-+#include <AvailabilityMacros.h> |
12459 |
-+ |
12460 |
-+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050 |
12461 |
-+/* member names of i386_thread_state and x86_thread_state64 have changed and |
12462 |
-+ * default of __DARWIN_UNIX03 activating those new names as well. Instead of |
12463 |
-+ * defining __DARWIN_UNIX03 with all its unknown consequences, we use defines |
12464 |
-+ * to make our source use the old names on an old system. */ |
12465 |
-+ |
12466 |
-+#define __esp esp |
12467 |
-+#define __eip eip |
12468 |
-+#define __ebp ebp |
12469 |
-+#define __ebx ebx |
12470 |
-+#define __ecx ecx |
12471 |
-+#define __edx edx |
12472 |
-+#define __esi esi |
12473 |
-+#define __edi edi |
12474 |
-+#define __esp esp |
12475 |
-+#define __eax eax |
12476 |
-+#define __rip rip |
12477 |
-+#define __rsp rsp |
12478 |
-+#define __rax rax |
12479 |
-+#define __rdx rdx |
12480 |
-+#define __rcx rcx |
12481 |
-+#define __rbx rbx |
12482 |
-+#define __rsi rsi |
12483 |
-+#define __rdi rdi |
12484 |
-+#define __rbp rbp |
12485 |
-+#define __rsp rsp |
12486 |
-+#define __r8 r8 |
12487 |
-+#define __r9 r9 |
12488 |
-+#define __r10 r10 |
12489 |
-+#define __r11 r11 |
12490 |
-+#define __r12 r12 |
12491 |
-+#define __r13 r13 |
12492 |
-+#define __r14 r14 |
12493 |
-+#define __r15 r15 |
12494 |
-+#endif |
12495 |
-+ |
12496 |
- namespace libunwind { |
12497 |
- |
12498 |
- |
12499 |
|
12500 |
diff --git a/sys-devel/binutils-apple/files/ld64-242-gcc.patch b/sys-devel/binutils-apple/files/ld64-242-gcc.patch |
12501 |
deleted file mode 100644 |
12502 |
index b6e1dbb..0000000 |
12503 |
--- a/sys-devel/binutils-apple/files/ld64-242-gcc.patch |
12504 |
+++ /dev/null |
12505 |
@@ -1,1038 +0,0 @@ |
12506 |
-Provide c++11 headers from tr1 include directory and namespace. |
12507 |
- |
12508 |
-Work around weird namespacing bug in gcc-4.2.1 where class ld::Section |
12509 |
-conflicts with template mach_o::relocatable::Section by renaming the latter to |
12510 |
-MRFSection (could possibly be done using sed from ebuild or avoided by figuring |
12511 |
-out, what's actually going on with those namespaces). |
12512 |
- |
12513 |
---- ld64-242/src/ld/InputFiles.h.gcc 2015-08-03 01:11:48.000000000 +0200 |
12514 |
-+++ ld64-242/src/ld/InputFiles.h 2015-08-03 01:11:57.000000000 +0200 |
12515 |
-@@ -46,6 +46,14 @@ |
12516 |
- #include <pthread.h> |
12517 |
- #endif |
12518 |
- |
12519 |
-+#ifdef __GLIBCXX__ |
12520 |
-+#include <tr1/unordered_map> |
12521 |
-+#define UNORDERED_MAP tr1::unordered_map |
12522 |
-+#else |
12523 |
-+#include <unordered_map> |
12524 |
-+#define UNORDERED_MAP unordered_map |
12525 |
-+#endif |
12526 |
-+ |
12527 |
- #include <vector> |
12528 |
- |
12529 |
- #include "Options.h" |
12530 |
-@@ -112,7 +120,7 @@ |
12531 |
- static void parseWorkerThread(InputFiles *inputFiles); |
12532 |
- void startThread(void (*threadFunc)(InputFiles *)) const; |
12533 |
- |
12534 |
-- typedef std::unordered_map<const char*, ld::dylib::File*, CStringHash, CStringEquals> InstallNameToDylib; |
12535 |
-+ typedef std::UNORDERED_MAP<const char*, ld::dylib::File*, CStringHash, CStringEquals> InstallNameToDylib; |
12536 |
- |
12537 |
- const Options& _options; |
12538 |
- std::vector<ld::File*> _inputFiles; |
12539 |
---- ld64-242/src/ld/ld.cpp.gcc 2015-08-03 01:11:48.000000000 +0200 |
12540 |
-+++ ld64-242/src/ld/ld.cpp 2015-08-03 01:11:57.000000000 +0200 |
12541 |
-@@ -56,7 +56,13 @@ |
12542 |
- #include <vector> |
12543 |
- #include <list> |
12544 |
- #include <algorithm> |
12545 |
-+#ifdef __GLIBCXX__ |
12546 |
-+#include <tr1/unordered_map> |
12547 |
-+#define UNORDERED_MAP tr1::unordered_map |
12548 |
-+#else |
12549 |
- #include <unordered_map> |
12550 |
-+#define UNORDERED_MAP unordered_map |
12551 |
-+#endif |
12552 |
- #include <cxxabi.h> |
12553 |
- |
12554 |
- #include "Options.h" |
12555 |
-@@ -153,7 +159,7 @@ |
12556 |
- struct SectionEquals { |
12557 |
- bool operator()(const ld::Section* left, const ld::Section* right) const; |
12558 |
- }; |
12559 |
-- typedef std::unordered_map<const ld::Section*, FinalSection*, SectionHash, SectionEquals> SectionInToOut; |
12560 |
-+ typedef std::UNORDERED_MAP<const ld::Section*, FinalSection*, SectionHash, SectionEquals> SectionInToOut; |
12561 |
- |
12562 |
- |
12563 |
- SectionInToOut _sectionInToFinalMap; |
12564 |
---- ld64-242/src/ld/ld.hpp.gcc 2015-08-03 01:11:48.000000000 +0200 |
12565 |
-+++ ld64-242/src/ld/ld.hpp 2015-08-03 01:11:57.000000000 +0200 |
12566 |
-@@ -32,7 +32,13 @@ |
12567 |
- #include <assert.h> |
12568 |
- |
12569 |
- #include <vector> |
12570 |
-+#ifdef __GLIBCXX__ |
12571 |
-+#include <tr1/unordered_set> |
12572 |
-+#define UNORDERED_SET tr1::unordered_set |
12573 |
-+#else |
12574 |
- #include <unordered_set> |
12575 |
-+#define UNORDERED_SET unordered_set |
12576 |
-+#endif |
12577 |
- |
12578 |
- #include "configure.h" |
12579 |
- |
12580 |
-@@ -822,7 +828,7 @@ |
12581 |
- bool operator()(const char* left, const char* right) const { return (strcmp(left, right) == 0); } |
12582 |
- }; |
12583 |
- |
12584 |
--typedef std::unordered_set<const char*, ld::CStringHash, ld::CStringEquals> CStringSet; |
12585 |
-+typedef std::UNORDERED_SET<const char*, ld::CStringHash, ld::CStringEquals> CStringSet; |
12586 |
- |
12587 |
- class Internal |
12588 |
- { |
12589 |
---- ld64-242/src/ld/LinkEditClassic.hpp.gcc 2015-08-03 01:11:48.000000000 +0200 |
12590 |
-+++ ld64-242/src/ld/LinkEditClassic.hpp 2015-08-03 01:11:57.000000000 +0200 |
12591 |
-@@ -31,8 +31,13 @@ |
12592 |
- #include <limits.h> |
12593 |
- #include <unistd.h> |
12594 |
- |
12595 |
--#include <vector> |
12596 |
-+#ifdef __GLIBCXX__ |
12597 |
-+#include <tr1/unordered_map> |
12598 |
-+#define UNORDERED_MAP tr1::unordered_map |
12599 |
-+#else |
12600 |
- #include <unordered_map> |
12601 |
-+#define UNORDERED_MAP unordered_map |
12602 |
-+#endif |
12603 |
- |
12604 |
- #if !defined(SET_COMM_ALIGN) |
12605 |
- /* missing on < 10.5 */ |
12606 |
-@@ -98,7 +103,7 @@ |
12607 |
- |
12608 |
- private: |
12609 |
- enum { kBufferSize = 0x01000000 }; |
12610 |
-- typedef std::unordered_map<const char*, int32_t, CStringHash, CStringEquals> StringToOffset; |
12611 |
-+ typedef std::UNORDERED_MAP<const char*, int32_t, CStringHash, CStringEquals> StringToOffset; |
12612 |
- |
12613 |
- const uint32_t _pointerSize; |
12614 |
- std::vector<char*> _fullBuffers; |
12615 |
---- ld64-242/src/ld/Options.cpp.gcc 2015-08-03 01:11:48.000000000 +0200 |
12616 |
-+++ ld64-242/src/ld/Options.cpp 2015-08-03 01:11:57.000000000 +0200 |
12617 |
-@@ -4743,7 +4743,7 @@ |
12618 |
- |
12619 |
- // make sure all required exported symbols exist |
12620 |
- std::vector<const char*> impliedExports; |
12621 |
-- for (NameSet::iterator it=fExportSymbols.regularBegin(); it != fExportSymbols.regularEnd(); ++it) { |
12622 |
-+ for (NameSet::const_iterator it=fExportSymbols.regularBegin(); it != fExportSymbols.regularEnd(); ++it) { |
12623 |
- const char* name = *it; |
12624 |
- const int len = strlen(name); |
12625 |
- if ( (strcmp(&name[len-3], ".eh") == 0) || (strncmp(name, ".objc_category_name_", 20) == 0) ) { |
12626 |
-@@ -4775,7 +4775,7 @@ |
12627 |
- } |
12628 |
- |
12629 |
- // make sure all required re-exported symbols exist |
12630 |
-- for (NameSet::iterator it=fReExportSymbols.regularBegin(); it != fReExportSymbols.regularEnd(); ++it) { |
12631 |
-+ for (NameSet::const_iterator it=fReExportSymbols.regularBegin(); it != fReExportSymbols.regularEnd(); ++it) { |
12632 |
- fInitialUndefines.push_back(*it); |
12633 |
- } |
12634 |
- |
12635 |
---- ld64-242/src/ld/Options.h.gcc 2015-08-03 01:11:48.000000000 +0200 |
12636 |
-+++ ld64-242/src/ld/Options.h 2015-08-03 01:11:57.000000000 +0200 |
12637 |
-@@ -30,8 +30,17 @@ |
12638 |
- #include <mach/machine.h> |
12639 |
- |
12640 |
- #include <vector> |
12641 |
-+#ifdef __GLIBCXX__ |
12642 |
-+#include <tr1/unordered_set> |
12643 |
-+#include <tr1/unordered_map> |
12644 |
-+#define UNORDERED_MAP tr1::unordered_map |
12645 |
-+#define UNORDERED_SET tr1::unordered_set |
12646 |
-+#else |
12647 |
- #include <unordered_set> |
12648 |
- #include <unordered_map> |
12649 |
-+#define UNORDERED_MAP unordered_map |
12650 |
-+#define UNORDERED_SET unordered_set |
12651 |
-+#endif |
12652 |
- |
12653 |
- #include "ld.hpp" |
12654 |
- #include "Snapshot.h" |
12655 |
-@@ -401,8 +410,8 @@ |
12656 |
- bool moveRwSymbol(const char* symName, const char* filePath, const char*& seg, bool& wildCardMatch) const; |
12657 |
- |
12658 |
- private: |
12659 |
-- typedef std::unordered_map<const char*, unsigned int, ld::CStringHash, ld::CStringEquals> NameToOrder; |
12660 |
-- typedef std::unordered_set<const char*, ld::CStringHash, ld::CStringEquals> NameSet; |
12661 |
-+ typedef std::UNORDERED_MAP<const char*, unsigned int, ld::CStringHash, ld::CStringEquals> NameToOrder; |
12662 |
-+ typedef std::UNORDERED_SET<const char*, ld::CStringHash, ld::CStringEquals> NameSet; |
12663 |
- enum ExportMode { kExportDefault, kExportSome, kDontExportSome }; |
12664 |
- enum LibrarySearchMode { kSearchDylibAndArchiveInEachDir, kSearchAllDirsForDylibsThenAllDirsForArchives }; |
12665 |
- enum InterposeMode { kInterposeNone, kInterposeAllExternal, kInterposeSome }; |
12666 |
-@@ -415,8 +424,8 @@ |
12667 |
- bool containsNonWildcard(const char*) const; |
12668 |
- bool empty() const { return fRegular.empty() && fWildCard.empty(); } |
12669 |
- bool hasWildCards() const { return !fWildCard.empty(); } |
12670 |
-- NameSet::iterator regularBegin() const { return fRegular.begin(); } |
12671 |
-- NameSet::iterator regularEnd() const { return fRegular.end(); } |
12672 |
-+ NameSet::const_iterator regularBegin() const { return fRegular.begin(); } |
12673 |
-+ NameSet::const_iterator regularEnd() const { return fRegular.end(); } |
12674 |
- void remove(const NameSet&); |
12675 |
- private: |
12676 |
- static bool hasWildCards(const char*); |
12677 |
---- ld64-242/src/ld/OutputFile.cpp.gcc 2015-08-03 01:11:48.000000000 +0200 |
12678 |
-+++ ld64-242/src/ld/OutputFile.cpp 2015-08-03 01:11:57.000000000 +0200 |
12679 |
-@@ -50,7 +50,13 @@ |
12680 |
- #include <vector> |
12681 |
- #include <list> |
12682 |
- #include <algorithm> |
12683 |
-+#ifdef __GLIBCXX__ |
12684 |
-+#include <tr1/unordered_set> |
12685 |
-+#define UNORDERED_SET tr1::unordered_set |
12686 |
-+#else |
12687 |
- #include <unordered_set> |
12688 |
-+#define UNORDERED_SET unordered_set |
12689 |
-+#endif |
12690 |
- |
12691 |
- #include <CommonCrypto/CommonDigest.h> |
12692 |
- #include <AvailabilityMacros.h> |
12693 |
-@@ -4800,7 +4806,7 @@ |
12694 |
- const char* filename = NULL; |
12695 |
- bool wroteStartSO = false; |
12696 |
- state.stabs.reserve(atomsNeedingDebugNotes.size()*4); |
12697 |
-- std::unordered_set<const char*, CStringHash, CStringEquals> seenFiles; |
12698 |
-+ std::UNORDERED_SET<const char*, CStringHash, CStringEquals> seenFiles; |
12699 |
- for (std::vector<const ld::Atom*>::iterator it=atomsNeedingDebugNotes.begin(); it != atomsNeedingDebugNotes.end(); it++) { |
12700 |
- const ld::Atom* atom = *it; |
12701 |
- const ld::File* atomFile = atom->file(); |
12702 |
---- ld64-242/src/ld/parsers/archive_file.cpp.gcc 2015-08-03 01:11:48.000000000 +0200 |
12703 |
-+++ ld64-242/src/ld/parsers/archive_file.cpp 2015-08-03 01:11:57.000000000 +0200 |
12704 |
-@@ -33,7 +33,13 @@ |
12705 |
- #include <set> |
12706 |
- #include <map> |
12707 |
- #include <algorithm> |
12708 |
-+#ifdef __GLIBCXX__ |
12709 |
-+#include <tr1/unordered_map> |
12710 |
-+#define UNORDERED_MAP tr1::unordered_map |
12711 |
-+#else |
12712 |
- #include <unordered_map> |
12713 |
-+#define UNORDERED_MAP unordered_map |
12714 |
-+#endif |
12715 |
- |
12716 |
- #include "MachOFileAbstraction.hpp" |
12717 |
- #include "Architectures.hpp" |
12718 |
-@@ -116,7 +122,7 @@ |
12719 |
- struct MemberState { ld::relocatable::File* file; const Entry *entry; bool logged; bool loaded; uint32_t index;}; |
12720 |
- bool loadMember(MemberState& state, ld::File::AtomHandler& handler, const char *format, ...) const; |
12721 |
- |
12722 |
-- typedef std::unordered_map<const char*, const struct ranlib*, ld::CStringHash, ld::CStringEquals> NameToEntryMap; |
12723 |
-+ typedef std::UNORDERED_MAP<const char*, const struct ranlib*, ld::CStringHash, ld::CStringEquals> NameToEntryMap; |
12724 |
- |
12725 |
- typedef typename A::P P; |
12726 |
- typedef typename A::P::E E; |
12727 |
---- ld64-242/src/ld/parsers/lto_file.cpp.gcc 2015-08-03 01:11:48.000000000 +0200 |
12728 |
-+++ ld64-242/src/ld/parsers/lto_file.cpp 2015-08-03 01:11:57.000000000 +0200 |
12729 |
-@@ -33,8 +33,17 @@ |
12730 |
- #include <pthread.h> |
12731 |
- #include <mach-o/dyld.h> |
12732 |
- #include <vector> |
12733 |
-+#ifdef __GLIBCXX__ |
12734 |
-+#include <tr1/unordered_set> |
12735 |
-+#include <tr1/unordered_map> |
12736 |
-+#define UNORDERED_MAP tr1::unordered_map |
12737 |
-+#define UNORDERED_SET tr1::unordered_set |
12738 |
-+#else |
12739 |
- #include <unordered_set> |
12740 |
- #include <unordered_map> |
12741 |
-+#define UNORDERED_MAP unordered_map |
12742 |
-+#define UNORDERED_SET unordered_set |
12743 |
-+#endif |
12744 |
- |
12745 |
- #include "MachOFileAbstraction.hpp" |
12746 |
- #include "Architectures.hpp" |
12747 |
-@@ -218,8 +227,8 @@ |
12748 |
- static void ltoDiagnosticHandler(lto_codegen_diagnostic_severity_t, const char*, void*); |
12749 |
- #endif |
12750 |
- |
12751 |
-- typedef std::unordered_set<const char*, ld::CStringHash, ld::CStringEquals> CStringSet; |
12752 |
-- typedef std::unordered_map<const char*, Atom*, ld::CStringHash, ld::CStringEquals> CStringToAtom; |
12753 |
-+ typedef std::UNORDERED_SET<const char*, ld::CStringHash, ld::CStringEquals> CStringSet; |
12754 |
-+ typedef std::UNORDERED_MAP<const char*, Atom*, ld::CStringHash, ld::CStringEquals> CStringToAtom; |
12755 |
- |
12756 |
- class AtomSyncer : public ld::File::AtomHandler { |
12757 |
- public: |
12758 |
---- ld64-242/src/ld/parsers/macho_dylib_file.cpp.gcc 2015-08-03 01:11:48.000000000 +0200 |
12759 |
-+++ ld64-242/src/ld/parsers/macho_dylib_file.cpp 2015-08-03 01:11:57.000000000 +0200 |
12760 |
-@@ -34,8 +34,17 @@ |
12761 |
- #include <vector> |
12762 |
- #include <set> |
12763 |
- #include <algorithm> |
12764 |
--#include <unordered_map> |
12765 |
-+#ifdef __GLIBCXX__ |
12766 |
-+#include <tr1/unordered_set> |
12767 |
-+#include <tr1/unordered_map> |
12768 |
-+#define UNORDERED_MAP tr1::unordered_map |
12769 |
-+#define UNORDERED_SET tr1::unordered_set |
12770 |
-+#else |
12771 |
- #include <unordered_set> |
12772 |
-+#include <unordered_map> |
12773 |
-+#define UNORDERED_MAP unordered_map |
12774 |
-+#define UNORDERED_SET unordered_set |
12775 |
-+#endif |
12776 |
- |
12777 |
- #include "Architectures.hpp" |
12778 |
- #include "MachOFileAbstraction.hpp" |
12779 |
-@@ -193,8 +202,8 @@ |
12780 |
- }; |
12781 |
- }; |
12782 |
- struct AtomAndWeak { ld::Atom* atom; bool weakDef; bool tlv; pint_t address; }; |
12783 |
-- typedef std::unordered_map<const char*, AtomAndWeak, ld::CStringHash, ld::CStringEquals> NameToAtomMap; |
12784 |
-- typedef std::unordered_set<const char*, CStringHash, ld::CStringEquals> NameSet; |
12785 |
-+ typedef std::UNORDERED_MAP<const char*, AtomAndWeak, ld::CStringHash, ld::CStringEquals> NameToAtomMap; |
12786 |
-+ typedef std::UNORDERED_SET<const char*, CStringHash, ld::CStringEquals> NameSet; |
12787 |
- |
12788 |
- struct Dependent { const char* path; File<A>* dylib; bool reExport; }; |
12789 |
- |
12790 |
-@@ -566,14 +575,18 @@ |
12791 |
- if ( _s_logHashtable ) fprintf(stderr, "ld: building hashtable of %u toc entries for %s\n", dynamicInfo->nextdefsym(), this->path()); |
12792 |
- const macho_nlist<P>* start = &symbolTable[dynamicInfo->iextdefsym()]; |
12793 |
- const macho_nlist<P>* end = &start[dynamicInfo->nextdefsym()]; |
12794 |
-+#ifndef __GLIBCXX__ |
12795 |
- _atoms.reserve(dynamicInfo->nextdefsym()); // set initial bucket count |
12796 |
-+#endif |
12797 |
- for (const macho_nlist<P>* sym=start; sym < end; ++sym) { |
12798 |
- this->addSymbol(&strings[sym->n_strx()], (sym->n_desc() & N_WEAK_DEF) != 0, false, sym->n_value()); |
12799 |
- } |
12800 |
- } |
12801 |
- else { |
12802 |
- int32_t count = dynamicInfo->ntoc(); |
12803 |
-+#ifndef __GLIBCXX__ |
12804 |
- _atoms.reserve(count); // set initial bucket count |
12805 |
-+#endif |
12806 |
- if ( _s_logHashtable ) fprintf(stderr, "ld: building hashtable of %u entries for %s\n", count, this->path()); |
12807 |
- const struct dylib_table_of_contents* toc = (dylib_table_of_contents*)(fileContent + dynamicInfo->tocoff()); |
12808 |
- for (int32_t i = 0; i < count; ++i) { |
12809 |
---- ld64-242/src/ld/parsers/macho_relocatable_file.cpp.gcc 2015-08-03 01:11:48.000000000 +0200 |
12810 |
-+++ ld64-242/src/ld/parsers/macho_relocatable_file.cpp 2015-08-03 01:12:27.000000000 +0200 |
12811 |
-@@ -66,7 +66,7 @@ |
12812 |
- // forward reference |
12813 |
- template <typename A> class Parser; |
12814 |
- template <typename A> class Atom; |
12815 |
--template <typename A> class Section; |
12816 |
-+template <typename A> class MRFSection; |
12817 |
- template <typename A> class CFISection; |
12818 |
- template <typename A> class CUSection; |
12819 |
- |
12820 |
-@@ -106,14 +106,14 @@ |
12821 |
- const uint8_t* fileContent() { return _fileContent; } |
12822 |
- private: |
12823 |
- friend class Atom<A>; |
12824 |
-- friend class Section<A>; |
12825 |
-+ friend class MRFSection<A>; |
12826 |
- friend class Parser<A>; |
12827 |
- friend class CFISection<A>::OAS; |
12828 |
- |
12829 |
- typedef typename A::P P; |
12830 |
- |
12831 |
- const uint8_t* _fileContent; |
12832 |
-- Section<A>** _sectionsArray; |
12833 |
-+ MRFSection<A>** _sectionsArray; |
12834 |
- uint8_t* _atomsArray; |
12835 |
- uint8_t* _aliasAtomsArray; |
12836 |
- uint32_t _sectionsArrayCount; |
12837 |
-@@ -138,14 +138,14 @@ |
12838 |
- |
12839 |
- |
12840 |
- template <typename A> |
12841 |
--class Section : public ld::Section |
12842 |
-+class MRFSection : public ld::Section |
12843 |
- { |
12844 |
- public: |
12845 |
- typedef typename A::P::uint_t pint_t; |
12846 |
- typedef typename A::P P; |
12847 |
- typedef typename A::P::E E; |
12848 |
- |
12849 |
-- virtual ~Section() { } |
12850 |
-+ virtual ~MRFSection() { } |
12851 |
- class File<A>& file() const { return _file; } |
12852 |
- const macho_section<P>* machoSection() const { return _machOSection; } |
12853 |
- uint32_t sectionNum(class Parser<A>&) const; |
12854 |
-@@ -169,10 +169,10 @@ |
12855 |
- static const char* makeSectionName(const macho_section<typename A::P>* s); |
12856 |
- |
12857 |
- protected: |
12858 |
-- Section(File<A>& f, const macho_section<typename A::P>* s) |
12859 |
-+ MRFSection(File<A>& f, const macho_section<typename A::P>* s) |
12860 |
- : ld::Section(makeSegmentName(s), makeSectionName(s), sectionType(s)), |
12861 |
- _file(f), _machOSection(s), _beginAtoms(NULL), _endAtoms(NULL), _hasAliases(false) { } |
12862 |
-- Section(File<A>& f, const char* segName, const char* sectName, ld::Section::Type t, bool hidden=false) |
12863 |
-+ MRFSection(File<A>& f, const char* segName, const char* sectName, ld::Section::Type t, bool hidden=false) |
12864 |
- : ld::Section(segName, sectName, t, hidden), _file(f), _machOSection(NULL), |
12865 |
- _beginAtoms(NULL), _endAtoms(NULL), _hasAliases(false) { } |
12866 |
- |
12867 |
-@@ -196,11 +196,11 @@ |
12868 |
- |
12869 |
- |
12870 |
- template <typename A> |
12871 |
--class CFISection : public Section<A> |
12872 |
-+class CFISection : public MRFSection<A> |
12873 |
- { |
12874 |
- public: |
12875 |
- CFISection(Parser<A>& parser, File<A>& f, const macho_section<typename A::P>* s) |
12876 |
-- : Section<A>(f, s) { } |
12877 |
-+ : MRFSection<A>(f, s) { } |
12878 |
- uint32_t cfiCount(Parser<A>& parser); |
12879 |
- |
12880 |
- virtual ld::Atom::ContentType contentType() { return ld::Atom::typeCFI; } |
12881 |
-@@ -260,11 +260,11 @@ |
12882 |
- |
12883 |
- |
12884 |
- template <typename A> |
12885 |
--class CUSection : public Section<A> |
12886 |
-+class CUSection : public MRFSection<A> |
12887 |
- { |
12888 |
- public: |
12889 |
- CUSection(Parser<A>& parser, File<A>& f, const macho_section<typename A::P>* s) |
12890 |
-- : Section<A>(f, s) { } |
12891 |
-+ : MRFSection<A>(f, s) { } |
12892 |
- |
12893 |
- typedef typename A::P::uint_t pint_t; |
12894 |
- typedef typename A::P P; |
12895 |
-@@ -301,11 +301,11 @@ |
12896 |
- |
12897 |
- |
12898 |
- template <typename A> |
12899 |
--class TentativeDefinitionSection : public Section<A> |
12900 |
-+class TentativeDefinitionSection : public MRFSection<A> |
12901 |
- { |
12902 |
- public: |
12903 |
- TentativeDefinitionSection(Parser<A>& parser, File<A>& f) |
12904 |
-- : Section<A>(f, "__DATA", "__comm/tent", ld::Section::typeTentativeDefs) {} |
12905 |
-+ : MRFSection<A>(f, "__DATA", "__comm/tent", ld::Section::typeTentativeDefs) {} |
12906 |
- |
12907 |
- virtual ld::Atom::ContentType contentType() { return ld::Atom::typeZeroFill; } |
12908 |
- virtual bool addFollowOnFixups() const { return false; } |
12909 |
-@@ -323,11 +323,11 @@ |
12910 |
- |
12911 |
- |
12912 |
- template <typename A> |
12913 |
--class AbsoluteSymbolSection : public Section<A> |
12914 |
-+class AbsoluteSymbolSection : public MRFSection<A> |
12915 |
- { |
12916 |
- public: |
12917 |
- AbsoluteSymbolSection(Parser<A>& parser, File<A>& f) |
12918 |
-- : Section<A>(f, "__DATA", "__abs", ld::Section::typeAbsoluteSymbols, true) {} |
12919 |
-+ : MRFSection<A>(f, "__DATA", "__abs", ld::Section::typeAbsoluteSymbols, true) {} |
12920 |
- |
12921 |
- virtual ld::Atom::ContentType contentType() { return ld::Atom::typeUnclassified; } |
12922 |
- virtual bool dontDeadStrip() { return false; } |
12923 |
-@@ -349,7 +349,7 @@ |
12924 |
- |
12925 |
- |
12926 |
- template <typename A> |
12927 |
--class SymboledSection : public Section<A> |
12928 |
-+class SymboledSection : public MRFSection<A> |
12929 |
- { |
12930 |
- public: |
12931 |
- SymboledSection(Parser<A>& parser, File<A>& f, const macho_section<typename A::P>* s); |
12932 |
-@@ -381,11 +381,11 @@ |
12933 |
- |
12934 |
- |
12935 |
- template <typename A> |
12936 |
--class ImplicitSizeSection : public Section<A> |
12937 |
-+class ImplicitSizeSection : public MRFSection<A> |
12938 |
- { |
12939 |
- public: |
12940 |
- ImplicitSizeSection(Parser<A>& parser, File<A>& f, const macho_section<typename A::P>* s) |
12941 |
-- : Section<A>(f, s) { } |
12942 |
-+ : MRFSection<A>(f, s) { } |
12943 |
- virtual uint32_t computeAtomCount(class Parser<A>& parser, struct Parser<A>::LabelAndCFIBreakIterator& it, const struct Parser<A>::CFI_CU_InfoArrays&); |
12944 |
- virtual uint32_t appendAtoms(class Parser<A>& parser, uint8_t* buffer, struct Parser<A>::LabelAndCFIBreakIterator& it, const struct Parser<A>::CFI_CU_InfoArrays&); |
12945 |
- protected: |
12946 |
-@@ -722,8 +722,8 @@ |
12947 |
- |
12948 |
- public: |
12949 |
- // methods for all atoms from mach-o object file |
12950 |
-- Section<A>& sect() const { return (Section<A>&)section(); } |
12951 |
-- File<A>& machofile() const { return ((Section<A>*)(this->_section))->file(); } |
12952 |
-+ MRFSection<A>& sect() const { return (MRFSection<A>&)section(); } |
12953 |
-+ File<A>& machofile() const { return ((MRFSection<A>*)(this->_section))->file(); } |
12954 |
- void setFixupsRange(uint32_t s, uint32_t c); |
12955 |
- void setUnwindInfoRange(uint32_t s, uint32_t c); |
12956 |
- void extendUnwindInfoRange(); |
12957 |
-@@ -740,7 +740,7 @@ |
12958 |
- typedef typename A::P::E E; |
12959 |
- typedef typename A::P::uint_t pint_t; |
12960 |
- // constuct via all attributes |
12961 |
-- Atom(Section<A>& sct, const char* nm, pint_t addr, uint64_t sz, |
12962 |
-+ Atom(MRFSection<A>& sct, const char* nm, pint_t addr, uint64_t sz, |
12963 |
- ld::Atom::Definition d, ld::Atom::Combine c, ld::Atom::Scope s, |
12964 |
- ld::Atom::ContentType ct, ld::Atom::SymbolTableInclusion i, |
12965 |
- bool dds, bool thumb, bool al, ld::Atom::Alignment a) |
12966 |
-@@ -750,7 +750,7 @@ |
12967 |
- _unwindInfoStartIndex(0), _fixupsCount(0), |
12968 |
- _lineInfoCount(0), _unwindInfoCount(0) { } |
12969 |
- // construct via symbol table entry |
12970 |
-- Atom(Section<A>& sct, Parser<A>& parser, const macho_nlist<P>& sym, |
12971 |
-+ Atom(MRFSection<A>& sct, Parser<A>& parser, const macho_nlist<P>& sym, |
12972 |
- uint64_t sz, bool alias=false) |
12973 |
- : ld::Atom((ld::Section&)sct, parser.definitionFromSymbol(sym), |
12974 |
- parser.combineFromSymbol(sym), parser.scopeFromSymbol(sym), |
12975 |
-@@ -773,7 +773,7 @@ |
12976 |
- |
12977 |
- private: |
12978 |
- friend class Parser<A>; |
12979 |
-- friend class Section<A>; |
12980 |
-+ friend class MRFSection<A>; |
12981 |
- friend class CStringSection<A>; |
12982 |
- friend class AbsoluteSymbolSection<A>; |
12983 |
- |
12984 |
-@@ -1040,8 +1040,8 @@ |
12985 |
- uint32_t undefinedStartIndex() { return _undefinedStartIndex; } |
12986 |
- uint32_t undefinedEndIndex() { return _undefinedEndIndex; } |
12987 |
- void addFixup(FixupInAtom f) { _allFixups.push_back(f); } |
12988 |
-- Section<A>* sectionForNum(unsigned int sectNum); |
12989 |
-- Section<A>* sectionForAddress(pint_t addr); |
12990 |
-+ MRFSection<A>* sectionForNum(unsigned int sectNum); |
12991 |
-+ MRFSection<A>* sectionForAddress(pint_t addr); |
12992 |
- Atom<A>* findAtomByAddress(pint_t addr); |
12993 |
- Atom<A>* findAtomByAddressOrNullIfStub(pint_t addr); |
12994 |
- Atom<A>* findAtomByAddressOrLocalTargetOfStub(pint_t addr, uint32_t* offsetInAtom); |
12995 |
-@@ -1084,7 +1084,7 @@ |
12996 |
- : sortedSymbolIndexes(ssa), sortedSymbolCount(ssc), cfiStartsArray(cfisa), |
12997 |
- cfiStartsCount(cfisc), fileHasOverlappingSymbols(ols), |
12998 |
- newSection(false), cfiIndex(0), symIndex(0) {} |
12999 |
-- bool next(Parser<A>& parser, const Section<A>& sect, uint32_t sectNum, pint_t startAddr, pint_t endAddr, |
13000 |
-+ bool next(Parser<A>& parser, const MRFSection<A>& sect, uint32_t sectNum, pint_t startAddr, pint_t endAddr, |
13001 |
- pint_t* addr, pint_t* size, const macho_nlist<P>** sym); |
13002 |
- pint_t peek(Parser<A>& parser, pint_t startAddr, pint_t endAddr); |
13003 |
- void beginSection() { newSection = true; symIndex = 0; } |
13004 |
-@@ -1113,7 +1113,7 @@ |
13005 |
- |
13006 |
- |
13007 |
- private: |
13008 |
-- friend class Section<A>; |
13009 |
-+ friend class MRFSection<A>; |
13010 |
- |
13011 |
- enum SectionType { sectionTypeIgnore, sectionTypeLiteral4, sectionTypeLiteral8, sectionTypeLiteral16, |
13012 |
- sectionTypeNonLazy, sectionTypeCFI, sectionTypeCString, sectionTypeCStringPointer, |
13013 |
-@@ -1465,7 +1465,7 @@ |
13014 |
- // was becuase of a label, the symbol). Returns false when no more chunks. |
13015 |
- // |
13016 |
- template <typename A> |
13017 |
--bool Parser<A>::LabelAndCFIBreakIterator::next(Parser<A>& parser, const Section<A>& sect, uint32_t sectNum, pint_t startAddr, pint_t endAddr, |
13018 |
-+bool Parser<A>::LabelAndCFIBreakIterator::next(Parser<A>& parser, const MRFSection<A>& sect, uint32_t sectNum, pint_t startAddr, pint_t endAddr, |
13019 |
- pint_t* addr, pint_t* size, const macho_nlist<P>** symbol) |
13020 |
- { |
13021 |
- // may not be a label on start of section, but need atom demarcation there |
13022 |
-@@ -1618,7 +1618,7 @@ |
13023 |
- |
13024 |
- #if SUPPORT_ARCH_arm_any |
13025 |
- template <> |
13026 |
--typename arm::P::uint_t Parser<arm>::realAddr(typename arm::P::uint_t addr) |
13027 |
-+arm::P::uint_t Parser<arm>::realAddr(arm::P::uint_t addr) |
13028 |
- { |
13029 |
- return addr & (-2); |
13030 |
- } |
13031 |
-@@ -1667,7 +1667,7 @@ |
13032 |
- uint32_t sortedSymbolIndexes[_symbolsInSections]; |
13033 |
- this->makeSortedSymbolsArray(sortedSymbolIndexes, sortedSectionIndexes); |
13034 |
- |
13035 |
-- // allocate Section<A> object for each mach-o section |
13036 |
-+ // allocate MRFSection<A> object for each mach-o section |
13037 |
- makeSections(); |
13038 |
- |
13039 |
- // if it exists, do special early parsing of __compact_unwind section |
13040 |
-@@ -1764,7 +1764,7 @@ |
13041 |
- #endif |
13042 |
- } |
13043 |
- |
13044 |
-- Section<A>** sections = _file->_sectionsArray; |
13045 |
-+ MRFSection<A>** sections = _file->_sectionsArray; |
13046 |
- uint32_t sectionsCount = _file->_sectionsArrayCount; |
13047 |
- |
13048 |
- // figure out how many atoms will be allocated and allocate |
13049 |
-@@ -2331,11 +2331,11 @@ |
13050 |
- _file->_swiftVersion = ((flags >> 8) & 0xFF); |
13051 |
- if ( sect->size() > 8 ) { |
13052 |
- warning("section %s/%s has unexpectedly large size %llu in %s", |
13053 |
-- sect->segname(), Section<A>::makeSectionName(sect), sect->size(), _file->path()); |
13054 |
-+ sect->segname(), MRFSection<A>::makeSectionName(sect), sect->size(), _file->path()); |
13055 |
- } |
13056 |
- } |
13057 |
- else { |
13058 |
-- warning("can't parse %s/%s section in %s", sect->segname(), Section<A>::makeSectionName(sect), _file->path()); |
13059 |
-+ warning("can't parse %s/%s section in %s", sect->segname(), MRFSection<A>::makeSectionName(sect), _file->path()); |
13060 |
- } |
13061 |
- continue; |
13062 |
- } |
13063 |
-@@ -2431,24 +2431,24 @@ |
13064 |
- // sort by address (mach-o object files don't aways have sections sorted) |
13065 |
- ::qsort(machOSects, count, sizeof(MachOSectionAndSectionClass<P>), MachOSectionAndSectionClass<P>::sorter); |
13066 |
- |
13067 |
-- // we will synthesize a dummy Section<A> object for tentative definitions |
13068 |
-+ // we will synthesize a dummy MRFSection<A> object for tentative definitions |
13069 |
- if ( _tentativeDefinitionCount > 0 ) { |
13070 |
- totalSectionsSize += sizeof(TentativeDefinitionSection<A>); |
13071 |
- machOSects[count++].type = sectionTypeTentativeDefinitions; |
13072 |
- } |
13073 |
- |
13074 |
-- // we will synthesize a dummy Section<A> object for Absolute symbols |
13075 |
-+ // we will synthesize a dummy MRFSection<A> object for Absolute symbols |
13076 |
- if ( _absoluteSymbolCount > 0 ) { |
13077 |
- totalSectionsSize += sizeof(AbsoluteSymbolSection<A>); |
13078 |
- machOSects[count++].type = sectionTypeAbsoluteSymbols; |
13079 |
- } |
13080 |
- |
13081 |
- // allocate one block for all Section objects as well as pointers to each |
13082 |
-- uint8_t* space = new uint8_t[totalSectionsSize+count*sizeof(Section<A>*)]; |
13083 |
-- _file->_sectionsArray = (Section<A>**)space; |
13084 |
-+ uint8_t* space = new uint8_t[totalSectionsSize+count*sizeof(MRFSection<A>*)]; |
13085 |
-+ _file->_sectionsArray = (MRFSection<A>**)space; |
13086 |
- _file->_sectionsArrayCount = count; |
13087 |
-- Section<A>** objects = _file->_sectionsArray; |
13088 |
-- space += count*sizeof(Section<A>*); |
13089 |
-+ MRFSection<A>** objects = _file->_sectionsArray; |
13090 |
-+ space += count*sizeof(MRFSection<A>*); |
13091 |
- for (uint32_t i=0; i < count; ++i) { |
13092 |
- switch ( machOSects[i].type ) { |
13093 |
- case sectionTypeIgnore: |
13094 |
-@@ -2536,7 +2536,7 @@ |
13095 |
- |
13096 |
- |
13097 |
- template <typename A> |
13098 |
--Section<A>* Parser<A>::sectionForAddress(typename A::P::uint_t addr) |
13099 |
-+MRFSection<A>* Parser<A>::sectionForAddress(typename A::P::uint_t addr) |
13100 |
- { |
13101 |
- for (uint32_t i=0; i < _file->_sectionsArrayCount; ++i ) { |
13102 |
- const macho_section<typename A::P>* sect = _file->_sectionsArray[i]->machoSection(); |
13103 |
-@@ -2563,7 +2563,7 @@ |
13104 |
- } |
13105 |
- |
13106 |
- template <typename A> |
13107 |
--Section<A>* Parser<A>::sectionForNum(unsigned int num) |
13108 |
-+MRFSection<A>* Parser<A>::sectionForNum(unsigned int num) |
13109 |
- { |
13110 |
- for (uint32_t i=0; i < _file->_sectionsArrayCount; ++i ) { |
13111 |
- const macho_section<typename A::P>* sect = _file->_sectionsArray[i]->machoSection(); |
13112 |
-@@ -2579,7 +2579,7 @@ |
13113 |
- template <typename A> |
13114 |
- Atom<A>* Parser<A>::findAtomByAddress(pint_t addr) |
13115 |
- { |
13116 |
-- Section<A>* section = this->sectionForAddress(addr); |
13117 |
-+ MRFSection<A>* section = this->sectionForAddress(addr); |
13118 |
- return section->findAtomByAddress(addr); |
13119 |
- } |
13120 |
- |
13121 |
-@@ -2636,7 +2636,7 @@ |
13122 |
- target.addend = 0; |
13123 |
- return; |
13124 |
- } |
13125 |
-- Section<A>* section = this->sectionForAddress(addr); |
13126 |
-+ MRFSection<A>* section = this->sectionForAddress(addr); |
13127 |
- target.atom = section->findAtomByAddress(addr); |
13128 |
- target.addend = addr - target.atom->_objAddress; |
13129 |
- target.weakImport = false; |
13130 |
-@@ -2684,7 +2684,7 @@ |
13131 |
- } |
13132 |
- return; |
13133 |
- } |
13134 |
-- Section<A>* section = this->sectionForNum(sectNum); |
13135 |
-+ MRFSection<A>* section = this->sectionForNum(sectNum); |
13136 |
- target.atom = section->findAtomByAddress(addr); |
13137 |
- if ( target.atom == NULL ) { |
13138 |
- typedef typename A::P::sint_t sint_t; |
13139 |
-@@ -3892,7 +3892,7 @@ |
13140 |
- } |
13141 |
- |
13142 |
- template <typename A> |
13143 |
--const char* Section<A>::makeSegmentName(const macho_section<typename A::P>* sect) |
13144 |
-+const char* MRFSection<A>::makeSegmentName(const macho_section<typename A::P>* sect) |
13145 |
- { |
13146 |
- // mach-o section record only has room for 16-byte seg/sect names |
13147 |
- // so a 16-byte name has no trailing zero |
13148 |
-@@ -3905,7 +3905,7 @@ |
13149 |
- } |
13150 |
- |
13151 |
- template <typename A> |
13152 |
--const char* Section<A>::makeSectionName(const macho_section<typename A::P>* sect) |
13153 |
-+const char* MRFSection<A>::makeSectionName(const macho_section<typename A::P>* sect) |
13154 |
- { |
13155 |
- const char* name = sect->sectname(); |
13156 |
- if ( strlen(name) < 16 ) |
13157 |
-@@ -3939,13 +3939,13 @@ |
13158 |
- } |
13159 |
- |
13160 |
- template <typename A> |
13161 |
--bool Section<A>::readable(const macho_section<typename A::P>* sect) |
13162 |
-+bool MRFSection<A>::readable(const macho_section<typename A::P>* sect) |
13163 |
- { |
13164 |
- return true; |
13165 |
- } |
13166 |
- |
13167 |
- template <typename A> |
13168 |
--bool Section<A>::writable(const macho_section<typename A::P>* sect) |
13169 |
-+bool MRFSection<A>::writable(const macho_section<typename A::P>* sect) |
13170 |
- { |
13171 |
- // mach-o .o files do not contain segment permissions |
13172 |
- // we just know TEXT is special |
13173 |
-@@ -3953,7 +3953,7 @@ |
13174 |
- } |
13175 |
- |
13176 |
- template <typename A> |
13177 |
--bool Section<A>::exectuable(const macho_section<typename A::P>* sect) |
13178 |
-+bool MRFSection<A>::exectuable(const macho_section<typename A::P>* sect) |
13179 |
- { |
13180 |
- // mach-o .o files do not contain segment permissions |
13181 |
- // we just know TEXT is special |
13182 |
-@@ -3962,7 +3962,7 @@ |
13183 |
- |
13184 |
- |
13185 |
- template <typename A> |
13186 |
--ld::Section::Type Section<A>::sectionType(const macho_section<typename A::P>* sect) |
13187 |
-+ld::Section::Type MRFSection<A>::sectionType(const macho_section<typename A::P>* sect) |
13188 |
- { |
13189 |
- switch ( sect->flags() & SECTION_TYPE ) { |
13190 |
- case S_ZEROFILL: |
13191 |
-@@ -4040,7 +4040,7 @@ |
13192 |
- |
13193 |
- |
13194 |
- template <typename A> |
13195 |
--Atom<A>* Section<A>::findContentAtomByAddress(pint_t addr, class Atom<A>* start, class Atom<A>* end) |
13196 |
-+Atom<A>* MRFSection<A>::findContentAtomByAddress(pint_t addr, class Atom<A>* start, class Atom<A>* end) |
13197 |
- { |
13198 |
- // do a binary search of atom array |
13199 |
- uint32_t atomCount = end - start; |
13200 |
-@@ -4072,7 +4072,7 @@ |
13201 |
- } |
13202 |
- |
13203 |
- template <typename A> |
13204 |
--ld::Atom::Alignment Section<A>::alignmentForAddress(pint_t addr) |
13205 |
-+ld::Atom::Alignment MRFSection<A>::alignmentForAddress(pint_t addr) |
13206 |
- { |
13207 |
- const uint32_t sectionAlignment = this->_machOSection->align(); |
13208 |
- uint32_t modulus = (addr % (1 << sectionAlignment)); |
13209 |
-@@ -4082,7 +4082,7 @@ |
13210 |
- } |
13211 |
- |
13212 |
- template <typename A> |
13213 |
--uint32_t Section<A>::sectionNum(class Parser<A>& parser) const |
13214 |
-+uint32_t MRFSection<A>::sectionNum(class Parser<A>& parser) const |
13215 |
- { |
13216 |
- if ( _machOSection == NULL ) |
13217 |
- return 0; |
13218 |
-@@ -4727,7 +4727,7 @@ |
13219 |
- // support __LD, __compact_unwind personality entries which are pointer to personality non-lazy pointer |
13220 |
- const pint_t* content = (pint_t*)(this->file().fileContent() + this->_machOSection->offset() + reloc->r_address()); |
13221 |
- pint_t nlPointerAddr = *content; |
13222 |
-- Section<x86>* nlSection = parser.sectionForAddress(nlPointerAddr); |
13223 |
-+ MRFSection<x86>* nlSection = parser.sectionForAddress(nlPointerAddr); |
13224 |
- if ( nlSection->type() == ld::Section::typeCode ) { |
13225 |
- // personality function is defined in this .o file, so this is a direct reference to it |
13226 |
- // atoms may not be constructed yet, so scan symbol table for labels |
13227 |
-@@ -4754,7 +4754,7 @@ |
13228 |
- else { |
13229 |
- const pint_t* content = (pint_t*)(this->file().fileContent() + this->_machOSection->offset() + reloc->r_address()); |
13230 |
- pint_t personalityAddr = *content; |
13231 |
-- Section<arm64>* personalitySection = parser.sectionForAddress(personalityAddr); |
13232 |
-+ MRFSection<arm64>* personalitySection = parser.sectionForAddress(personalityAddr); |
13233 |
- assert((personalitySection->type() == ld::Section::typeCode) && "personality column in __compact_unwind section is not pointer to function"); |
13234 |
- // atoms may not be constructed yet, so scan symbol table for labels |
13235 |
- const char* name = parser.scanSymbolTableForAddress(personalityAddr); |
13236 |
-@@ -4776,7 +4776,7 @@ |
13237 |
- // support __LD, __compact_unwind personality entries which are pointer to personality non-lazy pointer |
13238 |
- const pint_t* content = (pint_t*)(this->file().fileContent() + this->_machOSection->offset() + reloc->r_address()); |
13239 |
- pint_t nlPointerAddr = *content; |
13240 |
-- Section<arm>* nlSection = parser.sectionForAddress(nlPointerAddr); |
13241 |
-+ MRFSection<arm>* nlSection = parser.sectionForAddress(nlPointerAddr); |
13242 |
- if ( nlSection->type() == ld::Section::typeCode ) { |
13243 |
- // personality function is defined in this .o file, so this is a direct reference to it |
13244 |
- // atoms may not be constructed yet, so scan symbol table for labels |
13245 |
-@@ -4937,7 +4937,7 @@ |
13246 |
- |
13247 |
- template <typename A> |
13248 |
- SymboledSection<A>::SymboledSection(Parser<A>& parser, File<A>& f, const macho_section<typename A::P>* s) |
13249 |
-- : Section<A>(f, s), _type(ld::Atom::typeUnclassified) |
13250 |
-+ : MRFSection<A>(f, s), _type(ld::Atom::typeUnclassified) |
13251 |
- { |
13252 |
- switch ( s->flags() & SECTION_TYPE ) { |
13253 |
- case S_ZEROFILL: |
13254 |
-@@ -4983,7 +4983,7 @@ |
13255 |
- if ( ! this->_file.canScatterAtoms() ) |
13256 |
- return true; |
13257 |
- // call inherited |
13258 |
-- return Section<A>::dontDeadStrip(); |
13259 |
-+ return MRFSection<A>::dontDeadStrip(); |
13260 |
- } |
13261 |
- return false; |
13262 |
- } |
13263 |
-@@ -5847,7 +5847,7 @@ |
13264 |
- |
13265 |
- |
13266 |
- template <> |
13267 |
--uint32_t Section<x86_64>::x86_64PcRelOffset(uint8_t r_type) |
13268 |
-+uint32_t MRFSection<x86_64>::x86_64PcRelOffset(uint8_t r_type) |
13269 |
- { |
13270 |
- switch ( r_type ) { |
13271 |
- case X86_64_RELOC_SIGNED: |
13272 |
-@@ -5864,7 +5864,7 @@ |
13273 |
- |
13274 |
- |
13275 |
- template <> |
13276 |
--bool Section<x86_64>::addRelocFixup(class Parser<x86_64>& parser, const macho_relocation_info<P>* reloc) |
13277 |
-+bool MRFSection<x86_64>::addRelocFixup(class Parser<x86_64>& parser, const macho_relocation_info<P>* reloc) |
13278 |
- { |
13279 |
- const macho_section<P>* sect = this->machoSection(); |
13280 |
- uint64_t srcAddr = sect->addr() + reloc->r_address(); |
13281 |
-@@ -6071,7 +6071,7 @@ |
13282 |
- |
13283 |
- |
13284 |
- template <> |
13285 |
--bool Section<x86>::addRelocFixup(class Parser<x86>& parser, const macho_relocation_info<P>* reloc) |
13286 |
-+bool MRFSection<x86>::addRelocFixup(class Parser<x86>& parser, const macho_relocation_info<P>* reloc) |
13287 |
- { |
13288 |
- const macho_section<P>* sect = this->machoSection(); |
13289 |
- uint32_t srcAddr; |
13290 |
-@@ -6312,7 +6312,7 @@ |
13291 |
- |
13292 |
- #if SUPPORT_ARCH_arm_any |
13293 |
- template <> |
13294 |
--bool Section<arm>::addRelocFixup(class Parser<arm>& parser, const macho_relocation_info<P>* reloc) |
13295 |
-+bool MRFSection<arm>::addRelocFixup(class Parser<arm>& parser, const macho_relocation_info<P>* reloc) |
13296 |
- { |
13297 |
- const macho_section<P>* sect = this->machoSection(); |
13298 |
- bool result = false; |
13299 |
-@@ -6779,7 +6779,7 @@ |
13300 |
- |
13301 |
- #if SUPPORT_ARCH_arm64 |
13302 |
- template <> |
13303 |
--bool Section<arm64>::addRelocFixup(class Parser<arm64>& parser, const macho_relocation_info<P>* reloc) |
13304 |
-+bool MRFSection<arm64>::addRelocFixup(class Parser<arm64>& parser, const macho_relocation_info<P>* reloc) |
13305 |
- { |
13306 |
- bool result = false; |
13307 |
- Parser<arm64>::SourceLocation src; |
13308 |
-@@ -7177,7 +7177,7 @@ |
13309 |
- |
13310 |
- #if SUPPORT_ARCH_arm64 |
13311 |
- template <> |
13312 |
--void Section<arm64>::addLOH(class Parser<arm64>& parser, int kind, int count, const uint64_t addrs[]) { |
13313 |
-+void MRFSection<arm64>::addLOH(class Parser<arm64>& parser, int kind, int count, const uint64_t addrs[]) { |
13314 |
- switch (kind) { |
13315 |
- case LOH_ARM64_ADRP_ADRP: |
13316 |
- case LOH_ARM64_ADRP_LDR: |
13317 |
-@@ -7232,18 +7232,18 @@ |
13318 |
- extra.info.delta2 = (count > 1) ? ((addrs[1] - lowestAddress) >> 2) : 0; |
13319 |
- extra.info.delta3 = (count > 2) ? ((addrs[2] - lowestAddress) >> 2) : 0; |
13320 |
- extra.info.delta4 = (count > 3) ? ((addrs[3] - lowestAddress) >> 2) : 0; |
13321 |
-- typename Parser<arm64>::SourceLocation src(inAtom, lowestAddress- inAtom->objectAddress()); |
13322 |
-+ Parser<arm64>::SourceLocation src(inAtom, lowestAddress- inAtom->objectAddress()); |
13323 |
- parser.addFixup(src, ld::Fixup::k1of1, ld::Fixup::kindLinkerOptimizationHint, extra.addend); |
13324 |
- } |
13325 |
- #endif |
13326 |
- |
13327 |
- template <typename A> |
13328 |
--void Section<A>::addLOH(class Parser<A>& parser, int kind, int count, const uint64_t addrs[]) { |
13329 |
-+void MRFSection<A>::addLOH(class Parser<A>& parser, int kind, int count, const uint64_t addrs[]) { |
13330 |
- |
13331 |
- } |
13332 |
- |
13333 |
- template <typename A> |
13334 |
--void Section<A>::makeFixups(class Parser<A>& parser, const struct Parser<A>::CFI_CU_InfoArrays&) |
13335 |
-+void MRFSection<A>::makeFixups(class Parser<A>& parser, const struct Parser<A>::CFI_CU_InfoArrays&) |
13336 |
- { |
13337 |
- const macho_section<P>* sect = this->machoSection(); |
13338 |
- const macho_relocation_info<P>* relocs = (macho_relocation_info<P>*)(file().fileContent() + sect->reloff()); |
13339 |
-@@ -7254,7 +7254,7 @@ |
13340 |
- ++r; // skip next |
13341 |
- } |
13342 |
- catch (const char* msg) { |
13343 |
-- throwf("in section %s,%s reloc %u: %s", sect->segname(), Section<A>::makeSectionName(sect), r, msg); |
13344 |
-+ throwf("in section %s,%s reloc %u: %s", sect->segname(), MRFSection<A>::makeSectionName(sect), r, msg); |
13345 |
- } |
13346 |
- } |
13347 |
- |
13348 |
-@@ -7280,7 +7280,7 @@ |
13349 |
- } |
13350 |
- if ( !this->_altEntries.empty() && !this->addFollowOnFixups() ) { |
13351 |
- if ( _altEntries.count(_beginAtoms) != 0 ) |
13352 |
-- warning("N_ALT_ENTRY bit set on first atom in section %s/%s", sect->segname(), Section<A>::makeSectionName(sect)); |
13353 |
-+ warning("N_ALT_ENTRY bit set on first atom in section %s/%s", sect->segname(), MRFSection<A>::makeSectionName(sect)); |
13354 |
- |
13355 |
- Atom<A>* end = &_endAtoms[-1]; |
13356 |
- for(Atom<A>* p = _beginAtoms; p < end; ++p) { |
13357 |
---- ld64-242/src/ld/passes/dtrace_dof.cpp.gcc 2015-08-03 01:11:48.000000000 +0200 |
13358 |
-+++ ld64-242/src/ld/passes/dtrace_dof.cpp 2015-08-03 01:11:57.000000000 +0200 |
13359 |
-@@ -30,8 +30,17 @@ |
13360 |
- |
13361 |
- #include <vector> |
13362 |
- #include <map> |
13363 |
-+#ifdef __GLIBCXX__ |
13364 |
-+#include <tr1/unordered_map> |
13365 |
-+#include <tr1/unordered_set> |
13366 |
-+#define UNORDERED_MAP tr1::unordered_map |
13367 |
-+#define UNORDERED_SET tr1::unordered_set |
13368 |
-+#else |
13369 |
- #include <unordered_map> |
13370 |
- #include <unordered_set> |
13371 |
-+#define UNORDERED_MAP unordered_map |
13372 |
-+#define UNORDERED_SET unordered_set |
13373 |
-+#endif |
13374 |
- |
13375 |
- #include "ld.hpp" |
13376 |
- #include "MachOFileAbstraction.hpp" |
13377 |
-@@ -111,8 +120,8 @@ |
13378 |
- uint32_t offset; |
13379 |
- const char* probeName; |
13380 |
- }; |
13381 |
--typedef std::unordered_map<const char*, std::vector<DTraceProbeInfo>, CStringHash, CStringEquals> ProviderToProbes; |
13382 |
--typedef std::unordered_set<const char*, CStringHash, CStringEquals> CStringSet; |
13383 |
-+typedef std::UNORDERED_MAP<const char*, std::vector<DTraceProbeInfo>, CStringHash, CStringEquals> ProviderToProbes; |
13384 |
-+typedef std::UNORDERED_SET<const char*, CStringHash, CStringEquals> CStringSet; |
13385 |
- |
13386 |
- |
13387 |
- |
13388 |
---- ld64-242/src/ld/passes/order.cpp.gcc 2015-08-03 01:11:48.000000000 +0200 |
13389 |
-+++ ld64-242/src/ld/passes/order.cpp 2015-08-03 01:11:57.000000000 +0200 |
13390 |
-@@ -32,7 +32,13 @@ |
13391 |
- #include <vector> |
13392 |
- #include <map> |
13393 |
- #include <set> |
13394 |
-+#ifdef __GLIBCXX__ |
13395 |
-+#include <tr1/unordered_map> |
13396 |
-+#define UNORDERED_MAP tr1::unordered_map |
13397 |
-+#else |
13398 |
- #include <unordered_map> |
13399 |
-+#define UNORDERED_MAP unordered_map |
13400 |
-+#endif |
13401 |
- |
13402 |
- #include "ld.hpp" |
13403 |
- #include "order.h" |
13404 |
-@@ -85,7 +91,7 @@ |
13405 |
- ld::Internal& _state; |
13406 |
- }; |
13407 |
- |
13408 |
-- typedef std::unordered_map<const char*, const ld::Atom*, CStringHash, CStringEquals> NameToAtom; |
13409 |
-+ typedef std::UNORDERED_MAP<const char*, const ld::Atom*, CStringHash, CStringEquals> NameToAtom; |
13410 |
- |
13411 |
- typedef std::map<const ld::Atom*, const ld::Atom*> AtomToAtom; |
13412 |
- |
13413 |
---- ld64-242/src/ld/Resolver.h.gcc 2015-08-03 01:11:48.000000000 +0200 |
13414 |
-+++ ld64-242/src/ld/Resolver.h 2015-08-03 01:11:57.000000000 +0200 |
13415 |
-@@ -42,7 +42,13 @@ |
13416 |
- #include <mach-o/dyld.h> |
13417 |
- |
13418 |
- #include <vector> |
13419 |
-+#ifdef __GLIBCXX__ |
13420 |
-+#include <tr1/unordered_set> |
13421 |
-+#define UNORDERED_SET tr1::unordered_set |
13422 |
-+#else |
13423 |
- #include <unordered_set> |
13424 |
-+#define UNORDERED_SET unordered_set |
13425 |
-+#endif |
13426 |
- |
13427 |
- #include "Options.h" |
13428 |
- #include "ld.hpp" |
13429 |
-@@ -105,7 +111,7 @@ |
13430 |
- void doLinkerOption(const std::vector<const char*>& linkerOption, const char* fileName); |
13431 |
- void dumpAtoms(); |
13432 |
- |
13433 |
-- typedef std::unordered_set<const char*, CStringHash, CStringEquals> StringSet; |
13434 |
-+ typedef std::UNORDERED_SET<const char*, CStringHash, CStringEquals> StringSet; |
13435 |
- |
13436 |
- class NotLive { |
13437 |
- public: |
13438 |
---- ld64-242/src/ld/SymbolTable.h.gcc 2015-08-03 01:11:48.000000000 +0200 |
13439 |
-+++ ld64-242/src/ld/SymbolTable.h 2015-08-03 01:11:57.000000000 +0200 |
13440 |
-@@ -42,7 +42,13 @@ |
13441 |
- #include <mach-o/dyld.h> |
13442 |
- |
13443 |
- #include <vector> |
13444 |
-+#ifdef __GLIBCXX__ |
13445 |
-+#include <tr1/unordered_map> |
13446 |
-+#define UNORDERED_MAP tr1::unordered_map |
13447 |
-+#else |
13448 |
- #include <unordered_map> |
13449 |
-+#define UNORDERED_MAP unordered_map |
13450 |
-+#endif |
13451 |
- |
13452 |
- #include "Options.h" |
13453 |
- #include "ld.hpp" |
13454 |
-@@ -57,38 +63,38 @@ |
13455 |
- typedef uint32_t IndirectBindingSlot; |
13456 |
- |
13457 |
- private: |
13458 |
-- typedef std::unordered_map<const char*, IndirectBindingSlot, CStringHash, CStringEquals> NameToSlot; |
13459 |
-+ typedef std::UNORDERED_MAP<const char*, IndirectBindingSlot, CStringHash, CStringEquals> NameToSlot; |
13460 |
- |
13461 |
- class ContentFuncs { |
13462 |
- public: |
13463 |
- size_t operator()(const ld::Atom*) const; |
13464 |
- bool operator()(const ld::Atom* left, const ld::Atom* right) const; |
13465 |
- }; |
13466 |
-- typedef std::unordered_map<const ld::Atom*, IndirectBindingSlot, ContentFuncs, ContentFuncs> ContentToSlot; |
13467 |
-+ typedef std::UNORDERED_MAP<const ld::Atom*, IndirectBindingSlot, ContentFuncs, ContentFuncs> ContentToSlot; |
13468 |
- |
13469 |
- class ReferencesHashFuncs { |
13470 |
- public: |
13471 |
- size_t operator()(const ld::Atom*) const; |
13472 |
- bool operator()(const ld::Atom* left, const ld::Atom* right) const; |
13473 |
- }; |
13474 |
-- typedef std::unordered_map<const ld::Atom*, IndirectBindingSlot, ReferencesHashFuncs, ReferencesHashFuncs> ReferencesToSlot; |
13475 |
-+ typedef std::UNORDERED_MAP<const ld::Atom*, IndirectBindingSlot, ReferencesHashFuncs, ReferencesHashFuncs> ReferencesToSlot; |
13476 |
- |
13477 |
- class CStringHashFuncs { |
13478 |
- public: |
13479 |
- size_t operator()(const ld::Atom*) const; |
13480 |
- bool operator()(const ld::Atom* left, const ld::Atom* right) const; |
13481 |
- }; |
13482 |
-- typedef std::unordered_map<const ld::Atom*, IndirectBindingSlot, CStringHashFuncs, CStringHashFuncs> CStringToSlot; |
13483 |
-+ typedef std::UNORDERED_MAP<const ld::Atom*, IndirectBindingSlot, CStringHashFuncs, CStringHashFuncs> CStringToSlot; |
13484 |
- |
13485 |
- class UTF16StringHashFuncs { |
13486 |
- public: |
13487 |
- size_t operator()(const ld::Atom*) const; |
13488 |
- bool operator()(const ld::Atom* left, const ld::Atom* right) const; |
13489 |
- }; |
13490 |
-- typedef std::unordered_map<const ld::Atom*, IndirectBindingSlot, UTF16StringHashFuncs, UTF16StringHashFuncs> UTF16StringToSlot; |
13491 |
-+ typedef std::UNORDERED_MAP<const ld::Atom*, IndirectBindingSlot, UTF16StringHashFuncs, UTF16StringHashFuncs> UTF16StringToSlot; |
13492 |
- |
13493 |
- typedef std::map<IndirectBindingSlot, const char*> SlotToName; |
13494 |
-- typedef std::unordered_map<const char*, CStringToSlot*, CStringHash, CStringEquals> NameToMap; |
13495 |
-+ typedef std::UNORDERED_MAP<const char*, CStringToSlot*, CStringHash, CStringEquals> NameToMap; |
13496 |
- |
13497 |
- typedef std::vector<const ld::Atom *> DuplicatedSymbolAtomList; |
13498 |
- typedef std::map<const char *, DuplicatedSymbolAtomList * > DuplicateSymbols; |
13499 |
---- ld64-242/src/other/dyldinfo.cpp.gcc 2015-08-03 01:11:48.000000000 +0200 |
13500 |
-+++ ld64-242/src/other/dyldinfo.cpp 2015-08-03 01:11:57.000000000 +0200 |
13501 |
-@@ -33,7 +33,6 @@ |
13502 |
- |
13503 |
- #include <vector> |
13504 |
- #include <set> |
13505 |
--#include <unordered_set> |
13506 |
- |
13507 |
- #include "configure.h" |
13508 |
- #include "MachOFileAbstraction.hpp" |
13509 |
---- ld64-242/src/other/machochecker.cpp.gcc 2015-08-03 01:11:48.000000000 +0200 |
13510 |
-+++ ld64-242/src/other/machochecker.cpp 2015-08-03 01:11:57.000000000 +0200 |
13511 |
-@@ -33,7 +33,13 @@ |
13512 |
- |
13513 |
- #include <vector> |
13514 |
- #include <set> |
13515 |
-+#ifdef __GLIBCXX__ |
13516 |
-+#include <tr1/unordered_set> |
13517 |
-+#define UNORDERED_SET tr1::unordered_set |
13518 |
-+#else |
13519 |
- #include <unordered_set> |
13520 |
-+#define UNORDERED_SET unordered_set |
13521 |
-+#endif |
13522 |
- |
13523 |
- #include "configure.h" |
13524 |
- |
13525 |
-@@ -124,7 +130,7 @@ |
13526 |
- bool operator()(const char* left, const char* right) const { return (strcmp(left, right) == 0); } |
13527 |
- }; |
13528 |
- |
13529 |
-- typedef std::unordered_set<const char*, CStringHash, CStringEquals> StringSet; |
13530 |
-+ typedef std::UNORDERED_SET<const char*, CStringHash, CStringEquals> StringSet; |
13531 |
- |
13532 |
- MachOChecker(const uint8_t* fileContent, uint32_t fileLength, const char* path); |
13533 |
- void checkMachHeader(); |
13534 |
---- ld64-242/src/other/unwinddump.cpp.gcc 2015-08-03 01:11:48.000000000 +0200 |
13535 |
-+++ ld64-242/src/other/unwinddump.cpp 2015-08-03 01:11:57.000000000 +0200 |
13536 |
-@@ -33,7 +33,6 @@ |
13537 |
- |
13538 |
- #include <vector> |
13539 |
- #include <set> |
13540 |
--#include <unordered_set> |
13541 |
- |
13542 |
- #include "configure.h" |
13543 |
- #include "MachOFileAbstraction.hpp" |
13544 |
|
13545 |
diff --git a/sys-devel/binutils-apple/files/ld64-242-noarm.patch b/sys-devel/binutils-apple/files/ld64-242-noarm.patch |
13546 |
deleted file mode 100644 |
13547 |
index adfae99..0000000 |
13548 |
--- a/sys-devel/binutils-apple/files/ld64-242-noarm.patch |
13549 |
+++ /dev/null |
13550 |
@@ -1,1255 +0,0 @@ |
13551 |
-Fully conditionalise arm support so it can be disabled on 10.4. |
13552 |
- |
13553 |
---- ld64-242/src/ld/HeaderAndLoadCommands.hpp.noarm 2014-05-08 03:38:16.000000000 +0200 |
13554 |
-+++ ld64-242/src/ld/HeaderAndLoadCommands.hpp 2015-08-03 01:09:13.000000000 +0200 |
13555 |
-@@ -607,8 +607,12 @@ |
13556 |
- |
13557 |
- template <> uint32_t HeaderAndLoadCommandsAtom<x86>::cpuType() const { return CPU_TYPE_I386; } |
13558 |
- template <> uint32_t HeaderAndLoadCommandsAtom<x86_64>::cpuType() const { return CPU_TYPE_X86_64; } |
13559 |
-+#if SUPPORT_ARCH_arm_any |
13560 |
- template <> uint32_t HeaderAndLoadCommandsAtom<arm>::cpuType() const { return CPU_TYPE_ARM; } |
13561 |
-+#endif |
13562 |
-+#if SUPPORT_ARCH_arm64 |
13563 |
- template <> uint32_t HeaderAndLoadCommandsAtom<arm64>::cpuType() const { return CPU_TYPE_ARM64; } |
13564 |
-+#endif |
13565 |
- |
13566 |
- |
13567 |
- |
13568 |
-@@ -627,17 +631,21 @@ |
13569 |
- return _state.cpuSubType; |
13570 |
- } |
13571 |
- |
13572 |
-+#if SUPPORT_ARCH_arm_any |
13573 |
- template <> |
13574 |
- uint32_t HeaderAndLoadCommandsAtom<arm>::cpuSubType() const |
13575 |
- { |
13576 |
- return _state.cpuSubType; |
13577 |
- } |
13578 |
-+#endif |
13579 |
- |
13580 |
-+#if SUPPORT_ARCH_arm64 |
13581 |
- template <> |
13582 |
- uint32_t HeaderAndLoadCommandsAtom<arm64>::cpuSubType() const |
13583 |
- { |
13584 |
- return CPU_SUBTYPE_ARM64_ALL; |
13585 |
- } |
13586 |
-+#endif |
13587 |
- |
13588 |
- |
13589 |
- |
13590 |
---- ld64-242/src/ld/LinkEdit.hpp.noarm 2015-08-03 01:08:57.000000000 +0200 |
13591 |
-+++ ld64-242/src/ld/LinkEdit.hpp 2015-08-03 01:09:13.000000000 +0200 |
13592 |
-@@ -1595,6 +1595,7 @@ |
13593 |
- for (ld::Fixup::iterator fit = atom->fixupsBegin(); fit != atom->fixupsEnd(); ++fit) { |
13594 |
- if ( fit->kind != ld::Fixup::kindLinkerOptimizationHint) |
13595 |
- continue; |
13596 |
-+#if SUPPORT_ARCH_arm64 |
13597 |
- ld::Fixup::LOH_arm64 extra; |
13598 |
- extra.addend = fit->u.addend; |
13599 |
- _encodedData.append_uleb128(extra.info.kind); |
13600 |
-@@ -1606,6 +1607,7 @@ |
13601 |
- _encodedData.append_uleb128((extra.info.delta3 << 2) + fit->offsetInAtom + address); |
13602 |
- if ( extra.info.count > 2 ) |
13603 |
- _encodedData.append_uleb128((extra.info.delta4 << 2) + fit->offsetInAtom + address); |
13604 |
-+#endif |
13605 |
- } |
13606 |
- } |
13607 |
- } |
13608 |
---- ld64-242/src/ld/Options.cpp.noarm 2015-08-03 01:08:57.000000000 +0200 |
13609 |
-+++ ld64-242/src/ld/Options.cpp 2015-08-03 01:09:13.000000000 +0200 |
13610 |
-@@ -579,8 +579,13 @@ |
13611 |
- #endif |
13612 |
- } |
13613 |
- break; |
13614 |
-+#if SUPPORT_ARCH_arm_any |
13615 |
- case CPU_TYPE_ARM: |
13616 |
-+#endif |
13617 |
-+#if SUPPORT_ARCH_arm64 |
13618 |
- case CPU_TYPE_ARM64: |
13619 |
-+#endif |
13620 |
-+#if SUPPORT_ARCH_arm_any || SUPPORT_ARCH_arm64 |
13621 |
- if ( (fMacVersionMin == ld::macVersionUnset) && (fIOSVersionMin == ld::iOSVersionUnset) && (fOutputKind != Options::kObjectFile) ) { |
13622 |
- #if defined(DEFAULT_IPHONEOS_MIN_VERSION) |
13623 |
- warning("-ios_version_min not specified, assuming " DEFAULT_IPHONEOS_MIN_VERSION); |
13624 |
-@@ -591,6 +596,7 @@ |
13625 |
- #endif |
13626 |
- } |
13627 |
- break; |
13628 |
-+#endif |
13629 |
- } |
13630 |
- #ifdef SUPPORT_SNAPSHOTS |
13631 |
- fLinkSnapshot.recordArch(fArchitectureName); |
13632 |
-@@ -1687,9 +1693,11 @@ |
13633 |
- symbolStart = NULL; |
13634 |
- } |
13635 |
- else if ( strncmp(symbolStart, "arm:", 4) == 0 ) { |
13636 |
-+#if SUPPORT_ARCH_arm_any |
13637 |
- if ( fArchitecture == CPU_TYPE_ARM ) |
13638 |
- symbolStart = &symbolStart[4]; |
13639 |
- else |
13640 |
-+#endif |
13641 |
- symbolStart = NULL; |
13642 |
- } |
13643 |
- if ( symbolStart != NULL ) { |
13644 |
-@@ -3672,6 +3680,7 @@ |
13645 |
- #endif |
13646 |
- } |
13647 |
- break; |
13648 |
-+#if SUPPORT_ARCH_arm_any |
13649 |
- case CPU_TYPE_ARM: |
13650 |
- if ( (fOutputKind != Options::kObjectFile) && (fOutputKind != Options::kPreload) ) { |
13651 |
- #if defined(DEFAULT_IPHONEOS_MIN_VERSION) |
13652 |
-@@ -3683,6 +3692,7 @@ |
13653 |
- #endif |
13654 |
- } |
13655 |
- break; |
13656 |
-+#endif |
13657 |
- default: |
13658 |
- // architecture will be infered later by examining .o files |
13659 |
- break; |
13660 |
-@@ -3705,12 +3715,14 @@ |
13661 |
- fMacVersionMin = ld::mac10_4; |
13662 |
- } |
13663 |
- break; |
13664 |
-+#if SUPPORT_ARCH_arm64 |
13665 |
- case CPU_TYPE_ARM64: |
13666 |
- if ( fIOSVersionMin < ld::iOS_7_0 ) { |
13667 |
- //warning("-mios_version_min should be 7.0 or later for arm64"); |
13668 |
- fIOSVersionMin = ld::iOS_7_0; |
13669 |
- } |
13670 |
- break; |
13671 |
-+#endif |
13672 |
- } |
13673 |
- |
13674 |
- // default to adding functions start for dynamic code, static code must opt-in |
13675 |
-@@ -3750,6 +3762,7 @@ |
13676 |
- fAllowTextRelocs = true; |
13677 |
- fUndefinedTreatment = kUndefinedDynamicLookup; |
13678 |
- break; |
13679 |
-+#if SUPPORT_ARCH_arm64 |
13680 |
- case CPU_TYPE_ARM64: |
13681 |
- // arm64 uses new MH_KEXT_BUNDLE type |
13682 |
- fMakeCompressedDyldInfo = false; |
13683 |
-@@ -3758,6 +3771,8 @@ |
13684 |
- fKextsUseStubs = true; |
13685 |
- fUndefinedTreatment = kUndefinedDynamicLookup; |
13686 |
- break; |
13687 |
-+#endif |
13688 |
-+#if SUPPORT_ARCH_arm_any |
13689 |
- case CPU_TYPE_ARM: |
13690 |
- if ( fIOSVersionMin >= ld::iOS_5_0 ) { |
13691 |
- // iOS 5.0 and later use new MH_KEXT_BUNDLE type |
13692 |
-@@ -3769,6 +3784,7 @@ |
13693 |
- fUndefinedTreatment = kUndefinedDynamicLookup; |
13694 |
- break; |
13695 |
- } |
13696 |
-+#endif |
13697 |
- // else use object file |
13698 |
- case CPU_TYPE_I386: |
13699 |
- // use .o files |
13700 |
-@@ -3821,6 +3837,7 @@ |
13701 |
- if ( fSplitSegs && (fBaseWritableAddress-fBaseAddress != 0x10000000) ) |
13702 |
- fBaseWritableAddress = fBaseAddress + 0x10000000; |
13703 |
- break; |
13704 |
-+#if SUPPORT_ARCH_arm_any |
13705 |
- case CPU_TYPE_ARM: |
13706 |
- if ( fOutputKind != Options::kDynamicLibrary ) { |
13707 |
- fSplitSegs = false; |
13708 |
-@@ -3831,6 +3848,7 @@ |
13709 |
- fBaseWritableAddress = fBaseAddress + 0x08000000; |
13710 |
- } |
13711 |
- break; |
13712 |
-+#endif |
13713 |
- default: |
13714 |
- fSplitSegs = false; |
13715 |
- fBaseAddress = 0; |
13716 |
-@@ -3845,6 +3863,7 @@ |
13717 |
- break; |
13718 |
- case CPU_TYPE_X86_64: |
13719 |
- break; |
13720 |
-+#if SUPPORT_ARCH_arm_any |
13721 |
- case CPU_TYPE_ARM: |
13722 |
- switch ( fOutputKind ) { |
13723 |
- case Options::kDynamicExecutable: |
13724 |
-@@ -3867,6 +3886,7 @@ |
13725 |
- fBaseAddress = 0; |
13726 |
- } |
13727 |
- break; |
13728 |
-+#endif |
13729 |
- } |
13730 |
- |
13731 |
- // <rdar://problem/6138961> -r implies no prebinding for all architectures |
13732 |
-@@ -3912,6 +3932,7 @@ |
13733 |
- case CPU_TYPE_X86_64: |
13734 |
- fPrebind = false; |
13735 |
- break; |
13736 |
-+#if SUPPORT_ARCH_arm_any |
13737 |
- case CPU_TYPE_ARM: |
13738 |
- switch ( fOutputKind ) { |
13739 |
- case Options::kDynamicExecutable: |
13740 |
-@@ -3929,6 +3950,7 @@ |
13741 |
- break; |
13742 |
- } |
13743 |
- break; |
13744 |
-+#endif |
13745 |
- } |
13746 |
- } |
13747 |
- |
13748 |
-@@ -3955,10 +3977,12 @@ |
13749 |
- case CPU_TYPE_I386: |
13750 |
- if ( fIOSVersionMin != ld::iOSVersionUnset ) // simulator never needs modules |
13751 |
- break; |
13752 |
-+#if SUPPORT_ARCH_arm_any |
13753 |
- case CPU_TYPE_ARM: |
13754 |
- if ( fPrebind ) |
13755 |
- fNeedsModuleTable = true; // redo_prebinding requires a module table |
13756 |
- break; |
13757 |
-+#endif |
13758 |
- } |
13759 |
- } |
13760 |
- |
13761 |
-@@ -3974,7 +3998,9 @@ |
13762 |
- switch ( fArchitecture ) { |
13763 |
- case CPU_TYPE_I386: |
13764 |
- case CPU_TYPE_X86_64: |
13765 |
-+#if SUPPORT_ARCH_arm64 |
13766 |
- case CPU_TYPE_ARM64: |
13767 |
-+#endif |
13768 |
- switch ( fOutputKind ) { |
13769 |
- case Options::kObjectFile: |
13770 |
- case Options::kStaticExecutable: |
13771 |
-@@ -4037,7 +4063,15 @@ |
13772 |
- fEncryptable = false; |
13773 |
- break; |
13774 |
- } |
13775 |
-- if ( (fArchitecture != CPU_TYPE_ARM) && (fArchitecture != CPU_TYPE_ARM64) ) |
13776 |
-+ if ( |
13777 |
-+#if SUPPORT_ARCH_arm_any |
13778 |
-+ (fArchitecture != CPU_TYPE_ARM) && |
13779 |
-+#endif |
13780 |
-+#if SUPPORT_ARCH_arm64 |
13781 |
-+ (fArchitecture != CPU_TYPE_ARM64) && |
13782 |
-+#endif |
13783 |
-+ 1 |
13784 |
-+ ) |
13785 |
- fEncryptable = false; |
13786 |
- |
13787 |
- // don't move inits in dyld because dyld wants certain |
13788 |
-@@ -4089,11 +4123,15 @@ |
13789 |
- |
13790 |
- // only ARM and x86_64 enforces that cpu-sub-types must match |
13791 |
- switch ( fArchitecture ) { |
13792 |
-+#if SUPPORT_ARCH_arm_any |
13793 |
- case CPU_TYPE_ARM: |
13794 |
-+#endif |
13795 |
- case CPU_TYPE_X86_64: |
13796 |
- break; |
13797 |
- case CPU_TYPE_I386: |
13798 |
-+#if SUPPORT_ARCH_arm64 |
13799 |
- case CPU_TYPE_ARM64: |
13800 |
-+#endif |
13801 |
- fAllowCpuSubtypeMismatches = true; |
13802 |
- break; |
13803 |
- } |
13804 |
-@@ -4139,6 +4177,7 @@ |
13805 |
- fPositionIndependentExecutable = true; |
13806 |
- } |
13807 |
- |
13808 |
-+#if SUPPORT_ARCH_arm_any |
13809 |
- // armv7 for iOS4.3 defaults to PIE |
13810 |
- if ( (fArchitecture == CPU_TYPE_ARM) |
13811 |
- && fArchSupportsThumb2 |
13812 |
-@@ -4146,6 +4185,7 @@ |
13813 |
- && (fIOSVersionMin >= ld::iOS_4_3) ) { |
13814 |
- fPositionIndependentExecutable = true; |
13815 |
- } |
13816 |
-+#endif |
13817 |
- |
13818 |
- // Simulator defaults to PIE |
13819 |
- if ( fTargetIOSSimulator && (fOutputKind == kDynamicExecutable) ) |
13820 |
-@@ -4155,10 +4195,12 @@ |
13821 |
- if ( fDisablePositionIndependentExecutable ) |
13822 |
- fPositionIndependentExecutable = false; |
13823 |
- |
13824 |
-+#if SUPPORT_ARCH_arm64 |
13825 |
- // arm64 is always PIE |
13826 |
- if ( (fArchitecture == CPU_TYPE_ARM64) && (fOutputKind == kDynamicExecutable) ) { |
13827 |
- fPositionIndependentExecutable = true; |
13828 |
- } |
13829 |
-+#endif |
13830 |
- |
13831 |
- // set fOutputSlidable |
13832 |
- switch ( fOutputKind ) { |
13833 |
-@@ -4184,9 +4226,11 @@ |
13834 |
- if ( fMacVersionMin >= ld::mac10_7 ) { |
13835 |
- fTLVSupport = true; |
13836 |
- } |
13837 |
-+#if SUPPORT_ARCH_arm64 |
13838 |
- else if ( (fArchitecture == CPU_TYPE_ARM64) && (fIOSVersionMin >= ld::iOS_8_0) ) { |
13839 |
- fTLVSupport = true; |
13840 |
- } |
13841 |
-+#endif |
13842 |
- |
13843 |
- // default to adding version load command for dynamic code, static code must opt-in |
13844 |
- switch ( fOutputKind ) { |
13845 |
-@@ -4524,12 +4568,16 @@ |
13846 |
- if ( fStackAddr != 0 ) { |
13847 |
- switch (fArchitecture) { |
13848 |
- case CPU_TYPE_I386: |
13849 |
-+#if SUPPORT_ARCH_arm_any |
13850 |
- case CPU_TYPE_ARM: |
13851 |
-+#endif |
13852 |
- if ( fStackAddr > 0xFFFFFFFFULL ) |
13853 |
- throw "-stack_addr must be < 4G for 32-bit processes"; |
13854 |
- break; |
13855 |
- case CPU_TYPE_X86_64: |
13856 |
-+#if SUPPORT_ARCH_arm64 |
13857 |
- case CPU_TYPE_ARM64: |
13858 |
-+#endif |
13859 |
- break; |
13860 |
- } |
13861 |
- if ( (fStackAddr & -4096) != fStackAddr ) |
13862 |
-@@ -4550,6 +4598,7 @@ |
13863 |
- if ( (fStackAddr > 0xB0000000ULL) && ((fStackAddr-fStackSize) < 0xB0000000ULL) ) |
13864 |
- warning("custom stack placement overlaps and will disable shared region"); |
13865 |
- break; |
13866 |
-+#if SUPPORT_ARCH_arm_any |
13867 |
- case CPU_TYPE_ARM: |
13868 |
- if ( fStackSize > 0x2F000000 ) |
13869 |
- throw "-stack_size must be < 752MB"; |
13870 |
-@@ -4558,11 +4607,13 @@ |
13871 |
- if ( fStackAddr > 0x30000000ULL) |
13872 |
- throw "-stack_addr must be < 0x30000000 for arm"; |
13873 |
- break; |
13874 |
-+#endif |
13875 |
- case CPU_TYPE_X86_64: |
13876 |
- if ( fStackAddr == 0 ) { |
13877 |
- fStackAddr = 0x00007FFF5C000000ULL; |
13878 |
- } |
13879 |
- break; |
13880 |
-+#if SUPPORT_ARCH_arm64 |
13881 |
- case CPU_TYPE_ARM64: |
13882 |
- if ( fStackSize > 0x20000000 ) |
13883 |
- throw "-stack_size must be < 512MB"; |
13884 |
-@@ -4570,6 +4621,7 @@ |
13885 |
- fStackAddr = 0x120000000ULL; |
13886 |
- } |
13887 |
- break; |
13888 |
-+#endif |
13889 |
- } |
13890 |
- if ( (fStackSize & -4096) != fStackSize ) |
13891 |
- throw "-stack_size must be multiples of 4K"; |
13892 |
-@@ -4679,8 +4731,12 @@ |
13893 |
- alterObjC1ClassNamesToObjC2 = true; |
13894 |
- break; |
13895 |
- case CPU_TYPE_X86_64: |
13896 |
-+#if SUPPORT_ARCH_arm_any |
13897 |
- case CPU_TYPE_ARM: |
13898 |
-+#endif |
13899 |
-+#if SUPPORT_ARCH_arm64 |
13900 |
- case CPU_TYPE_ARM64: |
13901 |
-+#endif |
13902 |
- alterObjC1ClassNamesToObjC2 = true; |
13903 |
- break; |
13904 |
- } |
13905 |
-@@ -4772,11 +4828,15 @@ |
13906 |
- // zero page size not specified on command line, set default |
13907 |
- switch (fArchitecture) { |
13908 |
- case CPU_TYPE_I386: |
13909 |
-+#if SUPPORT_ARCH_arm_any |
13910 |
- case CPU_TYPE_ARM: |
13911 |
-+#endif |
13912 |
- // first 4KB for 32-bit architectures |
13913 |
- fZeroPageSize = 0x1000; |
13914 |
- break; |
13915 |
-+#if SUPPORT_ARCH_arm64 |
13916 |
- case CPU_TYPE_ARM64: |
13917 |
-+#endif |
13918 |
- case CPU_TYPE_X86_64: |
13919 |
- // first 4GB for x86_64 on all OS's |
13920 |
- fZeroPageSize = 0x100000000ULL; |
13921 |
-@@ -4878,9 +4938,11 @@ |
13922 |
- |
13923 |
- // -force_cpusubtype_ALL is not supported for ARM |
13924 |
- if ( fForceSubtypeAll ) { |
13925 |
-+#if SUPPORT_ARCH_arm_any |
13926 |
- if ( fArchitecture == CPU_TYPE_ARM ) { |
13927 |
- warning("-force_cpusubtype_ALL will become unsupported for ARM architectures"); |
13928 |
- } |
13929 |
-+#endif |
13930 |
- } |
13931 |
- |
13932 |
- // -reexported_symbols_list can only be used with -dynamiclib |
13933 |
---- ld64-242/src/ld/OutputFile.cpp.noarm 2015-08-03 01:08:57.000000000 +0200 |
13934 |
-+++ ld64-242/src/ld/OutputFile.cpp 2015-08-03 01:09:13.000000000 +0200 |
13935 |
-@@ -631,7 +631,12 @@ |
13936 |
- // is encoded in mach-o the same as: |
13937 |
- // .long _foo + 0x40000000 |
13938 |
- // so if _foo lays out to 0xC0000100, the first is ok, but the second is not. |
13939 |
-- if ( (_options.architecture() == CPU_TYPE_ARM) || (_options.architecture() == CPU_TYPE_I386) ) { |
13940 |
-+ if ( |
13941 |
-+#if SUPPORT_ARCH_arm_any |
13942 |
-+ (_options.architecture() == CPU_TYPE_ARM) || |
13943 |
-+#endif |
13944 |
-+ (_options.architecture() == CPU_TYPE_I386) || |
13945 |
-+ 0) { |
13946 |
- // Unlikely userland code does funky stuff like this, so warn for them, but not warn for -preload or -static |
13947 |
- if ( (_options.outputKind() != Options::kPreload) && (_options.outputKind() != Options::kStaticExecutable) ) { |
13948 |
- warning("32-bit absolute address out of range (0x%08llX max is 4GB): from %s + 0x%08X (0x%08llX) to 0x%08llX", |
13949 |
-@@ -1235,22 +1240,26 @@ |
13950 |
- return false; |
13951 |
- const ld::Fixup* f; |
13952 |
- switch ( fixup->kind ) { |
13953 |
-+#if SUPPORT_ARCH_arm64 |
13954 |
- case ld::Fixup::kindStoreTargetAddressARM64Page21: |
13955 |
- return !mustBeGOT; |
13956 |
- case ld::Fixup::kindStoreTargetAddressARM64GOTLoadPage21: |
13957 |
- case ld::Fixup::kindStoreTargetAddressARM64GOTLeaPage21: |
13958 |
- return true; |
13959 |
-+#endif |
13960 |
- case ld::Fixup::kindSetTargetAddress: |
13961 |
- f = fixup; |
13962 |
- do { |
13963 |
- ++f; |
13964 |
- } while ( ! f->lastInCluster() ); |
13965 |
- switch (f->kind ) { |
13966 |
-+#if SUPPORT_ARCH_arm64 |
13967 |
- case ld::Fixup::kindStoreARM64Page21: |
13968 |
- return !mustBeGOT; |
13969 |
- case ld::Fixup::kindStoreARM64GOTLoadPage21: |
13970 |
- case ld::Fixup::kindStoreARM64GOTLeaPage21: |
13971 |
- return true; |
13972 |
-+#endif |
13973 |
- default: |
13974 |
- break; |
13975 |
- } |
13976 |
-@@ -1267,22 +1276,26 @@ |
13977 |
- return false; |
13978 |
- const ld::Fixup* f; |
13979 |
- switch ( fixup->kind ) { |
13980 |
-+#if SUPPORT_ARCH_arm64 |
13981 |
- case ld::Fixup::kindStoreTargetAddressARM64PageOff12: |
13982 |
- return !mustBeGOT; |
13983 |
- case ld::Fixup::kindStoreTargetAddressARM64GOTLoadPageOff12: |
13984 |
- case ld::Fixup::kindStoreTargetAddressARM64GOTLeaPageOff12: |
13985 |
- return true; |
13986 |
-+#endif |
13987 |
- case ld::Fixup::kindSetTargetAddress: |
13988 |
- f = fixup; |
13989 |
- do { |
13990 |
- ++f; |
13991 |
- } while ( ! f->lastInCluster() ); |
13992 |
- switch (f->kind ) { |
13993 |
-+#if SUPPORT_ARCH_arm64 |
13994 |
- case ld::Fixup::kindStoreARM64PageOff12: |
13995 |
- return !mustBeGOT; |
13996 |
- case ld::Fixup::kindStoreARM64GOTLoadPageOff12: |
13997 |
- case ld::Fixup::kindStoreARM64GOTLeaPageOff12: |
13998 |
- return true; |
13999 |
-+#endif |
14000 |
- default: |
14001 |
- break; |
14002 |
- } |
14003 |
-@@ -1318,7 +1331,9 @@ |
14004 |
- std::map<uint32_t, const Fixup*> usedByHints; |
14005 |
- for (ld::Fixup::iterator fit = atom->fixupsBegin(), end=atom->fixupsEnd(); fit != end; ++fit) { |
14006 |
- uint8_t* fixUpLocation = &buffer[fit->offsetInAtom]; |
14007 |
-+#if SUPPORT_ARCH_arm64 |
14008 |
- ld::Fixup::LOH_arm64 lohExtra; |
14009 |
-+#endif |
14010 |
- switch ( (ld::Fixup::Kind)(fit->kind) ) { |
14011 |
- case ld::Fixup::kindNone: |
14012 |
- case ld::Fixup::kindNoneFollowOn: |
14013 |
-@@ -1580,6 +1595,7 @@ |
14014 |
- break; |
14015 |
- case ld::Fixup::kindLinkerOptimizationHint: |
14016 |
- // expand table of address/offsets used by hints |
14017 |
-+#if SUPPORT_ARCH_arm64 |
14018 |
- lohExtra.addend = fit->u.addend; |
14019 |
- usedByHints[fit->offsetInAtom + (lohExtra.info.delta1 << 2)] = NULL; |
14020 |
- if ( lohExtra.info.count > 0 ) |
14021 |
-@@ -1588,6 +1604,7 @@ |
14022 |
- usedByHints[fit->offsetInAtom + (lohExtra.info.delta3 << 2)] = NULL; |
14023 |
- if ( lohExtra.info.count > 2 ) |
14024 |
- usedByHints[fit->offsetInAtom + (lohExtra.info.delta4 << 2)] = NULL; |
14025 |
-+#endif |
14026 |
- break; |
14027 |
- case ld::Fixup::kindStoreTargetAddressLittleEndian32: |
14028 |
- accumulator = addressOf(state, fit, &toTarget); |
14029 |
-@@ -2095,6 +2112,7 @@ |
14030 |
- //uint8_t loadSize, destReg; |
14031 |
- //uint32_t scaledOffset; |
14032 |
- //uint32_t imm12; |
14033 |
-+#if SUPPORT_ARCH_arm64 |
14034 |
- ld::Fixup::LOH_arm64 alt; |
14035 |
- alt.addend = fit->u.addend; |
14036 |
- setInfo(state, atom, buffer, usedByHints, fit->offsetInAtom, (alt.info.delta1 << 2), &infoA); |
14037 |
-@@ -2453,6 +2471,7 @@ |
14038 |
- fprintf(stderr, "unknown hint kind %d alt.info.kind at 0x%08llX\n", alt.info.kind, infoA.instructionAddress); |
14039 |
- break; |
14040 |
- } |
14041 |
-+#endif |
14042 |
- } |
14043 |
- // apply hints pass 2 |
14044 |
- for (ld::Fixup::iterator fit = atom->fixupsBegin(), end=atom->fixupsEnd(); fit != end; ++fit) { |
14045 |
-@@ -2460,6 +2479,7 @@ |
14046 |
- continue; |
14047 |
- InstructionInfo infoA; |
14048 |
- InstructionInfo infoB; |
14049 |
-+#if SUPPORT_ARCH_arm64 |
14050 |
- ld::Fixup::LOH_arm64 alt; |
14051 |
- alt.addend = fit->u.addend; |
14052 |
- setInfo(state, atom, buffer, usedByHints, fit->offsetInAtom, (alt.info.delta1 << 2), &infoA); |
14053 |
-@@ -2491,6 +2511,7 @@ |
14054 |
- } |
14055 |
- break; |
14056 |
- } |
14057 |
-+#endif |
14058 |
- } |
14059 |
- } |
14060 |
- #endif // SUPPORT_ARCH_arm64 |
14061 |
-@@ -2505,6 +2526,7 @@ |
14062 |
- for (uint8_t* p=from; p < to; ++p) |
14063 |
- *p = 0x90; |
14064 |
- break; |
14065 |
-+#if SUPPORT_ARCH_arm_any |
14066 |
- case CPU_TYPE_ARM: |
14067 |
- if ( thumb ) { |
14068 |
- for (uint8_t* p=from; p < to; p += 2) |
14069 |
-@@ -2515,6 +2537,7 @@ |
14070 |
- OSWriteLittleInt32((uint32_t*)p, 0, 0xe1a00000); |
14071 |
- } |
14072 |
- break; |
14073 |
-+#endif |
14074 |
- default: |
14075 |
- for (uint8_t* p=from; p < to; ++p) |
14076 |
- *p = 0x00; |
14077 |
-@@ -2843,7 +2866,11 @@ |
14078 |
- |
14079 |
- // in -r mode, clarify symbolTableNotInFinalLinkedImages |
14080 |
- if ( _options.outputKind() == Options::kObjectFile ) { |
14081 |
-- if ( (_options.architecture() == CPU_TYPE_X86_64) || (_options.architecture() == CPU_TYPE_ARM64) ) { |
14082 |
-+ if ( (_options.architecture() == CPU_TYPE_X86_64) || |
14083 |
-+#if SUPPORT_ARCH_arm64 |
14084 |
-+ (_options.architecture() == CPU_TYPE_ARM64) || |
14085 |
-+#endif |
14086 |
-+ 0 ) { |
14087 |
- // x86_64 .o files need labels on anonymous literal strings |
14088 |
- if ( (sect->type() == ld::Section::typeCString) && (atom->combine() == ld::Atom::combineByNameAndContent) ) { |
14089 |
- (const_cast<ld::Atom*>(atom))->setSymbolTableInclusion(ld::Atom::symbolTableIn); |
14090 |
-@@ -4071,8 +4098,10 @@ |
14091 |
- if ( _options.sharedRegionEligible() ) { |
14092 |
- // <rdar://problem/13287063> when range checking, ignore high byte of arm64 addends |
14093 |
- uint64_t checkAddend = addend; |
14094 |
-+#if SUPPORT_ARCH_arm64 |
14095 |
- if ( _options.architecture() == CPU_TYPE_ARM64 ) |
14096 |
- checkAddend &= 0x0FFFFFFFFFFFFFFFULL; |
14097 |
-+#endif |
14098 |
- if ( checkAddend != 0 ) { |
14099 |
- // make sure the addend does not cause the pointer to point outside the target's segment |
14100 |
- // if it does, update_dyld_shared_cache will not be able to put this dylib into the shared cache |
14101 |
-@@ -4279,12 +4308,17 @@ |
14102 |
- |
14103 |
- bool OutputFile::useExternalSectionReloc(const ld::Atom* atom, const ld::Atom* target, ld::Fixup* fixupWithTarget) |
14104 |
- { |
14105 |
-- if ( (_options.architecture() == CPU_TYPE_X86_64) || (_options.architecture() == CPU_TYPE_ARM64) ) { |
14106 |
-+ if ( (_options.architecture() == CPU_TYPE_X86_64) || |
14107 |
-+#if SUPPORT_ARCH_arm64 |
14108 |
-+ (_options.architecture() == CPU_TYPE_ARM64) || |
14109 |
-+#endif |
14110 |
-+ 0) { |
14111 |
- // x86_64 and ARM64 use external relocations for everthing that has a symbol |
14112 |
- return ( target->symbolTableInclusion() != ld::Atom::symbolTableNotIn ); |
14113 |
- } |
14114 |
- |
14115 |
- // <rdar://problem/9513487> support arm branch interworking in -r mode |
14116 |
-+#if SUPPORT_ARCH_arm_any |
14117 |
- if ( (_options.architecture() == CPU_TYPE_ARM) && (_options.outputKind() == Options::kObjectFile) ) { |
14118 |
- if ( atom->isThumb() != target->isThumb() ) { |
14119 |
- switch ( fixupWithTarget->kind ) { |
14120 |
-@@ -4298,6 +4332,7 @@ |
14121 |
- } |
14122 |
- } |
14123 |
- } |
14124 |
-+#endif |
14125 |
- |
14126 |
- if ( (_options.architecture() == CPU_TYPE_I386) && (_options.outputKind() == Options::kObjectFile) ) { |
14127 |
- if ( target->contentType() == ld::Atom::typeTLV ) |
14128 |
-@@ -4365,7 +4400,11 @@ |
14129 |
- bool minusTargetUsesExternalReloc = (minusTarget != NULL) && this->useExternalSectionReloc(atom, minusTarget, fixupWithMinusTarget); |
14130 |
- |
14131 |
- // in x86_64 and arm64 .o files an external reloc means the content contains just the addend |
14132 |
-- if ( (_options.architecture() == CPU_TYPE_X86_64) ||(_options.architecture() == CPU_TYPE_ARM64) ) { |
14133 |
-+ if ( (_options.architecture() == CPU_TYPE_X86_64) || |
14134 |
-+#if SUPPORT_ARCH_arm64 |
14135 |
-+ (_options.architecture() == CPU_TYPE_ARM64) || |
14136 |
-+#endif |
14137 |
-+ 0 ) { |
14138 |
- if ( targetUsesExternalReloc ) { |
14139 |
- fixupWithTarget->contentAddendOnly = true; |
14140 |
- fixupWithStore->contentAddendOnly = true; |
14141 |
---- ld64-242/src/ld/parsers/archive_file.cpp.noarm 2015-08-03 01:08:57.000000000 +0200 |
14142 |
-+++ ld64-242/src/ld/parsers/archive_file.cpp 2015-08-03 01:09:13.000000000 +0200 |
14143 |
-@@ -232,8 +232,12 @@ |
14144 |
- |
14145 |
- template <> cpu_type_t File<x86>::architecture() { return CPU_TYPE_I386; } |
14146 |
- template <> cpu_type_t File<x86_64>::architecture() { return CPU_TYPE_X86_64; } |
14147 |
-+#if SUPPORT_ARCH_arm_any |
14148 |
- template <> cpu_type_t File<arm>::architecture() { return CPU_TYPE_ARM; } |
14149 |
-+#endif |
14150 |
-+#if SUPPORT_ARCH_arm64 |
14151 |
- template <> cpu_type_t File<arm64>::architecture() { return CPU_TYPE_ARM64; } |
14152 |
-+#endif |
14153 |
- |
14154 |
- |
14155 |
- template <typename A> |
14156 |
---- ld64-242/src/ld/parsers/macho_dylib_file.cpp.noarm 2015-08-03 01:08:57.000000000 +0200 |
14157 |
-+++ ld64-242/src/ld/parsers/macho_dylib_file.cpp 2015-08-03 01:09:13.000000000 +0200 |
14158 |
-@@ -258,11 +258,15 @@ |
14159 |
- bool File<A>::_s_logHashtable = false; |
14160 |
- |
14161 |
- template <> const char* File<x86_64>::objCInfoSegmentName() { return "__DATA"; } |
14162 |
-+#if SUPPORT_ARCH_arm_any |
14163 |
- template <> const char* File<arm>::objCInfoSegmentName() { return "__DATA"; } |
14164 |
-+#endif |
14165 |
- template <typename A> const char* File<A>::objCInfoSegmentName() { return "__OBJC"; } |
14166 |
- |
14167 |
- template <> const char* File<x86_64>::objCInfoSectionName() { return "__objc_imageinfo"; } |
14168 |
-+#if SUPPORT_ARCH_arm_any |
14169 |
- template <> const char* File<arm>::objCInfoSectionName() { return "__objc_imageinfo"; } |
14170 |
-+#endif |
14171 |
- template <typename A> const char* File<A>::objCInfoSectionName() { return "__image_info"; } |
14172 |
- |
14173 |
- template <typename A> |
14174 |
-@@ -1020,6 +1024,7 @@ |
14175 |
- } |
14176 |
- } |
14177 |
- |
14178 |
-+#if SUPPORT_ARCH_arm_any |
14179 |
- template <> |
14180 |
- bool Parser<arm>::validFile(const uint8_t* fileContent, bool executableOrDyliborBundle) |
14181 |
- { |
14182 |
-@@ -1046,9 +1051,11 @@ |
14183 |
- return false; |
14184 |
- } |
14185 |
- } |
14186 |
-+#endif |
14187 |
- |
14188 |
- |
14189 |
- |
14190 |
-+#if SUPPORT_ARCH_arm64 |
14191 |
- template <> |
14192 |
- bool Parser<arm64>::validFile(const uint8_t* fileContent, bool executableOrDyliborBundle) |
14193 |
- { |
14194 |
-@@ -1075,6 +1082,7 @@ |
14195 |
- return false; |
14196 |
- } |
14197 |
- } |
14198 |
-+#endif |
14199 |
- |
14200 |
- |
14201 |
- bool isDylibFile(const uint8_t* fileContent, cpu_type_t* result, cpu_subtype_t* subResult) |
14202 |
-@@ -1090,17 +1098,21 @@ |
14203 |
- *subResult = CPU_SUBTYPE_X86_ALL; |
14204 |
- return true; |
14205 |
- } |
14206 |
-+#if SUPPORT_ARCH_arm_any |
14207 |
- if ( Parser<arm>::validFile(fileContent, false) ) { |
14208 |
- *result = CPU_TYPE_ARM; |
14209 |
- const macho_header<Pointer32<LittleEndian> >* header = (const macho_header<Pointer32<LittleEndian> >*)fileContent; |
14210 |
- *subResult = header->cpusubtype(); |
14211 |
- return true; |
14212 |
- } |
14213 |
-+#endif |
14214 |
-+#if SUPPORT_ARCH_arm64 |
14215 |
- if ( Parser<arm64>::validFile(fileContent, false) ) { |
14216 |
- *result = CPU_TYPE_ARM64; |
14217 |
- *subResult = CPU_SUBTYPE_ARM64_ALL; |
14218 |
- return true; |
14219 |
- } |
14220 |
-+#endif |
14221 |
- return false; |
14222 |
- } |
14223 |
- |
14224 |
-@@ -1126,6 +1138,7 @@ |
14225 |
- return "x86_64"; |
14226 |
- } |
14227 |
- |
14228 |
-+#if SUPPORT_ARCH_arm_any |
14229 |
- template <> |
14230 |
- const char* Parser<arm>::fileKind(const uint8_t* fileContent) |
14231 |
- { |
14232 |
-@@ -1141,6 +1154,7 @@ |
14233 |
- } |
14234 |
- return "arm???"; |
14235 |
- } |
14236 |
-+#endif |
14237 |
- |
14238 |
- #if SUPPORT_ARCH_arm64 |
14239 |
- template <> |
14240 |
-@@ -1166,9 +1180,11 @@ |
14241 |
- if ( Parser<x86>::validFile(fileContent, true) ) { |
14242 |
- return Parser<x86>::fileKind(fileContent); |
14243 |
- } |
14244 |
-+#if SUPPORT_ARCH_arm_any |
14245 |
- if ( Parser<arm>::validFile(fileContent, true) ) { |
14246 |
- return Parser<arm>::fileKind(fileContent); |
14247 |
- } |
14248 |
-+#endif |
14249 |
- #if SUPPORT_ARCH_arm64 |
14250 |
- if ( Parser<arm64>::validFile(fileContent, false) ) { |
14251 |
- return Parser<arm64>::fileKind(fileContent); |
14252 |
---- ld64-242/src/ld/parsers/macho_relocatable_file.cpp.noarm 2015-08-03 01:08:57.000000000 +0200 |
14253 |
-+++ ld64-242/src/ld/parsers/macho_relocatable_file.cpp 2015-08-03 01:10:52.000000000 +0200 |
14254 |
-@@ -870,6 +870,7 @@ |
14255 |
- } |
14256 |
- } |
14257 |
- |
14258 |
-+#if SUPPORT_ARCH_arm_any |
14259 |
- template <> |
14260 |
- void Atom<arm>::verifyAlignment(const macho_section<P>&) const |
14261 |
- { |
14262 |
-@@ -878,6 +879,7 @@ |
14263 |
- warning("ARM function not 4-byte aligned: %s from %s", this->name(), this->file()->path()); |
14264 |
- } |
14265 |
- } |
14266 |
-+#endif |
14267 |
- |
14268 |
- #if SUPPORT_ARCH_arm64 |
14269 |
- template <> |
14270 |
-@@ -1267,6 +1269,7 @@ |
14271 |
- return true; |
14272 |
- } |
14273 |
- |
14274 |
-+#if SUPPORT_ARCH_arm_any |
14275 |
- template <> |
14276 |
- bool Parser<arm>::validFile(const uint8_t* fileContent, bool subtypeMustMatch, cpu_subtype_t subtype) |
14277 |
- { |
14278 |
-@@ -1287,8 +1290,10 @@ |
14279 |
- } |
14280 |
- return true; |
14281 |
- } |
14282 |
-+#endif |
14283 |
- |
14284 |
- |
14285 |
-+#if SUPPORT_ARCH_arm64 |
14286 |
- template <> |
14287 |
- bool Parser<arm64>::validFile(const uint8_t* fileContent, bool subtypeMustMatch, cpu_subtype_t subtype) |
14288 |
- { |
14289 |
-@@ -1301,6 +1306,7 @@ |
14290 |
- return false; |
14291 |
- return true; |
14292 |
- } |
14293 |
-+#endif |
14294 |
- |
14295 |
- |
14296 |
- template <> |
14297 |
-@@ -1325,6 +1331,7 @@ |
14298 |
- return "x86_64"; |
14299 |
- } |
14300 |
- |
14301 |
-+#if SUPPORT_ARCH_arm_any |
14302 |
- template <> |
14303 |
- const char* Parser<arm>::fileKind(const uint8_t* fileContent) |
14304 |
- { |
14305 |
-@@ -1340,6 +1347,7 @@ |
14306 |
- } |
14307 |
- return "arm???"; |
14308 |
- } |
14309 |
-+#endif |
14310 |
- |
14311 |
- #if SUPPORT_ARCH_arm64 |
14312 |
- template <> |
14313 |
-@@ -1604,11 +1612,13 @@ |
14314 |
- return false; |
14315 |
- } |
14316 |
- |
14317 |
-+#if SUPPORT_ARCH_arm_any |
14318 |
- template <> |
14319 |
- arm::P::uint_t Parser<arm>::realAddr(arm::P::uint_t addr) |
14320 |
- { |
14321 |
- return addr & (-2); |
14322 |
- } |
14323 |
-+#endif |
14324 |
- |
14325 |
- template <typename A> |
14326 |
- typename A::P::uint_t Parser<A>::realAddr(typename A::P::uint_t addr) |
14327 |
-@@ -1874,8 +1884,12 @@ |
14328 |
- |
14329 |
- template <> uint8_t Parser<x86>::loadCommandSizeMask() { return 0x03; } |
14330 |
- template <> uint8_t Parser<x86_64>::loadCommandSizeMask() { return 0x07; } |
14331 |
-+#if SUPPORT_ARCH_arm_any |
14332 |
- template <> uint8_t Parser<arm>::loadCommandSizeMask() { return 0x03; } |
14333 |
-+#endif |
14334 |
-+#if SUPPORT_ARCH_arm64 |
14335 |
- template <> uint8_t Parser<arm64>::loadCommandSizeMask() { return 0x07; } |
14336 |
-+#endif |
14337 |
- |
14338 |
- template <typename A> |
14339 |
- bool Parser<A>::parseLoadCommands() |
14340 |
-@@ -4072,6 +4086,7 @@ |
14341 |
- return 1 + (this->_machOSection - parser.firstMachOSection()); |
14342 |
- } |
14343 |
- |
14344 |
-+#if SUPPORT_ARCH_arm_any |
14345 |
- // arm does not have zero cost exceptions |
14346 |
- template <> |
14347 |
- uint32_t CFISection<arm>::cfiCount(Parser<arm>& parser) |
14348 |
-@@ -4084,6 +4099,7 @@ |
14349 |
- } |
14350 |
- return 0; |
14351 |
- } |
14352 |
-+#endif |
14353 |
- |
14354 |
- template <typename A> |
14355 |
- uint32_t CFISection<A>::cfiCount(Parser<A>& parser) |
14356 |
-@@ -4211,6 +4227,7 @@ |
14357 |
- |
14358 |
- |
14359 |
- |
14360 |
-+#if SUPPORT_ARCH_arm_any |
14361 |
- template <> |
14362 |
- void CFISection<arm>::cfiParse(class Parser<arm>& parser, uint8_t* buffer, |
14363 |
- libunwind::CFI_Atom_Info<CFISection<arm>::OAS>::CFI_Atom_Info cfiArray[], |
14364 |
-@@ -4233,6 +4250,7 @@ |
14365 |
- if ( msg != NULL ) |
14366 |
- throwf("malformed __eh_frame section: %s", msg); |
14367 |
- } |
14368 |
-+#endif |
14369 |
- |
14370 |
- |
14371 |
- |
14372 |
-@@ -4337,8 +4355,12 @@ |
14373 |
- |
14374 |
- template <> bool CFISection<x86_64>::bigEndian() { return false; } |
14375 |
- template <> bool CFISection<x86>::bigEndian() { return false; } |
14376 |
-+#if SUPPORT_ARCH_arm_any |
14377 |
- template <> bool CFISection<arm>::bigEndian() { return false; } |
14378 |
-+#endif |
14379 |
-+#if SUPPORT_ARCH_arm64 |
14380 |
- template <> bool CFISection<arm64>::bigEndian() { return false; } |
14381 |
-+#endif |
14382 |
- |
14383 |
- |
14384 |
- template <> |
14385 |
-@@ -4412,6 +4434,7 @@ |
14386 |
- } |
14387 |
- #endif |
14388 |
- |
14389 |
-+#if SUPPORT_ARCH_arm_any |
14390 |
- template <> |
14391 |
- void CFISection<arm>::addCiePersonalityFixups(class Parser<arm>& parser, const CFI_Atom_Info* cieInfo) |
14392 |
- { |
14393 |
-@@ -4433,7 +4456,7 @@ |
14394 |
- throwf("unsupported address encoding (%02X) of personality function in CIE", personalityEncoding); |
14395 |
- } |
14396 |
- } |
14397 |
-- |
14398 |
-+#endif |
14399 |
- |
14400 |
- |
14401 |
- template <typename A> |
14402 |
-@@ -5324,11 +5347,13 @@ |
14403 |
- return ld::Fixup::kindStoreLittleEndian32; |
14404 |
- } |
14405 |
- |
14406 |
-+#if SUPPORT_ARCH_arm_any |
14407 |
- template <> |
14408 |
- ld::Fixup::Kind NonLazyPointerSection<arm>::fixupKind() |
14409 |
- { |
14410 |
- return ld::Fixup::kindStoreLittleEndian32; |
14411 |
- } |
14412 |
-+#endif |
14413 |
- |
14414 |
- template <> |
14415 |
- ld::Fixup::Kind NonLazyPointerSection<arm64>::fixupKind() |
14416 |
-@@ -7440,10 +7465,14 @@ |
14417 |
- return ( mach_o::relocatable::Parser<x86_64>::validFile(fileContent) ); |
14418 |
- case CPU_TYPE_I386: |
14419 |
- return ( mach_o::relocatable::Parser<x86>::validFile(fileContent) ); |
14420 |
-+#if SUPPORT_ARCH_arm_any |
14421 |
- case CPU_TYPE_ARM: |
14422 |
- return ( mach_o::relocatable::Parser<arm>::validFile(fileContent, opts.objSubtypeMustMatch, opts.subType) ); |
14423 |
-+#endif |
14424 |
-+#if SUPPORT_ARCH_arm64 |
14425 |
- case CPU_TYPE_ARM64: |
14426 |
- return ( mach_o::relocatable::Parser<arm64>::validFile(fileContent, opts.objSubtypeMustMatch, opts.subType) ); |
14427 |
-+#endif |
14428 |
- } |
14429 |
- return false; |
14430 |
- } |
14431 |
-@@ -7464,17 +7493,21 @@ |
14432 |
- *subResult = CPU_SUBTYPE_X86_ALL; |
14433 |
- return true; |
14434 |
- } |
14435 |
-+#if SUPPORT_ARCH_arm_any |
14436 |
- if ( mach_o::relocatable::Parser<arm>::validFile(fileContent, false, 0) ) { |
14437 |
- *result = CPU_TYPE_ARM; |
14438 |
- const macho_header<Pointer32<LittleEndian> >* header = (const macho_header<Pointer32<LittleEndian> >*)fileContent; |
14439 |
- *subResult = header->cpusubtype(); |
14440 |
- return true; |
14441 |
- } |
14442 |
-+#endif |
14443 |
-+#if SUPPORT_ARCH_arm_any |
14444 |
- if ( mach_o::relocatable::Parser<arm64>::validFile(fileContent, false, 0) ) { |
14445 |
- *result = CPU_TYPE_ARM64; |
14446 |
- *subResult = CPU_SUBTYPE_ARM64_ALL; |
14447 |
- return true; |
14448 |
- } |
14449 |
-+#endif |
14450 |
- return false; |
14451 |
- } |
14452 |
- |
14453 |
-@@ -7489,9 +7522,11 @@ |
14454 |
- if ( mach_o::relocatable::Parser<x86>::validFile(fileContent) ) { |
14455 |
- return mach_o::relocatable::Parser<x86>::fileKind(fileContent); |
14456 |
- } |
14457 |
-+#if SUPPORT_ARCH_arm_any |
14458 |
- if ( mach_o::relocatable::Parser<arm>::validFile(fileContent, false, 0) ) { |
14459 |
- return mach_o::relocatable::Parser<arm>::fileKind(fileContent); |
14460 |
- } |
14461 |
-+#endif |
14462 |
- return NULL; |
14463 |
- } |
14464 |
- |
14465 |
-@@ -7503,9 +7538,11 @@ |
14466 |
- if ( mach_o::relocatable::Parser<x86_64>::validFile(fileContent) ) { |
14467 |
- return mach_o::relocatable::Parser<x86_64>::hasObjC2Categories(fileContent); |
14468 |
- } |
14469 |
-+#if SUPPORT_ARCH_arm_any |
14470 |
- else if ( mach_o::relocatable::Parser<arm>::validFile(fileContent, false, 0) ) { |
14471 |
- return mach_o::relocatable::Parser<arm>::hasObjC2Categories(fileContent); |
14472 |
- } |
14473 |
-+#endif |
14474 |
- else if ( mach_o::relocatable::Parser<x86>::validFile(fileContent, false, 0) ) { |
14475 |
- return mach_o::relocatable::Parser<x86>::hasObjC2Categories(fileContent); |
14476 |
- } |
14477 |
---- ld64-242/src/ld/passes/branch_island.cpp.noarm 2014-03-19 23:50:50.000000000 +0100 |
14478 |
-+++ ld64-242/src/ld/passes/branch_island.cpp 2015-08-03 01:09:13.000000000 +0200 |
14479 |
-@@ -285,6 +285,7 @@ |
14480 |
- static uint64_t textSizeWhenMightNeedBranchIslands(const Options& opts, bool seenThumbBranch) |
14481 |
- { |
14482 |
- switch ( opts.architecture() ) { |
14483 |
-+#if SUPPORT_ARCH_arm_any |
14484 |
- case CPU_TYPE_ARM: |
14485 |
- if ( ! seenThumbBranch ) |
14486 |
- return 32000000; // ARM can branch +/- 32MB |
14487 |
-@@ -293,6 +294,7 @@ |
14488 |
- else |
14489 |
- return 4000000; // thumb1 can branch +/- 4MB |
14490 |
- break; |
14491 |
-+#endif |
14492 |
- } |
14493 |
- assert(0 && "unexpected architecture"); |
14494 |
- return 0x100000000LL; |
14495 |
-@@ -302,6 +304,7 @@ |
14496 |
- static uint64_t maxDistanceBetweenIslands(const Options& opts, bool seenThumbBranch) |
14497 |
- { |
14498 |
- switch ( opts.architecture() ) { |
14499 |
-+#if SUPPORT_ARCH_arm_any |
14500 |
- case CPU_TYPE_ARM: |
14501 |
- if ( ! seenThumbBranch ) |
14502 |
- return 30*1024*1024; // 2MB of branch islands per 32MB |
14503 |
-@@ -310,6 +313,7 @@ |
14504 |
- else |
14505 |
- return 3500000; // 0.5MB of branch islands per 4MB |
14506 |
- break; |
14507 |
-+#endif |
14508 |
- } |
14509 |
- assert(0 && "unexpected architecture"); |
14510 |
- return 0x100000000LL; |
14511 |
-@@ -654,8 +658,10 @@ |
14512 |
- |
14513 |
- // only ARM needs branch islands |
14514 |
- switch ( opts.architecture() ) { |
14515 |
-+#if SUPPORT_ARCH_arm_any |
14516 |
- case CPU_TYPE_ARM: |
14517 |
- break; |
14518 |
-+#endif |
14519 |
- default: |
14520 |
- return; |
14521 |
- } |
14522 |
---- ld64-242/src/ld/passes/branch_shim.cpp.noarm 2013-03-08 00:10:19.000000000 +0100 |
14523 |
-+++ ld64-242/src/ld/passes/branch_shim.cpp 2015-08-03 01:09:13.000000000 +0200 |
14524 |
-@@ -276,6 +276,9 @@ |
14525 |
- // |
14526 |
- void doPass(const Options& opts, ld::Internal& state) |
14527 |
- { |
14528 |
-+#if !SUPPORT_ARCH_arm_any |
14529 |
-+ return; |
14530 |
-+#else |
14531 |
- // only make branch shims in final linked images |
14532 |
- if ( opts.outputKind() == Options::kObjectFile ) |
14533 |
- return; |
14534 |
-@@ -386,6 +389,7 @@ |
14535 |
- // append all new shims to end of __text |
14536 |
- sect->atoms.insert(sect->atoms.end(), shims.begin(), shims.end()); |
14537 |
- } |
14538 |
-+#endif |
14539 |
- } |
14540 |
- |
14541 |
- |
14542 |
---- ld64-242/src/ld/passes/dtrace_dof.cpp.noarm 2015-08-03 01:08:57.000000000 +0200 |
14543 |
-+++ ld64-242/src/ld/passes/dtrace_dof.cpp 2015-08-03 01:09:13.000000000 +0200 |
14544 |
-@@ -179,8 +179,12 @@ |
14545 |
- switch ( opts.architecture() ) { |
14546 |
- case CPU_TYPE_I386: |
14547 |
- case CPU_TYPE_X86_64: |
14548 |
-+#if SUPPORT_ARCH_arm_any |
14549 |
- case CPU_TYPE_ARM: |
14550 |
-+#endif |
14551 |
-+#if SUPPORT_ARCH_arm64 |
14552 |
- case CPU_TYPE_ARM64: |
14553 |
-+#endif |
14554 |
- storeKind = ld::Fixup::kindStoreLittleEndian32; |
14555 |
- break; |
14556 |
- default: |
14557 |
---- ld64-242/src/ld/passes/stubs/stubs.cpp.noarm 2013-07-23 01:37:47.000000000 +0200 |
14558 |
-+++ ld64-242/src/ld/passes/stubs/stubs.cpp 2015-08-03 01:09:13.000000000 +0200 |
14559 |
-@@ -324,9 +324,11 @@ |
14560 |
- if ( _options.outputKind() != Options::kDynamicLibrary ) |
14561 |
- throwf("resolver functions (%s) can only be used in dylibs", atom->name()); |
14562 |
- if ( !_options.makeCompressedDyldInfo() ) { |
14563 |
-+#if SUPPORT_ARCH_arm_any |
14564 |
- if ( _options.architecture() == CPU_TYPE_ARM ) |
14565 |
- throwf("resolver functions (%s) can only be used when targeting iOS 4.2 or later", atom->name()); |
14566 |
- else |
14567 |
-+#endif |
14568 |
- throwf("resolver functions (%s) can only be used when targeting Mac OS X 10.6 or later", atom->name()); |
14569 |
- } |
14570 |
- stubFor[atom] = NULL; |
14571 |
-@@ -354,6 +356,7 @@ |
14572 |
- throw "symbol dyld_stub_binding_helper not found, normally in crt1.o/dylib1.o/bundle1.o"; |
14573 |
- |
14574 |
- // disable arm close stubs in some cases |
14575 |
-+#if SUPPORT_ARCH_arm_any |
14576 |
- if ( _architecture == CPU_TYPE_ARM ) { |
14577 |
- if ( codeSize > 4*1024*1024 ) |
14578 |
- _largeText = true; |
14579 |
-@@ -377,6 +380,7 @@ |
14580 |
- } |
14581 |
- } |
14582 |
- } |
14583 |
-+#endif |
14584 |
- |
14585 |
- // make stub atoms |
14586 |
- for (std::map<const ld::Atom*,ld::Atom*>::iterator it = stubFor.begin(); it != stubFor.end(); ++it) { |
14587 |
---- ld64-242/src/ld/Resolver.cpp.noarm 2015-08-03 01:08:56.000000000 +0200 |
14588 |
-+++ ld64-242/src/ld/Resolver.cpp 2015-08-03 01:09:13.000000000 +0200 |
14589 |
-@@ -428,6 +428,7 @@ |
14590 |
- // update cpu-sub-type |
14591 |
- cpu_subtype_t nextObjectSubType = file.cpuSubType(); |
14592 |
- switch ( _options.architecture() ) { |
14593 |
-+#if SUPPORT_ARCH_arm_any |
14594 |
- case CPU_TYPE_ARM: |
14595 |
- if ( _options.subArchitecture() != nextObjectSubType ) { |
14596 |
- if ( (_options.subArchitecture() == CPU_SUBTYPE_ARM_ALL) && _options.forceCpuSubtypeAll() ) { |
14597 |
-@@ -446,6 +447,7 @@ |
14598 |
- } |
14599 |
- } |
14600 |
- break; |
14601 |
-+#endif |
14602 |
- |
14603 |
- case CPU_TYPE_I386: |
14604 |
- _internal.cpuSubType = CPU_SUBTYPE_I386_ALL; |
14605 |
---- ld64-242/src/other/machochecker.cpp.noarm 2015-08-03 01:08:57.000000000 +0200 |
14606 |
-+++ ld64-242/src/other/machochecker.cpp 2015-08-03 01:09:13.000000000 +0200 |
14607 |
-@@ -252,6 +252,7 @@ |
14608 |
- return false; |
14609 |
- } |
14610 |
- |
14611 |
-+#if SUPPORT_ARCH_arm_any |
14612 |
- template <> |
14613 |
- bool MachOChecker<arm>::validFile(const uint8_t* fileContent) |
14614 |
- { |
14615 |
-@@ -269,6 +270,7 @@ |
14616 |
- } |
14617 |
- return false; |
14618 |
- } |
14619 |
-+#endif |
14620 |
- |
14621 |
- #if SUPPORT_ARCH_arm64 |
14622 |
- template <> |
14623 |
-@@ -294,7 +296,9 @@ |
14624 |
- template <> uint8_t MachOChecker<ppc64>::loadCommandSizeMask() { return 0x07; } |
14625 |
- template <> uint8_t MachOChecker<x86>::loadCommandSizeMask() { return 0x03; } |
14626 |
- template <> uint8_t MachOChecker<x86_64>::loadCommandSizeMask() { return 0x07; } |
14627 |
-+#if SUPPORT_ARCH_arm_any |
14628 |
- template <> uint8_t MachOChecker<arm>::loadCommandSizeMask() { return 0x03; } |
14629 |
-+#endif |
14630 |
- #if SUPPORT_ARCH_arm64 |
14631 |
- template <> uint8_t MachOChecker<arm64>::loadCommandSizeMask() { return 0x07; } |
14632 |
- #endif |
14633 |
-@@ -324,11 +328,13 @@ |
14634 |
- return threadInfo->thread_register(7); |
14635 |
- } |
14636 |
- |
14637 |
-+#if SUPPORT_ARCH_arm_any |
14638 |
- template <> |
14639 |
- arm::P::uint_t MachOChecker<arm>::getInitialStackPointer(const macho_thread_command<arm::P>* threadInfo) |
14640 |
- { |
14641 |
- return threadInfo->thread_register(13); |
14642 |
- } |
14643 |
-+#endif |
14644 |
- |
14645 |
- #if SUPPORT_ARCH_arm64 |
14646 |
- template <> |
14647 |
-@@ -362,11 +368,13 @@ |
14648 |
- return threadInfo->thread_register(16); |
14649 |
- } |
14650 |
- |
14651 |
-+#if SUPPORT_ARCH_arm_any |
14652 |
- template <> |
14653 |
- arm::P::uint_t MachOChecker<arm>::getEntryPoint(const macho_thread_command<arm::P>* threadInfo) |
14654 |
- { |
14655 |
- return threadInfo->thread_register(15); |
14656 |
- } |
14657 |
-+#endif |
14658 |
- |
14659 |
- #if SUPPORT_ARCH_arm64 |
14660 |
- template <> |
14661 |
-@@ -1025,6 +1033,7 @@ |
14662 |
- return fFirstWritableSegment->vmaddr(); |
14663 |
- } |
14664 |
- |
14665 |
-+#if SUPPORT_ARCH_arm_any |
14666 |
- template <> |
14667 |
- arm::P::uint_t MachOChecker<arm>::relocBase() |
14668 |
- { |
14669 |
-@@ -1033,6 +1042,7 @@ |
14670 |
- else |
14671 |
- return fFirstSegment->vmaddr(); |
14672 |
- } |
14673 |
-+#endif |
14674 |
- |
14675 |
- #if SUPPORT_ARCH_arm64 |
14676 |
- template <> |
14677 |
---- ld64-242/src/other/ObjectDump.cpp.noarm 2015-08-03 01:08:56.000000000 +0200 |
14678 |
-+++ ld64-242/src/other/ObjectDump.cpp 2015-08-03 01:09:13.000000000 +0200 |
14679 |
-@@ -806,6 +806,7 @@ |
14680 |
- case ld::Fixup::kindStoreThumbHigh16: |
14681 |
- printf(", then store high-16 in Thumb movt"); |
14682 |
- break; |
14683 |
-+#if SUPPORT_ARCH_arm64 |
14684 |
- case ld::Fixup::kindStoreARM64Branch26: |
14685 |
- printf(", then store as ARM64 26-bit pcrel branch"); |
14686 |
- break; |
14687 |
-@@ -845,6 +846,7 @@ |
14688 |
- case ld::Fixup::kindStoreARM64PCRelToGOT: |
14689 |
- printf(", then store as 32-bit delta to GOT entry"); |
14690 |
- break; |
14691 |
-+#endif |
14692 |
- case ld::Fixup::kindDtraceExtra: |
14693 |
- printf("dtrace static probe extra info"); |
14694 |
- break; |
14695 |
-@@ -989,6 +991,7 @@ |
14696 |
- case ld::Fixup::kindSetTargetTLVTemplateOffsetLittleEndian64: |
14697 |
- printf("tlv template offset of %s", referenceTargetAtomName(ref)); |
14698 |
- break; |
14699 |
-+#if SUPPORT_ARCH_arm64 |
14700 |
- case ld::Fixup::kindStoreTargetAddressARM64Branch26: |
14701 |
- printf("ARM64 store 26-bit pcrel branch to %s", referenceTargetAtomName(ref)); |
14702 |
- break; |
14703 |
-@@ -1022,6 +1025,7 @@ |
14704 |
- case ld::Fixup::kindStoreTargetAddressARM64TLVPLoadNowLeaPageOff12: |
14705 |
- printf("ARM64 store 12-bit page offset of lea for TLV of %s", referenceTargetAtomName(ref)); |
14706 |
- break; |
14707 |
-+#endif |
14708 |
- //default: |
14709 |
- // printf("unknown fixup"); |
14710 |
- // break; |
14711 |
---- ld64-242/src/other/rebase.cpp.noarm 2013-03-08 00:10:19.000000000 +0100 |
14712 |
-+++ ld64-242/src/other/rebase.cpp 2015-08-03 01:09:13.000000000 +0200 |
14713 |
-@@ -160,9 +160,11 @@ |
14714 |
- case CPU_TYPE_X86_64: |
14715 |
- fRebasers.push_back(new Rebaser<x86_64>(&p[fileOffset])); |
14716 |
- break; |
14717 |
-+#if SUPPORT_ARCH_arm_any |
14718 |
- case CPU_TYPE_ARM: |
14719 |
- fRebasers.push_back(new Rebaser<arm>(&p[fileOffset])); |
14720 |
- break; |
14721 |
-+#endif |
14722 |
- default: |
14723 |
- throw "unknown file format"; |
14724 |
- } |
14725 |
-@@ -186,9 +188,11 @@ |
14726 |
- else if ( (OSSwapLittleToHostInt32(mh->magic) == MH_MAGIC_64) && (OSSwapLittleToHostInt32(mh->cputype) == CPU_TYPE_X86_64)) { |
14727 |
- fRebasers.push_back(new Rebaser<x86_64>(mh)); |
14728 |
- } |
14729 |
-+#if SUPPORT_ARCH_arm_any |
14730 |
- else if ( (OSSwapLittleToHostInt32(mh->magic) == MH_MAGIC) && (OSSwapLittleToHostInt32(mh->cputype) == CPU_TYPE_ARM)) { |
14731 |
- fRebasers.push_back(new Rebaser<arm>(mh)); |
14732 |
- } |
14733 |
-+#endif |
14734 |
- else { |
14735 |
- throw "unknown file format"; |
14736 |
- } |
14737 |
-@@ -236,7 +240,9 @@ |
14738 |
- template <> cpu_type_t Rebaser<ppc64>::getArchitecture() const { return CPU_TYPE_POWERPC64; } |
14739 |
- template <> cpu_type_t Rebaser<x86>::getArchitecture() const { return CPU_TYPE_I386; } |
14740 |
- template <> cpu_type_t Rebaser<x86_64>::getArchitecture() const { return CPU_TYPE_X86_64; } |
14741 |
-+#if SUPPORT_ARCH_arm_any |
14742 |
- template <> cpu_type_t Rebaser<arm>::getArchitecture() const { return CPU_TYPE_ARM; } |
14743 |
-+#endif |
14744 |
- |
14745 |
- template <typename A> |
14746 |
- uint64_t Rebaser<A>::getBaseAddress() const |
14747 |
-@@ -875,8 +881,10 @@ |
14748 |
- return "i386"; |
14749 |
- case CPU_TYPE_X86_64: |
14750 |
- return "x86_64"; |
14751 |
-+#if SUPPORT_ARCH_arm_any |
14752 |
- case CPU_TYPE_ARM: |
14753 |
- return "arm"; |
14754 |
-+#endif |
14755 |
- } |
14756 |
- return "unknown"; |
14757 |
- } |
14758 |
-@@ -969,6 +977,7 @@ |
14759 |
- else if ( arch == CPU_TYPE_X86_64 ) { |
14760 |
- return 0x200000000ULL; |
14761 |
- } |
14762 |
-+#if SUPPORT_ARCH_arm_any |
14763 |
- else if ( arch == CPU_TYPE_ARM ) { |
14764 |
- // place dylibs below dyld |
14765 |
- uint64_t topAddr = 0x2FE00000; |
14766 |
-@@ -977,6 +986,7 @@ |
14767 |
- throwf("total size of images (0x%X) does not fit below 0x2FE00000", totalSize); |
14768 |
- return topAddr - totalSize; |
14769 |
- } |
14770 |
-+#endif |
14771 |
- else |
14772 |
- throw "unknown architecture"; |
14773 |
- } |
14774 |
-@@ -1043,7 +1053,9 @@ |
14775 |
- onlyArchs.insert(CPU_TYPE_POWERPC64); |
14776 |
- onlyArchs.insert(CPU_TYPE_I386); |
14777 |
- onlyArchs.insert(CPU_TYPE_X86_64); |
14778 |
-+#if SUPPORT_ARCH_arm_any |
14779 |
- onlyArchs.insert(CPU_TYPE_ARM); |
14780 |
-+#endif |
14781 |
- } |
14782 |
- |
14783 |
- // scan files and collect sizes |
14784 |
---- ld64-242/src/other/unwinddump.cpp.noarm 2015-08-03 01:08:57.000000000 +0200 |
14785 |
-+++ ld64-242/src/other/unwinddump.cpp 2015-08-03 01:09:13.000000000 +0200 |
14786 |
-@@ -97,7 +97,9 @@ |
14787 |
- |
14788 |
- template <> const char* UnwindPrinter<x86>::archName() { return "i386"; } |
14789 |
- template <> const char* UnwindPrinter<x86_64>::archName() { return "x86_64"; } |
14790 |
-+#if SUPPORT_ARCH_arm_any |
14791 |
- template <> const char* UnwindPrinter<arm>::archName() { return "arm"; } |
14792 |
-+#endif |
14793 |
- #if SUPPORT_ARCH_arm64 |
14794 |
- template <> const char* UnwindPrinter<arm64>::archName() { return "arm64"; } |
14795 |
- #endif |
14796 |
-@@ -1195,7 +1197,9 @@ |
14797 |
- #if SUPPORT_ARCH_arm64 |
14798 |
- onlyArchs.insert(CPU_TYPE_ARM64); |
14799 |
- #endif |
14800 |
-+#if SUPPORT_ARCH_arm_any |
14801 |
- onlyArchs.insert(CPU_TYPE_ARM); |
14802 |
-+#endif |
14803 |
- } |
14804 |
- |
14805 |
- // process each file |
14806 |
|
14807 |
diff --git a/sys-devel/binutils-apple/files/ld64-95.2.12-Makefile b/sys-devel/binutils-apple/files/ld64-95.2.12-Makefile |
14808 |
deleted file mode 100644 |
14809 |
index 8016434..0000000 |
14810 |
--- a/sys-devel/binutils-apple/files/ld64-95.2.12-Makefile |
14811 |
+++ /dev/null |
14812 |
@@ -1,26 +0,0 @@ |
14813 |
-CPPFLAGS += -Iinclude -Iabstraction -Ild -Iother -I. |
14814 |
- |
14815 |
-# dropped machocheck due to compilation failures |
14816 |
-all: rebase unwinddump dyldinfo ObjectDump ld64 |
14817 |
- |
14818 |
-libprunetrie.a: other/PruneTrie.o other/prune_trie.h |
14819 |
- $(AR) -s -r -c libprunetrie.a other/PruneTrie.o |
14820 |
- |
14821 |
-ld64: libprunetrie.a ld/ld.o ld/Options.o ld/debugline.o version.o |
14822 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ |
14823 |
- |
14824 |
-rebase: other/rebase.o |
14825 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ |
14826 |
- |
14827 |
-dyldinfo: other/dyldinfo.o |
14828 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ |
14829 |
- |
14830 |
-unwinddump: other/unwinddump.o |
14831 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ |
14832 |
- |
14833 |
-ObjectDump: other/ObjectDump.o ld/debugline.o |
14834 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ |
14835 |
- |
14836 |
-machocheck: other/machochecker.o |
14837 |
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ |
14838 |
- |
14839 |
|
14840 |
diff --git a/sys-devel/binutils-apple/files/ld64-95.2.12-darwin8-no-mlong-branch-warning.patch b/sys-devel/binutils-apple/files/ld64-95.2.12-darwin8-no-mlong-branch-warning.patch |
14841 |
deleted file mode 100644 |
14842 |
index 790fb97..0000000 |
14843 |
--- a/sys-devel/binutils-apple/files/ld64-95.2.12-darwin8-no-mlong-branch-warning.patch |
14844 |
+++ /dev/null |
14845 |
@@ -1,15 +0,0 @@ |
14846 |
-The whole system (/usr/bin/crt0.o for example) is long-branch compiled, |
14847 |
-so *any* linkage operation causes this warning to be raised. Don't do |
14848 |
-it. |
14849 |
- |
14850 |
---- ld/MachOReaderRelocatable.hpp |
14851 |
-+++ ld/MachOReaderRelocatable.hpp |
14852 |
-@@ -4165,8 +4165,6 @@ |
14853 |
- if ( nextReloc->r_type() != PPC_RELOC_PAIR ) { |
14854 |
- throw "PPC_RELOC_JBSR missing following pair"; |
14855 |
- } |
14856 |
-- if ( !fHasLongBranchStubs ) |
14857 |
-- warning("object file compiled with -mlong-branch which is no longer needed. To remove this warning, recompile without -mlong-branch: %s", fPath); |
14858 |
- fHasLongBranchStubs = true; |
14859 |
- result = true; |
14860 |
- if ( reloc->r_extern() ) { |
14861 |
|
14862 |
diff --git a/sys-devel/binutils-apple/files/libunwind-30-Makefile b/sys-devel/binutils-apple/files/libunwind-30-Makefile |
14863 |
deleted file mode 100644 |
14864 |
index cb502d9..0000000 |
14865 |
--- a/sys-devel/binutils-apple/files/libunwind-30-Makefile |
14866 |
+++ /dev/null |
14867 |
@@ -1,23 +0,0 @@ |
14868 |
-CPPFLAGS += -I../include |
14869 |
- |
14870 |
-all: libunwind.a |
14871 |
- |
14872 |
-OBJS=Registers.o unw_getcontext.o libuwind.o UnwindLevel1-gcc-ext.o UnwindLevel1.o Unwind-sjlj.o |
14873 |
- |
14874 |
-libunwind.a: $(OBJS) |
14875 |
- libtool -static -o $@ $^ |
14876 |
- |
14877 |
-libunwind.dylib: $(OBJS) |
14878 |
- $(CXX) $(CXXFLAGS) -dynamiclib -single_module -compatibility_version 1 -o $@ $^ |
14879 |
- |
14880 |
-Registers.o: Registers.s |
14881 |
- $(CXX) $(CPPFLAGS) $(CFLAGS) -c -o $@ $^ |
14882 |
- |
14883 |
-unw_getcontext.o: unw_getcontext.s |
14884 |
- $(CXX) $(CPPFLAGS) $(CFLAGS) -c -o $@ $^ |
14885 |
- |
14886 |
-libuwind.o: libuwind.cxx |
14887 |
- $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(DYLDINCS) -c -o $@ $^ |
14888 |
- |
14889 |
-%.o: %.c |
14890 |
- $(CXX) $(CPPFLAGS) $(CFLAGS) -c -o $@ $^ |