1 |
commit: 54f0d5937f1587c16d68927a9a471d06612714e3 |
2 |
Author: Benda Xu <heroxbd <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Nov 12 08:23:13 2015 +0000 |
4 |
Commit: Benda XU <heroxbd <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Nov 12 08:23:13 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/dev/heroxbd.git/commit/?id=54f0d593 |
7 |
|
8 |
sys-devel/llvm: add. |
9 |
|
10 |
sys-devel/llvm/Manifest | 119 +++++ |
11 |
.../0001-r600-Add-some-intrinsic-definitions.patch | 64 +++ |
12 |
...t_global_size-and-get_local_size-intrinsi.patch | 27 + |
13 |
...clang-3.1-gentoo-runtime-gcc-detection-v3.patch | 29 ++ |
14 |
.../llvm/files/clang-3.3-gcc-header-path.patch | 90 ++++ |
15 |
.../llvm/files/clang-3.3-gentoo-install.patch | 71 +++ |
16 |
.../llvm/files/clang-3.4-darwin_build_fix.patch | 47 ++ |
17 |
.../clang-3.4-darwin_prefix-include-paths.patch | 18 + |
18 |
.../llvm/files/clang-3.4-gentoo-install.patch | 80 +++ |
19 |
.../llvm/files/clang-3.5-gentoo-install.patch | 57 +++ |
20 |
...clang-3.5-gentoo-runtime-gcc-detection-v3.patch | 42 ++ |
21 |
sys-devel/llvm/files/clang-3.6-fbsd-gcc49.patch | 25 + |
22 |
.../llvm/files/clang-3.6-gentoo-install.patch | 48 ++ |
23 |
.../llvm/files/clang-3.7-strip_doc_refs.patch | 42 ++ |
24 |
...rt-overriding-Sphinx-HTML-doc-install-dir.patch | 36 ++ |
25 |
...n-ordering-dep-between-HTML-man-Sphinx-ta.patch | 32 ++ |
26 |
.../cmake/0004-cmake-Do-not-install-libgtest.patch | 28 ++ |
27 |
...g-runtime-into-usr-lib-without-suffix-3.8.patch | 37 ++ |
28 |
...clang-runtime-into-usr-lib-without-suffix.patch | 52 ++ |
29 |
...make-Make-CLANG_LIBDIR_SUFFIX-overridable.patch | 28 ++ |
30 |
...ll-compiler-rt-into-usr-lib-without-suffi.patch | 25 + |
31 |
.../files/cmake/llvm-3.7.0-ocaml-multilib.patch | 43 ++ |
32 |
.../llvm-3.8-allow_custom_cmake_build_types.patch | 14 + |
33 |
.../llvm/files/llvm-2.6-commandguide-nops.patch | 30 ++ |
34 |
sys-devel/llvm/files/llvm-2.7-nodoctargz.patch | 47 ++ |
35 |
sys-devel/llvm/files/llvm-2.8-alignof.patch | 59 +++ |
36 |
sys-devel/llvm/files/llvm-2.8-darwin8.patch | 15 + |
37 |
.../llvm/files/llvm-2.9-Operator.h-c++0x.patch | 57 +++ |
38 |
sys-devel/llvm/files/llvm-2.9-gcc4.7.patch | 14 + |
39 |
sys-devel/llvm/files/llvm-2.9-nodoctargz.patch | 39 ++ |
40 |
.../llvm-3.0-PPCCompilationCallbackC_static.patch | 27 + |
41 |
sys-devel/llvm/files/llvm-3.0-PPC_macro.patch | 43 ++ |
42 |
sys-devel/llvm/files/llvm-3.0-gold_LTO_link.patch | 10 + |
43 |
sys-devel/llvm/files/llvm-3.0-ocaml_install.patch | 16 + |
44 |
sys-devel/llvm/files/llvm-3.0-set_soname.patch | 12 + |
45 |
.../llvm-3.1-ExecutionEngine_tests_xfail_arm.patch | 27 + |
46 |
.../files/llvm-3.1-docs-pod-markup-fixes.patch | 28 ++ |
47 |
.../llvm/files/llvm-3.1-fix_debug_line_info.patch | 65 +++ |
48 |
.../llvm/files/llvm-3.1-ivybridge_support.patch | 13 + |
49 |
sys-devel/llvm/files/llvm-3.2-nodoctargz.patch | 45 ++ |
50 |
sys-devel/llvm/files/llvm-3.3-R600_debug.patch | 22 + |
51 |
.../llvm/files/llvm-3.3-cmake-modulepath.patch | 24 + |
52 |
sys-devel/llvm/files/llvm-3.3-gentoo-install.patch | 141 ++++++ |
53 |
sys-devel/llvm/files/llvm-3.3-insecure-rpath.patch | 30 ++ |
54 |
.../llvm/files/llvm-3.3-r2-gentoo-install.patch | 117 +++++ |
55 |
.../llvm/files/llvm-3.4-cmake-configparser.patch | 35 ++ |
56 |
sys-devel/llvm/files/llvm-3.4-fix_varargs.patch | 148 ++++++ |
57 |
sys-devel/llvm/files/llvm-3.4-gentoo-install.patch | 96 ++++ |
58 |
sys-devel/llvm/files/llvm-3.5-gcc-4.9.patch | 43 ++ |
59 |
sys-devel/llvm/files/llvm-3.5-gentoo-install.patch | 83 ++++ |
60 |
.../files/llvm-3.5.0-fix_LLVMExports_cmake.patch | 39 ++ |
61 |
sys-devel/llvm/files/llvm-3.5.2-gcc-5.1.patch | 14 + |
62 |
sys-devel/llvm/files/llvm-3.6-gentoo-install.patch | 82 ++++ |
63 |
.../llvm/files/llvm-3.6.0-ocaml-ctypes-0.4.0.patch | 35 ++ |
64 |
sys-devel/llvm/files/llvm-3.7-nodoctargz.patch | 49 ++ |
65 |
sys-devel/llvm/llvm-2.8-r2.ebuild | 168 +++++++ |
66 |
sys-devel/llvm/llvm-2.9-r2.ebuild | 175 +++++++ |
67 |
sys-devel/llvm/llvm-3.0-r2.ebuild | 181 +++++++ |
68 |
sys-devel/llvm/llvm-3.1-r2.ebuild | 191 ++++++++ |
69 |
sys-devel/llvm/llvm-3.2.ebuild | 206 ++++++++ |
70 |
sys-devel/llvm/llvm-3.3-r3.ebuild | 500 +++++++++++++++++++ |
71 |
sys-devel/llvm/llvm-3.4.2.ebuild | 543 +++++++++++++++++++++ |
72 |
sys-devel/llvm/llvm-3.5.0.ebuild | 530 ++++++++++++++++++++ |
73 |
sys-devel/llvm/llvm-3.5.1.ebuild | 530 ++++++++++++++++++++ |
74 |
sys-devel/llvm/llvm-3.5.2.ebuild | 532 ++++++++++++++++++++ |
75 |
sys-devel/llvm/llvm-3.6.0.ebuild | 534 ++++++++++++++++++++ |
76 |
sys-devel/llvm/llvm-3.6.1.ebuild | 541 ++++++++++++++++++++ |
77 |
sys-devel/llvm/llvm-3.6.2.ebuild | 541 ++++++++++++++++++++ |
78 |
sys-devel/llvm/llvm-3.7.0-r1.ebuild | 509 +++++++++++++++++++ |
79 |
sys-devel/llvm/llvm-3.7.0.ebuild | 492 +++++++++++++++++++ |
80 |
sys-devel/llvm/llvm-9999.ebuild | 508 +++++++++++++++++++ |
81 |
sys-devel/llvm/metadata.xml | 28 ++ |
82 |
72 files changed, 9268 insertions(+) |
83 |
|
84 |
diff --git a/sys-devel/llvm/Manifest b/sys-devel/llvm/Manifest |
85 |
new file mode 100644 |
86 |
index 0000000..715e76b |
87 |
--- /dev/null |
88 |
+++ b/sys-devel/llvm/Manifest |
89 |
@@ -0,0 +1,119 @@ |
90 |
+AUX cl-patches/0001-r600-Add-some-intrinsic-definitions.patch 2450 SHA256 b0a718800c8969e174f3a22e61c15a370376f477e031fe97fff6aaab152f9867 SHA512 d23f9645d3e3364b1e9ce522eb15022fd3f2a685741db88b117b409ee33a07344a8e9ba9d89dc3535e5289edf79c6beb7ff144659f4e725b1a8f2c4256f9aad0 WHIRLPOOL c549806dbe5309dc441b65c942de488c6afc8c511d060d5c1459a4f99b97a357acbec51ce51bd704e5e1e74437cd413755f15377ad6b96c235242bc370af096f |
91 |
+AUX cl-patches/0002-r600-Add-get_global_size-and-get_local_size-intrinsi.patch 1189 SHA256 172bbb3cb1214e61ee2684c133317bb997e94a34c91dae94d4848cbd0c216436 SHA512 cf711149c421b4258bc64b81018d0a9474d8b4e4128d0cc0cea788b54c93e9512397b2310db8a1834c3507b4d893d5743dbc53183ac0daca23da55601b976c16 WHIRLPOOL 8e6bd9f005a6a941c55d7c8d9b127826191944fab9e404f8ed958efd07017f5f9301273739f869a73f15fc2a79af9dc18687ff85403acf24e175a464838b3f2e |
92 |
+AUX clang-3.1-gentoo-runtime-gcc-detection-v3.patch 1457 SHA256 f4b22281d21e39bc4681519cec90243c0e50262ce56ae68b0a8d9e7d92ce0375 SHA512 81c582791f4b0b1ccfcf3e8c82fbb68312320c5287402236d8c6d2d76767bbba031094c26d2b7bd9581c473896b78dda5a6284c5a87726e1bc0c539ae9294763 WHIRLPOOL bb68797804c89f8797561964697a72a015daf2c951d92f490f8c83f38aac6f50ce1527f39b53ccc6a3d93f84ec8f868e40340a5472b9e7ee4c34ceaa4b9ca845 |
93 |
+AUX clang-3.3-gcc-header-path.patch 4309 SHA256 56e51c30b91f0ff264c27e332c5375672c035b8271a64860b9e940c918ebf7ac SHA512 568c82c34b56bd18e34122975a420f38ae9f190c9efec00383aa0802c1810297b1fef94a21093775ee20c4b30ad5800b4bbebd26e5cbc9358b11ce7b5165ac41 WHIRLPOOL 2ea6ba49110d6f0bb1f3c6f93f6788463cfcf67b19d9397a69ab4066d3fc1106d544bedc24668a5e515df561e992a7d59a27253a08fae02e622aad36962ace8f |
94 |
+AUX clang-3.3-gentoo-install.patch 2815 SHA256 76a3ce245b1fb9cc5d391934755d27e248bdcbb9581ab7931287e75bf626aad5 SHA512 8105461ff031a7dc00e2a8ca9939afb56525bdc065beff7bb06f22525cb6ecf6b8196a1e0ac11fa3895dc29b4f04c24f61c5492859f23785285517775f3d69b6 WHIRLPOOL dbb5fc2596bee19ec9fff0c14b4a9e087a6ba4e3af115da956c43772cf44f2f480a21f86b15ec3890d74cc3fa3b9cb4e3bdbee341677fb8e79a640b0a5c8f6fa |
95 |
+AUX clang-3.4-darwin_build_fix.patch 1876 SHA256 b2fe85911006affc8ac5fc68496c45845872cf4b37445910b8d10a5bfbe77fcc SHA512 54841b590e14b84f90b00ec782785181018196d076764e4048960d1321d18aac388e1220bdc70b10432dfb5fcad5a43af6c33124ec93df8bc3a724cceeee9260 WHIRLPOOL 8c1373a558619be095427d7986246524e5f7c1239ee706234debc2add1f03626d630a1e5216bdc7127f0b833eca791fae666765a27d394ecc55d394492f424ab |
96 |
+AUX clang-3.4-darwin_prefix-include-paths.patch 710 SHA256 f76311dfc5fa734a3a72fa516f695486595963824d5b6891fd1454d71c27fa0b SHA512 e130d7392b82ffc40ec96c0ee45d53cf032c761e00a7a2382af1f826e2a892b12069a7f5407307e1828fb741e522b8e10728d593d839e1b5648ccf9460feff0e WHIRLPOOL d2b24e224cb90be9615994d64af92b139325b2630cc43851370b8989d0eb7ee8f43ad421e3036041a30ec1fb30c1e3ddaf09d54f461484963a2bd8ea2fba24c6 |
97 |
+AUX clang-3.4-gentoo-install.patch 3228 SHA256 051799f114102aa46717dc4a7224c878f7511b69a06090c501abe157c6025c5d SHA512 35127c66182ee1f698bf96731c11679c3fe162d9dcb524c06467598b374fcce94dd0484723acc0072ab1565c581e2fc74d6b7246484bfd9bf1511eb419a85c9b WHIRLPOOL 3d1644da31e9278bf0983bcaf1947b99570e71366b6cc868020c5978037795c27ae211c4d32562dfc1933ff2a4e9f8c0aab0248ac9c6c69fc954a830502d3f68 |
98 |
+AUX clang-3.5-gentoo-install.patch 2166 SHA256 e359a219f2d0d2b88094bbb5ab91fd50d9662686f77e85b7ccfb8d1c4a6fd39d SHA512 07e5b3d4131a7d58577bcb99a82c585258c98a38e71b7e8dda058b467a558471e1ddeec5c9f5492f5d17e280cd4b09e49338e0926dd2534583bc8a2772bce26d WHIRLPOOL 5582b2015b4d3e845a45bfda08c156683df11685170f253f79ccf016f2e771b016d213417d83068f01a41bd8e0148474711cd6f9b7187e758322e9ebb9c390dd |
99 |
+AUX clang-3.5-gentoo-runtime-gcc-detection-v3.patch 1694 SHA256 24691db819d08f87f0144a67900ae6797c0df4d180b55acc5c377d890ac2e72e SHA512 a34f694560ef0c7366ad0dc243a479afc74b6122d624b8681538da69c70d0d1869245a89c61d49add890c5f76134281470f5e75a59e6fc9ac963230fc56fe8e6 WHIRLPOOL 4f4af09e08c7d5af89558e77d0a2a4542f77ae505e9020ca6e48e20ef71c4db6016ed0211b2a303b756994f62949c91c216cc2f81b16ff65c71414d354977c8f |
100 |
+AUX clang-3.6-fbsd-gcc49.patch 1016 SHA256 550862df82d47bd54e8adad7b8ee5bc8eaf14ed4bc100d09ba01d5416ac624b5 SHA512 4d9fcb9626774ea1a06494ee55efb5d6232a33874996a90fa29003ac53f9b9dad2885281a9f9bc15fdf0f0817c351cb6d8a4151e5f6ea12e28d383ded1429018 WHIRLPOOL c0140413a4944989efc5ef9c6ba33d10f43add5e1d8c7a8438cb04c18e764c3db26d65330d6a1570940a93cf4d43de6bb1f5a5640384faed3ea43abfa52b3d5d |
101 |
+AUX clang-3.6-gentoo-install.patch 1660 SHA256 74cce23945897ce2cfd3931b08695d534973e32a0d104ff942b2f5c500ec4ad7 SHA512 77e2a2dd82fd13292edced8c9bba911579f2b4984a64223e8c80f41b5605220f1433beb6f40e0746163d894d4405296e1f40584eb069f960866df97e6057b569 WHIRLPOOL 4784e8da4e04406a1261c9a539280c90936141b6061e567c70f9e4b566d45e0275b2513d66c03a5473fee6f434e0cf0242e7ac21eafe59a8c26c7c6bf7040876 |
102 |
+AUX clang-3.7-strip_doc_refs.patch 2213 SHA256 5b1e7cc9264d55d3c8213cbf4c6701ad01652da1159ba0bf620cbe7a3382cfdd SHA512 dbe382a64e01c148b6e33734c1b423148584a15037c651cc56691146a1419559006a605c9bfb4ae72d23702ea48f1f40903bd0faf95c1d0ac3c8bd68c4238cdf WHIRLPOOL 5c884f67413af976f1146a2705c1096a7425ca90d13686b9f71f2230447ebe1d1bd39a93e32ef01b4ec6178fbd199b05bcf8d0a6780637914f3bac86955409c3 |
103 |
+AUX cmake/0002-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch 1404 SHA256 c9692562264ee6a25c3a2f25c990fab763aee36014de3ef95aa1d35a89aa0c0b SHA512 41dfe489adc0a45e4ffd5961c973fe94934d542b1474bb2dba4320b75ed6ff22ce0ac4b590ff20e626ea7c14617c9703ce1fd4d8d6bf1bd3b26ab0adeea373f0 WHIRLPOOL a9d84dc513118cab6310ea46c7b2e67654c81cd3c783d5db8e9ea3657fc1658e80fe4663399d4e35f99294ea9a98fb422e9077a6c8b73a3a98bbc8b282d1e9ad |
104 |
+AUX cmake/0003-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch 954 SHA256 6518c1a1fdce0371aa1a9dab790c0999440e7971ab2613f6d348250ace9310d2 SHA512 e4721c13add5f65126a3d84b9b66ce7086f435c9d2a729edca7bfc3c6f185afb2b5422c7f5045c1a3a4f82c5e3d5616b647bfad9975bb73ecf228235f1d9f588 WHIRLPOOL f35f09b2d29de42dba9c28825af5feec562860f25206589b0a9dcd1daea27c317da1385bdaa5c562b2f4c0613071c3bc1fbfcddece97cd13debaddd14324d552 |
105 |
+AUX cmake/0004-cmake-Do-not-install-libgtest.patch 835 SHA256 ed1531681603507fc674babd1f117063dcceb856151c20fd967d667d0dd83f2d SHA512 156f3b56e1bfe17804d3543a109567dcc10bac7a77f440d97bb900cc61f1e7bfe195ea3cf97bffbae7b132ebe31ad9d1acf5aca462a4aa01575909971ffdcf06 WHIRLPOOL d8bdc2032cec631c89d77a8fd231a0c22eeb5f9c99b8fda1068fb0e9fc10c81dc2d1bc71e8254ebea6392cfe3700427879841f7a6fcca3cd4c72ec1f1cdd56b0 |
106 |
+AUX cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix-3.8.patch 1754 SHA256 fa820a6403b34aaad9eddc370b6715b605c35b143355f098c0b37dd0c488277f SHA512 e9f46d482e85bad1a69cc88b4c47766dc7a250bcc86227b8a5ed54d5f4d184621e8acd52b405df10edf47d253b254a5c52dbe674fa87a75004c57e0094d02614 WHIRLPOOL e14c2110d76a3ec72eadf3fa3b19f0e0695b3321f6a928f845e99d2dea5072550a367727e8b9b43cdadf837d211aca538550e441ab018ae580c838d1250f4f93 |
107 |
+AUX cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix.patch 2251 SHA256 eb5c750e910b8088ec7e7fe2fa1cf367f4db738dbe681fa41c35e989db312c3b SHA512 6fc2a0a8d0b015c852f2ee2ca8038da0e64d7388f8909f52e871bcf0a25e8b5ac2a0a163411e83c24a71445a8e84d9ac9cc6acea543fd407ac8a46eb4ca13c0f WHIRLPOOL e193fe49bfe4657caa08deda88d8d5ec9270a9cbdeb9a08279efe9571a19ff2dbcd6e5eedb8ddc473a763ae60eebf7a38bc3366959569b78a9e15c46f2f4d360 |
108 |
+AUX cmake/clang-0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch 1031 SHA256 a0da8be64c575ec5a353ee33c530569c754df65cf6df04e5abbc29bcda1fccca SHA512 1948de3e7fb38517e00909f285541bcf3d75cb9c51ce7a2dfb7485346dd3409200bf82081a3a83d7e6843fb4cdbac12395ac6b9049f45201c94fc0ffa09d1ad9 WHIRLPOOL 8282dace8d2ba9d111b57b68e0116e92cafe2c070cc82d52518c6a6b4be3dcd37882bb505fcb3b01817eb577261c4f7f1b152bb12def6be52ea9c1625a15c29a |
109 |
+AUX cmake/compiler-rt-0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi.patch 1106 SHA256 010816607be72e178c21f7b5b8fbe2e70697feb70c4d78e03b498672bff1cc5c SHA512 0081071254eebfa2f550b98290b661664c31ce5e28222d491d9f3522c4822878b50ba6f08c24e1a3f97cc9b1d437e76d50fb94939e37432d048e22825068936a WHIRLPOOL 38f09fcc2db0453974b76c12ca287718d778153496e6fe9237b92026bd6dcddf96dde69c5e406781c9da90fcb0de39327e1c4cb8ab847935e2626697e3acc9f7 |
110 |
+AUX cmake/llvm-3.7.0-ocaml-multilib.patch 1863 SHA256 0dcb28109edc6dc9f962c39f32efe67f4716f8169b45d13e899a5d2b88741f9b SHA512 7ecae37559602e91392473066e8e311bb5b1a04ba0c00324c39dcd4b40f28a5c57514f4774fbebb63778f0c82d62ba865e5b785efc9f4e90b7db9377e21a0576 WHIRLPOOL 4c42d612bc859763fffee629c024c195e1f0aa6c22690c29b23fcc0de4b57c95e6636c56e258ea614d11d0807034d01eea915ecfdc13ff69dc70c69593fd9c73 |
111 |
+AUX cmake/llvm-3.8-allow_custom_cmake_build_types.patch 563 SHA256 e2e8b2bce270eb2bf5edfa67bcec9cbff114a9f4cacbaad8d66f998b5d8b9a2f SHA512 bd3e5ebd4be947f561da8d19ebf50a31d2dcfdb2ab0080fdcf514f02ea23d411643bf5556d1d788d7f53c71b6503f457e9f6a68c82f0650a86e4b0ddc4aaa9b9 WHIRLPOOL 65ce41d820b969a0596655fe6f7e55edcb4fd16972c4608c9c2ad7ae522d2c522009b2af430185c08a007a34908470e058dae5d1b084eac1c6db2ba39e0d08e1 |
112 |
+AUX llvm-2.6-commandguide-nops.patch 975 SHA256 0e36fb43e020fa380230a8c6f2a79b9a19e12e857e833ef856e2b41aaa283649 SHA512 6842285e499b86581ca12fd94f5335e0dcd7afcaf0cdc5042ee8d84d0da6aba6659652eb639027bcad7caf77b0c994ac7e181a15bc609c4b3882e0f391c8cd33 WHIRLPOOL bf1212a8fd06214dba0916a73266842558bed740220d68e3447701ffeba1b3020ca4b4ab5c6d57772a60a6e09f153232f680b1e0b11cbd5d430bd9ef693d2926 |
113 |
+AUX llvm-2.7-nodoctargz.patch 1878 SHA256 983657329ebede731b397ba0256d729b3958f39faea64c9f7d065ab8d2a3e7fd SHA512 3f9dd34437c6dba8246cdf5c8563889f805f3c8e579190c4f0fb06f72bf5aa112ecbfa18467a35eceaadcd470544f434f319f048cb58d6631170788b10fcc75b WHIRLPOOL 63182867bf8f0bd6ca1b7d97229fd13952526d59587192727348026e8a759f1c6b79db044760465e2424851fdbdf79e4122c5bb0285b505d20f151334063e8d1 |
114 |
+AUX llvm-2.8-alignof.patch 2522 SHA256 a9f7add4f4002bf9af438c0c4d1ca86875d6214a5044334325a60cdcbc8a3cdc SHA512 188bdf29b60ce0f83010ef33cd28c4cb710d238fe678be731ce1d099c7df5577f51162c95e06d996e9c90535ace41fecd3eff6570214a313fe165c0945c42832 WHIRLPOOL 65dd1cf8eb106af0516a5f302a08c51bfa884e35dd5efffbbcf97e1212a6b9356c6caea4472dce8e54a5a30dc5c6ba73be29e64b1b060e63a9ce7d816066ccea |
115 |
+AUX llvm-2.8-darwin8.patch 576 SHA256 6db04d9bb5fe65f8a92972988477328a7358e325abca32f30a716ff454d0fe21 SHA512 a7716ade819779bc2b8922cb6b072b85c0edef95cdc85b3b6dca18a51c7d4c48b4a8428341c2de85ac6fb0045849feada36f610a6e706eb80dfe64bb4e414d3f WHIRLPOOL 86dae6d234a8d93dd2714a9cd8ea45f7749cf1993d003da1c3a9a15cbc6e44603cd9b364a5095c5e7fb2df899d418bca29e1b50aad5ecc66829b944dff9d5488 |
116 |
+AUX llvm-2.9-Operator.h-c++0x.patch 2062 SHA256 1c37346b0f412556dc979fd510585f3e20d2d45319ec095dbdec37a582d590c7 SHA512 215214df015c87efa92f8896b9239e5d7385edae1f637bd837584f21a919b9be15f0608274242172c684905f080685e8de770fc16c54c42bed416e6c8e94d2de WHIRLPOOL df4a1ee6d150f95add3a6f33f5b9648dde89ace1012702e88ce5337748a0e1f826073b1b034def46e1971bc1fa5c1841d1dc2eafbf5b428803cd0d5f80c4594d |
117 |
+AUX llvm-2.9-gcc4.7.patch 542 SHA256 9472566d91344ce87e235c68e4e08786c493cddb3383f2bd2f0bd5a1ef153cf6 SHA512 6011f0cd56dffb068342b0f272898218a751f077a970cca34ceaf6e3b43b0c1e7440eed1a73b925e91d0ce0090beba4d8935496449e84609123388860f92d0a5 WHIRLPOOL 4d9a8154fb0f7e2cb1498e8fa010be6f586736180bd46fe54e9b148d1a0f7ce52e4772d17a7481e45490a12dc2c10f5e6a1a7b886914206a5d3102e174cf5240 |
118 |
+AUX llvm-2.9-nodoctargz.patch 1569 SHA256 62f1b080364d94e528bb34f0063562d16a59395aa7f97277bba88fbd93e00b84 SHA512 3a995897f25bfb97908bd8a379249a7b04dc0d8b64aef693272b87c88eff3494d5eac0a66c786e0cc1b8d4fc6b2c555ff8d09bbcd2e29c5e6f3bfbbdeba79044 WHIRLPOOL 254f121f0a5a1974600b1240074f9f8f9bfa760e5bf34f27697c27cf65646e412279b3c523dc3ee88305f73747881c20f60258dbd90bc6a2c380dcc3000ba329 |
119 |
+AUX llvm-3.0-PPCCompilationCallbackC_static.patch 1046 SHA256 f197920fb1ffbebeb2f43689619d637c5102bfc73295a8edb139cca46094ec5b SHA512 29a46adf9c2205475e2fd74ce15a3094b43905f28c484961ad81c78f54e3c4d56fb4005080db7e9671654738fa25901d5bbd1f0a6ae861a5e9b6d38053a6a65e WHIRLPOOL 8ba25aca05b21e2a8a6e25f5c07aa46175b03a4233e6fe102c619b7c60d5558d28e80dbc9c0892a1ecda1e2effd50211cc145c8389e644a27282cd108671e2a7 |
120 |
+AUX llvm-3.0-PPC_macro.patch 1825 SHA256 e56947d9744549ef6903238653c6569b5f91a1eb1bd84ec5d69d32ce5b20d6e4 SHA512 552a6a980cb2c05b6c6924d234efdcf375d12e72829a0372d3a4754d6bfa54f022d98e08b6f286d7dd496f2e74e4f6f9e5f81994a9d183cc39a4a01170b2c57e WHIRLPOOL f40fc9c6d75d7c05c66271c74011c320e302a0502970c38312cbf57a75f06a291900e62a09e3127d0dba7f0569a89d1e35225ca4e2e2b702063c0fb4f05878f6 |
121 |
+AUX llvm-3.0-gold_LTO_link.patch 442 SHA256 62dc70a1d1f581b7f768ca728dcca688a741e03e64566d5f38e02e33c6372ab8 SHA512 6daf346d5fb93cb9ed498164ef42c2c565e6e4e68bd820fed54f53afea4b1a580560836cf484e370a1566603d8799c0f359f589ea99b9d920bc587145391a65c WHIRLPOOL afc7dceed1de3db657f45ec58fb6befd9ec9e79e6c55dc3fcbc26e19c5e0b9d9c0980476a34e4dabf800465a6fe57897ddc4aa1b1a1d88a639126e262bedda62 |
122 |
+AUX llvm-3.0-ocaml_install.patch 664 SHA256 6f451130ed8fcced98691361d33d4d44d8866e703673c293cf7f88af8362e694 SHA512 b13e26a979505df40519ec6fd859f46e3a0e8589ed29c8509ca5c737af1e94890fea2f7c7a0b95ef168dfc7993b52133d7205de228fc4b750fd84af1ee2735e8 WHIRLPOOL a5d455a5671ec1804a06849588c072c29718d5c8218c6ba4a6b7de0b7dac0ad3d37007ed8b39447545bdf917b4c8e5fa780477a28c6250b47692605be7239b02 |
123 |
+AUX llvm-3.0-set_soname.patch 522 SHA256 0f4fe63baa74a963929dc39359cccb6eb4fba73176d72d4a354ebf50e51318a5 SHA512 ddf1b5572d51b5af66d5d7ef28798b41a2991c1799ba091c9e6f3a64a6b1b8081d596096919c7c910ad5af0adc0c8ad02b23fba30eead994d724a334d2c9da9e WHIRLPOOL 51aa3f1dd35e085fa4d3fe700503cd348b9342ef1d7164ec3ef2627b8ed8df0764442779315720c6cd301e4c099722cf84b305717129a386fd2792751e0c20ed |
124 |
+AUX llvm-3.1-ExecutionEngine_tests_xfail_arm.patch 1357 SHA256 392a5e752623a9e019106943e7977f4ba96159e4d5f45208d99ebaa5ddc340a4 SHA512 088dbadb4d27fd9317f9df077527790a817c64eff0b3c27e24a09bb35c00e3138d85d6aaf65e7dc749a120efc639e6ac8c4fbe74af73f3f0e4664fc254273854 WHIRLPOOL dea2a2ee142803fc4cc598fd75351679d761acd9e2c5153428791e0f7548b0aec0d63066f1454987fa6bc712107a6390272cceb03580808408229f6051dcbbde |
125 |
+AUX llvm-3.1-docs-pod-markup-fixes.patch 819 SHA256 c15d4ec435b7b9e37157d0c766ceeeb9b1c650328acd1eee0e588b5272f9ace0 SHA512 b6d8dcdd2003060ab486a8cd4de7b36594641c15074f0642ed2db1f58cd4b55e327a5bfcd6344a7d987ee38f2b4f5ce79941f5658a6fbbcf851172991ef4b883 WHIRLPOOL c37650b8584698379efa5b76e2c02b4bfb30d086d5729754ea668ca8e7cf99a07d795bde132085a89cc926f966a97f68c0094313ed6d895040d429ccd7923fc1 |
126 |
+AUX llvm-3.1-fix_debug_line_info.patch 2620 SHA256 db1f1aadebbc4c4232bdad49fb9b7dc61eac727085c63154b870fa9ce64fd18d SHA512 0b8bdde081dc7eddcc3556a0220f0a47565c6b95afb31560a835abe630d641c43e3acd0f0d0ba177809495f3208c17aa1a0fd267da3a34d71039c846b03253e8 WHIRLPOOL 47decb374e7109cee7eca7ccfcae5a2bd01a837d9daf6d201f20eb0d2ded14a66e737532c033ca128b049557cd0977dee811a4c54c15036e050d7383c586b5bd |
127 |
+AUX llvm-3.1-ivybridge_support.patch 405 SHA256 cc91a69be3d0f7f216a4d0484284fd054d4b0273f1c4dda7afcc005564867725 SHA512 7ec84a127eda4cbec0aaeb1e34f0606ff76e070bf1f3eb71334219b6a2e21299f30f157d022952e6f23c5e4180903239f5a4323f214041decd4ccc21f1a285d7 WHIRLPOOL 443c57305f1c9676e7191042c0ab7491a2a789433e32b5cc12050cece38eebe9ae62fd1d54200fbc32d2c7d22aedc7f6776fd250ae53e7d2afad0a325c1ba919 |
128 |
+AUX llvm-3.2-nodoctargz.patch 1761 SHA256 e17494aef638d2fe3fb0b669516ffcc9e560161903e1e165de0eecba684c8c1b SHA512 d12a8996d8a1160f7bad4ce3b3a9ddfb2d29d91fc160876c145f9241927b0cf4413f3b29bc2bf291f0421f61a512de8057e8f3d0029a8a09ba3f1d93582723b5 WHIRLPOOL be273271db8293829a63120cfc917711c99d8893cae6f95af2583def735131f629ee67b5a1515df007477f34abeaf5f2729d689eefdc61eb3aae6b1959971507 |
129 |
+AUX llvm-3.3-R600_debug.patch 909 SHA256 84ebe63a557e3734dc8ed4545f098e2496d815e6bf4a99dfcb65d649a23d2c1b SHA512 cd1b92c713edf895ab7a15494c6092e44082b40b9bb5b0fdfdc438e919456c7fcafab9a840adb165c191454948c0b42bc78ce2b4d2cfbdf371917b16351c6928 WHIRLPOOL 0f08c58c78c1d04b8e701b0b817956a37271115c1fc83ea8f0f54bf965fbc659e418abf7f429c2a29581351050346cb783f0aa9147757d4cfdfa24fd8b28d09e |
130 |
+AUX llvm-3.3-cmake-modulepath.patch 916 SHA256 9d0a00b543c4db58cc65bcf82bafd0aba4747c559f19fd96af1b52a3781f75d0 SHA512 610d1397d35e6502b4b7699399d41585724845f93dc88cfff8104318570b29ce25f99575298d3263440ba57859ed9792b1fed951ab4bd30ef5e1e1c3ec4898f9 WHIRLPOOL 808aa0c3b744c0c3c942cbede312ac8ec2af7404362e4bf8fd0d408e9ffaff90453787816575dcd6a1cacd406818aac5618b2bc5b5a2b4b3817a1025295f264f |
131 |
+AUX llvm-3.3-gentoo-install.patch 5321 SHA256 4f2e80f5567227e3539052a743ef0432f108d76e6fb9ba373dc51dbf159e0410 SHA512 90075d4bb5bdefb76bfb191dcb1b618de464434d9d084b2f99cc5034d33b112378f9aae1d289d30a2f8926132c17ea32ba1bf4049c3a61a418d37f903634b259 WHIRLPOOL 39b3ce4e937985483be7b4d19a37c0837b3c27f308f09fe8aee185b9fb43782b540f6b6be042b8f6dc4b5037be64284e2e233e65b3558e4b4eb1095a7d586a4f |
132 |
+AUX llvm-3.3-insecure-rpath.patch 881 SHA256 27d893e5f551d245f15c01a94df81dd9ad069c2a980cf6a8860fb429eb37a5d8 SHA512 f03d1f522d0153fcbef677bf85202a6ddff408362d9ebc3e4f9f21814b43d28b033b0efb3ee86f5c11a4ac3a91b8afc80d022bddcd839ba503b29cf946e40218 WHIRLPOOL cfca8d189f88c0e26b4c3091db6c4267a90307c5728e64ee3ca55272a884389e56ed186904d9d66b44b870792eaae049cf6e66ee38efaf757655a4be4a0cec6e |
133 |
+AUX llvm-3.3-r2-gentoo-install.patch 4043 SHA256 a8e24328888dc0459fb5c24e244c30baf7f8ec75875fc7293f9e1029d75fb1f2 SHA512 f829d9f8e0d5730a8221a8be9a1d87c7c79a09f498f00d5f9cb7d1172dcdcb2ba1b68b8b5454225dde230d642240d0f647439f34befa23b64156b2f7c2247027 WHIRLPOOL e937127359c474bb843cef34116d2ca8651c4d22ef7ebfc8cd2a22537e483cfdad7e78c1fc4a7d4bee92fa19995bdab9dc8b7cd96594f114ddc9a6af4604ac63 |
134 |
+AUX llvm-3.4-cmake-configparser.patch 1182 SHA256 b5d61e4882e301b361321c3bc69cdee6398b97bbb86ab3895879def6e18907bd SHA512 06e792016a6d7d091a5e15f8a13678e3e59e87bef591f9340ef427c820d0112cc22b7bc9ec57c7066da7f9bca3841a558bd98c71aa7df2aa2da75e53260a5347 WHIRLPOOL 8326541d632a6d4abf8d6444384932a395b6640d8b7f91c8ab29ae9acdd11922acd7652a9e211e5ad704016744d980d0087dbab30b09cab62e160ceed2236936 |
135 |
+AUX llvm-3.4-fix_varargs.patch 6427 SHA256 b764d5c8e2c25aa2634834522aed973ea6ef367d65eb7bed6fca19255af80f82 SHA512 cede7ea9aec7d27dd2ad4a41eb79cf566a03c9384a0fe1b07b52bc470d97a0a54735f5e09ee78cbf2323f28bb3f191e30a6f7454967975791cd70b96e09538d4 WHIRLPOOL a238ba38b5ea13ce7a2d96d4ca2853ff563988b439e4b8dbf99fb6789d46b260469190c7ffe11d5012ca2cb77a8c2be6a95722a3df2aed841938179b219cb6e0 |
136 |
+AUX llvm-3.4-gentoo-install.patch 3528 SHA256 fa2de6dd186091b255832a9b5cb654edddd4c4a16f0f138357c813a40aa9a75b SHA512 e946e1fd422f49d2e150bd641bac0ffe6ea6757b2e6119465090a3c7f5cf69e17c00221bcf67a7fcf29628d93463fb1c57d0d009ff7834151440d779f2d33484 WHIRLPOOL 171f167802ee289716232e16a2c507e3b8dc7913b40df29c55a815ff88596871a1a970c891b0e9b361186cada4d8898e65920d014b4e6eb2178cc207f61bf6da |
137 |
+AUX llvm-3.5-gcc-4.9.patch 1722 SHA256 c73f64311ff67534b581729b3ef0fecf452b86961c3b668ac2e6b50f1eff0bd2 SHA512 5ad0a742fca3eb9e08a183af9f90370baf85528bba6f3083d19592fe2a704950ca8c6bf9e930f9834255de3fc5832c49a06c9ca29a66e45928d9047abd9ad8ac WHIRLPOOL dac24fcb47d8b094ffa6b4403dbd7604901dd0f5ef6665a882380109584e4de815b2f277e05d44c05e1a3d22a7003075b2b2649f3f614f299b38bc6d594400ae |
138 |
+AUX llvm-3.5-gentoo-install.patch 3204 SHA256 0c97173613505ea92f0aa79d4e04e797f1917fdc33b34daee05752bb52336d53 SHA512 f60b04f1fc7798f7869f3d80e4c163086c398e01b81220d60ccff42be5899fa036d5ab95257933e89e4c5efd04267a09015917c6a617b86b82d7ab4f5d0de221 WHIRLPOOL 81ce5835b9eb1fe1b162f35d6e37762cc8d613e67c5791f078ecd0e354a87eb92e52452bd6e9a7f70953dabea99d197786e87ed64dc802223149b8e97d6de265 |
139 |
+AUX llvm-3.5.0-fix_LLVMExports_cmake.patch 1563 SHA256 924303a7fa7ee46276eb2984e3e2d9304873df1d63c0d878371cf98b4094aef0 SHA512 8e8c3ae2c8e2bac0d78a7f572ccfae9cfc30e52ffbfa953596c075cf6adc4e5881d2b80cad4d87bbf1de837d88352334bb51a331adc8d8db74354945c036637e WHIRLPOOL b525bbf3a7ade5906e9e35315af1ccb50c4392e1d104c516927a3ab9b627bc3d0fcf41bd0b77093f6743131f801d37d53d1065371e5c86eb4e7d538eb969b3a8 |
140 |
+AUX llvm-3.5.2-gcc-5.1.patch 516 SHA256 c964eecdfb0cbf4d2a59a553d7bdb3f16e70d8910e6aa7e9c768828ecbdfcea2 SHA512 dd12f9ad7b80625477c5af045cd16233a169c67f62bbc1fa1aaa8b0c975b585b447fcf0773e2fc4f83cc767967fd5fd3678527e447fef66841f40d98927ec4b3 WHIRLPOOL 628021a89d48b74d302199f75a827b89d8fa2ce6909ecba93f5dd64f584a6dc215a0b3cb6b46267d1fd7488594b3ca64de44a867905949e61ae5552cbb30fc82 |
141 |
+AUX llvm-3.6-gentoo-install.patch 3169 SHA256 318288e667623e22c441f7a1da8c3e27b3fff7426839a58a05e43dd0ac37d443 SHA512 9e13fd8606c6aa636d5e1cd3e32781fa4cae3266acf306f5c38f052a7520fc4b603022244b4502045d968c9ca28292539a17caa33b9b470353adfdbb8e159321 WHIRLPOOL 8f3b9b5150d2a29ba4f94a86235d12cf96c1a28ceb7f55fe7b90b3e5e074fe4883d449ac34cbe823ccc22f1ab8b3e2d05dadb39abaaac0a17e3870bbba1ea14e |
142 |
+AUX llvm-3.6.0-ocaml-ctypes-0.4.0.patch 1783 SHA256 3beb0718c10b57b125809d4de991b24d53618469119c652120802b584c7de184 SHA512 8c26e55939c82cca0f1ab9b276720e56cb8f22d1bfcffe228636d18feb3a51b62c408a1fed762d91430137eb231266df4038f88585428dd5d0af19de3749549e WHIRLPOOL be72dbe99b852cd85e1312f8c425e69a09b22ed6d3f5371e8b1ac9697cd2555195e0e36ae4b0d47fc4ee9d77ece883e4668e1c30da30c530bf7fdabfec827a8a |
143 |
+AUX llvm-3.7-nodoctargz.patch 1903 SHA256 6364b822c82697b81bd37db63e059bad26c6e825bc47d894dffac5a3ff28098c SHA512 6fcad8138fb2ab19694bbc92e23c3b34579e5f15dc31b47dd4f0910325b9ec457913185eb78d8f68ae96fca6f48c3754a74de9b3185b25ae25efe41ec5d3348a WHIRLPOOL ce14af312aec1112e10bc213e4bc27f52d6a82aa0b08e3bcdd633795c5f073af2bb8f8e4f6386b22bc6709f654bd1df401303a475730a29f2aef8f9b4fc42342 |
144 |
+DIST cfe-3.3.src.tar.gz 9425539 SHA256 b1b55de4ab3a57d3e0331a83e0284610191c77d924e3446498d9113d08dfb996 SHA512 06773f43f7d3529f06edb029f7de398f06a700a0f2476e00c4727e70c291028221bfac23625dfd2c220d6ac91a21670848187a934b99a21801c695127371afcc WHIRLPOOL 8b97b527f19015dd3283b9e174615170e639793f64c635ccc4ee4d8216f8de759fd0121a8ef3513fa1c6ad19b31aa3529091ffb44a01ee858edfef400881596a |
145 |
+DIST cfe-3.4.2.src.tar.gz 10612313 SHA256 5ba6f5772f8d00f445209356a7daf83c5bca2da5acd10de517ad2359ae95bc10 SHA512 e01fa8e312e9b3b7b3cb572ac21349161aaa50078ecfe7bded273b75db4a0c44acde524f8fdfcbeec54c61eeeb8339e9917d1f205a8fda18e34fe7ccbe89c36d WHIRLPOOL 153208b1a60bb5fbe92a7162cb26bbe70d591e7db9dcf06fcd54efc539bbff0403ec88e64236969c9f256e5586bc333840bd6178fd158577d6fe228d9edd4dcd |
146 |
+DIST cfe-3.5.0.src.tar.xz 8233432 SHA256 fc80992e004b06f6c7afb612de1cdaa9ac9d25811c55f94fcf7331d9b81cdb8b SHA512 b26a5e2cd81c150607c23b22fafc0d9c7f12b83b45e476b8e75bf5e99d42be7c98ffeac7349df664f01b00900864a01429860b298e48961861377a4b2daf3e49 WHIRLPOOL 5dd8b6fe97933b74f1668b1d753c16cd3bcd05ccf72aac1283aa449caf93f5ba88ae79e7668f7e79b554e1421549a87af21c86cf92657c1b4d77744165718ce7 |
147 |
+DIST cfe-3.5.1.src.tar.xz 8268140 SHA256 6773f3f9cf815631cc7e779ec134ddd228dc8e9a250e1ea3a910610c59eb8f5c SHA512 bd904586f6155c05d2f7ddd05b86c28feae883cdc60e2cb3b48d4ae0ce55916064bcea414a46518d0fb73618f18a3f3fca6cc4cad81083428a2221299f5c5c7f WHIRLPOOL eca619b84ae6dfbca4b3d46601419d2c5a0cd77d643336c560d4bc358f4a2b0f7123d3e87248119c3e447143859da20b9b2e94721ebb14053627f0a158d843f5 |
148 |
+DIST cfe-3.5.2.src.tar.xz 8268008 SHA256 4feb575f74fb3a74b6245400460230141bf610f235ef3a25008cfe6137828620 SHA512 2ad9a7daa8e62cdbf47b001aa6b937a06ae7e6396dcd1832797e2d98036522443ccfca9f1253e16d531a99d1edf237fcd2b457c55491ff68ca4534a2396ca52f WHIRLPOOL 51789ba2a3193d404b26d26b999fc47f1bc4b56b45048078cc51e4ff5c31d834d360ee0c2d16096c060f85acab6de9055dc375569348ae3307e4b280406f2d9e |
149 |
+DIST cfe-3.6.0.src.tar.xz 8640776 SHA256 be0e69378119fe26f0f2f74cffe82b7c26da840c9733fe522ed3c1b66b11082d SHA512 dc137bdf9c2c5adb25498c995f0b944016699267156a595cc1fe6127f6961d45162275023d194db42691d80fa8fc74f56abad9c145ef1ff492881f547ca76cfe WHIRLPOOL 0df122c9d32dba5a00a97bec4a54b7b7bd8241ef625357bcf9997e3670e7c4775becec971f572073f3ffad86c7ccf616a94c06926ef9b0528248e34958e9b43f |
150 |
+DIST cfe-3.6.1.src.tar.xz 8616132 SHA256 74f92d0c93b86678b015e87655f59474b2f657769680efdeb3c0524ffbd2dad7 SHA512 a96944bccfd9341be7adafdcc40367d458e85e7e74b0d2f3a7ea18edf1454d04a232c2d0003d6449c52f81d1e235b434acc1bb63eb5f7d16f8f4a43b70826743 WHIRLPOOL 1b4b8bb33fc7dbaeb03f32ba3544580bf0424889705b9d5130127be4d514c6d2aae5e224d71e20595a31441fc4bdd7bbf647e99e57d2c1e17fff3cff9022faa1 |
151 |
+DIST cfe-3.6.2.src.tar.xz 8617576 SHA256 ae9180466a23acb426d12444d866b266ff2289b266064d362462e44f8d4699f3 SHA512 ed837c48f38d8998efd675b56477c8681dcedfcf3f71bba65930f145501289bebb6fe6a6d9de336548f94c381d016b99f10c58e046b885449755d44ac782de03 WHIRLPOOL a17419cea329999c8662c0008dbd0391ed5f52045d0175488979e7620f6a9a21b08e451a5e21d3bf944597bb37934a8228fa89c09d773882359822d59bd447a8 |
152 |
+DIST cfe-3.7.0.src.tar.xz 9147204 SHA256 4ed740c5a91df1c90a4118c5154851d6a475f39a91346bdf268c1c29c13aa1cc SHA512 099d34cb019ea548c6ee85efd22b150beba0aa92061394fa3e423b1ebfe4a5c98c0586e5d56fc5c39e2b1606d36db59f442c056cc59473e32df76c8790c9d0ae WHIRLPOOL 1078d962edfb1b90044f19921f64a28c32259e34d983ddf9f9c198d13c8cd0679778a640d7a06c0bf1224d982602294c79a510034276216e3a6de21c739e6c39 |
153 |
+DIST clang-tools-extra-3.4.src.tar.gz 230729 SHA256 ba85187551ae97fe1c8ab569903beae5ff0900e21233e5eb5389f6ceab1028b4 SHA512 9656678acea490fd5674b2d47ad30ec69e5aedb450924e566a90418c94ce6483faa254e7dde0d5163cb0643153113d27b6b000fea7bba08f0ba55741b35873b1 WHIRLPOOL c41ec11d0b88678c56d77d285c4383a39cabab16aae8a4457666014e0927aa4b04cf77e73af0275e6bfc603a9531598eca98ab61d5d81288e2920682088d9eaf |
154 |
+DIST clang-tools-extra-3.5.0.src.tar.xz 216256 SHA256 2981beb378afb5aa5c50ed017720a42a33e77e902c7086ad2d412ef4fa931f69 SHA512 5ff2cc5d143b78fbe6645486f02e50f738a92aaf6b8e85cfc6f91e659684686b12e61fc8f00b814b4372c5ed2c2b1be5eca61ea696fbe074b815877b799534ee WHIRLPOOL 10b5afc550fa6a8c33739fbf9268e934732b2892842d398152676e66ab90aed3c6e1bae02bc1b8aa0a9a917b6b450f60950317a9eda3f9e377971cbe00164b11 |
155 |
+DIST clang-tools-extra-3.5.1.src.tar.xz 215776 SHA256 e8d011250389cfc36eb51557ca25ae66ab08173e8d53536a0747356105d72906 SHA512 eefacd6857584c9a3186815a7d015a595f32cd926f6c221245d388b8cb9266c52e0980a8e94f01f49c452510fdd42e659b02f116619d3d0e35170566f0704712 WHIRLPOOL a3d14e21f201cc02649833edd67ba04f17c88486fbf399327dbb76d21e151b956a4f58cd7446b8563f72fa1cee06a8bd4abbc53234761a3a69fc1afc99ced87d |
156 |
+DIST clang-tools-extra-3.5.2.src.tar.xz 215804 SHA256 f21a374d74b194d8c984546266491b518859b5f12ed9abd49337b8060d3fc004 SHA512 6a8e662d2704147296c13626fbc5885911c646c67404f12eacc67ee2995221445bf4f6122b271b9cb3a56b716f550a651024822f72358d400b9052bf50423669 WHIRLPOOL 088d2725a88a439a1a2c4048e0eaf540587078078bd1c9823a4804200265cab4d32606abf5e72be76da45ea4aa6e7a7201a2bdbddc78d5f9e0024b0d7b59e222 |
157 |
+DIST clang-tools-extra-3.6.0.src.tar.xz 248688 SHA256 3aa949ba82913490a75697287d9ee8598c619fae0aa6bb8fddf0095ff51bc812 SHA512 52e0cd3cce3047bb98d52e5c03ac4a8c549fcdc628f57492727f3e7659b2d4bd29ad98ab4ebab387233911fbb098861ec020b28c051e6b2c17d73dd490beebf3 WHIRLPOOL 423f018a2943d16ac605d36bece61046423974c2ffbcc7e4a9aebc5efbb2444ecead70e46bc05f51f4fedbfef338d177b5b16969e8fb0df0bbc911200ce483ae |
158 |
+DIST clang-tools-extra-3.6.1.src.tar.xz 248592 SHA256 f4ee70d870d550a9147ac6a548ce7daf7d9e6897348bf411f43c572966fb92b6 SHA512 3273f8c1fa1683de231d0c0b9371d4b7537381e939fe38996e70a8005a1e6185da459ace2f260fad41df4840b459448ed1498c2fd576dd560005117a54e2ccb9 WHIRLPOOL b35c2118efff758358ed9945384218327767a48ae18acdaf2233a5b97e1dc5a682023ddf78d989d1278119c277aecec596c37c5dab8ea2b16a1c9348eb40d9e6 |
159 |
+DIST clang-tools-extra-3.6.2.src.tar.xz 248624 SHA256 6a0ec627d398f501ddf347060f7a2ccea4802b2494f1d4fd7bda3e0442d04feb SHA512 1b7710a7deee30cefb6a3b4edb026a96d8935a0c6f3056ccdb7a45564d10baf01a4f6722ae853ad9a3bad17e8de32a3c0ec99c5cf6144647a5e182809d403f7a WHIRLPOOL 3dc8888c302bac84f53b673784dec092a2c59ea2985d9983e87f057b9aa7b5d3e34cf13d2b0f1f60ea44f342b8167377204a510036872a087037cf02335c19cd |
160 |
+DIST clang-tools-extra-3.7.0.src.tar.xz 276628 SHA256 8ae8a0a3a96b7a700412d67df0af172cb2fc1326beec575fcc0f71d2e72709cd SHA512 c266eb327e2f50767b7d37c9d5713d6c70f590b59e4fe09d997f2eba0d54c9229ef6c8a2a903196380f67dffa7e35ebb47a9e5f2f097fd2a3c363481b72202eb WHIRLPOOL 681a5c14301990bb945e26375d0d31fa22b795101f342bcaaeb9d3e015c0f0f6b260b913388d086cb3054fc357845b34a6813e34614cdfa0de2c58fc6db7c64c |
161 |
+DIST compiler-rt-3.3.src.tar.gz 1568034 SHA256 0e2f3180d6316e6c43f064fdd406c5c6515e682c5f31c57c28335b68c7525423 SHA512 3e86aa8ab9810b4fbac54a40fc93a717a55c642520858c0db215a5324c1e495b4d8fcec9620251cca8e4e5f9afa34bc14364d7f785880a0700469d0201827929 WHIRLPOOL fcfd06bc860dfd901a7576cd4309f863e9d4363e36ab4c67e9e08fe3c8a37d627ee95eb96b9ed53eb6047dec06e73181b3c3e1555b1b49f1e893e6382f21ddc1 |
162 |
+DIST compiler-rt-3.4.src.tar.gz 1858593 SHA256 f37c89b1383ce462d47537a0245ac798600887a9be9f63073e16b79ed536ab5c SHA512 70efffaf12ff7c15befa87ce808489c6f6b6eb421d0ab5d8ecd525239efc8aab850c7ed34b31a993ff5e499657b72598619945cc4461fe3e5359e9a94aaac0c8 WHIRLPOOL ad558b5877a01e476d30d2757959ab04be0c385b2fe3442bcc578bf36c6f3214cd78b4adda24fcb1f3b2b84353db213b82e8d7d4c40e66c3f57aed3a49322dbc |
163 |
+DIST compiler-rt-3.5.0.src.tar.xz 1088352 SHA256 a4b3e655832bf8d9a357ea2c771db347237460e131988cbb96cda40ff39a8136 SHA512 862cce2d6b398bd1a8399496a547e6ab976a31f676528beebfbea5fd7dc54aa72e1c25deefa12f6167096521eba74090565b0168806451da02ddac04e922fc48 WHIRLPOOL 248acf997d70d7904aa79bf83e0c02ba4e5f8c2812c03f44a8e1e31b845a654f250c09ec6a123f9245d0db8713e8cc5a4087b9ce785af4f5eb7e55d9dbd362a2 |
164 |
+DIST compiler-rt-3.5.1.src.tar.xz 1092452 SHA256 adf4b526f33e681aff5961f0821f5b514d3fc375410008842640b56a2e6a837a SHA512 3a4f093972b080f439c81c8b08793c311cea71afeda7ba7b4e32f19378b1cb420da7b594fa9f6a6f7826570438f67d42d3243c4b3503e1cf8a7dcedf52e8e590 WHIRLPOOL edbf11837139b48207fc6f82ecad39fbc6983cf5bd1441cbe6d50e5e484566b63c5afa2fc64cd29fb8560f07015a98c00b58c926ca7e9af47b7eea92133d0db4 |
165 |
+DIST compiler-rt-3.5.2.src.tar.xz 1093000 SHA256 542d7aadd21e7fe35bea0a7912bc965f08a1a566746cebcca76f96dcfeb74dc3 SHA512 319a8a1dbe07eb4f1fcccfe79a1fa445f348fb854a441500e89fa0a128e45716b65d06347f19a63de32e9294cd2331e914ae0d5fe8224f0b2452c39b79ac96ff WHIRLPOOL 6e9286c56a60a515006c8232ca01622ae844185a5f31fb49bce632868862c5e560619f1c45da66878b5322a764f91a284cd296e9f13105d6f74e055a17321d93 |
166 |
+DIST compiler-rt-3.6.0.src.tar.xz 1140616 SHA256 7f49fb79e5adcdce7dddaf973f1db130228dfb19e37a99a7f5365a6948b26b11 SHA512 2758bc2b78dcfb9b6509b83ebc4ebc86907ca3dc2a5f151f580771c674b934432cae055e342ed73096a08331b2f7b129ff65629b27932458b1877aeb554b6328 WHIRLPOOL 1836b59c2369457aac79dc113b9a76623da30195a460afd0e25997aa21855991cdee78d5aec12b45d05d7d14e42d5fc7678f1c169b5a7fd500681a34d02d4468 |
167 |
+DIST compiler-rt-3.6.1.src.tar.xz 1128460 SHA256 fcbf610c77be6047f11ca10c4725610417beba832565115a9e2fcfe2897b649f SHA512 121c048fe60bccccd4a188a18613c94e1e1d9abd8fbae6405d23418f0c9b3562fff72fe77aea9bc0f8632ec9ad89503b9c67fcab5bf378001f90ad7492a1845a WHIRLPOOL fabbf5a63734f879d1698cd65846beb1cfa8559009b37bf5b5f4e239e62c9a9014d484233674cf357fb7aabb04ac8df840e832c764caf4b4a3b662ff0a51115e |
168 |
+DIST compiler-rt-3.6.2.src.tar.xz 1128080 SHA256 0f2ff37d80a64575fecd8cf0d5c50f7ac1f837ddf700d1855412bb7547431d87 SHA512 7dafcc5bd4822475de649d8a84ae51af3c4ed4d0958f76b1b55ba79219638f3e78eb94a1986c6e9ba0e7f1ccf3ec834d546b5ca60e8b08083fea5880ecdf17a3 WHIRLPOOL dd77e7df43c9028a6873ed903da67560fdb04968013016a7f0ad2d2e9a81b3a3d890b95e4f49a6bdef349806d6507defcd80a0a9fb50c1c9f778e7eff42dbc5d |
169 |
+DIST compiler-rt-3.7.0.src.tar.xz 1192832 SHA256 227fa998520bc94974a428dc8e7654d9bdf277e5bc70d4064ebc05691bd62b0b SHA512 2ba6abb3d6ec7f1469cfe1d48fde2069e9a767d19144f80f05516ac63f353ace90a9df3e9d1c1f708f3c397aba0ec61b12e4f105b25a2e1cd26b25b0dd252bc9 WHIRLPOOL 8bb535b667a7fdc1710d32e0912daee3798049f78cf70a03abc409157f02602b77f290b66185a35c464e512e55d57aab0125be6ae4843f6233f4017228afb579 |
170 |
+DIST lldb-3.7.0.src.tar.xz 10649660 SHA256 f4d7505bc111044eaa4033af012221e492938405b62522b8e3e354c20c4b71e9 SHA512 52157782ef13e2c8b7b35ff3ccc05887195fe46ddb6bafcf0707a3c46c1e034734b55342b8dbfc46cae7a8c3cb1012345284e4bedb2344c5016b8d19a12e90df WHIRLPOOL 8c0803a51820ec67944e27061c858e95a92aefa38a1540241fead2b63c5b065c1268cf958b14d8841f62fc8aea5da1e20204704426598bfc2c4e61bcda135c43 |
171 |
+DIST llvm-2.8-r1.tgz 9112527 SHA256 25addb742f1c6cc12877ed0ee924dda962d848368ee095be8e48342ae613d43b SHA512 8688d5cf415e8aef74cca6a14587af36234a6347e2238ac2c0d66805c42926b9399f36390e1a58a4081e902b0904adb818c1a360d5df572dfa893d6f79f5e35a WHIRLPOOL 0da9250e31242b55586c9138089e742aab5d414d5f3412ebf917ae8b9506f984c6134a932be93ec7e4c01c79f6c21d508cb0b2e0ec283419bd4ae4db745430ae |
172 |
+DIST llvm-2.9.tgz 9574781 SHA256 661236cfa17428b48cfa9cbb9909f7569c64b8ecd219fd91dbc00e3b557b3779 SHA512 9cb0fa0bb8ac02661fd6f926001a15e0ad4a9660683421dc86b03f1cf5184142c5815f9f9283ee7cdf8d474e01177f83406122253342e0e95ddc878821660070 WHIRLPOOL f7b445b6b5d455f29ca68c342511b8b5e6eedec525af1cc60440c4de544df2332aa241bffca29eda5d2428a3f518e093a626bd45c7f8a9e0656d0f68aef5d9d1 |
173 |
+DIST llvm-3.0.tar.gz 10350539 SHA256 519eb11d3499ce99c6ffdb8718651fc91425ed7690eac91c8d6853474f7c0477 SHA512 602bb5590b70cb9138bc19d8c630c62bbabdcb2132215c921fe4bce4e3f74dfc66440b9dcd458ff55a86047cc9cc0417c6563715c133e0db222e4b88f07c13bb WHIRLPOOL 6f4ece3ec747352cd78b08d25c5b1cda91140eb6957d509161e45395e47c074f8d2102bfcaeabcdef8c1f6672f2cf06d88e290667666122da029391b3528d440 |
174 |
+DIST llvm-3.1.src.tar.gz 11077429 SHA256 1ea05135197b5400c1f88d00ff280d775ce778f8f9ea042e25a1e1e734a4b9ab SHA512 fb941094601043e405ccc57473414ef92437b09c200e71614f93d8e93b2a58cca8d78c385be037e064b0711cd6268802c774ce4a40fc0ea17bf576305304d2aa WHIRLPOOL c5c72e139296e1c186131f991010f52f958063a4fcfcb1f8527b53a2aaa7edcaca70ab6cf86c25d08640dcf6d720a865fda7dc7eb06cf1ce9c23fd37b5d597ef |
175 |
+DIST llvm-3.2-manpages.tar.bz2 25962 SHA256 159eaaaf59a2cee66f6aa0bbc93ca4c9fa37a9a25d4116f085556cdbc32f75ca SHA512 75ce41827f99b9e08f0c3e374c49f8a231653bca28bea158ece551e5934bc61ae21bfaf158490f83b05c1a7926b95c8832c0eb023280dcafa671e7d551efa17e WHIRLPOOL 58382b3e92b2ef8b1f5a7ebf2d893852253976b781b2b2acd11dfd914fad9776f59ddc5559d3986832a00fde88539db6a5882aa69a6f3ceca90337a59420acc1 |
176 |
+DIST llvm-3.2.src.tar.gz 12275252 SHA256 125090c4d26740f1d5e9838477c931ed7d9ad70d599ba265f46f3a42cb066343 SHA512 cc66171322dbbe40bcac0e0ea5b09df8ff52df63ded304f841f32f702270d6ab1512216413ee52498c3ebee8cd39c4cd23e3855d591944bc2ac0ae76f5be62cc WHIRLPOOL c3a39b2426293d0251b7769607ade873bb6bf8d54e7c8055773a9b75742bc8e39049fb71409a258c6f3d98775b78c280d4bfe4223ba91e5ed6ecae0eddf910e5 |
177 |
+DIST llvm-3.3-manpages.tar.bz2 27098 SHA256 46bb22d63d5fe7dd04e1a7bb7e16c03d93f2ed51d31540cfb9d97ed70059aa77 SHA512 6f24b66b13025d0606908f91ad9b4fc6de1b4aac2d97d261f6b989065476cf153d2f84792f8dd4972b95fb1a45a3931c328df3bcf8ce5ab21170a7a912a39783 WHIRLPOOL 31b9c3635b698f404b75b87c7891b4b6be9cbeb6062bcb6fba5476b0b3069a486ba60c27ab2b12b8a2da9404f666617162041860f023951050a9fc4c7d27748a |
178 |
+DIST llvm-3.3.src.tar.gz 13602421 SHA256 68766b1e70d05a25e2f502e997a3cb3937187a3296595cf6e0977d5cd6727578 SHA512 1b7f7c5e907a68f642dcbe48fdff9585cb1504022bc9d386f310ebe5d25103d0d5f7cf0abf19e0e3fd666970160a98c90033754e2b79b2fac0cf866c984f8038 WHIRLPOOL a89c0b470fde562a3402e7878b91bc0573d433ca0a60e62c9c46946d7948a4fb657b116b6bac032555e29c70d82c751876adb398fe240f5c8d0a9a2378ce1866 |
179 |
+DIST llvm-3.4-manpages.tar.bz2 33753 SHA256 dc2616104cf333dd9ef56b2d31f9a36e81303e2c5756ff8bc221e05b46f7e1cb SHA512 8e438a9392c9b896ccb2b1460a8f57ffa01633e3a6bba61e2bf2f718d970ff96c17d63b0bc0d4da1162e1d1dc4cb9b2a9e9a14a722e8a5b5d2f205f037ae665d WHIRLPOOL 1c037a9972442937f84bc3147d77d4bbc6d6c0812c3025f3107c2ee5f6259afab990f6e1bca564237fdca8089e2372df4b7ca45cbdea686fbf891f92d1bfbbe6 |
180 |
+DIST llvm-3.4.2.src.tar.gz 15938155 SHA256 17038d47069ad0700c063caed76f0c7259628b0e79651ce2b540d506f2f1efd7 SHA512 6c1453f7d9d9110257db3574cc4f6227fed8938705cbb09851ac09a868089b48f1556a1b6e758aff6d97520b08b5605d3ed20411ad9dd22cdc573d62176905f0 WHIRLPOOL f8b4d5167469e6f350ec41aede04e7b756e18f3d8e78b3270beb5791310a7b9b13c69e57c8bcfefbd0a78efc0c40e3b75a9a158eac72c025b7c77146e8dfaf7c |
181 |
+DIST llvm-3.5.0-manpages.tar.bz2 35314 SHA256 724e752a60016dce8cc536658906d3646c600e977374e0ea692a5d0fe2d4a021 SHA512 d99d6096d7f21a81923297584fe5eeb23e0d83d4538fe376615c92fffc8aff3189999f7ab3c537b5aa5d6bc2c22c53eb05717d48c7ab99c42315b8665bac62c3 WHIRLPOOL 68ced06ee6678c5333c662eb1cc0da744c5a184b12dd059c1b77ec200b1d3cc231f270b9d9b6e177d728776894277b3f9061338aa55620c90474eb97915b7819 |
182 |
+DIST llvm-3.5.0.src.tar.xz 11735940 SHA256 28e199f368ef0a4666708f31c7991ad3bcc3a578342b0306526dd35f07595c03 SHA512 b4d0f325dbdb0a8f10e5fd031954ef4b1971d8f99f4e4b53834801a2b74a7acde3f77c655c8355b407424b363edfb10f71d85fc370356dc52af5c636a1bba197 WHIRLPOOL 561520823468b61c63df8e13f876b7ac586eb1e52c256e9a36370e5d46e8cef3937655c36fbb51eebd3680fab67412e7c777479477fc728e7a8f35420e573ef1 |
183 |
+DIST llvm-3.5.1.src.tar.xz 11869356 SHA256 bf3275d2d7890015c8d8f5e6f4f882f8cf3bf51967297ebe74111d6d8b53be15 SHA512 a643ff173627e813b26077829b1af801b75daa5dcea540c4f05366ed57ef6aeafaf8b3fe4208d4c1b303a048a90ddac48a23488480c165637ae9218de140ae55 WHIRLPOOL 798ad46bc21570d8e5b0caadf2c0b434382fd78bfea5a08097fa001019b749b828e56ffe330435e5f3556700e8b0bee29e4139a7ff6b2824bb83dcc8caba2606 |
184 |
+DIST llvm-3.5.2.src.tar.xz 11876128 SHA256 44196156d5749eb4b4224fe471a29cc3984df92570a4a89fa859f7394fc0c575 SHA512 0f6a83cc61a385387e7baf8fb8f0d9f18e3fd00d2d389a3c7e2c3792be7d82ed095506cac52c24e65ae3c1f94456a441d39440feef6125e25ef18447ec9dd406 WHIRLPOOL b41de51907d6d2c2d04a4c498b44f0ed560cc710e6e2d8678f5ef93a9009d140bc7c2406f4b25d5b901fd026689d48edce77a2e435687b489b835156a512e256 |
185 |
+DIST llvm-3.6.0-manpages.tar.bz2 35140 SHA256 53b14a7896f6db547fa692b43fb5b08898b251699ec505a2b9d9c9c3b632eed7 SHA512 2efe21ecaf10ced3e078e7675918f5b7fe6cfa3ba6371906f832690858024c57f4868a3af54b6de18c980d6008992d08ae21bc2a678ef12652a0a0eabad52a15 WHIRLPOOL f6bfc9ec0432566b70ab16aa99628a64e0d9f325db72a37cb1b04d6a3521625b37b858770ac1c9e313612d9475d7832f683fbbc2c3acad97c99daeb39383df45 |
186 |
+DIST llvm-3.6.0.src.tar.xz 12750908 SHA256 b39a69e501b49e8f73ff75c9ad72313681ee58d6f430bfad4d81846fe92eb9ce SHA512 ca492b7d86333f05930dc849c7a8beff981da51ca174cd844650b516d0a592a2c3837d5a8a9b62713c0f29292b845f27ef0ec361809e325c6b60cbbcd3f20357 WHIRLPOOL 4f9de6b8dd2514e7b55e8c6e6af2ab9d355ebf49f1bd113a652f71809d74060792a95f6cee5b8b3bd64d92586b46e7778f616027702c98eb726ee84375e4eea6 |
187 |
+DIST llvm-3.6.1-manpages.tar.bz2 38338 SHA256 b27c6198e09b11421841a7184d4e8a0f8878d4f1313405da28d643134a55688a SHA512 a47aeb0b4632329eaaa1d6c774446fea5822d7692d81533a9a5c5de1c6a3b37fdd6b7c1fc6433339649f4d3a53a753065e73afb30fd84f253ad31d5fb3d48662 WHIRLPOOL 022b214b6340365490915b5c873e515bf16be90d04cd32f09024a3607c23edc2c2e241d295102f045bd08a442c4e5aaf134ac89f7e59a027ec1633330a95989b |
188 |
+DIST llvm-3.6.1.src.tar.xz 12798852 SHA256 2f00c615913aa0b56607ee1548936e60ad2aa89e6d56f23fb032a4463366fc7a SHA512 fa07d0fe6c527d86c0b91b1b62597f949d777e3609e4e8ca2ea5e07931e1ebc7a363273cc705cf4a13b45e7ab00716b76de26688d077c1b51341d9dd2972de3f WHIRLPOOL c6340956e9935c0e4a986f1a8da9458ca3b3a7bdff376d33c7a3c60bc5154fb5820bfaf43fb4118f28ab9b0f356f436672fd2f984bc629eeee01233b703030fb |
189 |
+DIST llvm-3.6.2.src.tar.xz 12802380 SHA256 f60dc158bfda6822de167e87275848969f0558b3134892ff54fced87e4667b94 SHA512 42b44ce69cfb96e2dc12dc2246f0de8ff983a99741206e2c46ccf074b3248aaab9c0f22c6baad802de851d06f202f40db9dd62fe38aab4479b3f70026c936b36 WHIRLPOOL 1a15e16793fe4120f1c14a5334362c36db26745c493e7289281351b7c18c523d781ff9425dddfe1a2add9ea1e8aebb92f2313787da5f286259b55b0884b3039f |
190 |
+DIST llvm-3.7.0-manpages.tar.bz2 38095 SHA256 8597fa532464c6336aefbbef0b1ce452aaa98d474fa58108c6a6f57a9ccd6785 SHA512 ea70ac15dbaef3740b31f66aa798338f7f9b82484586582aa62e0364f9d74bf175be2f4f29721df253b8157c1cbc146ab9045c0656c42a6375434e994786b643 WHIRLPOOL 743b339b0df7c52d270a5197e9e765dfd92d4b5acee94cf9d9d7713e1a75aa9d987b3f5adab0952e7267febf88b318d0f31cb45847e2b0b42c7c7373b2358358 |
191 |
+DIST llvm-3.7.0.src.tar.xz 14636252 SHA256 ab45895f9dcdad1e140a3a79fd709f64b05ad7364e308c0e582c5b02e9cc3153 SHA512 fe3bfefd3d49423831ad12b89f944ac9f469aaaaafdea1dd94fc7fb6d5cc9fbe66b6463796aeaabfc145ae474ec3ad68da41c4a011e8aa4bc650f1835af75388 WHIRLPOOL 4787fc417042cbb4470887358225c367c6617ccd6cb90f1e4f226ec1565b302e4d70458fc13ceedca5b3ac270523637398bb7503c8c423c81fd9682a41c0289f |
192 |
+EBUILD llvm-2.8-r2.ebuild 5300 SHA256 a791a4ff7f8ff85420170fa9534a276b8d26e99c18c73891dc67520ad76db1d7 SHA512 e3f07152eb6ff2bc3f5b06ed72f0dd565d08562d38ee3b4ae7d0805836273ddcffff56288583bf317b18337e6ec7bdfc60c46f99ca707b1cb3982e7a24044468 WHIRLPOOL 8a0c8306d49b84220f043789b98ab1b47014e896d6c96692e5dd58278a35a71587bf4a1f70f74011a87c9b555cbcbd514d2f6360a94dec192f01c2681c668136 |
193 |
+EBUILD llvm-2.9-r2.ebuild 5375 SHA256 5741b05e0f53e0d774c51668bb45af04d2d10f6c5edb045eae32fbf871c33710 SHA512 d3fadf51788a541fe6910c2b3fbcc334db7fa263b1c052ce4949efb3fef21c2e8293e68d12bb2d9502d10354d3c2250d40a0304aaec60f70cb2c42c8dd3aec92 WHIRLPOOL 128bfa9318d9c564e8d0908710c3eda32832e505cd298d588e528e819af628b1c1310256e6feb1fb1f834eafe3961f070194c833894471026e02715ca2193cc0 |
194 |
+EBUILD llvm-3.0-r2.ebuild 5664 SHA256 5ccecb7d96ac21ec8f74775c07db20966799a50430c4c1e80e61fc4f778971c2 SHA512 c1e2c0768142c324f50947d77411667db5f425a4f698f811796b365614fb24df9092e0296d332015e5fcd9b19942cdc6b7eee038a2f8ff5b584559b41a3dbd68 WHIRLPOOL a4fa7c9432bd26076cef892bfa8cbd2b4bd685636a5c6acfd124e7bcfa3d31357003c65a362f47520a10817b9a395a446acf4f12f68db4d93cd175ae2e0d6dfa |
195 |
+EBUILD llvm-3.1-r2.ebuild 5985 SHA256 90ca5fac2e47f0888180ce76753e8c190a8e77c71d6271293a85f99a0d23e33e SHA512 2aac1ac25d11b9c5edc7f4effc00616feb3b19b3cdd4bc0770549194635c016e3ce6d4cfb5d00535fd4adad3245745ff3cf5fb1897f6adfc237eecf9d985e681 WHIRLPOOL cdb8ff9de5417a9d1221d1cfb1be14d723b154f8869c3f82b6ffc3285910cd0a7682bf5cc677d38c65bbfedb4e1d9b812b48c9c83a983d6c829c4abc0a21eb7c |
196 |
+EBUILD llvm-3.2.ebuild 6431 SHA256 63c73522ff9c06fe8e4be26e785a26952e58772695e8f28dd760b811865574cd SHA512 e4e2474cb318531d04ac2e7ce3633eef9e08a884d16f96014c5122bc313ccd108360fca5d7716a37417ae655c6b85ed3e7d4639a9381aecfccf2740f55998b4f WHIRLPOOL b720db9a25a1d37c47abc7210cca8571dd67ceec8449b85c064c1870a81c87f58b127d181c4b39a46a56c8753b2088932ee4170e46276fb85fc3c9c63d4c7441 |
197 |
+EBUILD llvm-3.3-r3.ebuild 14076 SHA256 657281168023af08e823624d532cff8413a0d26792cfe96f8d772c292de65219 SHA512 a86bc53e31a9ca8f7dbebd07cef2306aa14bbaced69a728c8c68f20141531522e57fe6bc6c76b8cff2b00ca5ae95dba26b9d480d5164c84ce444bdeb11ef5c5e WHIRLPOOL 00f1420244f8fa0c5d9af90cdecbb53571980a315961ec4e6f290b976d9c7435f3dcb8ef7591f95110cc8647049c66283bbbc7a42be1ab6eadcdc9a9b964031c |
198 |
+EBUILD llvm-3.4.2.ebuild 15678 SHA256 f1784d5669744298d8bc3cbb9501c1c5f6b403f3d0ff01400ab8d6179aa37780 SHA512 1772a306f891b79a15393a78666ef0602908513c550fa22041d8e19b55b0428b28e02998e0bebd90b1bda0c685b202bbef249194b4523ce74e0fa9ae363de1a8 WHIRLPOOL e9da506ec60e3f9b664b87aec5b6d15884cdfada61a99fd1bd2ae494a5c1d2c86fd98f01595a67af0f9fb3a43630dd2a2282fe1d65ba8165b83b09e281510220 |
199 |
+EBUILD llvm-3.5.0.ebuild 15131 SHA256 71a3c6dad11d3f52646397581e9b88c229faebcb14a0bd49f45a990b36ade328 SHA512 07b54ba55d0adf37a8c794176fc8ba1ee8bad57837b50d0ddb8b92b9a65987ff4f2f60337bc61e8b700c09b4ecb1aee7a4d424ea8d7a0c6ca403b0413c5edebd WHIRLPOOL a2cdd772dcfd15841d6ad1d7826c0821815236806aaf2d1ef051b013a0817041a7822273af04274a9de8ce6b2bb69d9c0baf33e0818adbbacdfb6ef83901fc8d |
200 |
+EBUILD llvm-3.5.1.ebuild 15222 SHA256 46bee55510ab7e3e021f15e57e7f54d31bc3fd5d52c686a912fe5443d5222f6a SHA512 8aa8abf04968eb51fa1a91caabc2d1cec182626b31cea481c4168b8b5e12430d7754d57f9618edade1d5e96ee74d846b09a8cc8f63d74dedddab6c7846641fe1 WHIRLPOOL 9716e23981ad51d4e8bc72e83da45c257c2c97733d9e9efb3fed1ca76116294c0ef010b4dbc0c059fb32c9b1d52dbae22742d4313837daf30be2da2bae1f9714 |
201 |
+EBUILD llvm-3.5.2.ebuild 15292 SHA256 cd65a205c753831553aef88c2473fc99f7ac1b7d851af884578f7c182736a8a3 SHA512 1b0b45e02ea39621b1a7417fbc93a901b48a5a5551b6d7e1f9490a155c4d0ad98812af8fd45bb36482541268f32f36aba2663602e042f728f08285dc5ea2fa18 WHIRLPOOL ba1ba8c77bbb4b78708f69106fc6a59180d73e51fd579038547c065f23dd81794a5266df543845480652b458e0ee92b179fd512342d602b10eda8e4b727a125f |
202 |
+EBUILD llvm-3.6.0.ebuild 15285 SHA256 f9dc886bcd3163182f9366952e2ba6efc55c2b798b615ea33620912260dd922f SHA512 7e372b0fdd2ddce4ad4f1814c593a6e47e1d962fa24e983d8db101251662e64ed723edee83b27d11a35de71bd7c3170ad6992ad44c770533b845d77b3ebc9272 WHIRLPOOL 7d67c7bc55c0734bee38ed3fc2dfa3677eac1a11df8d0e533f62afc5f32c55a08931fe1371b86e3774b704ba26cf08c15eed7efd5620bd387c077391e5bbbcfa |
203 |
+EBUILD llvm-3.6.1.ebuild 15554 SHA256 f1f007fa874bc33f5c1cdc9622ba17badc64d03fa91f3d4b690cb8faaddfcfd8 SHA512 5f18a894cfd0f8687f8ddc0fdca4de85ddeff1f06a662e0830cfe36c6adb2add2a2871059fd78354ece0b527638e4ba08e73e22cfc05e8738feca10002bacaf5 WHIRLPOOL d851589c993b8711e62b1fe7317f31bc009561fa541da68259d812ecb3202e2649b21333fb86fba74c410fea5d1233d6be5fc010497f588f42fdcd50493fe6b6 |
204 |
+EBUILD llvm-3.6.2.ebuild 15575 SHA256 88b3ec82fbb47565a671857d824f53b5a2c5a1f0b3d6b472e9c7790d551d03da SHA512 8321368e71c96ddd8868dae7368c62e096bb974fba0d293c7d67a4a4ae54603ccc851232d1c216b1cd5e63ced7bf1060aed99afeeedc22eca0230ea4e2912d47 WHIRLPOOL 2355533fb2a7bc5115dc7ba1aa20494335a1b9c3cefba33d9589370acc0c368f95931b11d3efb75d517d4d0211e4625f10af2c751b51f24539ddad1a218a9e3a |
205 |
+EBUILD llvm-3.7.0-r1.ebuild 14585 SHA256 020933286b03a17665de28143614f7653baf8abdad2c4d59fd4235cf1e95ff84 SHA512 fdae45263ab6ed3380479c6cda191b1b11112e3d87e858cc932cd6c2ea48dd4807a4bdc15107b1d94f0a6ef791a58a75409e5f72900c7f686f64edbc93b55653 WHIRLPOOL 7995b1936e83ff82a6e06fa877d25d3a5d8ccfd6d29dab1359e8866cf2ab09d02fa5d28c634fc8f8edbf6b1e2bf0e4e2ffe22a5b9640cc5d5d2e745fb7c8e44b |
206 |
+EBUILD llvm-3.7.0.ebuild 14056 SHA256 12f9a4b1a178b193a5cab94c00f448eb538d31056d5e34915a173caf52ea0b87 SHA512 1951a8ab684aaa9de60a2a1b86534cc57ea56bf4d3deb82a8638685f09b0ff3b01c86fafeb8514d4df24892119eba1a69cf2bf99ca12d584f9eb455f3a74448f WHIRLPOOL 9ebf4aa05d6fdaf3e5fb690d75a3996229214197f057dd4695dff0e7dac49492b4b292ce0497dcd8dcd64bdc2975b08540cbc3f458350b1f412f040a6505e7b8 |
207 |
+EBUILD llvm-9999.ebuild 14197 SHA256 ffef165a5ff340631817283b6cad6f4df21cf78a0d4196c5fa2918e9fc390bfb SHA512 4011a7b5507c31b09eaae49cdc6488981dfed92a63f11c6f7e3e1e6608da343b15eda4f62372f9e882dbcc37fa87352ed35752728c35e9ee93f5565529382709 WHIRLPOOL 3b104d8aa520bfd967c6697661dfb4ea35c0205518dc9ac406a274d4cd79a1e35ac3ccdd6e9275cb41c7ab9dc64fb5e9d193834bd7e27ff422b0472ac628a6e4 |
208 |
+MISC metadata.xml 2761 SHA256 1118fce576ccb1bf73ddb832a43ce1991d28b36d9775943ad7009d7a9a795ef9 SHA512 662b95a0c374a6f6873c15f0b06a6e16a53c52cd7c231f56710a43bfdb4663d5b98d84c191b8cce06ee473a0fea9622f7dae7afa70b6461ad02b0fd742a04302 WHIRLPOOL b7d697e632ad6d9d74db8db2c8a376d71fba9ed1b90a4f78ba15d3768cd334e69271e10f21a9fe9f5224fd0b1e541ff5a743fd5f275067f847ea96bed37cefd4 |
209 |
|
210 |
diff --git a/sys-devel/llvm/files/cl-patches/0001-r600-Add-some-intrinsic-definitions.patch b/sys-devel/llvm/files/cl-patches/0001-r600-Add-some-intrinsic-definitions.patch |
211 |
new file mode 100644 |
212 |
index 0000000..9d99c9c |
213 |
--- /dev/null |
214 |
+++ b/sys-devel/llvm/files/cl-patches/0001-r600-Add-some-intrinsic-definitions.patch |
215 |
@@ -0,0 +1,64 @@ |
216 |
+From e25389b66b5ced3a2b5461077dcc9a505d334e3d Mon Sep 17 00:00:00 2001 |
217 |
+From: Tom Stellard <thomas.stellard@×××.com> |
218 |
+Date: Tue, 13 Mar 2012 14:12:21 -0400 |
219 |
+Subject: [PATCH 1/2] r600: Add some intrinsic definitions |
220 |
+ |
221 |
+--- |
222 |
+ include/llvm/Intrinsics.td | 1 + |
223 |
+ include/llvm/IntrinsicsR600.td | 35 +++++++++++++++++++++++++++++++++++ |
224 |
+ 2 files changed, 36 insertions(+), 0 deletions(-) |
225 |
+ create mode 100644 include/llvm/IntrinsicsR600.td |
226 |
+ |
227 |
+diff --git a/include/llvm/Intrinsics.td b/include/llvm/Intrinsics.td |
228 |
+index 069f907..e90dd85 100644 |
229 |
+--- a/include/llvm/Intrinsics.td |
230 |
++++ b/include/llvm/Intrinsics.td |
231 |
+@@ -441,3 +441,4 @@ include "llvm/IntrinsicsCellSPU.td" |
232 |
+ include "llvm/IntrinsicsXCore.td" |
233 |
+ include "llvm/IntrinsicsPTX.td" |
234 |
+ include "llvm/IntrinsicsHexagon.td" |
235 |
++include "llvm/IntrinsicsR600.td" |
236 |
+diff --git a/include/llvm/IntrinsicsR600.td b/include/llvm/IntrinsicsR600.td |
237 |
+new file mode 100644 |
238 |
+index 0000000..789fecb |
239 |
+--- /dev/null |
240 |
++++ b/include/llvm/IntrinsicsR600.td |
241 |
+@@ -0,0 +1,35 @@ |
242 |
++//===- IntrinsicsR600.td - Defines R600 intrinsics ---------*- tablegen -*-===// |
243 |
++// |
244 |
++// The LLVM Compiler Infrastructure |
245 |
++// |
246 |
++// This file is distributed under the University of Illinois Open Source |
247 |
++// License. See LICENSE.TXT for details. |
248 |
++// |
249 |
++//===----------------------------------------------------------------------===// |
250 |
++// |
251 |
++// This file defines all of the R600-specific intrinsics. |
252 |
++// |
253 |
++//===----------------------------------------------------------------------===// |
254 |
++// |
255 |
++// Authors: Tom Stellard <thomas.stellard@×××.com> |
256 |
++// |
257 |
++ |
258 |
++let TargetPrefix = "r600" in { |
259 |
++ |
260 |
++class R600ReadPreloadRegisterIntrinsic<string name> |
261 |
++ : Intrinsic<[llvm_i32_ty], [], [IntrNoMem]>, |
262 |
++ GCCBuiltin<name>; |
263 |
++ |
264 |
++multiclass R600ReadPreloadRegisterIntrinsic_xyz<string prefix> { |
265 |
++ def _x : R600ReadPreloadRegisterIntrinsic<!strconcat(prefix, "_x")>; |
266 |
++ def _y : R600ReadPreloadRegisterIntrinsic<!strconcat(prefix, "_y")>; |
267 |
++ def _z : R600ReadPreloadRegisterIntrinsic<!strconcat(prefix, "_z")>; |
268 |
++} |
269 |
++ |
270 |
++defm int_r600_read_ngroups : R600ReadPreloadRegisterIntrinsic_xyz < |
271 |
++ "__builtin_r600_read_ngroups">; |
272 |
++defm int_r600_read_tgid : R600ReadPreloadRegisterIntrinsic_xyz < |
273 |
++ "__builtin_r600_read_tgid">; |
274 |
++defm int_r600_read_tidig : R600ReadPreloadRegisterIntrinsic_xyz < |
275 |
++ "__builtin_r600_read_tidig">; |
276 |
++} // End TargetPrefix = "r600" |
277 |
+-- |
278 |
+1.7.7.6 |
279 |
+ |
280 |
|
281 |
diff --git a/sys-devel/llvm/files/cl-patches/0002-r600-Add-get_global_size-and-get_local_size-intrinsi.patch b/sys-devel/llvm/files/cl-patches/0002-r600-Add-get_global_size-and-get_local_size-intrinsi.patch |
282 |
new file mode 100644 |
283 |
index 0000000..db176dd |
284 |
--- /dev/null |
285 |
+++ b/sys-devel/llvm/files/cl-patches/0002-r600-Add-get_global_size-and-get_local_size-intrinsi.patch |
286 |
@@ -0,0 +1,27 @@ |
287 |
+From 17667fa3450470f7c89fc2ba4631d908cf510749 Mon Sep 17 00:00:00 2001 |
288 |
+From: Tom Stellard <thomas.stellard@×××.com> |
289 |
+Date: Wed, 14 Mar 2012 11:19:35 -0400 |
290 |
+Subject: [PATCH 2/2] r600: Add get_global_size and get_local_size intrinsics |
291 |
+ |
292 |
+--- |
293 |
+ include/llvm/IntrinsicsR600.td | 4 ++++ |
294 |
+ 1 files changed, 4 insertions(+), 0 deletions(-) |
295 |
+ |
296 |
+diff --git a/include/llvm/IntrinsicsR600.td b/include/llvm/IntrinsicsR600.td |
297 |
+index 789fecb..0473acb 100644 |
298 |
+--- a/include/llvm/IntrinsicsR600.td |
299 |
++++ b/include/llvm/IntrinsicsR600.td |
300 |
+@@ -26,6 +26,10 @@ multiclass R600ReadPreloadRegisterIntrinsic_xyz<string prefix> { |
301 |
+ def _z : R600ReadPreloadRegisterIntrinsic<!strconcat(prefix, "_z")>; |
302 |
+ } |
303 |
+ |
304 |
++defm int_r600_read_global_size : R600ReadPreloadRegisterIntrinsic_xyz < |
305 |
++ "__builtin_r600_read_global_size">; |
306 |
++defm int_r600_read_local_size : R600ReadPreloadRegisterIntrinsic_xyz < |
307 |
++ "__builtin_r600_read_local_size">; |
308 |
+ defm int_r600_read_ngroups : R600ReadPreloadRegisterIntrinsic_xyz < |
309 |
+ "__builtin_r600_read_ngroups">; |
310 |
+ defm int_r600_read_tgid : R600ReadPreloadRegisterIntrinsic_xyz < |
311 |
+-- |
312 |
+1.7.7.6 |
313 |
+ |
314 |
|
315 |
diff --git a/sys-devel/llvm/files/clang-3.1-gentoo-runtime-gcc-detection-v3.patch b/sys-devel/llvm/files/clang-3.1-gentoo-runtime-gcc-detection-v3.patch |
316 |
new file mode 100644 |
317 |
index 0000000..49f1085 |
318 |
--- /dev/null |
319 |
+++ b/sys-devel/llvm/files/clang-3.1-gentoo-runtime-gcc-detection-v3.patch |
320 |
@@ -0,0 +1,29 @@ |
321 |
+diff -upNr a/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.cpp b/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.cpp |
322 |
+--- a/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.cpp 2012-05-24 03:32:31.593191000 -0400 |
323 |
++++ b/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.cpp 2012-05-24 03:38:31.733163513 -0400 |
324 |
+@@ -1145,6 +1145,25 @@ Generic_GCC::GCCInstallationDetector::GC |
325 |
+ Prefixes.push_back(D.InstalledDir + "/.."); |
326 |
+ } |
327 |
+ |
328 |
++ llvm::OwningPtr<llvm::MemoryBuffer> File; |
329 |
++ for (unsigned k = 0, ke = CandidateTripleAliases.size(); k < ke; ++k) { |
330 |
++ if (!llvm::MemoryBuffer::getFile(D.SysRoot + "/etc/env.d/gcc/config-" + CandidateTripleAliases[k].str(), File)) |
331 |
++ { |
332 |
++ bool Exists; |
333 |
++ const std::string VersionText = File.get()->getBuffer().rsplit('-').second.substr(0,5).str(); |
334 |
++ const std::string GentooPath = D.SysRoot + "/usr/lib/gcc/" + CandidateTripleAliases[k].str() + "/" + VersionText; |
335 |
++ if (!llvm::sys::fs::exists(GentooPath + "/crtbegin.o", Exists) && Exists) |
336 |
++ { |
337 |
++ Version = GCCVersion::Parse(VersionText); |
338 |
++ GCCInstallPath = GentooPath; |
339 |
++ GCCParentLibPath = GCCInstallPath + "/../../.."; |
340 |
++ GCCTriple.setTriple(CandidateTripleAliases[k]); |
341 |
++ IsValid = true; |
342 |
++ return; |
343 |
++ } |
344 |
++ } |
345 |
++ } |
346 |
++ |
347 |
+ // Loop over the various components which exist and select the best GCC |
348 |
+ // installation available. GCC installs are ranked by version number. |
349 |
+ Version = GCCVersion::Parse("0.0.0"); |
350 |
|
351 |
diff --git a/sys-devel/llvm/files/clang-3.3-gcc-header-path.patch b/sys-devel/llvm/files/clang-3.3-gcc-header-path.patch |
352 |
new file mode 100644 |
353 |
index 0000000..dc9a4f7 |
354 |
--- /dev/null |
355 |
+++ b/sys-devel/llvm/files/clang-3.3-gcc-header-path.patch |
356 |
@@ -0,0 +1,90 @@ |
357 |
+Backport handling of 'g++-vX.Y' header location. |
358 |
+ |
359 |
+Fixes: https://bugs.gentoo.org/show_bug.cgi?id=487584 |
360 |
+--- |
361 |
+ tools/clang/lib/Driver/ToolChains.cpp | 20 ++++++++++++-------- |
362 |
+ tools/clang/lib/Driver/ToolChains.h | 3 +++ |
363 |
+ 2 files changed, 15 insertions(+), 8 deletions(-) |
364 |
+ |
365 |
+diff --git a/tools/clang/lib/Driver/ToolChains.cpp b/tools/clang/lib/Driver/ToolChains.cpp |
366 |
+index 7c9e9c0..e38d42d 100644 |
367 |
+--- a/tools/clang/lib/Driver/ToolChains.cpp |
368 |
++++ b/tools/clang/lib/Driver/ToolChains.cpp |
369 |
+@@ -917,17 +917,19 @@ Darwin_Generic_GCC::ComputeEffectiveClangTriple(const ArgList &Args, |
370 |
+ /// This is the primary means of forming GCCVersion objects. |
371 |
+ /*static*/ |
372 |
+ Generic_GCC::GCCVersion Linux::GCCVersion::Parse(StringRef VersionText) { |
373 |
+- const GCCVersion BadVersion = { VersionText.str(), -1, -1, -1, "" }; |
374 |
++ const GCCVersion BadVersion = { VersionText.str(), -1, -1, -1, "", "", "" }; |
375 |
+ std::pair<StringRef, StringRef> First = VersionText.split('.'); |
376 |
+ std::pair<StringRef, StringRef> Second = First.second.split('.'); |
377 |
+ |
378 |
+- GCCVersion GoodVersion = { VersionText.str(), -1, -1, -1, "" }; |
379 |
++ GCCVersion GoodVersion = { VersionText.str(), -1, -1, -1, "", "", "" }; |
380 |
+ if (First.first.getAsInteger(10, GoodVersion.Major) || |
381 |
+ GoodVersion.Major < 0) |
382 |
+ return BadVersion; |
383 |
++ GoodVersion.MajorStr = First.first.str(); |
384 |
+ if (Second.first.getAsInteger(10, GoodVersion.Minor) || |
385 |
+ GoodVersion.Minor < 0) |
386 |
+ return BadVersion; |
387 |
++ GoodVersion.MinorStr = Second.first.str(); |
388 |
+ |
389 |
+ // First look for a number prefix and parse that if present. Otherwise just |
390 |
+ // stash the entire patch string in the suffix, and leave the number |
391 |
+@@ -945,7 +947,7 @@ Generic_GCC::GCCVersion Linux::GCCVersion::Parse(StringRef VersionText) { |
392 |
+ if (PatchText.slice(0, EndNumber).getAsInteger(10, GoodVersion.Patch) || |
393 |
+ GoodVersion.Patch < 0) |
394 |
+ return BadVersion; |
395 |
+- GoodVersion.PatchSuffix = PatchText.substr(EndNumber).str(); |
396 |
++ GoodVersion.PatchSuffix = PatchText.substr(EndNumber); |
397 |
+ } |
398 |
+ } |
399 |
+ |
400 |
+@@ -2590,11 +2592,11 @@ void Linux::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, |
401 |
+ // equivalent to '/usr/include/c++/X.Y' in almost all cases. |
402 |
+ StringRef LibDir = GCCInstallation.getParentLibPath(); |
403 |
+ StringRef InstallDir = GCCInstallation.getInstallPath(); |
404 |
+- StringRef Version = GCCInstallation.getVersion().Text; |
405 |
+ StringRef TripleStr = GCCInstallation.getTriple().str(); |
406 |
++ const GCCVersion &Version = GCCInstallation.getVersion(); |
407 |
+ |
408 |
+ if (addLibStdCXXIncludePaths(LibDir.str() + "/../include", |
409 |
+- "/c++/" + Version.str(), |
410 |
++ "/c++/" + Version.Text, |
411 |
+ TripleStr, |
412 |
+ GCCInstallation.getMultiarchSuffix(), |
413 |
+ DriverArgs, CC1Args)) |
414 |
+@@ -2602,10 +2604,12 @@ void Linux::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, |
415 |
+ |
416 |
+ const std::string IncludePathCandidates[] = { |
417 |
+ // Gentoo is weird and places its headers inside the GCC install, so if the |
418 |
+- // first attempt to find the headers fails, try this pattern. |
419 |
+- InstallDir.str() + "/include/g++-v4", |
420 |
++ // first attempt to find the headers fails, try these patterns. |
421 |
++ InstallDir.str() + "/include/g++-v" + Version.MajorStr + "." + |
422 |
++ Version.MinorStr, |
423 |
++ InstallDir.str() + "/include/g++-v" + Version.MajorStr, |
424 |
+ // Android standalone toolchain has C++ headers in yet another place. |
425 |
+- LibDir.str() + "/../" + TripleStr.str() + "/include/c++/" + Version.str(), |
426 |
++ LibDir.str() + "/../" + TripleStr.str() + "/include/c++/" + Version.Text, |
427 |
+ // Freescale SDK C++ headers are directly in <sysroot>/usr/include/c++, |
428 |
+ // without a subdirectory corresponding to the gcc version. |
429 |
+ LibDir.str() + "/../include/c++", |
430 |
+diff --git a/tools/clang/lib/Driver/ToolChains.h b/tools/clang/lib/Driver/ToolChains.h |
431 |
+index 3afd8dd..04cf467 100644 |
432 |
+--- a/tools/clang/lib/Driver/ToolChains.h |
433 |
++++ b/tools/clang/lib/Driver/ToolChains.h |
434 |
+@@ -48,6 +48,9 @@ protected: |
435 |
+ /// \brief The parsed major, minor, and patch numbers. |
436 |
+ int Major, Minor, Patch; |
437 |
+ |
438 |
++ /// \brief The text of the parsed major, and major+minor versions. |
439 |
++ std::string MajorStr, MinorStr; |
440 |
++ |
441 |
+ /// \brief Any textual suffix on the patch number. |
442 |
+ std::string PatchSuffix; |
443 |
+ |
444 |
+-- |
445 |
+1.8.3.2 |
446 |
+ |
447 |
|
448 |
diff --git a/sys-devel/llvm/files/clang-3.3-gentoo-install.patch b/sys-devel/llvm/files/clang-3.3-gentoo-install.patch |
449 |
new file mode 100644 |
450 |
index 0000000..5519fbc |
451 |
--- /dev/null |
452 |
+++ b/sys-devel/llvm/files/clang-3.3-gentoo-install.patch |
453 |
@@ -0,0 +1,71 @@ |
454 |
+From 1a539a8868070e49966c6b5f5e4b9f1257acd7dc Mon Sep 17 00:00:00 2001 |
455 |
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <gentoo@××××××××××.pl> |
456 |
+Date: Fri, 19 Jul 2013 10:23:57 +0200 |
457 |
+Subject: [PATCH] clang gentoo install |
458 |
+ |
459 |
+--- |
460 |
+ tools/clang/lib/Driver/Tools.cpp | 4 ++-- |
461 |
+ tools/clang/tools/scan-build/scan-build | 4 ++-- |
462 |
+ tools/clang/tools/scan-view/scan-view | 2 +- |
463 |
+ 3 files changed, 5 insertions(+), 5 deletions(-) |
464 |
+ |
465 |
+diff --git a/tools/clang/lib/Driver/Tools.cpp b/tools/clang/lib/Driver/Tools.cpp |
466 |
+index e014980..6e60513 100644 |
467 |
+--- a/tools/clang/lib/Driver/Tools.cpp |
468 |
++++ b/tools/clang/lib/Driver/Tools.cpp |
469 |
+@@ -219,7 +219,7 @@ static void addProfileRT(const ToolChain &TC, const ArgList &Args, |
470 |
+ // libprofile_rt.so. We used to use the -l:libprofile_rt.a syntax, but that is |
471 |
+ // not supported by old linkers. |
472 |
+ std::string ProfileRT = |
473 |
+- std::string(TC.getDriver().Dir) + "/../lib/libprofile_rt.a"; |
474 |
++ "-l:libprofile_rt.a"; |
475 |
+ |
476 |
+ CmdArgs.push_back(Args.MakeArgString(ProfileRT)); |
477 |
+ } |
478 |
+@@ -6177,7 +6177,7 @@ void gnutools::Link::ConstructJob(Compilation &C, const JobAction &JA, |
479 |
+ // forward. |
480 |
+ if (D.IsUsingLTO(Args) || Args.hasArg(options::OPT_use_gold_plugin)) { |
481 |
+ CmdArgs.push_back("-plugin"); |
482 |
+- std::string Plugin = ToolChain.getDriver().Dir + "/../lib/LLVMgold.so"; |
483 |
++ std::string Plugin = ToolChain.getDriver().Dir + "/../@libdir@/LLVMgold.so"; |
484 |
+ CmdArgs.push_back(Args.MakeArgString(Plugin)); |
485 |
+ |
486 |
+ // Try to pass driver level flags relevant to LTO code generation down to |
487 |
+diff --git a/tools/clang/tools/scan-build/scan-build b/tools/clang/tools/scan-build/scan-build |
488 |
+index 22d5289..dcb4822 100755 |
489 |
+--- a/tools/clang/tools/scan-build/scan-build |
490 |
++++ b/tools/clang/tools/scan-build/scan-build |
491 |
+@@ -410,7 +410,7 @@ sub CopyFiles { |
492 |
+ |
493 |
+ my $Dir = shift; |
494 |
+ |
495 |
+- my $JS = Cwd::realpath("$RealBin/sorttable.js"); |
496 |
++ my $JS = Cwd::realpath("@EPREFIX@/usr/share/llvm/sorttable.js"); |
497 |
+ |
498 |
+ DieDiag("Cannot find 'sorttable.js'.\n") |
499 |
+ if (! -r $JS); |
500 |
+@@ -420,7 +420,7 @@ sub CopyFiles { |
501 |
+ DieDiag("Could not copy 'sorttable.js' to '$Dir'.\n") |
502 |
+ if (! -r "$Dir/sorttable.js"); |
503 |
+ |
504 |
+- my $CSS = Cwd::realpath("$RealBin/scanview.css"); |
505 |
++ my $CSS = Cwd::realpath("@EPREFIX@/usr/share/llvm/scanview.css"); |
506 |
+ |
507 |
+ DieDiag("Cannot find 'scanview.css'.\n") |
508 |
+ if (! -r $CSS); |
509 |
+diff --git a/tools/clang/tools/scan-view/scan-view b/tools/clang/tools/scan-view/scan-view |
510 |
+index fb27da6..1f8ddb8 100755 |
511 |
+--- a/tools/clang/tools/scan-view/scan-view |
512 |
++++ b/tools/clang/tools/scan-view/scan-view |
513 |
+@@ -54,7 +54,7 @@ def start_browser(port, options): |
514 |
+ webbrowser.open(url) |
515 |
+ |
516 |
+ def run(port, options, root): |
517 |
+- import ScanView |
518 |
++ from clang import ScanView |
519 |
+ try: |
520 |
+ print 'Starting scan-view at: http://%s:%d'%(options.host, |
521 |
+ port) |
522 |
+-- |
523 |
+1.8.3.2 |
524 |
+ |
525 |
|
526 |
diff --git a/sys-devel/llvm/files/clang-3.4-darwin_build_fix.patch b/sys-devel/llvm/files/clang-3.4-darwin_build_fix.patch |
527 |
new file mode 100644 |
528 |
index 0000000..113b04b |
529 |
--- /dev/null |
530 |
+++ b/sys-devel/llvm/files/clang-3.4-darwin_build_fix.patch |
531 |
@@ -0,0 +1,47 @@ |
532 |
+Our (gcc/binutils) toolchain doesn't do ARM targets, hence we will get |
533 |
+"unable to interface with target machine" errors while building if we |
534 |
+attempt to. Disable those targets. |
535 |
+ |
536 |
+Patch by Reza Jelveh from |
537 |
+https://github.com/fishman/timebomb-gentoo-osx-overlay/blob/master/sys-devel/llvm/files/llvm-3.4-fix_darwin_build.patch |
538 |
+ |
539 |
+--- a/projects/compiler-rt/make/platform/clang_darwin_embedded.mk |
540 |
++++ b/projects/compiler-rt/make/platform/clang_darwin_embedded.mk |
541 |
+@@ -27,20 +27,20 @@ UniversalArchs := |
542 |
+ # Soft-float version of the runtime. No floating-point instructions will be used |
543 |
+ # and the ABI (out of necessity) passes floating values in normal registers: |
544 |
+ # non-VFP variant of the AAPCS. |
545 |
+-Configs += soft_static |
546 |
+-UniversalArchs.soft_static := armv6m armv7m armv7em armv7 |
547 |
++# Configs += soft_static |
548 |
++# UniversalArchs.soft_static := armv6m armv7m armv7em armv7 |
549 |
+ |
550 |
+ # Hard-float version of the runtime. On ARM VFP instructions and registers are |
551 |
+ # allowed, and floating point values get passed in them. VFP variant of the |
552 |
+ # AAPCS. |
553 |
+ Configs += hard_static |
554 |
+-UniversalArchs.hard_static := armv7em armv7 i386 x86_64 |
555 |
++UniversalArchs.hard_static := i386 x86_64 |
556 |
+ |
557 |
+-Configs += soft_pic |
558 |
+-UniversalArchs.soft_pic := armv6m armv7m armv7em armv7 |
559 |
++# Configs += soft_pic |
560 |
++# UniversalArchs.soft_pic := armv6m armv7m armv7em armv7 |
561 |
+ |
562 |
+ Configs += hard_pic |
563 |
+-UniversalArchs.hard_pic := armv7em armv7 i386 x86_64 |
564 |
++UniversalArchs.hard_pic := i386 x86_64 |
565 |
+ |
566 |
+ CFLAGS := -Wall -Werror -Oz -fomit-frame-pointer -ffreestanding |
567 |
+ |
568 |
+--- a/tools/clang/runtime/compiler-rt/Makefile |
569 |
++++ b/tools/clang/runtime/compiler-rt/Makefile |
570 |
+@@ -85,7 +85,7 @@ RuntimeLibrary.darwin.Configs := \ |
571 |
+ profile_osx.a profile_ios.a \ |
572 |
+ ubsan_osx.a |
573 |
+ RuntimeLibrary.darwin_embedded.Configs := \ |
574 |
+- soft_static.a hard_static.a soft_pic.a hard_pic.a |
575 |
++ hard_static.a hard_pic.a |
576 |
+ |
577 |
+ # Support building compiler-rt with relocatable SDKs. |
578 |
+ # |
579 |
|
580 |
diff --git a/sys-devel/llvm/files/clang-3.4-darwin_prefix-include-paths.patch b/sys-devel/llvm/files/clang-3.4-darwin_prefix-include-paths.patch |
581 |
new file mode 100644 |
582 |
index 0000000..f5f1d9e |
583 |
--- /dev/null |
584 |
+++ b/sys-devel/llvm/files/clang-3.4-darwin_prefix-include-paths.patch |
585 |
@@ -0,0 +1,18 @@ |
586 |
+--- tools/clang/lib/Frontend/InitHeaderSearch.cpp |
587 |
++++ tools/clang/lib/Frontend/InitHeaderSearch.cpp |
588 |
+@@ -233,6 +233,7 @@ |
589 |
+ case llvm::Triple::Bitrig: |
590 |
+ break; |
591 |
+ default: |
592 |
++ AddPath("@GENTOO_PORTAGE_EPREFIX@/usr/include", System, false); |
593 |
+ // FIXME: temporary hack: hard-coded paths. |
594 |
+ AddPath("/usr/local/include", System, false); |
595 |
+ break; |
596 |
+@@ -505,6 +506,7 @@ |
597 |
+ // Add the default framework include paths on Darwin. |
598 |
+ if (HSOpts.UseStandardSystemIncludes) { |
599 |
+ if (triple.isOSDarwin()) { |
600 |
++ AddPath("@GENTOO_PORTAGE_EPREFIX@/Frameworks", System, true); |
601 |
+ AddPath("/System/Library/Frameworks", System, true); |
602 |
+ AddPath("/Library/Frameworks", System, true); |
603 |
+ } |
604 |
|
605 |
diff --git a/sys-devel/llvm/files/clang-3.4-gentoo-install.patch b/sys-devel/llvm/files/clang-3.4-gentoo-install.patch |
606 |
new file mode 100644 |
607 |
index 0000000..0a1d9eb |
608 |
--- /dev/null |
609 |
+++ b/sys-devel/llvm/files/clang-3.4-gentoo-install.patch |
610 |
@@ -0,0 +1,80 @@ |
611 |
+From a12fc090b3b43fe25c7de50c09782611e3834aeb Mon Sep 17 00:00:00 2001 |
612 |
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
613 |
+Date: Sat, 14 Jun 2014 19:35:33 +0200 |
614 |
+Subject: [PATCH] clang gentoo fixes |
615 |
+ |
616 |
+--- |
617 |
+ tools/clang/lib/Driver/Tools.cpp | 6 +++--- |
618 |
+ tools/clang/tools/scan-build/scan-build | 4 ++-- |
619 |
+ tools/clang/tools/scan-view/scan-view | 2 +- |
620 |
+ 3 files changed, 6 insertions(+), 6 deletions(-) |
621 |
+ |
622 |
+diff --git a/tools/clang/lib/Driver/Tools.cpp b/tools/clang/lib/Driver/Tools.cpp |
623 |
+index b013eb5..dbbcacb 100644 |
624 |
+--- a/tools/clang/lib/Driver/Tools.cpp |
625 |
++++ b/tools/clang/lib/Driver/Tools.cpp |
626 |
+@@ -222,7 +222,7 @@ static void addProfileRT(const ToolChain &TC, const ArgList &Args, |
627 |
+ // libprofile_rt.so. We used to use the -l:libprofile_rt.a syntax, but that is |
628 |
+ // not supported by old linkers. |
629 |
+ std::string ProfileRT = |
630 |
+- std::string(TC.getDriver().Dir) + "/../lib/libprofile_rt.a"; |
631 |
++ "-l:libprofile_rt.a"; |
632 |
+ |
633 |
+ CmdArgs.push_back(Args.MakeArgString(ProfileRT)); |
634 |
+ } |
635 |
+@@ -5911,7 +5911,7 @@ void freebsd::Link::ConstructJob(Compilation &C, const JobAction &JA, |
636 |
+ // forward. |
637 |
+ if (D.IsUsingLTO(Args)) { |
638 |
+ CmdArgs.push_back("-plugin"); |
639 |
+- std::string Plugin = ToolChain.getDriver().Dir + "/../lib/LLVMgold.so"; |
640 |
++ std::string Plugin = ToolChain.getDriver().Dir + "/../@libdir@/LLVMgold.so"; |
641 |
+ CmdArgs.push_back(Args.MakeArgString(Plugin)); |
642 |
+ |
643 |
+ // Try to pass driver level flags relevant to LTO code generation down to |
644 |
+@@ -6534,7 +6534,7 @@ void gnutools::Link::ConstructJob(Compilation &C, const JobAction &JA, |
645 |
+ // forward. |
646 |
+ if (D.IsUsingLTO(Args)) { |
647 |
+ CmdArgs.push_back("-plugin"); |
648 |
+- std::string Plugin = ToolChain.getDriver().Dir + "/../lib/LLVMgold.so"; |
649 |
++ std::string Plugin = ToolChain.getDriver().Dir + "/../@libdir@/LLVMgold.so"; |
650 |
+ CmdArgs.push_back(Args.MakeArgString(Plugin)); |
651 |
+ |
652 |
+ // Try to pass driver level flags relevant to LTO code generation down to |
653 |
+diff --git a/tools/clang/tools/scan-build/scan-build b/tools/clang/tools/scan-build/scan-build |
654 |
+index 0f119f6..58f78d9 100755 |
655 |
+--- a/tools/clang/tools/scan-build/scan-build |
656 |
++++ b/tools/clang/tools/scan-build/scan-build |
657 |
+@@ -419,7 +419,7 @@ sub CopyFiles { |
658 |
+ |
659 |
+ my $Dir = shift; |
660 |
+ |
661 |
+- my $JS = Cwd::realpath("$RealBin/sorttable.js"); |
662 |
++ my $JS = Cwd::realpath("@EPREFIX@/usr/share/llvm/sorttable.js"); |
663 |
+ |
664 |
+ DieDiag("Cannot find 'sorttable.js'.\n") |
665 |
+ if (! -r $JS); |
666 |
+@@ -429,7 +429,7 @@ sub CopyFiles { |
667 |
+ DieDiag("Could not copy 'sorttable.js' to '$Dir'.\n") |
668 |
+ if (! -r "$Dir/sorttable.js"); |
669 |
+ |
670 |
+- my $CSS = Cwd::realpath("$RealBin/scanview.css"); |
671 |
++ my $CSS = Cwd::realpath("@EPREFIX@/usr/share/llvm/scanview.css"); |
672 |
+ |
673 |
+ DieDiag("Cannot find 'scanview.css'.\n") |
674 |
+ if (! -r $CSS); |
675 |
+diff --git a/tools/clang/tools/scan-view/scan-view b/tools/clang/tools/scan-view/scan-view |
676 |
+index fb27da6..1f8ddb8 100755 |
677 |
+--- a/tools/clang/tools/scan-view/scan-view |
678 |
++++ b/tools/clang/tools/scan-view/scan-view |
679 |
+@@ -54,7 +54,7 @@ def start_browser(port, options): |
680 |
+ webbrowser.open(url) |
681 |
+ |
682 |
+ def run(port, options, root): |
683 |
+- import ScanView |
684 |
++ from clang import ScanView |
685 |
+ try: |
686 |
+ print 'Starting scan-view at: http://%s:%d'%(options.host, |
687 |
+ port) |
688 |
+-- |
689 |
+2.0.0 |
690 |
+ |
691 |
|
692 |
diff --git a/sys-devel/llvm/files/clang-3.5-gentoo-install.patch b/sys-devel/llvm/files/clang-3.5-gentoo-install.patch |
693 |
new file mode 100644 |
694 |
index 0000000..5d4261d |
695 |
--- /dev/null |
696 |
+++ b/sys-devel/llvm/files/clang-3.5-gentoo-install.patch |
697 |
@@ -0,0 +1,57 @@ |
698 |
+--- |
699 |
+ tools/clang/lib/Driver/Tools.cpp | 2 +- |
700 |
+ tools/clang/tools/scan-build/scan-build | 4 ++-- |
701 |
+ tools/clang/tools/scan-view/scan-view | 2 +- |
702 |
+ 3 files changed, 4 insertions(+), 4 deletions(-) |
703 |
+ |
704 |
+diff --git a/tools/clang/lib/Driver/Tools.cpp b/tools/clang/lib/Driver/Tools.cpp |
705 |
+index 187ed38..55bcd99 100644 |
706 |
+--- a/tools/clang/lib/Driver/Tools.cpp |
707 |
++++ b/tools/clang/lib/Driver/Tools.cpp |
708 |
+@@ -1404,7 +1404,7 @@ static void AddGoldPlugin(const ToolChain &ToolChain, const ArgList &Args, |
709 |
+ // as gold requires -plugin to come before any -plugin-opt that -Wl might |
710 |
+ // forward. |
711 |
+ CmdArgs.push_back("-plugin"); |
712 |
+- std::string Plugin = ToolChain.getDriver().Dir + "/../lib/LLVMgold.so"; |
713 |
++ std::string Plugin = ToolChain.getDriver().Dir + "/../@libdir@/LLVMgold.so"; |
714 |
+ CmdArgs.push_back(Args.MakeArgString(Plugin)); |
715 |
+ |
716 |
+ // Try to pass driver level flags relevant to LTO code generation down to |
717 |
+diff --git a/tools/clang/tools/scan-build/scan-build b/tools/clang/tools/scan-build/scan-build |
718 |
+index 0f119f6..58f78d9 100755 |
719 |
+--- a/tools/clang/tools/scan-build/scan-build |
720 |
++++ b/tools/clang/tools/scan-build/scan-build |
721 |
+@@ -419,7 +419,7 @@ |
722 |
+ |
723 |
+ my $Dir = shift; |
724 |
+ |
725 |
+- my $JS = Cwd::realpath("$RealBin/sorttable.js"); |
726 |
++ my $JS = Cwd::realpath("@EPREFIX@/usr/share/llvm/sorttable.js"); |
727 |
+ |
728 |
+ DieDiag("Cannot find 'sorttable.js'.\n") |
729 |
+ if (! -r $JS); |
730 |
+@@ -429,7 +429,7 @@ |
731 |
+ DieDiag("Could not copy 'sorttable.js' to '$Dir'.\n") |
732 |
+ if (! -r "$Dir/sorttable.js"); |
733 |
+ |
734 |
+- my $CSS = Cwd::realpath("$RealBin/scanview.css"); |
735 |
++ my $CSS = Cwd::realpath("@EPREFIX@/usr/share/llvm/scanview.css"); |
736 |
+ |
737 |
+ DieDiag("Cannot find 'scanview.css'.\n") |
738 |
+ if (! -r $CSS); |
739 |
+diff --git a/tools/clang/tools/scan-view/scan-view b/tools/clang/tools/scan-view/scan-view |
740 |
+index fb27da6..1f8ddb8 100755 |
741 |
+--- a/tools/clang/tools/scan-view/scan-view |
742 |
++++ b/tools/clang/tools/scan-view/scan-view |
743 |
+@@ -54,7 +54,7 @@ def start_browser(port, options): |
744 |
+ webbrowser.open(url) |
745 |
+ |
746 |
+ def run(port, options, root): |
747 |
+- import ScanView |
748 |
++ from clang import ScanView |
749 |
+ try: |
750 |
+ print 'Starting scan-view at: http://%s:%d'%(options.host, |
751 |
+ port) |
752 |
+-- |
753 |
+1.8.4.4 |
754 |
+ |
755 |
|
756 |
diff --git a/sys-devel/llvm/files/clang-3.5-gentoo-runtime-gcc-detection-v3.patch b/sys-devel/llvm/files/clang-3.5-gentoo-runtime-gcc-detection-v3.patch |
757 |
new file mode 100644 |
758 |
index 0000000..1f81af0 |
759 |
--- /dev/null |
760 |
+++ b/sys-devel/llvm/files/clang-3.5-gentoo-runtime-gcc-detection-v3.patch |
761 |
@@ -0,0 +1,42 @@ |
762 |
+From 916572e1243633ddf913c8f32771a3a7f70fd853 Mon Sep 17 00:00:00 2001 |
763 |
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
764 |
+Date: Fri, 5 Sep 2014 16:49:35 +0200 |
765 |
+Subject: [PATCH] Support obtaining active toolchain from gcc-config. |
766 |
+ |
767 |
+--- |
768 |
+ tools/clang/lib/Driver/ToolChains.cpp | 19 +++++++++++++++++++ |
769 |
+ 1 file changed, 19 insertions(+) |
770 |
+ |
771 |
+diff --git a/tools/clang/lib/Driver/ToolChains.cpp b/tools/clang/lib/Driver/ToolChains.cpp |
772 |
+index b46f69d..2d4374d 100644 |
773 |
+--- a/tools/clang/lib/Driver/ToolChains.cpp |
774 |
++++ b/tools/clang/lib/Driver/ToolChains.cpp |
775 |
+@@ -1253,6 +1253,25 @@ Generic_GCC::GCCInstallationDetector::init( |
776 |
+ Prefixes.push_back("/usr"); |
777 |
+ } |
778 |
+ |
779 |
++ for (unsigned k = 0, ke = CandidateTripleAliases.size(); k < ke; ++k) { |
780 |
++ llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> File = |
781 |
++ llvm::MemoryBuffer::getFile(D.SysRoot + "/etc/env.d/gcc/config-" + CandidateTripleAliases[k].str()); |
782 |
++ if (File) |
783 |
++ { |
784 |
++ const std::string VersionText = File.get()->getBuffer().rsplit('-').second.substr(0,5).str(); |
785 |
++ const std::string GentooPath = D.SysRoot + "/usr/lib/gcc/" + CandidateTripleAliases[k].str() + "/" + VersionText; |
786 |
++ if (llvm::sys::fs::exists(GentooPath + "/crtbegin.o")) |
787 |
++ { |
788 |
++ Version = GCCVersion::Parse(VersionText); |
789 |
++ GCCInstallPath = GentooPath; |
790 |
++ GCCParentLibPath = GCCInstallPath + "/../../.."; |
791 |
++ GCCTriple.setTriple(CandidateTripleAliases[k]); |
792 |
++ IsValid = true; |
793 |
++ return; |
794 |
++ } |
795 |
++ } |
796 |
++ } |
797 |
++ |
798 |
+ // Loop over the various components which exist and select the best GCC |
799 |
+ // installation available. GCC installs are ranked by version number. |
800 |
+ Version = GCCVersion::Parse("0.0.0"); |
801 |
+-- |
802 |
+2.1.0 |
803 |
+ |
804 |
|
805 |
diff --git a/sys-devel/llvm/files/clang-3.6-fbsd-gcc49.patch b/sys-devel/llvm/files/clang-3.6-fbsd-gcc49.patch |
806 |
new file mode 100644 |
807 |
index 0000000..31f5fc2 |
808 |
--- /dev/null |
809 |
+++ b/sys-devel/llvm/files/clang-3.6-fbsd-gcc49.patch |
810 |
@@ -0,0 +1,25 @@ |
811 |
+Fix build fails with using gcc-4.9 on Gentoo/FreeBSD |
812 |
+https://bugs.gentoo.org/show_bug.cgi?id=548444 |
813 |
+ |
814 |
+diff --git a/llvm-3.6.0.src/tools/clang/lib/Driver/MSVCToolChain.cpp b/llvm-3.6.0.src/tools/clang/lib/Driver/MSVCToolChain.cpp |
815 |
+index d6bd5c3..372f76f 100644 |
816 |
+--- a/llvm-3.6.0.src/tools/clang/lib/Driver/MSVCToolChain.cpp |
817 |
++++ b/llvm-3.6.0.src/tools/clang/lib/Driver/MSVCToolChain.cpp |
818 |
+@@ -22,6 +22,8 @@ |
819 |
+ #include "llvm/Support/FileSystem.h" |
820 |
+ #include "llvm/Support/Process.h" |
821 |
+ |
822 |
++#include <cstdio> |
823 |
++ |
824 |
+ // Include the necessary headers to interface with the Windows registry and |
825 |
+ // environment. |
826 |
+ #if defined(LLVM_ON_WIN32) |
827 |
+@@ -212,7 +214,7 @@ bool MSVCToolChain::getWindowsSDKDir(std::string &path, int &major, |
828 |
+ "SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\$VERSION", |
829 |
+ "InstallationFolder", path, &sdkVersion); |
830 |
+ if (!sdkVersion.empty()) |
831 |
+- ::sscanf(sdkVersion.c_str(), "v%d.%d", &major, &minor); |
832 |
++ std::sscanf(sdkVersion.c_str(), "v%d.%d", &major, &minor); |
833 |
+ return hasSDKDir && !path.empty(); |
834 |
+ } |
835 |
+ |
836 |
|
837 |
diff --git a/sys-devel/llvm/files/clang-3.6-gentoo-install.patch b/sys-devel/llvm/files/clang-3.6-gentoo-install.patch |
838 |
new file mode 100644 |
839 |
index 0000000..6d76ba9 |
840 |
--- /dev/null |
841 |
+++ b/sys-devel/llvm/files/clang-3.6-gentoo-install.patch |
842 |
@@ -0,0 +1,48 @@ |
843 |
+--- |
844 |
+ tools/clang/lib/Driver/Tools.cpp | 2 +- |
845 |
+ tools/clang/tools/scan-build/scan-build | 4 ++-- |
846 |
+ tools/clang/tools/scan-view/scan-view | 2 +- |
847 |
+ 3 files changed, 4 insertions(+), 4 deletions(-) |
848 |
+ |
849 |
+diff --git a/tools/clang/lib/Driver/Tools.cpp b/tools/clang/lib/Driver/Tools.cpp |
850 |
+index 187ed38..55bcd99 100644 |
851 |
+--- a/tools/clang/lib/Driver/Tools.cpp |
852 |
++++ b/tools/clang/lib/Driver/Tools.cpp |
853 |
+diff --git a/tools/clang/tools/scan-build/scan-build b/tools/clang/tools/scan-build/scan-build |
854 |
+index 0f119f6..58f78d9 100755 |
855 |
+--- a/tools/clang/tools/scan-build/scan-build |
856 |
++++ b/tools/clang/tools/scan-build/scan-build |
857 |
+@@ -419,7 +419,7 @@ |
858 |
+ |
859 |
+ my $Dir = shift; |
860 |
+ |
861 |
+- my $JS = Cwd::realpath("$RealBin/sorttable.js"); |
862 |
++ my $JS = Cwd::realpath("@EPREFIX@/usr/share/llvm/sorttable.js"); |
863 |
+ |
864 |
+ DieDiag("Cannot find 'sorttable.js'.\n") |
865 |
+ if (! -r $JS); |
866 |
+@@ -429,7 +429,7 @@ |
867 |
+ DieDiag("Could not copy 'sorttable.js' to '$Dir'.\n") |
868 |
+ if (! -r "$Dir/sorttable.js"); |
869 |
+ |
870 |
+- my $CSS = Cwd::realpath("$RealBin/scanview.css"); |
871 |
++ my $CSS = Cwd::realpath("@EPREFIX@/usr/share/llvm/scanview.css"); |
872 |
+ |
873 |
+ DieDiag("Cannot find 'scanview.css'.\n") |
874 |
+ if (! -r $CSS); |
875 |
+diff --git a/tools/clang/tools/scan-view/scan-view b/tools/clang/tools/scan-view/scan-view |
876 |
+index fb27da6..1f8ddb8 100755 |
877 |
+--- a/tools/clang/tools/scan-view/scan-view |
878 |
++++ b/tools/clang/tools/scan-view/scan-view |
879 |
+@@ -54,7 +54,7 @@ def start_browser(port, options): |
880 |
+ webbrowser.open(url) |
881 |
+ |
882 |
+ def run(port, options, root): |
883 |
+- import ScanView |
884 |
++ from clang import ScanView |
885 |
+ try: |
886 |
+ print 'Starting scan-view at: http://%s:%d'%(options.host, |
887 |
+ port) |
888 |
+-- |
889 |
+1.8.4.4 |
890 |
+ |
891 |
|
892 |
diff --git a/sys-devel/llvm/files/clang-3.7-strip_doc_refs.patch b/sys-devel/llvm/files/clang-3.7-strip_doc_refs.patch |
893 |
new file mode 100644 |
894 |
index 0000000..9576b92 |
895 |
--- /dev/null |
896 |
+++ b/sys-devel/llvm/files/clang-3.7-strip_doc_refs.patch |
897 |
@@ -0,0 +1,42 @@ |
898 |
+--- tools/clang/docs/AddressSanitizer.rst 2015-06-26 01:36:44.000000000 +0200 |
899 |
++++ tools/clang/docs/AddressSanitizer.rst 2015-08-23 15:35:10.399174574 +0200 |
900 |
+@@ -198,7 +198,7 @@ |
901 |
+ Some code should not be instrumented by AddressSanitizer. One may use the |
902 |
+ function attribute ``__attribute__((no_sanitize("address")))`` |
903 |
+ (which has deprecated synonyms |
904 |
+-:ref:`no_sanitize_address <langext-address_sanitizer>` and |
905 |
++`no_sanitize_address` and |
906 |
+ `no_address_safety_analysis`) to disable instrumentation of a particular |
907 |
+ function. This attribute may not be supported by other compilers, so we suggest |
908 |
+ to use it together with ``__has_feature(address_sanitizer)``. |
909 |
+--- tools/clang/docs/MemorySanitizer.rst 2015-02-26 16:59:30.000000000 +0100 |
910 |
++++ tools/clang/docs/MemorySanitizer.rst 2015-08-23 15:35:28.002200413 +0200 |
911 |
+@@ -82,7 +82,7 @@ |
912 |
+ |
913 |
+ Some code should not be checked by MemorySanitizer. |
914 |
+ One may use the function attribute |
915 |
+-:ref:`no_sanitize_memory <langext-memory_sanitizer>` |
916 |
++`no_sanitize_memory` |
917 |
+ to disable uninitialized checks in a particular function. |
918 |
+ MemorySanitizer may still instrument such functions to avoid false positives. |
919 |
+ This attribute may not be |
920 |
+--- tools/clang/docs/ThreadSanitizer.rst 2015-02-18 23:26:20.000000000 +0100 |
921 |
++++ tools/clang/docs/ThreadSanitizer.rst 2015-08-23 15:34:53.918150364 +0200 |
922 |
+@@ -88,7 +88,7 @@ |
923 |
+ |
924 |
+ Some code should not be instrumented by ThreadSanitizer. |
925 |
+ One may use the function attribute |
926 |
+-:ref:`no_sanitize_thread <langext-thread_sanitizer>` |
927 |
++`no_sanitize_thread` |
928 |
+ to disable instrumentation of plain (non-atomic) loads/stores in a particular function. |
929 |
+ ThreadSanitizer still instruments such functions to avoid false positives and |
930 |
+ provide meaningful stack traces. |
931 |
+@@ -102,7 +102,7 @@ |
932 |
+ ThreadSanitizer supports ``src`` and ``fun`` entity types in |
933 |
+ :doc:`SanitizerSpecialCaseList`, that can be used to suppress data race reports in |
934 |
+ the specified source files or functions. Unlike functions marked with |
935 |
+-:ref:`no_sanitize_thread <langext-thread_sanitizer>` attribute, |
936 |
++`no_sanitize_thread` attribute, |
937 |
+ blacklisted functions are not instrumented at all. This can lead to false positives |
938 |
+ due to missed synchronization via atomic operations and missed stack frames in reports. |
939 |
+ |
940 |
|
941 |
diff --git a/sys-devel/llvm/files/cmake/0002-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch b/sys-devel/llvm/files/cmake/0002-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch |
942 |
new file mode 100644 |
943 |
index 0000000..3e57f0d |
944 |
--- /dev/null |
945 |
+++ b/sys-devel/llvm/files/cmake/0002-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch |
946 |
@@ -0,0 +1,36 @@ |
947 |
+From 2ec240a76253839cd1c5dc2e964f55698ae468fc Mon Sep 17 00:00:00 2001 |
948 |
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
949 |
+Date: Mon, 8 Jun 2015 06:43:00 +0200 |
950 |
+Subject: [PATCH 2/4] cmake: Support overriding Sphinx HTML doc install |
951 |
+ directory |
952 |
+ |
953 |
+Provide ${PROJECT}_INSTALL_HTML variables (e.g. LLVM_INSTALL_HTML) to |
954 |
+override Sphinx HTML doc install directory. |
955 |
+ |
956 |
+Fixes: https://llvm.org/bugs/show_bug.cgi?id=23780 |
957 |
+--- |
958 |
+ cmake/modules/AddSphinxTarget.cmake | 8 ++++++-- |
959 |
+ 1 file changed, 6 insertions(+), 2 deletions(-) |
960 |
+ |
961 |
+diff --git a/cmake/modules/AddSphinxTarget.cmake b/cmake/modules/AddSphinxTarget.cmake |
962 |
+index 045dc23..9c9c444 100644 |
963 |
+--- a/cmake/modules/AddSphinxTarget.cmake |
964 |
++++ b/cmake/modules/AddSphinxTarget.cmake |
965 |
+@@ -53,8 +53,12 @@ function (add_sphinx_target builder project) |
966 |
+ DESTINATION share/man/man1) |
967 |
+ |
968 |
+ elseif (builder STREQUAL html) |
969 |
+- install(DIRECTORY "${SPHINX_BUILD_DIR}" |
970 |
+- DESTINATION "share/doc/${project}") |
971 |
++ string(TOUPPER "${project}" project_upper) |
972 |
++ set(${project_upper}_INSTALL_HTML "share/doc/${project}/html" |
973 |
++ CACHE STRING "HTML documentation install directory for ${project}") |
974 |
++ |
975 |
++ install(DIRECTORY "${SPHINX_BUILD_DIR}/" |
976 |
++ DESTINATION "${${project_upper}_INSTALL_HTML}") |
977 |
+ else() |
978 |
+ message(WARNING Installation of ${builder} not supported) |
979 |
+ endif() |
980 |
+-- |
981 |
+2.4.3 |
982 |
+ |
983 |
|
984 |
diff --git a/sys-devel/llvm/files/cmake/0003-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch b/sys-devel/llvm/files/cmake/0003-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch |
985 |
new file mode 100644 |
986 |
index 0000000..b1c74c6 |
987 |
--- /dev/null |
988 |
+++ b/sys-devel/llvm/files/cmake/0003-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch |
989 |
@@ -0,0 +1,32 @@ |
990 |
+From 4f7092ba05cccfeea7d26177d93f3d7a57d9bce2 Mon Sep 17 00:00:00 2001 |
991 |
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
992 |
+Date: Mon, 8 Jun 2015 14:29:03 +0200 |
993 |
+Subject: [PATCH 3/4] cmake: Add an ordering dep between HTML & man Sphinx |
994 |
+ targets |
995 |
+ |
996 |
+Add a dependency between HTML & manpage Sphinx targets to prevent two |
997 |
+instances of Sphinx from running in parallel, and therefore solves race |
998 |
+conditions reusing the same doctree directory. |
999 |
+ |
1000 |
+Fixes: https://llvm.org/bugs/show_bug.cgi?id=23781 |
1001 |
+--- |
1002 |
+ docs/CMakeLists.txt | 3 +++ |
1003 |
+ 1 file changed, 3 insertions(+) |
1004 |
+ |
1005 |
+diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt |
1006 |
+index da27627..63309a6 100644 |
1007 |
+--- a/docs/CMakeLists.txt |
1008 |
++++ b/docs/CMakeLists.txt |
1009 |
+@@ -100,6 +100,9 @@ if (LLVM_ENABLE_SPHINX) |
1010 |
+ |
1011 |
+ if (${SPHINX_OUTPUT_MAN}) |
1012 |
+ add_sphinx_target(man llvm) |
1013 |
++ if (${SPHINX_OUTPUT_HTML}) |
1014 |
++ add_dependencies(docs-llvm-html docs-llvm-man) |
1015 |
++ endif() |
1016 |
+ endif() |
1017 |
+ |
1018 |
+ endif() |
1019 |
+-- |
1020 |
+2.4.3 |
1021 |
+ |
1022 |
|
1023 |
diff --git a/sys-devel/llvm/files/cmake/0004-cmake-Do-not-install-libgtest.patch b/sys-devel/llvm/files/cmake/0004-cmake-Do-not-install-libgtest.patch |
1024 |
new file mode 100644 |
1025 |
index 0000000..92ca2e4 |
1026 |
--- /dev/null |
1027 |
+++ b/sys-devel/llvm/files/cmake/0004-cmake-Do-not-install-libgtest.patch |
1028 |
@@ -0,0 +1,28 @@ |
1029 |
+From d9f80393cfd4e586242ac3efd4e6ba6b49ce39ae Mon Sep 17 00:00:00 2001 |
1030 |
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
1031 |
+Date: Tue, 9 Jun 2015 11:58:52 +0200 |
1032 |
+Subject: [PATCH 4/4] cmake: Do not install libgtest |
1033 |
+ |
1034 |
+libgtest is an internal test dependency, and should not be installed to |
1035 |
+the live system as a part of LLVM. |
1036 |
+--- |
1037 |
+ utils/unittest/CMakeLists.txt | 3 +++ |
1038 |
+ 1 file changed, 3 insertions(+) |
1039 |
+ |
1040 |
+diff --git a/utils/unittest/CMakeLists.txt b/utils/unittest/CMakeLists.txt |
1041 |
+index b34e22a..3fe5884 100644 |
1042 |
+--- a/utils/unittest/CMakeLists.txt |
1043 |
++++ b/utils/unittest/CMakeLists.txt |
1044 |
+@@ -41,6 +41,9 @@ if (PTHREAD_LIBRARY_PATH) |
1045 |
+ list(APPEND LIBS pthread) |
1046 |
+ endif() |
1047 |
+ |
1048 |
++# Delay building until the tests pull it in, and avoid installing it |
1049 |
++set(EXCLUDE_FROM_ALL ON) |
1050 |
++ |
1051 |
+ add_llvm_library(gtest |
1052 |
+ googletest/src/gtest-all.cc |
1053 |
+ |
1054 |
+-- |
1055 |
+2.4.3 |
1056 |
+ |
1057 |
|
1058 |
diff --git a/sys-devel/llvm/files/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix-3.8.patch b/sys-devel/llvm/files/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix-3.8.patch |
1059 |
new file mode 100644 |
1060 |
index 0000000..cf2ca59 |
1061 |
--- /dev/null |
1062 |
+++ b/sys-devel/llvm/files/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix-3.8.patch |
1063 |
@@ -0,0 +1,37 @@ |
1064 |
+diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp |
1065 |
+index fa7780f..e3a6c8f 100644 |
1066 |
+--- a/tools/clang/lib/Driver/Driver.cpp |
1067 |
++++ b/tools/clang/lib/Driver/Driver.cpp |
1068 |
+@@ -66,8 +66,7 @@ Driver::Driver(StringRef ClangExecutable, StringRef DefaultTargetTriple, |
1069 |
+ if (ClangResourceDir != "") { |
1070 |
+ llvm::sys::path::append(P, ClangResourceDir); |
1071 |
+ } else { |
1072 |
+- StringRef ClangLibdirSuffix(CLANG_LIBDIR_SUFFIX); |
1073 |
+- llvm::sys::path::append(P, "..", Twine("lib") + ClangLibdirSuffix, "clang", |
1074 |
++ llvm::sys::path::append(P, "..", "lib", "clang", |
1075 |
+ CLANG_VERSION_STRING); |
1076 |
+ } |
1077 |
+ ResourceDir = P.str(); |
1078 |
+diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp |
1079 |
+index f078b37..0c514fc 100644 |
1080 |
+--- a/tools/clang/lib/Frontend/CompilerInvocation.cpp |
1081 |
++++ b/tools/clang/lib/Frontend/CompilerInvocation.cpp |
1082 |
+@@ -1097,7 +1097,7 @@ std::string CompilerInvocation::GetResourcesPath(const char *Argv0, |
1083 |
+ if (ClangResourceDir != "") |
1084 |
+ llvm::sys::path::append(P, ClangResourceDir); |
1085 |
+ else |
1086 |
+- llvm::sys::path::append(P, "..", Twine("lib") + CLANG_LIBDIR_SUFFIX, |
1087 |
++ llvm::sys::path::append(P, "..", "lib", |
1088 |
+ "clang", CLANG_VERSION_STRING); |
1089 |
+ |
1090 |
+ return P.str(); |
1091 |
+diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt |
1092 |
+index 7de5fbe..49f439b 100644 |
1093 |
+--- a/tools/clang/lib/Headers/CMakeLists.txt |
1094 |
++++ b/tools/clang/lib/Headers/CMakeLists.txt |
1095 |
+@@ -98,4 +98,4 @@ set_target_properties(clang-headers PROPERTIES FOLDER "Misc") |
1096 |
+ install( |
1097 |
+ FILES ${files} ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h |
1098 |
+ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ |
1099 |
+- DESTINATION lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include) |
1100 |
++ DESTINATION lib/clang/${CLANG_VERSION}/include) |
1101 |
|
1102 |
diff --git a/sys-devel/llvm/files/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix.patch b/sys-devel/llvm/files/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix.patch |
1103 |
new file mode 100644 |
1104 |
index 0000000..904a72a |
1105 |
--- /dev/null |
1106 |
+++ b/sys-devel/llvm/files/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix.patch |
1107 |
@@ -0,0 +1,52 @@ |
1108 |
+From b28503def986bcbc388a04be0d51cbe80bc59506 Mon Sep 17 00:00:00 2001 |
1109 |
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
1110 |
+Date: Tue, 9 Jun 2015 12:11:50 +0200 |
1111 |
+Subject: [PATCH] Install clang runtime into /usr/lib (without suffix) |
1112 |
+ |
1113 |
+--- |
1114 |
+ lib/Driver/Driver.cpp | 3 +-- |
1115 |
+ lib/Frontend/CompilerInvocation.cpp | 3 +-- |
1116 |
+ lib/Headers/CMakeLists.txt | 2 +- |
1117 |
+ 3 files changed, 3 insertions(+), 5 deletions(-) |
1118 |
+ |
1119 |
+diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp |
1120 |
+index a04a1f8..418d46a 100644 |
1121 |
+--- a/tools/clang/lib/Driver/Driver.cpp |
1122 |
++++ b/tools/clang//lib/Driver/Driver.cpp |
1123 |
+@@ -66,8 +66,7 @@ Driver::Driver(StringRef ClangExecutable, StringRef DefaultTargetTriple, |
1124 |
+ if (ClangResourceDir != "") { |
1125 |
+ llvm::sys::path::append(P, ClangResourceDir); |
1126 |
+ } else { |
1127 |
+- StringRef ClangLibdirSuffix(CLANG_LIBDIR_SUFFIX); |
1128 |
+- llvm::sys::path::append(P, "..", Twine("lib") + ClangLibdirSuffix, "clang", |
1129 |
++ llvm::sys::path::append(P, "..", "lib", "clang", |
1130 |
+ CLANG_VERSION_STRING); |
1131 |
+ } |
1132 |
+ ResourceDir = P.str(); |
1133 |
+diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp |
1134 |
+index 9485767..0b9ecbd 100644 |
1135 |
+--- a/tools/clang/lib/Frontend/CompilerInvocation.cpp |
1136 |
++++ b/tools/clang/lib/Frontend/CompilerInvocation.cpp |
1137 |
+@@ -1053,8 +1053,7 @@ std::string CompilerInvocation::GetResourcesPath(const char *Argv0, |
1138 |
+ if (ClangResourceDir != "") { |
1139 |
+ llvm::sys::path::append(P, ClangResourceDir); |
1140 |
+ } else { |
1141 |
+- StringRef ClangLibdirSuffix(CLANG_LIBDIR_SUFFIX); |
1142 |
+- llvm::sys::path::append(P, "..", Twine("lib") + ClangLibdirSuffix, "clang", |
1143 |
++ llvm::sys::path::append(P, "..", "lib", "clang", |
1144 |
+ CLANG_VERSION_STRING); |
1145 |
+ } |
1146 |
+ |
1147 |
+diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt |
1148 |
+index 29a738e..3769d23 100644 |
1149 |
+--- a/tools/clang/lib/Headers/CMakeLists.txt |
1150 |
++++ b/tools/clang/lib/Headers/CMakeLists.txt |
1151 |
+@@ -93,4 +93,4 @@ set_target_properties(clang-headers PROPERTIES FOLDER "Misc") |
1152 |
+ install( |
1153 |
+ FILES ${files} ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h |
1154 |
+ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ |
1155 |
+- DESTINATION lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include) |
1156 |
++ DESTINATION lib/clang/${CLANG_VERSION}/include) |
1157 |
+-- |
1158 |
+2.4.3 |
1159 |
+ |
1160 |
|
1161 |
diff --git a/sys-devel/llvm/files/cmake/clang-0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch b/sys-devel/llvm/files/cmake/clang-0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch |
1162 |
new file mode 100644 |
1163 |
index 0000000..0b93deb |
1164 |
--- /dev/null |
1165 |
+++ b/sys-devel/llvm/files/cmake/clang-0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch |
1166 |
@@ -0,0 +1,28 @@ |
1167 |
+From d07632abe23d55eec2aae303a142a97765a77d32 Mon Sep 17 00:00:00 2001 |
1168 |
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
1169 |
+Date: Tue, 9 Jun 2015 12:20:06 +0200 |
1170 |
+Subject: [PATCH 2/2] cmake: Make CLANG_LIBDIR_SUFFIX overridable |
1171 |
+ |
1172 |
+Make CLANG_LIBDIR_SUFFIX a cache variable so that it can be explicitly |
1173 |
+overriden. It is used purely to find the LLVMgold.so plugin, so we want |
1174 |
+to set it to native suffix. |
1175 |
+--- |
1176 |
+ CMakeLists.txt | 2 +- |
1177 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
1178 |
+ |
1179 |
+diff --git a/CMakeLists.txt b/CMakeLists.txt |
1180 |
+index 357286b..647f976 100644 |
1181 |
+--- a/tools/clang/CMakeLists.txt |
1182 |
++++ b/tools/clang/CMakeLists.txt |
1183 |
+@@ -203,7 +203,7 @@ set(CLANG_VENDOR_UTI "org.llvm.clang" CACHE STRING |
1184 |
+ "Vendor-specific uti.") |
1185 |
+ |
1186 |
+ # The libdir suffix must exactly match whatever LLVM's configuration used. |
1187 |
+-set(CLANG_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}") |
1188 |
++set(CLANG_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}" CACHE STRING "") |
1189 |
+ |
1190 |
+ set(CLANG_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) |
1191 |
+ set(CLANG_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) |
1192 |
+-- |
1193 |
+2.4.3 |
1194 |
+ |
1195 |
|
1196 |
diff --git a/sys-devel/llvm/files/cmake/compiler-rt-0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi.patch b/sys-devel/llvm/files/cmake/compiler-rt-0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi.patch |
1197 |
new file mode 100644 |
1198 |
index 0000000..9353800 |
1199 |
--- /dev/null |
1200 |
+++ b/sys-devel/llvm/files/cmake/compiler-rt-0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi.patch |
1201 |
@@ -0,0 +1,25 @@ |
1202 |
+From 8bd62a681744d3c31a0837c0f84f99ea4987e017 Mon Sep 17 00:00:00 2001 |
1203 |
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
1204 |
+Date: Tue, 9 Jun 2015 12:17:57 +0200 |
1205 |
+Subject: [PATCH] cmake: Install compiler-rt into /usr/lib (without suffix) |
1206 |
+ |
1207 |
+--- |
1208 |
+ CMakeLists.txt | 2 +- |
1209 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
1210 |
+ |
1211 |
+diff --git a/CMakeLists.txt b/CMakeLists.txt |
1212 |
+index 0d8a880..5ae98a9 100644 |
1213 |
+--- a/projects/compiler-rt/CMakeLists.txt |
1214 |
++++ b/projects/compiler-rt/CMakeLists.txt |
1215 |
+@@ -52,7 +52,7 @@ if (NOT COMPILER_RT_STANDALONE_BUILD) |
1216 |
+ # Setup the paths where compiler-rt runtimes and headers should be stored. |
1217 |
+ set(COMPILER_RT_OUTPUT_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}) |
1218 |
+ set(COMPILER_RT_EXEC_OUTPUT_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR}) |
1219 |
+- set(COMPILER_RT_INSTALL_PATH lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}) |
1220 |
++ set(COMPILER_RT_INSTALL_PATH lib/clang/${CLANG_VERSION}) |
1221 |
+ option(COMPILER_RT_INCLUDE_TESTS "Generate and build compiler-rt unit tests." |
1222 |
+ ${LLVM_INCLUDE_TESTS}) |
1223 |
+ option(COMPILER_RT_ENABLE_WERROR "Fail and stop if warning is triggered" |
1224 |
+-- |
1225 |
+2.4.3 |
1226 |
+ |
1227 |
|
1228 |
diff --git a/sys-devel/llvm/files/cmake/llvm-3.7.0-ocaml-multilib.patch b/sys-devel/llvm/files/cmake/llvm-3.7.0-ocaml-multilib.patch |
1229 |
new file mode 100644 |
1230 |
index 0000000..caba3d1 |
1231 |
--- /dev/null |
1232 |
+++ b/sys-devel/llvm/files/cmake/llvm-3.7.0-ocaml-multilib.patch |
1233 |
@@ -0,0 +1,43 @@ |
1234 |
+--- llvm-3.7.0rc3.src-orig/cmake/modules/AddOCaml.cmake 2015-06-08 05:22:22.000000000 +1000 |
1235 |
++++ llvm-3.7.0rc3.src/cmake/modules/AddOCaml.cmake 2015-08-30 19:22:37.216580808 +1000 |
1236 |
+@@ -131,7 +131,7 @@ |
1237 |
+ if( APPLE ) |
1238 |
+ set(ocaml_rpath "@executable_path/../../lib") |
1239 |
+ elseif( UNIX ) |
1240 |
+- set(ocaml_rpath "\\$ORIGIN/../../lib") |
1241 |
++ set(ocaml_rpath "\\$ORIGIN/../../${CMAKE_INSTALL_LIBDIR}") |
1242 |
+ endif() |
1243 |
+ list(APPEND ocaml_flags "-ldopt" "-Wl,-rpath,${ocaml_rpath}") |
1244 |
+ |
1245 |
+@@ -183,12 +183,12 @@ |
1246 |
+ endforeach() |
1247 |
+ |
1248 |
+ install(FILES ${install_files} |
1249 |
+- DESTINATION lib/ocaml) |
1250 |
++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/ocaml) |
1251 |
+ install(FILES ${install_shlibs} |
1252 |
+ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE |
1253 |
+ GROUP_READ GROUP_EXECUTE |
1254 |
+ WORLD_READ WORLD_EXECUTE |
1255 |
+- DESTINATION lib/ocaml) |
1256 |
++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/ocaml) |
1257 |
+ |
1258 |
+ foreach( install_file ${install_files} ${install_shlibs} ) |
1259 |
+ get_filename_component(filename "${install_file}" NAME) |
1260 |
+--- llvm-3.7.0rc3.src-orig/bindings/ocaml/backends/CMakeLists.txt 2014-12-30 14:24:07.000000000 +1100 |
1261 |
++++ llvm-3.7.0rc3.src/bindings/ocaml/backends/CMakeLists.txt 2015-08-30 19:23:49.726583886 +1000 |
1262 |
+@@ -23,5 +23,5 @@ |
1263 |
+ "${LLVM_LIBRARY_DIR}/ocaml/META.llvm_${TARGET}") |
1264 |
+ |
1265 |
+ install(FILES "${LLVM_LIBRARY_DIR}/ocaml/META.llvm_${TARGET}" |
1266 |
+- DESTINATION lib/ocaml) |
1267 |
++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/ocaml) |
1268 |
+ endforeach() |
1269 |
+--- llvm-3.7.0rc3.src-orig/bindings/ocaml/llvm/CMakeLists.txt 2014-12-30 14:24:07.000000000 +1100 |
1270 |
++++ llvm-3.7.0rc3.src/bindings/ocaml/llvm/CMakeLists.txt 2015-08-30 19:23:43.561583624 +1000 |
1271 |
+@@ -8,4 +8,4 @@ |
1272 |
+ "${LLVM_LIBRARY_DIR}/ocaml/META.llvm") |
1273 |
+ |
1274 |
+ install(FILES "${LLVM_LIBRARY_DIR}/ocaml/META.llvm" |
1275 |
+- DESTINATION lib/ocaml) |
1276 |
++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/ocaml) |
1277 |
|
1278 |
diff --git a/sys-devel/llvm/files/cmake/llvm-3.8-allow_custom_cmake_build_types.patch b/sys-devel/llvm/files/cmake/llvm-3.8-allow_custom_cmake_build_types.patch |
1279 |
new file mode 100644 |
1280 |
index 0000000..e42c08a |
1281 |
--- /dev/null |
1282 |
+++ b/sys-devel/llvm/files/cmake/llvm-3.8-allow_custom_cmake_build_types.patch |
1283 |
@@ -0,0 +1,14 @@ |
1284 |
+--- a/CMakeLists.txt 2015-08-12 20:04:55.397881480 +0200 |
1285 |
++++ b/CMakeLists.txt 2015-08-12 20:05:06.625741113 +0200 |
1286 |
+@@ -152,11 +152,6 @@ |
1287 |
+ |
1288 |
+ string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE) |
1289 |
+ |
1290 |
+-if (CMAKE_BUILD_TYPE AND |
1291 |
+- NOT uppercase_CMAKE_BUILD_TYPE MATCHES "^(DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL)$") |
1292 |
+- message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") |
1293 |
+-endif() |
1294 |
+- |
1295 |
+ set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" ) |
1296 |
+ |
1297 |
+ # They are used as destination of target generators. |
1298 |
|
1299 |
diff --git a/sys-devel/llvm/files/llvm-2.6-commandguide-nops.patch b/sys-devel/llvm/files/llvm-2.6-commandguide-nops.patch |
1300 |
new file mode 100644 |
1301 |
index 0000000..583fdf9 |
1302 |
--- /dev/null |
1303 |
+++ b/sys-devel/llvm/files/llvm-2.6-commandguide-nops.patch |
1304 |
@@ -0,0 +1,30 @@ |
1305 |
+--- docs/CommandGuide/Makefile.orig 2009-10-26 16:54:33.000000000 +0100 |
1306 |
++++ docs/CommandGuide/Makefile 2009-10-26 17:32:03.000000000 +0100 |
1307 |
+@@ -19,7 +19,7 @@ |
1308 |
+ DST_PS_DIR=ps/ |
1309 |
+ |
1310 |
+ # If we are in BUILD_FOR_WEBSITE mode, default to the all target. |
1311 |
+-all:: html man ps |
1312 |
++all:: html man |
1313 |
+ |
1314 |
+ clean: |
1315 |
+ rm -f pod2htm*.*~~ $(HTML) $(MAN) $(PS) |
1316 |
+@@ -81,7 +81,7 @@ |
1317 |
+ MAN_DIR := $(PROJ_mandir)/man1 |
1318 |
+ PS_DIR := $(PROJ_docsdir)/ps |
1319 |
+ |
1320 |
+-install-local:: $(HTML) $(INSTALL_MANS) $(PS) |
1321 |
++install-local:: $(HTML) $(INSTALL_MANS) |
1322 |
+ $(Echo) Installing HTML CommandGuide Documentation |
1323 |
+ $(Verb) $(MKDIR) $(HTML_DIR) |
1324 |
+ $(Verb) $(DataInstall) $(HTML) $(HTML_DIR) |
1325 |
+@@ -90,9 +90,6 @@ |
1326 |
+ $(Echo) Installing MAN CommandGuide Documentation |
1327 |
+ $(Verb) $(MKDIR) $(MAN_DIR) |
1328 |
+ $(Verb) $(DataInstall) $(INSTALL_MANS) $(MAN_DIR) |
1329 |
+- $(Echo) Installing PS CommandGuide Documentation |
1330 |
+- $(Verb) $(MKDIR) $(PS_DIR) |
1331 |
+- $(Verb) $(DataInstall) $(PS) $(PS_DIR) |
1332 |
+ |
1333 |
+ uninstall-local:: |
1334 |
+ $(Echo) Uninstalling CommandGuide Documentation |
1335 |
|
1336 |
diff --git a/sys-devel/llvm/files/llvm-2.7-nodoctargz.patch b/sys-devel/llvm/files/llvm-2.7-nodoctargz.patch |
1337 |
new file mode 100644 |
1338 |
index 0000000..cce09eb |
1339 |
--- /dev/null |
1340 |
+++ b/sys-devel/llvm/files/llvm-2.7-nodoctargz.patch |
1341 |
@@ -0,0 +1,47 @@ |
1342 |
+--- docs/Makefile.orig 2010-04-26 15:00:58.000000000 +0200 |
1343 |
++++ docs/Makefile 2010-04-26 15:03:12.000000000 +0200 |
1344 |
+@@ -46,13 +46,12 @@ |
1345 |
+ # 'make generated BUILD_FOR_WEBSITE=1' |
1346 |
+ generated:: doxygen ocamldoc |
1347 |
+ |
1348 |
+-install-html: $(PROJ_OBJ_DIR)/html.tar.gz |
1349 |
++install-html: |
1350 |
+ $(Echo) Installing HTML documentation |
1351 |
+ $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html |
1352 |
+ $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html/img |
1353 |
+ $(Verb) $(DataInstall) $(HTML) $(DESTDIR)$(PROJ_docsdir)/html |
1354 |
+ $(Verb) $(DataInstall) $(IMAGES) $(DESTDIR)$(PROJ_docsdir)/html/img |
1355 |
+- $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/html.tar.gz $(DESTDIR)$(PROJ_docsdir) |
1356 |
+ |
1357 |
+ $(PROJ_OBJ_DIR)/html.tar.gz: $(HTML) |
1358 |
+ $(Echo) Packaging HTML documentation |
1359 |
+@@ -64,12 +63,11 @@ |
1360 |
+ install-doxygen: doxygen |
1361 |
+ $(Echo) Installing doxygen documentation |
1362 |
+ $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html/doxygen |
1363 |
+- $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/doxygen.tar.gz $(DESTDIR)$(PROJ_docsdir) |
1364 |
+ $(Verb) cd $(PROJ_OBJ_DIR)/doxygen && \ |
1365 |
+ $(FIND) . -type f -exec \ |
1366 |
+ $(DataInstall) {} $(DESTDIR)$(PROJ_docsdir)/html/doxygen \; |
1367 |
+ |
1368 |
+-doxygen: regendoc $(PROJ_OBJ_DIR)/doxygen.tar.gz |
1369 |
++doxygen: regendoc |
1370 |
+ |
1371 |
+ regendoc: |
1372 |
+ $(Echo) Building doxygen documentation |
1373 |
+@@ -95,7 +93,6 @@ |
1374 |
+ install-ocamldoc: ocamldoc |
1375 |
+ $(Echo) Installing ocamldoc documentation |
1376 |
+ $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/ocamldoc/html |
1377 |
+- $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/ocamldoc.tar.gz $(DESTDIR)$(PROJ_docsdir) |
1378 |
+ $(Verb) cd $(PROJ_OBJ_DIR)/ocamldoc && \ |
1379 |
+ $(FIND) . -type f -exec \ |
1380 |
+ $(DataInstall) {} $(DESTDIR)$(PROJ_docsdir)/ocamldoc/html \; |
1381 |
+@@ -105,7 +102,6 @@ |
1382 |
+ $(Verb) $(RM) -rf $(PROJ_OBJ_DIR)/ocamldoc.tar* |
1383 |
+ $(Verb) $(TAR) cf $(PROJ_OBJ_DIR)/ocamldoc.tar ocamldoc |
1384 |
+ $(Verb) $(GZIP) $(PROJ_OBJ_DIR)/ocamldoc.tar |
1385 |
+- $(Verb) $(CP) $(PROJ_OBJ_DIR)/ocamldoc.tar.gz $(PROJ_OBJ_DIR)/ocamldoc/html/ |
1386 |
+ |
1387 |
+ regen-ocamldoc: |
1388 |
+ $(Echo) Building ocamldoc documentation |
1389 |
|
1390 |
diff --git a/sys-devel/llvm/files/llvm-2.8-alignof.patch b/sys-devel/llvm/files/llvm-2.8-alignof.patch |
1391 |
new file mode 100644 |
1392 |
index 0000000..ae7f314 |
1393 |
--- /dev/null |
1394 |
+++ b/sys-devel/llvm/files/llvm-2.8-alignof.patch |
1395 |
@@ -0,0 +1,59 @@ |
1396 |
+Index: include/llvm/ADT/StringMap.h |
1397 |
+=================================================================== |
1398 |
+--- include/llvm/ADT/StringMap.h (révision 117773) |
1399 |
++++ include/llvm/ADT/StringMap.h (révision 117774) |
1400 |
+@@ -167,7 +167,7 @@ |
1401 |
+ |
1402 |
+ unsigned AllocSize = static_cast<unsigned>(sizeof(StringMapEntry))+ |
1403 |
+ KeyLength+1; |
1404 |
+- unsigned Alignment = alignof<StringMapEntry>(); |
1405 |
++ unsigned Alignment = alignOf<StringMapEntry>(); |
1406 |
+ |
1407 |
+ StringMapEntry *NewItem = |
1408 |
+ static_cast<StringMapEntry*>(Allocator.Allocate(AllocSize,Alignment)); |
1409 |
+Index: include/llvm/Support/AlignOf.h |
1410 |
+=================================================================== |
1411 |
+--- include/llvm/Support/AlignOf.h (révision 117773) |
1412 |
++++ include/llvm/Support/AlignOf.h (révision 117774) |
1413 |
+@@ -49,12 +49,12 @@ |
1414 |
+ |
1415 |
+ }; |
1416 |
+ |
1417 |
+-/// alignof - A templated function that returns the mininum alignment of |
1418 |
++/// alignOf - A templated function that returns the mininum alignment of |
1419 |
+ /// of a type. This provides no extra functionality beyond the AlignOf |
1420 |
+ /// class besides some cosmetic cleanliness. Example usage: |
1421 |
+-/// alignof<int>() returns the alignment of an int. |
1422 |
++/// alignOf<int>() returns the alignment of an int. |
1423 |
+ template <typename T> |
1424 |
+-static inline unsigned alignof() { return AlignOf<T>::Alignment; } |
1425 |
++static inline unsigned alignOf() { return AlignOf<T>::Alignment; } |
1426 |
+ |
1427 |
+ } // end namespace llvm |
1428 |
+ #endif |
1429 |
+Index: include/llvm/Support/Allocator.h |
1430 |
+=================================================================== |
1431 |
+--- include/llvm/Support/Allocator.h (révision 117773) |
1432 |
++++ include/llvm/Support/Allocator.h (révision 117774) |
1433 |
+@@ -201,7 +201,7 @@ |
1434 |
+ char *End = Slab == Allocator.CurSlab ? Allocator.CurPtr : |
1435 |
+ (char *)Slab + Slab->Size; |
1436 |
+ for (char *Ptr = (char*)(Slab+1); Ptr < End; Ptr += sizeof(T)) { |
1437 |
+- Ptr = Allocator.AlignPtr(Ptr, alignof<T>()); |
1438 |
++ Ptr = Allocator.AlignPtr(Ptr, alignOf<T>()); |
1439 |
+ if (Ptr + sizeof(T) <= End) |
1440 |
+ reinterpret_cast<T*>(Ptr)->~T(); |
1441 |
+ } |
1442 |
+Index: include/llvm/CodeGen/SlotIndexes.h |
1443 |
+=================================================================== |
1444 |
+--- include/llvm/CodeGen/SlotIndexes.h (révision 117773) |
1445 |
++++ include/llvm/CodeGen/SlotIndexes.h (révision 117774) |
1446 |
+@@ -393,7 +393,7 @@ |
1447 |
+ IndexListEntry *entry = |
1448 |
+ static_cast<IndexListEntry*>( |
1449 |
+ ileAllocator.Allocate(sizeof(IndexListEntry), |
1450 |
+- alignof<IndexListEntry>())); |
1451 |
++ alignOf<IndexListEntry>())); |
1452 |
+ |
1453 |
+ new (entry) IndexListEntry(mi, index); |
1454 |
+ |
1455 |
|
1456 |
diff --git a/sys-devel/llvm/files/llvm-2.8-darwin8.patch b/sys-devel/llvm/files/llvm-2.8-darwin8.patch |
1457 |
new file mode 100644 |
1458 |
index 0000000..284ab47 |
1459 |
--- /dev/null |
1460 |
+++ b/sys-devel/llvm/files/llvm-2.8-darwin8.patch |
1461 |
@@ -0,0 +1,15 @@ |
1462 |
+Avoid like in Makefile.rules |
1463 |
+ld: -rpath can only be used when targeting Mac OS X 10.5 or later |
1464 |
+ |
1465 |
+--- unittests/Makefile.unittest |
1466 |
++++ unittests/Makefile.unittest |
1467 |
+@@ -37,7 +37,9 @@ |
1468 |
+ ifeq ($(ENABLE_SHARED), 1) |
1469 |
+ # Add the absolute path to the dynamic library. This is ok because |
1470 |
+ # we'll never install unittests. |
1471 |
++ifneq ($(DARWIN_MAJVERS),4) |
1472 |
+ LD.Flags += $(RPATH) -Wl,$(SharedLibDir) |
1473 |
++endif |
1474 |
+ # Also set {DYLD,LD}_LIBRARY_PATH because OSX ignores the rpath most |
1475 |
+ # of the time. |
1476 |
+ Run.Shared := $(SHLIBPATH_VAR)="$(SharedLibDir)$${$(SHLIBPATH_VAR):+:}$$$(SHLIBPATH_VAR)" |
1477 |
|
1478 |
diff --git a/sys-devel/llvm/files/llvm-2.9-Operator.h-c++0x.patch b/sys-devel/llvm/files/llvm-2.9-Operator.h-c++0x.patch |
1479 |
new file mode 100644 |
1480 |
index 0000000..b95d7d7 |
1481 |
--- /dev/null |
1482 |
+++ b/sys-devel/llvm/files/llvm-2.9-Operator.h-c++0x.patch |
1483 |
@@ -0,0 +1,57 @@ |
1484 |
+--- llvm/trunk/include/llvm/Operator.h 2011/02/07 16:40:21 125006 |
1485 |
++++ llvm/trunk/include/llvm/Operator.h 2011/05/08 01:59:22 131062 |
1486 |
+@@ -186,28 +186,46 @@ |
1487 |
+ }; |
1488 |
+ |
1489 |
+ class AddOperator |
1490 |
+- : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Add> {}; |
1491 |
++ : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Add> { |
1492 |
++ ~AddOperator(); // DO NOT IMPLEMENT |
1493 |
++}; |
1494 |
+ class SubOperator |
1495 |
+- : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Sub> {}; |
1496 |
++ : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Sub> { |
1497 |
++ ~SubOperator(); // DO NOT IMPLEMENT |
1498 |
++}; |
1499 |
+ class MulOperator |
1500 |
+- : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Mul> {}; |
1501 |
++ : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Mul> { |
1502 |
++ ~MulOperator(); // DO NOT IMPLEMENT |
1503 |
++}; |
1504 |
+ class ShlOperator |
1505 |
+- : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Shl> {}; |
1506 |
++ : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Shl> { |
1507 |
++ ~ShlOperator(); // DO NOT IMPLEMENT |
1508 |
++}; |
1509 |
+ |
1510 |
+ |
1511 |
+ class SDivOperator |
1512 |
+- : public ConcreteOperator<PossiblyExactOperator, Instruction::SDiv> {}; |
1513 |
++ : public ConcreteOperator<PossiblyExactOperator, Instruction::SDiv> { |
1514 |
++ ~SDivOperator(); // DO NOT IMPLEMENT |
1515 |
++}; |
1516 |
+ class UDivOperator |
1517 |
+- : public ConcreteOperator<PossiblyExactOperator, Instruction::UDiv> {}; |
1518 |
++ : public ConcreteOperator<PossiblyExactOperator, Instruction::UDiv> { |
1519 |
++ ~UDivOperator(); // DO NOT IMPLEMENT |
1520 |
++}; |
1521 |
+ class AShrOperator |
1522 |
+- : public ConcreteOperator<PossiblyExactOperator, Instruction::AShr> {}; |
1523 |
++ : public ConcreteOperator<PossiblyExactOperator, Instruction::AShr> { |
1524 |
++ ~AShrOperator(); // DO NOT IMPLEMENT |
1525 |
++}; |
1526 |
+ class LShrOperator |
1527 |
+- : public ConcreteOperator<PossiblyExactOperator, Instruction::LShr> {}; |
1528 |
++ : public ConcreteOperator<PossiblyExactOperator, Instruction::LShr> { |
1529 |
++ ~LShrOperator(); // DO NOT IMPLEMENT |
1530 |
++}; |
1531 |
+ |
1532 |
+ |
1533 |
+ |
1534 |
+ class GEPOperator |
1535 |
+ : public ConcreteOperator<Operator, Instruction::GetElementPtr> { |
1536 |
++ ~GEPOperator(); // DO NOT IMPLEMENT |
1537 |
++ |
1538 |
+ enum { |
1539 |
+ IsInBounds = (1 << 0) |
1540 |
+ }; |
1541 |
|
1542 |
diff --git a/sys-devel/llvm/files/llvm-2.9-gcc4.7.patch b/sys-devel/llvm/files/llvm-2.9-gcc4.7.patch |
1543 |
new file mode 100644 |
1544 |
index 0000000..a48ad96 |
1545 |
--- /dev/null |
1546 |
+++ b/sys-devel/llvm/files/llvm-2.9-gcc4.7.patch |
1547 |
@@ -0,0 +1,14 @@ |
1548 |
+--- |
1549 |
+ Intercept.cpp | 1 + |
1550 |
+ 1 file changed, 1 insertion(+) |
1551 |
+ |
1552 |
+--- a/lib/ExecutionEngine/JIT/Intercept.cpp 2012-05-17 16:11:46.956180361 +0200 |
1553 |
++++ b/lib/ExecutionEngine/JIT/Intercept.cpp 2012-05-17 16:14:35.256184996 +0200 |
1554 |
+@@ -52,6 +52,7 @@ |
1555 |
+ #include <sys/stat.h> |
1556 |
+ #endif |
1557 |
+ #include <fcntl.h> |
1558 |
++#include <unistd.h> |
1559 |
+ /* stat functions are redirecting to __xstat with a version number. On x86-64 |
1560 |
+ * linking with libc_nonshared.a and -Wl,--export-dynamic doesn't make 'stat' |
1561 |
+ * available as an exported symbol, so we have to add it explicitly. |
1562 |
|
1563 |
diff --git a/sys-devel/llvm/files/llvm-2.9-nodoctargz.patch b/sys-devel/llvm/files/llvm-2.9-nodoctargz.patch |
1564 |
new file mode 100644 |
1565 |
index 0000000..9507817 |
1566 |
--- /dev/null |
1567 |
+++ b/sys-devel/llvm/files/llvm-2.9-nodoctargz.patch |
1568 |
@@ -0,0 +1,39 @@ |
1569 |
+--- docs/Makefile.orig 2011-02-28 21:30:46.000000000 +0100 |
1570 |
++++ docs/Makefile 2011-02-28 21:35:22.000000000 +0100 |
1571 |
+@@ -53,13 +53,12 @@ |
1572 |
+ # 'make generated BUILD_FOR_WEBSITE=1' |
1573 |
+ generated:: $(generated_targets) |
1574 |
+ |
1575 |
+-install-html: $(PROJ_OBJ_DIR)/html.tar.gz |
1576 |
++install-html: |
1577 |
+ $(Echo) Installing HTML documentation |
1578 |
+ $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html |
1579 |
+ $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html/img |
1580 |
+ $(Verb) $(DataInstall) $(HTML) $(DESTDIR)$(PROJ_docsdir)/html |
1581 |
+ $(Verb) $(DataInstall) $(IMAGES) $(DESTDIR)$(PROJ_docsdir)/html/img |
1582 |
+- $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/html.tar.gz $(DESTDIR)$(PROJ_docsdir) |
1583 |
+ |
1584 |
+ $(PROJ_OBJ_DIR)/html.tar.gz: $(HTML) |
1585 |
+ $(Echo) Packaging HTML documentation |
1586 |
+@@ -71,12 +70,11 @@ |
1587 |
+ install-doxygen: doxygen |
1588 |
+ $(Echo) Installing doxygen documentation |
1589 |
+ $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html/doxygen |
1590 |
+- $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/doxygen.tar.gz $(DESTDIR)$(PROJ_docsdir) |
1591 |
+ $(Verb) cd $(PROJ_OBJ_DIR)/doxygen && \ |
1592 |
+ $(FIND) . -type f -exec \ |
1593 |
+ $(DataInstall) {} $(DESTDIR)$(PROJ_docsdir)/html/doxygen \; |
1594 |
+ |
1595 |
+-doxygen: regendoc $(PROJ_OBJ_DIR)/doxygen.tar.gz |
1596 |
++doxygen: regendoc |
1597 |
+ |
1598 |
+ regendoc: |
1599 |
+ $(Echo) Building doxygen documentation |
1600 |
+@@ -102,7 +100,6 @@ |
1601 |
+ install-ocamldoc: ocamldoc |
1602 |
+ $(Echo) Installing ocamldoc documentation |
1603 |
+ $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/ocamldoc/html |
1604 |
+- $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/ocamldoc.tar.gz $(DESTDIR)$(PROJ_docsdir) |
1605 |
+ $(Verb) cd $(PROJ_OBJ_DIR)/ocamldoc && \ |
1606 |
+ $(FIND) . -type f -exec \ |
1607 |
+ $(DataInstall) {} $(DESTDIR)$(PROJ_docsdir)/ocamldoc/html \; |
1608 |
|
1609 |
diff --git a/sys-devel/llvm/files/llvm-3.0-PPCCompilationCallbackC_static.patch b/sys-devel/llvm/files/llvm-3.0-PPCCompilationCallbackC_static.patch |
1610 |
new file mode 100644 |
1611 |
index 0000000..04e4024 |
1612 |
--- /dev/null |
1613 |
+++ b/sys-devel/llvm/files/llvm-3.0-PPCCompilationCallbackC_static.patch |
1614 |
@@ -0,0 +1,27 @@ |
1615 |
+https://bugs.gentoo.org/show_bug.cgi?id=403519 |
1616 |
+http://llvm.org/viewvc/llvm-project?view=rev&revision=153938 |
1617 |
+ |
1618 |
+--- llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp 2011/06/15 15:29:47 133059 |
1619 |
++++ llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp 2012/04/03 06:59:28 153938 |
1620 |
+@@ -291,9 +291,10 @@ |
1621 |
+ } |
1622 |
+ #endif |
1623 |
+ |
1624 |
+-extern "C" void *PPCCompilationCallbackC(unsigned *StubCallAddrPlus4, |
1625 |
+- unsigned *OrigCallAddrPlus4, |
1626 |
+- bool is64Bit) { |
1627 |
++extern "C" { |
1628 |
++static void* LLVM_ATTRIBUTE_USED PPCCompilationCallbackC(unsigned *StubCallAddrPlus4, |
1629 |
++ unsigned *OrigCallAddrPlus4, |
1630 |
++ bool is64Bit) { |
1631 |
+ // Adjust the pointer to the address of the call instruction in the stub |
1632 |
+ // emitted by emitFunctionStub, rather than the instruction after it. |
1633 |
+ unsigned *StubCallAddr = StubCallAddrPlus4 - 1; |
1634 |
+@@ -337,6 +338,7 @@ |
1635 |
+ // stack after we restore all regs. |
1636 |
+ return Target; |
1637 |
+ } |
1638 |
++} |
1639 |
+ |
1640 |
+ |
1641 |
+ |
1642 |
|
1643 |
diff --git a/sys-devel/llvm/files/llvm-3.0-PPC_macro.patch b/sys-devel/llvm/files/llvm-3.0-PPC_macro.patch |
1644 |
new file mode 100644 |
1645 |
index 0000000..c485e9b |
1646 |
--- /dev/null |
1647 |
+++ b/sys-devel/llvm/files/llvm-3.0-PPC_macro.patch |
1648 |
@@ -0,0 +1,43 @@ |
1649 |
+Index: llvm-3.0-3.0/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h |
1650 |
+=================================================================== |
1651 |
+--- llvm-3.0-3.0.orig/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h 2011-07-25 23:24:55.000000000 +0000 |
1652 |
++++ llvm-3.0-3.0/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h 2011-12-02 13:06:48.000000000 +0000 |
1653 |
+@@ -34,6 +34,10 @@ |
1654 |
+ |
1655 |
+ } // End llvm namespace |
1656 |
+ |
1657 |
++// Generated files will use "namespace PPC". To avoid symbol clash, |
1658 |
++// undefine PPC here. PPC may be predefined on some hosts. |
1659 |
++#undef PPC |
1660 |
++ |
1661 |
+ // Defines symbolic names for PowerPC registers. This defines a mapping from |
1662 |
+ // register name to register number. |
1663 |
+ // |
1664 |
+Index: llvm-3.0-3.0/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h |
1665 |
+=================================================================== |
1666 |
+--- llvm-3.0-3.0.orig/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h 2011-07-26 00:24:13.000000000 +0000 |
1667 |
++++ llvm-3.0-3.0/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h 2011-12-02 13:06:48.000000000 +0000 |
1668 |
+@@ -14,6 +14,10 @@ |
1669 |
+ #ifndef LLVM_TARGET_POWERPC_PPCPREDICATES_H |
1670 |
+ #define LLVM_TARGET_POWERPC_PPCPREDICATES_H |
1671 |
+ |
1672 |
++// Generated files will use "namespace PPC". To avoid symbol clash, |
1673 |
++// undefine PPC here. PPC may be predefined on some hosts. |
1674 |
++#undef PPC |
1675 |
++ |
1676 |
+ namespace llvm { |
1677 |
+ namespace PPC { |
1678 |
+ /// Predicate - These are "(BI << 5) | BO" for various predicates. |
1679 |
+Index: llvm-3.0-3.0/lib/Target/PowerPC/MCTargetDesc/PPCFixupKinds.h |
1680 |
+=================================================================== |
1681 |
+--- llvm-3.0-3.0.orig/lib/Target/PowerPC/MCTargetDesc/PPCFixupKinds.h 2011-07-25 19:53:23.000000000 +0000 |
1682 |
++++ llvm-3.0-3.0/lib/Target/PowerPC/MCTargetDesc/PPCFixupKinds.h 2011-12-02 16:21:23.000000000 +0000 |
1683 |
+@@ -12,6 +12,8 @@ |
1684 |
+ |
1685 |
+ #include "llvm/MC/MCFixup.h" |
1686 |
+ |
1687 |
++#undef PPC |
1688 |
++ |
1689 |
+ namespace llvm { |
1690 |
+ namespace PPC { |
1691 |
+ enum Fixups { |
1692 |
|
1693 |
diff --git a/sys-devel/llvm/files/llvm-3.0-gold_LTO_link.patch b/sys-devel/llvm/files/llvm-3.0-gold_LTO_link.patch |
1694 |
new file mode 100644 |
1695 |
index 0000000..031448d |
1696 |
--- /dev/null |
1697 |
+++ b/sys-devel/llvm/files/llvm-3.0-gold_LTO_link.patch |
1698 |
@@ -0,0 +1,10 @@ |
1699 |
+--- tools/gold/Makefile 2011/11/23 03:03:21 145094 |
1700 |
++++ tools/gold/Makefile 2011/11/23 03:07:25 145095 |
1701 |
+@@ -24,6 +24,6 @@ |
1702 |
+ # Because off_t is used in the public API, the largefile parts are required for |
1703 |
+ # ABI compatibility. |
1704 |
+ CXXFLAGS+=-I$(BINUTILS_INCDIR) -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 |
1705 |
+-CXXFLAGS+=$(SharedLibDir)/$(SharedPrefix)LTO$(SHLIBEXT) |
1706 |
++CXXFLAGS+=-L$(SharedLibDir)/$(SharedPrefix) -lLTO |
1707 |
+ |
1708 |
+ include $(LEVEL)/Makefile.common |
1709 |
|
1710 |
diff --git a/sys-devel/llvm/files/llvm-3.0-ocaml_install.patch b/sys-devel/llvm/files/llvm-3.0-ocaml_install.patch |
1711 |
new file mode 100644 |
1712 |
index 0000000..18f5cf6 |
1713 |
--- /dev/null |
1714 |
+++ b/sys-devel/llvm/files/llvm-3.0-ocaml_install.patch |
1715 |
@@ -0,0 +1,16 @@ |
1716 |
+https://bugs.gentoo.org/show_bug.cgi?id=393023 |
1717 |
+http://llvm.org/bugs/show_bug.cgi?id=11177 |
1718 |
+ |
1719 |
+Index: llvm-3.0-3.0/bindings/ocaml/llvm/Makefile |
1720 |
+=================================================================== |
1721 |
+--- llvm-3.0-3.0.orig/bindings/ocaml/llvm/Makefile 2011-11-15 12:17:02.785987852 +0100 |
1722 |
++++ llvm-3.0-3.0/bindings/ocaml/llvm/Makefile 2011-11-15 12:20:12.661983615 +0100 |
1723 |
+@@ -30,7 +30,7 @@ |
1724 |
+ $(OcamlDir)/META.llvm: META.llvm |
1725 |
+ $(Verb) $(CP) -f $< $@ |
1726 |
+ |
1727 |
+-install-meta:: $(ObjDir)/META.llvm |
1728 |
++install-meta:: $(ObjDir)/../META.llvm |
1729 |
+ $(Echo) "Install $(BuildMode) $(DestMETA)" |
1730 |
+ $(Verb) $(MKDIR) $(PROJ_libocamldir) |
1731 |
+ $(Verb) $(DataInstall) META.llvm "$(DestMETA)" |
1732 |
|
1733 |
diff --git a/sys-devel/llvm/files/llvm-3.0-set_soname.patch b/sys-devel/llvm/files/llvm-3.0-set_soname.patch |
1734 |
new file mode 100644 |
1735 |
index 0000000..69ba74d |
1736 |
--- /dev/null |
1737 |
+++ b/sys-devel/llvm/files/llvm-3.0-set_soname.patch |
1738 |
@@ -0,0 +1,12 @@ |
1739 |
+https://bugs.gentoo.org/show_bug.cgi?id=409267 |
1740 |
+http://llvm.org/bugs/show_bug.cgi?id=12334 |
1741 |
+--- tools/llvm-shlib/Makefile.orig 2012-03-26 18:14:13.071797115 +0200 |
1742 |
++++ tools/llvm-shlib/Makefile 2012-03-26 17:31:12.491196254 +0200 |
1743 |
+@@ -67,6 +67,7 @@ |
1744 |
+ # Include everything from the .a's into the shared library. |
1745 |
+ LLVMLibsOptions := -Wl,--whole-archive $(LLVMLibsOptions) \ |
1746 |
+ -Wl,--no-whole-archive |
1747 |
++ LLVMLibsOptions += -Wl,--soname,lib$(LIBRARYNAME)$(SHLIBEXT) |
1748 |
+ endif |
1749 |
+ |
1750 |
+ ifeq ($(HOST_OS),Linux) |
1751 |
|
1752 |
diff --git a/sys-devel/llvm/files/llvm-3.1-ExecutionEngine_tests_xfail_arm.patch b/sys-devel/llvm/files/llvm-3.1-ExecutionEngine_tests_xfail_arm.patch |
1753 |
new file mode 100644 |
1754 |
index 0000000..05a20e6 |
1755 |
--- /dev/null |
1756 |
+++ b/sys-devel/llvm/files/llvm-3.1-ExecutionEngine_tests_xfail_arm.patch |
1757 |
@@ -0,0 +1,27 @@ |
1758 |
+diff -Naur llvm-3.1.src/test/ExecutionEngine/2002-12-16-ArgTest.ll llvm.src/test/ExecutionEngine/2002-12-16-ArgTest.ll |
1759 |
+--- llvm-3.1.src/test/ExecutionEngine/2002-12-16-ArgTest.ll 2012-04-12 22:13:57.000000000 +0200 |
1760 |
++++ llvm.src/test/ExecutionEngine/2002-12-16-ArgTest.ll 2012-10-08 15:06:30.000000000 +0200 |
1761 |
+@@ -1,4 +1,5 @@ |
1762 |
+ ; RUN: %lli %s > /dev/null |
1763 |
++; XFAIL: arm |
1764 |
+ |
1765 |
+ @.LC0 = internal global [10 x i8] c"argc: %d\0A\00" ; <[10 x i8]*> [#uses=1] |
1766 |
+ |
1767 |
+diff -Naur llvm-3.1.src/test/ExecutionEngine/test-fp-no-external-funcs.ll llvm.src/test/ExecutionEngine/test-fp-no-external-funcs.ll |
1768 |
+--- llvm-3.1.src/test/ExecutionEngine/test-fp-no-external-funcs.ll 2012-04-12 22:13:57.000000000 +0200 |
1769 |
++++ llvm.src/test/ExecutionEngine/test-fp-no-external-funcs.ll 2012-10-08 15:06:30.000000000 +0200 |
1770 |
+@@ -1,4 +1,5 @@ |
1771 |
+ ; RUN: %lli %s > /dev/null |
1772 |
++; XFAIL: arm |
1773 |
+ |
1774 |
+ define double @test(double* %DP, double %Arg) { |
1775 |
+ %D = load double* %DP ; <double> [#uses=1] |
1776 |
+diff -Naur llvm-3.1.src/test/ExecutionEngine/test-fp.ll llvm.src/test/ExecutionEngine/test-fp.ll |
1777 |
+--- llvm-3.1.src/test/ExecutionEngine/test-fp.ll 2012-04-12 22:13:57.000000000 +0200 |
1778 |
++++ llvm.src/test/ExecutionEngine/test-fp.ll 2012-10-08 15:06:30.000000000 +0200 |
1779 |
+@@ -1,4 +1,5 @@ |
1780 |
+ ; RUN: %lli %s > /dev/null |
1781 |
++; XFAIL: arm |
1782 |
+ |
1783 |
+ define double @test(double* %DP, double %Arg) { |
1784 |
+ %D = load double* %DP ; <double> [#uses=1] |
1785 |
|
1786 |
diff --git a/sys-devel/llvm/files/llvm-3.1-docs-pod-markup-fixes.patch b/sys-devel/llvm/files/llvm-3.1-docs-pod-markup-fixes.patch |
1787 |
new file mode 100644 |
1788 |
index 0000000..cd8a62a |
1789 |
--- /dev/null |
1790 |
+++ b/sys-devel/llvm/files/llvm-3.1-docs-pod-markup-fixes.patch |
1791 |
@@ -0,0 +1,28 @@ |
1792 |
+--- llvm-3.1.src/docs/CommandGuide/lit.pod~ 2012-03-27 03:01:14.000000000 +0900 |
1793 |
++++ llvm-3.1.src/docs/CommandGuide/lit.pod 2013-01-23 12:47:30.297510832 +0900 |
1794 |
+@@ -386,8 +386,6 @@ |
1795 |
+ ******************** |
1796 |
+ PASS: D (4 of 4) |
1797 |
+ |
1798 |
+-=back |
1799 |
+- |
1800 |
+ =head2 LIT EXAMPLE TESTS |
1801 |
+ |
1802 |
+ The B<lit> distribution contains several example implementations of test suites |
1803 |
+--- llvm-3.1.src/docs/CommandGuide/llvm-cov.pod~ 2011-11-29 08:39:25.000000000 +0900 |
1804 |
++++ llvm-3.1.src/docs/CommandGuide/llvm-cov.pod 2013-01-23 13:44:32.184212441 +0900 |
1805 |
+@@ -18,12 +18,12 @@ |
1806 |
+ |
1807 |
+ =over |
1808 |
+ |
1809 |
+-=item B<-gcno=filename] |
1810 |
++=item B<-gcno=filename> |
1811 |
+ |
1812 |
+ This option selects input description file generated by compiler while instrumenting |
1813 |
+ program. |
1814 |
+ |
1815 |
+-=item B<-gcda=filename] |
1816 |
++=item B<-gcda=filename> |
1817 |
+ |
1818 |
+ This option selects coverage data file generated by instrumented compiler. |
1819 |
+ |
1820 |
|
1821 |
diff --git a/sys-devel/llvm/files/llvm-3.1-fix_debug_line_info.patch b/sys-devel/llvm/files/llvm-3.1-fix_debug_line_info.patch |
1822 |
new file mode 100644 |
1823 |
index 0000000..de2d46b |
1824 |
--- /dev/null |
1825 |
+++ b/sys-devel/llvm/files/llvm-3.1-fix_debug_line_info.patch |
1826 |
@@ -0,0 +1,65 @@ |
1827 |
+From 737fdba46f2b2b7d39bc728d15ea2334c44779e0 Mon Sep 17 00:00:00 2001 |
1828 |
+From: Ben Longbons <b.r.longbons@×××××.com> |
1829 |
+Date: Fri, 29 Jun 2012 12:58:34 -0700 |
1830 |
+Subject: [PATCH] Revert "Patch to set is_stmt a little better for prologue |
1831 |
+ lines in a function." |
1832 |
+ |
1833 |
+This meants that the debugger could find meaningful line information. |
1834 |
+ |
1835 |
+This reverts commit 60b35f408bc3194e7ea4e96367c0b42dc5e7f850. |
1836 |
+--- |
1837 |
+ lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 7 ++----- |
1838 |
+ test/DebugInfo/X86/ending-run.ll | 6 ++---- |
1839 |
+ 2 files changed, 4 insertions(+), 9 deletions(-) |
1840 |
+ |
1841 |
+diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp |
1842 |
+index 3e79a6d..24aedfb 100644 |
1843 |
+--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp |
1844 |
++++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp |
1845 |
+@@ -1093,15 +1093,12 @@ void DwarfDebug::beginInstruction(const MachineInstr *MI) { |
1846 |
+ if (!MI->isDebugValue()) { |
1847 |
+ DebugLoc DL = MI->getDebugLoc(); |
1848 |
+ if (DL != PrevInstLoc && (!DL.isUnknown() || UnknownLocations)) { |
1849 |
+- unsigned Flags = 0; |
1850 |
++ unsigned Flags = DWARF2_FLAG_IS_STMT; |
1851 |
+ PrevInstLoc = DL; |
1852 |
+ if (DL == PrologEndLoc) { |
1853 |
+ Flags |= DWARF2_FLAG_PROLOGUE_END; |
1854 |
+ PrologEndLoc = DebugLoc(); |
1855 |
+ } |
1856 |
+- if (PrologEndLoc.isUnknown()) |
1857 |
+- Flags |= DWARF2_FLAG_IS_STMT; |
1858 |
+- |
1859 |
+ if (!DL.isUnknown()) { |
1860 |
+ const MDNode *Scope = DL.getScope(Asm->MF->getFunction()->getContext()); |
1861 |
+ recordSourceLine(DL.getLine(), DL.getCol(), Scope, Flags); |
1862 |
+@@ -1382,7 +1379,7 @@ void DwarfDebug::beginFunction(const MachineFunction *MF) { |
1863 |
+ MF->getFunction()->getContext()); |
1864 |
+ recordSourceLine(FnStartDL.getLine(), FnStartDL.getCol(), |
1865 |
+ FnStartDL.getScope(MF->getFunction()->getContext()), |
1866 |
+- 0); |
1867 |
++ DWARF2_FLAG_IS_STMT); |
1868 |
+ } |
1869 |
+ } |
1870 |
+ |
1871 |
+diff --git a/test/DebugInfo/X86/ending-run.ll b/test/DebugInfo/X86/ending-run.ll |
1872 |
+index 6935c47..0cd3de1 100644 |
1873 |
+--- a/test/DebugInfo/X86/ending-run.ll |
1874 |
++++ b/test/DebugInfo/X86/ending-run.ll |
1875 |
+@@ -1,11 +1,9 @@ |
1876 |
+ ; RUN: llc -mtriple=x86_64-apple-darwin %s -o %t -filetype=obj |
1877 |
+ ; RUN: llvm-dwarfdump %t | FileCheck %s |
1878 |
+ |
1879 |
+-; Check that the line table starts at 7, not 4, but that the first |
1880 |
+-; statement isn't until line 8. |
1881 |
++; Check that the line table starts at 7, not 4. |
1882 |
+ |
1883 |
+-; CHECK-NOT: 0x0000000000000000 7 0 1 0 is_stmt |
1884 |
+-; CHECK: 0x0000000000000000 7 0 1 0 |
1885 |
++; CHECK: 0x0000000000000000 7 0 1 0 is_stmt |
1886 |
+ ; CHECK: 0x0000000000000004 8 18 1 0 is_stmt prologue_end |
1887 |
+ |
1888 |
+ define i32 @callee(i32 %x) nounwind uwtable ssp { |
1889 |
+-- |
1890 |
+1.7.10 |
1891 |
+ |
1892 |
|
1893 |
diff --git a/sys-devel/llvm/files/llvm-3.1-ivybridge_support.patch b/sys-devel/llvm/files/llvm-3.1-ivybridge_support.patch |
1894 |
new file mode 100644 |
1895 |
index 0000000..a03ec42 |
1896 |
--- /dev/null |
1897 |
+++ b/sys-devel/llvm/files/llvm-3.1-ivybridge_support.patch |
1898 |
@@ -0,0 +1,13 @@ |
1899 |
+--- llvm/trunk/lib/Support/Host.cpp 2012/04/23 22:22:46 155401 |
1900 |
++++ llvm/trunk/lib/Support/Host.cpp 2012/04/23 22:41:39 155402 |
1901 |
+@@ -230,6 +230,10 @@ |
1902 |
+ case 45: |
1903 |
+ return "corei7-avx"; |
1904 |
+ |
1905 |
++ // Ivy Bridge: |
1906 |
++ case 58: |
1907 |
++ return "core-avx-i"; |
1908 |
++ |
1909 |
+ case 28: // Intel Atom processor. All processors are manufactured using |
1910 |
+ // the 45 nm process |
1911 |
+ return "atom"; |
1912 |
|
1913 |
diff --git a/sys-devel/llvm/files/llvm-3.2-nodoctargz.patch b/sys-devel/llvm/files/llvm-3.2-nodoctargz.patch |
1914 |
new file mode 100644 |
1915 |
index 0000000..3a622b5 |
1916 |
--- /dev/null |
1917 |
+++ b/sys-devel/llvm/files/llvm-3.2-nodoctargz.patch |
1918 |
@@ -0,0 +1,45 @@ |
1919 |
+--- docs/Makefile.orig 2012-04-30 17:00:01.000000000 +0200 |
1920 |
++++ docs/Makefile 2012-04-30 17:15:52.000000000 +0200 |
1921 |
+@@ -52,11 +52,10 @@ |
1922 |
+ # 'make generated BUILD_FOR_WEBSITE=1' |
1923 |
+ generated:: $(generated_targets) |
1924 |
+ |
1925 |
+-install-html: $(PROJ_OBJ_DIR)/html.tar.gz |
1926 |
++install-html: |
1927 |
+ $(Echo) Installing HTML documentation |
1928 |
+ $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html |
1929 |
+ $(Verb) $(DataInstall) $(HTML) $(DESTDIR)$(PROJ_docsdir)/html |
1930 |
+- $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/html.tar.gz $(DESTDIR)$(PROJ_docsdir) |
1931 |
+ |
1932 |
+ $(PROJ_OBJ_DIR)/html.tar.gz: $(HTML) |
1933 |
+ $(Echo) Packaging HTML documentation |
1934 |
+@@ -68,12 +67,11 @@ |
1935 |
+ install-doxygen: doxygen |
1936 |
+ $(Echo) Installing doxygen documentation |
1937 |
+ $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html/doxygen |
1938 |
+- $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/doxygen.tar.gz $(DESTDIR)$(PROJ_docsdir) |
1939 |
+ $(Verb) cd $(PROJ_OBJ_DIR)/doxygen && \ |
1940 |
+ $(FIND) . -type f -exec \ |
1941 |
+ $(DataInstall) {} $(DESTDIR)$(PROJ_docsdir)/html/doxygen \; |
1942 |
+ |
1943 |
+-doxygen: regendoc $(PROJ_OBJ_DIR)/doxygen.tar.gz |
1944 |
++doxygen: regendoc |
1945 |
+ |
1946 |
+ regendoc: |
1947 |
+ $(Echo) Building doxygen documentation |
1948 |
+@@ -99,7 +97,6 @@ |
1949 |
+ install-ocamldoc: ocamldoc |
1950 |
+ $(Echo) Installing ocamldoc documentation |
1951 |
+ $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/ocamldoc/html |
1952 |
+- $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/ocamldoc.tar.gz $(DESTDIR)$(PROJ_docsdir) |
1953 |
+ $(Verb) cd $(PROJ_OBJ_DIR)/ocamldoc && \ |
1954 |
+ $(FIND) . -type f -exec \ |
1955 |
+ $(DataInstall) {} $(DESTDIR)$(PROJ_docsdir)/ocamldoc/html \; |
1956 |
+@@ -109,7 +106,6 @@ |
1957 |
+ $(Verb) $(RM) -rf $(PROJ_OBJ_DIR)/ocamldoc.tar* |
1958 |
+ $(Verb) $(TAR) cf $(PROJ_OBJ_DIR)/ocamldoc.tar ocamldoc |
1959 |
+ $(Verb) $(GZIPBIN) $(PROJ_OBJ_DIR)/ocamldoc.tar |
1960 |
+- $(Verb) $(CP) $(PROJ_OBJ_DIR)/ocamldoc.tar.gz $(PROJ_OBJ_DIR)/ocamldoc/html/ |
1961 |
+ |
1962 |
+ regen-ocamldoc: |
1963 |
+ $(Echo) Building ocamldoc documentation |
1964 |
|
1965 |
diff --git a/sys-devel/llvm/files/llvm-3.3-R600_debug.patch b/sys-devel/llvm/files/llvm-3.3-R600_debug.patch |
1966 |
new file mode 100644 |
1967 |
index 0000000..b104273 |
1968 |
--- /dev/null |
1969 |
+++ b/sys-devel/llvm/files/llvm-3.3-R600_debug.patch |
1970 |
@@ -0,0 +1,22 @@ |
1971 |
+Fixes compilation of llvm-3.3 on gcc-4.6 and 4.7 when VIDEO_CARDS=radeon |
1972 |
+ |
1973 |
+This issue is caused because although Q is a multiset the original code tries to get |
1974 |
+a set iterator which can't be converted in a multiset one. |
1975 |
+ |
1976 |
+The fix is as simple as just using a multiset iterator. |
1977 |
+ |
1978 |
+Patch by Francisco Blas Izquierdo Riera (klondike) |
1979 |
+Consider the changes in the Public Domain |
1980 |
+https://bugs.gentoo.org/show_bug.cgi?id=474096 |
1981 |
+ |
1982 |
+--- lib/Target/R600/R600MachineScheduler.cpp |
1983 |
++++ lib/Target/R600/R600MachineScheduler.cpp |
1984 |
+@@ -290,7 +290,7 @@ |
1985 |
+ SUnit *R600SchedStrategy::PopInst(std::multiset<SUnit *, CompareSUnit> &Q) { |
1986 |
+ if (Q.empty()) |
1987 |
+ return NULL; |
1988 |
+- for (std::set<SUnit *, CompareSUnit>::iterator It = Q.begin(), E = Q.end(); |
1989 |
++ for (std::multiset<SUnit *, CompareSUnit>::iterator It = Q.begin(), E = Q.end(); |
1990 |
+ It != E; ++It) { |
1991 |
+ SUnit *SU = *It; |
1992 |
+ InstructionsGroupCandidate.push_back(SU->getInstr()); |
1993 |
|
1994 |
diff --git a/sys-devel/llvm/files/llvm-3.3-cmake-modulepath.patch b/sys-devel/llvm/files/llvm-3.3-cmake-modulepath.patch |
1995 |
new file mode 100644 |
1996 |
index 0000000..754ae46 |
1997 |
--- /dev/null |
1998 |
+++ b/sys-devel/llvm/files/llvm-3.3-cmake-modulepath.patch |
1999 |
@@ -0,0 +1,24 @@ |
2000 |
+--- cmake/modules/LLVMConfig.cmake.in.old 2013-12-30 14:40:54.888983600 +0100 |
2001 |
++++ cmake/modules/LLVMConfig.cmake.in 2013-12-30 14:44:15.448970509 +0100 |
2002 |
+@@ -39,16 +39,10 @@ |
2003 |
+ set(LLVM_LIBRARY_DIRS ${LLVM_INSTALL_PREFIX}/lib) |
2004 |
+ set(LLVM_DEFINITIONS "-D__STDC_LIMIT_MACROS" "-D__STDC_CONSTANT_MACROS") |
2005 |
+ |
2006 |
+-# We try to include using the current setting of CMAKE_MODULE_PATH, |
2007 |
+-# which suppossedly was filled by the user with the directory where |
2008 |
+-# this file was installed: |
2009 |
+-include( LLVM-Config OPTIONAL RESULT_VARIABLE LLVMCONFIG_INCLUDED ) |
2010 |
+- |
2011 |
+-# If failed, we assume that this is an un-installed build: |
2012 |
+-if( NOT LLVMCONFIG_INCLUDED ) |
2013 |
+- set(CMAKE_MODULE_PATH |
2014 |
++# For some reasons without it it fails on Gentoo, see bug #496480 |
2015 |
++set(CMAKE_MODULE_PATH |
2016 |
+ ${CMAKE_MODULE_PATH} |
2017 |
+- "@LLVM_SOURCE_DIR@/cmake/modules") |
2018 |
+- include( LLVM-Config ) |
2019 |
+-endif() |
2020 |
++ "@LLVM_INSTALL_PREFIX@/share/llvm/cmake") |
2021 |
++ |
2022 |
++include(LLVM-Config) |
2023 |
+ |
2024 |
|
2025 |
diff --git a/sys-devel/llvm/files/llvm-3.3-gentoo-install.patch b/sys-devel/llvm/files/llvm-3.3-gentoo-install.patch |
2026 |
new file mode 100644 |
2027 |
index 0000000..e477be5 |
2028 |
--- /dev/null |
2029 |
+++ b/sys-devel/llvm/files/llvm-3.3-gentoo-install.patch |
2030 |
@@ -0,0 +1,141 @@ |
2031 |
+From 378109dbae7e4772d9b096384904c638a6a34028 Mon Sep 17 00:00:00 2001 |
2032 |
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <gentoo@××××××××××.pl> |
2033 |
+Date: Fri, 19 Jul 2013 10:10:52 +0200 |
2034 |
+Subject: [PATCH 1/2] gentoo install fixes |
2035 |
+ |
2036 |
+--- |
2037 |
+ Makefile.config.in | 6 +++--- |
2038 |
+ Makefile.rules | 7 +++---- |
2039 |
+ tools/gold/Makefile | 2 +- |
2040 |
+ tools/llvm-config/BuildVariables.inc.in | 2 ++ |
2041 |
+ tools/llvm-config/Makefile | 4 ++++ |
2042 |
+ tools/llvm-config/llvm-config.cpp | 5 +++-- |
2043 |
+ utils/FileCheck/Makefile | 2 +- |
2044 |
+ 7 files changed, 17 insertions(+), 11 deletions(-) |
2045 |
+ |
2046 |
+diff --git a/Makefile.config.in b/Makefile.config.in |
2047 |
+index fd4f6ef..5634ecc 100644 |
2048 |
+--- a/Makefile.config.in |
2049 |
++++ b/Makefile.config.in |
2050 |
+@@ -95,10 +95,10 @@ PROJ_internal_prefix := $(prefix) |
2051 |
+ endif |
2052 |
+ |
2053 |
+ PROJ_bindir := $(PROJ_prefix)/bin |
2054 |
+-PROJ_libdir := $(PROJ_prefix)/lib |
2055 |
++PROJ_libdir := $(PROJ_prefix)/$(GENTOO_LIBDIR)/llvm |
2056 |
+ PROJ_datadir := $(PROJ_prefix)/share |
2057 |
+-PROJ_docsdir := $(PROJ_prefix)/docs/llvm |
2058 |
+-PROJ_etcdir := $(PROJ_prefix)/etc/llvm |
2059 |
++PROJ_docsdir := $(PROJ_prefix)/share/doc/@PF@ |
2060 |
++PROJ_etcdir := @EPREFIX@/etc/llvm |
2061 |
+ PROJ_includedir := $(PROJ_prefix)/include |
2062 |
+ PROJ_infodir := $(PROJ_prefix)/info |
2063 |
+ PROJ_mandir := $(PROJ_prefix)/share/man |
2064 |
+diff --git a/Makefile.rules b/Makefile.rules |
2065 |
+index f0c542b..db252f7 100644 |
2066 |
+--- a/Makefile.rules |
2067 |
++++ b/Makefile.rules |
2068 |
+@@ -276,7 +276,7 @@ ifeq ($(ENABLE_OPTIMIZED),1) |
2069 |
+ # Don't use -fomit-frame-pointer on Darwin or FreeBSD. |
2070 |
+ ifneq ($(HOST_OS),FreeBSD) |
2071 |
+ ifneq ($(HOST_OS),Darwin) |
2072 |
+- OmitFramePointer := -fomit-frame-pointer |
2073 |
++ OmitFramePointer := |
2074 |
+ endif |
2075 |
+ endif |
2076 |
+ |
2077 |
+@@ -639,7 +638,7 @@ endif |
2078 |
+ ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) |
2079 |
+ ifneq ($(HOST_OS), Darwin) |
2080 |
+ ifdef TOOLNAME |
2081 |
+- LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib' |
2082 |
++ LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib' $(RPATH) -Wl,'$(PROJ_libdir)' |
2083 |
+ ifdef EXAMPLE_TOOL |
2084 |
+ LD.Flags += $(RPATH) -Wl,$(ExmplDir) $(DynamicFlag) |
2085 |
+ else |
2086 |
+@@ -648,7 +647,7 @@ ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) |
2087 |
+ endif |
2088 |
+ else |
2089 |
+ ifneq ($(DARWIN_MAJVERS),4) |
2090 |
+- LD.Flags += $(RPATH) -Wl,@executable_path/../lib |
2091 |
++ LD.Flags += $(RPATH) -Wl,@executable_path/../lib -Wl,'$(PROJ_libdir)' |
2092 |
+ endif |
2093 |
+ ifeq ($(RC_XBS),YES) |
2094 |
+ TempFile := $(shell mkdir -p ${OBJROOT}/dSYMs ; mktemp ${OBJROOT}/dSYMs/llvm-lto.XXXXXX) |
2095 |
+diff --git a/tools/gold/Makefile b/tools/gold/Makefile |
2096 |
+index 496e31c..d36b340 100644 |
2097 |
+--- a/tools/gold/Makefile |
2098 |
++++ b/tools/gold/Makefile |
2099 |
+@@ -24,7 +24,7 @@ include $(LEVEL)/Makefile.config |
2100 |
+ # Because off_t is used in the public API, the largefile parts are required for |
2101 |
+ # ABI compatibility. |
2102 |
+ CXXFLAGS += -I$(BINUTILS_INCDIR) -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 |
2103 |
+-LDFLAGS += -L$(SharedLibDir)/$(SharedPrefix) |
2104 |
++LDFLAGS += -L$(PROJ_libdir) |
2105 |
+ |
2106 |
+ include $(LEVEL)/Makefile.common |
2107 |
+ |
2108 |
+diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in |
2109 |
+index fe87afb..fd9f2c6 100644 |
2110 |
+--- a/tools/llvm-config/BuildVariables.inc.in |
2111 |
++++ b/tools/llvm-config/BuildVariables.inc.in |
2112 |
+@@ -25,3 +25,5 @@ |
2113 |
+ #define LLVM_BUILDMODE "@LLVM_BUILDMODE@" |
2114 |
+ #define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@" |
2115 |
+ #define LLVM_SYSTEM_LIBS "@LLVM_SYSTEM_LIBS@" |
2116 |
++#define LLVM_RPATH "@LLVM_RPATH@" |
2117 |
++#define LLVM_LIBDIR "@LLVM_LIBDIR@" |
2118 |
+diff --git a/tools/llvm-config/Makefile b/tools/llvm-config/Makefile |
2119 |
+index b20b6bf..fc56781 100644 |
2120 |
+--- a/tools/llvm-config/Makefile |
2121 |
++++ b/tools/llvm-config/Makefile |
2122 |
+@@ -55,6 +55,10 @@ $(ObjDir)/BuildVariables.inc: $(BUILDVARIABLES_SRCPATH) Makefile $(ObjDir)/.dir |
2123 |
+ >> temp.sed |
2124 |
+ $(Verb) $(ECHO) 's/@LLVM_TARGETS_BUILT@/$(subst /,\/,$(TARGETS_TO_BUILD))/' \ |
2125 |
+ >> temp.sed |
2126 |
++ $(Verb) $(ECHO) 's/@LLVM_RPATH@/$(subst /,\/,$(RPATH))/' \ |
2127 |
++ >> temp.sed |
2128 |
++ $(Verb) $(ECHO) 's/@LLVM_LIBDIR@/$(subst /,\/,$(GENTOO_LIBDIR))/' \ |
2129 |
++ >> temp.sed |
2130 |
+ $(Verb) $(SED) -f temp.sed < $< > $@ |
2131 |
+ $(Verb) $(RM) temp.sed |
2132 |
+ |
2133 |
+diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp |
2134 |
+index 7edf5ec..4541c28 100644 |
2135 |
+--- a/tools/llvm-config/llvm-config.cpp |
2136 |
++++ b/tools/llvm-config/llvm-config.cpp |
2137 |
+@@ -250,7 +250,7 @@ int main(int argc, char **argv) { |
2138 |
+ ActivePrefix = CurrentExecPrefix; |
2139 |
+ ActiveIncludeDir = ActivePrefix + "/include"; |
2140 |
+ ActiveBinDir = ActivePrefix + "/bin"; |
2141 |
+- ActiveLibDir = ActivePrefix + "/lib"; |
2142 |
++ ActiveLibDir = ActivePrefix + "/" LLVM_LIBDIR "/llvm"; |
2143 |
+ ActiveIncludeOption = "-I" + ActiveIncludeDir; |
2144 |
+ } |
2145 |
+ |
2146 |
+@@ -277,7 +277,8 @@ int main(int argc, char **argv) { |
2147 |
+ } else if (Arg == "--cxxflags") { |
2148 |
+ OS << ActiveIncludeOption << ' ' << LLVM_CXXFLAGS << '\n'; |
2149 |
+ } else if (Arg == "--ldflags") { |
2150 |
+- OS << "-L" << ActiveLibDir << ' ' << LLVM_LDFLAGS |
2151 |
++ OS << "-L" << ActiveLibDir << ' ' |
2152 |
++ << LLVM_RPATH << " -Wl," << ActiveLibDir << ' ' << LLVM_LDFLAGS |
2153 |
+ << ' ' << LLVM_SYSTEM_LIBS << '\n'; |
2154 |
+ } else if (Arg == "--libs") { |
2155 |
+ PrintLibs = true; |
2156 |
+diff --git a/utils/FileCheck/Makefile b/utils/FileCheck/Makefile |
2157 |
+index 268b7bc..e7674f9 100644 |
2158 |
+--- a/utils/FileCheck/Makefile |
2159 |
++++ b/utils/FileCheck/Makefile |
2160 |
+@@ -15,7 +15,7 @@ USEDLIBS = LLVMSupport.a |
2161 |
+ TOOL_NO_EXPORTS = 1 |
2162 |
+ |
2163 |
+ # Don't install this utility |
2164 |
+-NO_INSTALL = 1 |
2165 |
++#NO_INSTALL = 1 |
2166 |
+ |
2167 |
+ include $(LEVEL)/Makefile.common |
2168 |
+ |
2169 |
+-- |
2170 |
+1.8.3.2 |
2171 |
+ |
2172 |
|
2173 |
diff --git a/sys-devel/llvm/files/llvm-3.3-insecure-rpath.patch b/sys-devel/llvm/files/llvm-3.3-insecure-rpath.patch |
2174 |
new file mode 100644 |
2175 |
index 0000000..659f237 |
2176 |
--- /dev/null |
2177 |
+++ b/sys-devel/llvm/files/llvm-3.3-insecure-rpath.patch |
2178 |
@@ -0,0 +1,30 @@ |
2179 |
+From d23d21bc76693dd2a43b5d76c68972ac01a055ba Mon Sep 17 00:00:00 2001 |
2180 |
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <gentoo@××××××××××.pl> |
2181 |
+Date: Sat, 20 Jul 2013 15:56:56 +0200 |
2182 |
+Subject: [PATCH] Remove insecure RUNPATHs. |
2183 |
+ |
2184 |
+LLVM seems to build fine without them, and they were removed for 3.4 |
2185 |
+already. |
2186 |
+--- |
2187 |
+ Makefile.rules | 5 ----- |
2188 |
+ 1 file changed, 5 deletions(-) |
2189 |
+ |
2190 |
+diff --git a/Makefile.rules b/Makefile.rules |
2191 |
+index db252f7..a29481b 100644 |
2192 |
+--- a/Makefile.rules |
2193 |
++++ b/Makefile.rules |
2194 |
+@@ -639,11 +639,6 @@ ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) |
2195 |
+ ifneq ($(HOST_OS), Darwin) |
2196 |
+ ifdef TOOLNAME |
2197 |
+ LD.Flags += $(RPATH) -Wl,'$(PROJ_libdir)' |
2198 |
+- ifdef EXAMPLE_TOOL |
2199 |
+- LD.Flags += $(RPATH) -Wl,$(ExmplDir) $(DynamicFlag) |
2200 |
+- else |
2201 |
+- LD.Flags += $(RPATH) -Wl,$(ToolDir) $(DynamicFlag) |
2202 |
+- endif |
2203 |
+ endif |
2204 |
+ else |
2205 |
+ ifneq ($(DARWIN_MAJVERS),4) |
2206 |
+-- |
2207 |
+1.8.3.2 |
2208 |
+ |
2209 |
|
2210 |
diff --git a/sys-devel/llvm/files/llvm-3.3-r2-gentoo-install.patch b/sys-devel/llvm/files/llvm-3.3-r2-gentoo-install.patch |
2211 |
new file mode 100644 |
2212 |
index 0000000..c5bd8b8 |
2213 |
--- /dev/null |
2214 |
+++ b/sys-devel/llvm/files/llvm-3.3-r2-gentoo-install.patch |
2215 |
@@ -0,0 +1,117 @@ |
2216 |
+From a554809b6bdbe29b1f775c89104c1088300685ef Mon Sep 17 00:00:00 2001 |
2217 |
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
2218 |
+Date: Sat, 28 Dec 2013 10:30:28 +0100 |
2219 |
+Subject: [PATCH] Update for gentoo install layout. |
2220 |
+ |
2221 |
+--- |
2222 |
+ Makefile.config.in | 6 +++--- |
2223 |
+ Makefile.rules | 8 ++++---- |
2224 |
+ tools/llvm-config/BuildVariables.inc.in | 1 + |
2225 |
+ tools/llvm-config/Makefile | 2 ++ |
2226 |
+ tools/llvm-config/llvm-config.cpp | 2 +- |
2227 |
+ utils/FileCheck/Makefile | 2 +- |
2228 |
+ 6 files changed, 12 insertions(+), 9 deletions(-) |
2229 |
+ |
2230 |
+diff --git a/Makefile.config.in b/Makefile.config.in |
2231 |
+index fd4f6ef..b63786c 100644 |
2232 |
+--- a/Makefile.config.in |
2233 |
++++ b/Makefile.config.in |
2234 |
+@@ -95,10 +95,10 @@ PROJ_internal_prefix := $(prefix) |
2235 |
+ endif |
2236 |
+ |
2237 |
+ PROJ_bindir := $(PROJ_prefix)/bin |
2238 |
+-PROJ_libdir := $(PROJ_prefix)/lib |
2239 |
++PROJ_libdir := $(PROJ_prefix)/$(GENTOO_LIBDIR) |
2240 |
+ PROJ_datadir := $(PROJ_prefix)/share |
2241 |
+-PROJ_docsdir := $(PROJ_prefix)/docs/llvm |
2242 |
+-PROJ_etcdir := $(PROJ_prefix)/etc/llvm |
2243 |
++PROJ_docsdir := $(PROJ_prefix)/share/doc/@PF@ |
2244 |
++PROJ_etcdir := @EPREFIX@/etc/llvm |
2245 |
+ PROJ_includedir := $(PROJ_prefix)/include |
2246 |
+ PROJ_infodir := $(PROJ_prefix)/info |
2247 |
+ PROJ_mandir := $(PROJ_prefix)/share/man |
2248 |
+diff --git a/Makefile.rules b/Makefile.rules |
2249 |
+index f0c542b..6cc19fd 100644 |
2250 |
+--- a/Makefile.rules |
2251 |
++++ b/Makefile.rules |
2252 |
+@@ -276,7 +276,7 @@ ifeq ($(ENABLE_OPTIMIZED),1) |
2253 |
+ # Don't use -fomit-frame-pointer on Darwin or FreeBSD. |
2254 |
+ ifneq ($(HOST_OS),FreeBSD) |
2255 |
+ ifneq ($(HOST_OS),Darwin) |
2256 |
+- OmitFramePointer := -fomit-frame-pointer |
2257 |
++ OmitFramePointer := |
2258 |
+ endif |
2259 |
+ endif |
2260 |
+ |
2261 |
+@@ -601,7 +601,7 @@ endif |
2262 |
+ ifdef SHARED_LIBRARY |
2263 |
+ ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) |
2264 |
+ ifneq ($(HOST_OS),Darwin) |
2265 |
+- LD.Flags += $(RPATH) -Wl,'$$ORIGIN' |
2266 |
++ LD.Flags += |
2267 |
+ endif |
2268 |
+ endif |
2269 |
+ endif |
2270 |
+@@ -641,9 +641,9 @@ ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) |
2271 |
+ ifdef TOOLNAME |
2272 |
+ LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib' |
2273 |
+ ifdef EXAMPLE_TOOL |
2274 |
+- LD.Flags += $(RPATH) -Wl,$(ExmplDir) $(DynamicFlag) |
2275 |
++ LD.Flags += $(DynamicFlag) |
2276 |
+ else |
2277 |
+- LD.Flags += $(RPATH) -Wl,$(ToolDir) $(DynamicFlag) |
2278 |
++ LD.Flags += $(DynamicFlag) |
2279 |
+ endif |
2280 |
+ endif |
2281 |
+ else |
2282 |
+diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in |
2283 |
+index fe87afb..908acd4 100644 |
2284 |
+--- a/tools/llvm-config/BuildVariables.inc.in |
2285 |
++++ b/tools/llvm-config/BuildVariables.inc.in |
2286 |
+@@ -25,3 +25,4 @@ |
2287 |
+ #define LLVM_BUILDMODE "@LLVM_BUILDMODE@" |
2288 |
+ #define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@" |
2289 |
+ #define LLVM_SYSTEM_LIBS "@LLVM_SYSTEM_LIBS@" |
2290 |
++#define LLVM_LIBDIR "@LLVM_LIBDIR@" |
2291 |
+diff --git a/tools/llvm-config/Makefile b/tools/llvm-config/Makefile |
2292 |
+index b20b6bf..0aeba45 100644 |
2293 |
+--- a/tools/llvm-config/Makefile |
2294 |
++++ b/tools/llvm-config/Makefile |
2295 |
+@@ -55,6 +55,8 @@ $(ObjDir)/BuildVariables.inc: $(BUILDVARIABLES_SRCPATH) Makefile $(ObjDir)/.dir |
2296 |
+ >> temp.sed |
2297 |
+ $(Verb) $(ECHO) 's/@LLVM_TARGETS_BUILT@/$(subst /,\/,$(TARGETS_TO_BUILD))/' \ |
2298 |
+ >> temp.sed |
2299 |
++ $(Verb) $(ECHO) 's/@LLVM_LIBDIR@/$(subst /,\/,$(GENTOO_LIBDIR))/' \ |
2300 |
++ >> temp.sed |
2301 |
+ $(Verb) $(SED) -f temp.sed < $< > $@ |
2302 |
+ $(Verb) $(RM) temp.sed |
2303 |
+ |
2304 |
+diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp |
2305 |
+index 7edf5ec..c09b702 100644 |
2306 |
+--- a/tools/llvm-config/llvm-config.cpp |
2307 |
++++ b/tools/llvm-config/llvm-config.cpp |
2308 |
+@@ -250,7 +250,7 @@ int main(int argc, char **argv) { |
2309 |
+ ActivePrefix = CurrentExecPrefix; |
2310 |
+ ActiveIncludeDir = ActivePrefix + "/include"; |
2311 |
+ ActiveBinDir = ActivePrefix + "/bin"; |
2312 |
+- ActiveLibDir = ActivePrefix + "/lib"; |
2313 |
++ ActiveLibDir = ActivePrefix + "/" LLVM_LIBDIR; |
2314 |
+ ActiveIncludeOption = "-I" + ActiveIncludeDir; |
2315 |
+ } |
2316 |
+ |
2317 |
+diff --git a/utils/FileCheck/Makefile b/utils/FileCheck/Makefile |
2318 |
+index 268b7bc..e7674f9 100644 |
2319 |
+--- a/utils/FileCheck/Makefile |
2320 |
++++ b/utils/FileCheck/Makefile |
2321 |
+@@ -15,7 +15,7 @@ USEDLIBS = LLVMSupport.a |
2322 |
+ TOOL_NO_EXPORTS = 1 |
2323 |
+ |
2324 |
+ # Don't install this utility |
2325 |
+-NO_INSTALL = 1 |
2326 |
++#NO_INSTALL = 1 |
2327 |
+ |
2328 |
+ include $(LEVEL)/Makefile.common |
2329 |
+ |
2330 |
+-- |
2331 |
+1.8.5.2 |
2332 |
+ |
2333 |
|
2334 |
diff --git a/sys-devel/llvm/files/llvm-3.4-cmake-configparser.patch b/sys-devel/llvm/files/llvm-3.4-cmake-configparser.patch |
2335 |
new file mode 100644 |
2336 |
index 0000000..cda8bdc |
2337 |
--- /dev/null |
2338 |
+++ b/sys-devel/llvm/files/llvm-3.4-cmake-configparser.patch |
2339 |
@@ -0,0 +1,35 @@ |
2340 |
+From 773560acfad511769017e971991c0305dbc0323d Mon Sep 17 00:00:00 2001 |
2341 |
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
2342 |
+Date: Wed, 11 Jun 2014 09:40:26 +0200 |
2343 |
+Subject: [PATCH] Avoid using external configparser in favor of built-in |
2344 |
+ ConfigParser. |
2345 |
+ |
2346 |
+We only support Python 2 anyway, and configparser-3.2 is known to break |
2347 |
+the build. Since some packages actually force version 3.2, and we do not |
2348 |
+to pull in extra dependencies, forcing built-in seems to be the best |
2349 |
+option. |
2350 |
+ |
2351 |
+Fixes: https://bugs.gentoo.org/show_bug.cgi?id=500856 |
2352 |
+--- |
2353 |
+ utils/llvm-build/llvmbuild/componentinfo.py | 5 +---- |
2354 |
+ 1 file changed, 1 insertion(+), 4 deletions(-) |
2355 |
+ |
2356 |
+diff --git a/utils/llvm-build/llvmbuild/componentinfo.py b/utils/llvm-build/llvmbuild/componentinfo.py |
2357 |
+index eda3a48..c963ef1 100644 |
2358 |
+--- a/utils/llvm-build/llvmbuild/componentinfo.py |
2359 |
++++ b/utils/llvm-build/llvmbuild/componentinfo.py |
2360 |
+@@ -3,10 +3,7 @@ Descriptor objects for entities that are part of the LLVM project. |
2361 |
+ """ |
2362 |
+ |
2363 |
+ from __future__ import absolute_import |
2364 |
+-try: |
2365 |
+- import configparser |
2366 |
+-except: |
2367 |
+- import ConfigParser as configparser |
2368 |
++import ConfigParser as configparser |
2369 |
+ import sys |
2370 |
+ |
2371 |
+ from llvmbuild.util import * |
2372 |
+-- |
2373 |
+2.0.0 |
2374 |
+ |
2375 |
|
2376 |
diff --git a/sys-devel/llvm/files/llvm-3.4-fix_varargs.patch b/sys-devel/llvm/files/llvm-3.4-fix_varargs.patch |
2377 |
new file mode 100644 |
2378 |
index 0000000..377c4da |
2379 |
--- /dev/null |
2380 |
+++ b/sys-devel/llvm/files/llvm-3.4-fix_varargs.patch |
2381 |
@@ -0,0 +1,148 @@ |
2382 |
+https://bugs.gentoo.org/show_bug.cgi?id=497298 |
2383 |
+http://llvm.org/bugs/show_bug.cgi?id=18346 |
2384 |
+ |
2385 |
+SVN revisions: |
2386 |
+http://llvm.org/viewvc/llvm-project?view=revision&revision=197503 |
2387 |
+http://llvm.org/viewvc/llvm-project?view=revision&revision=197505 |
2388 |
+http://llvm.org/viewvc/llvm-project?view=revision&revision=197520 |
2389 |
+ |
2390 |
+diff -Naur llvm-3.4.orig/lib/Target/X86/X86ISelLowering.cpp llvm-3.4/lib/Target/X86/X86ISelLowering.cpp |
2391 |
+--- llvm-3.4.orig/lib/Target/X86/X86ISelLowering.cpp 2014-01-08 11:22:23.373060109 +0100 |
2392 |
++++ llvm-3.4/lib/Target/X86/X86ISelLowering.cpp 2014-01-08 11:23:58.517125907 +0100 |
2393 |
+@@ -15226,9 +15226,15 @@ |
2394 |
+ MBB->addSuccessor(EndMBB); |
2395 |
+ } |
2396 |
+ |
2397 |
++ // Make sure the last operand is EFLAGS, which gets clobbered by the branch |
2398 |
++ // that was just emitted, but clearly shouldn't be "saved". |
2399 |
++ assert((MI->getNumOperands() <= 3 || |
2400 |
++ !MI->getOperand(MI->getNumOperands() - 1).isReg() || |
2401 |
++ MI->getOperand(MI->getNumOperands() - 1).getReg() == X86::EFLAGS) |
2402 |
++ && "Expected last argument to be EFLAGS"); |
2403 |
+ unsigned MOVOpc = Subtarget->hasFp256() ? X86::VMOVAPSmr : X86::MOVAPSmr; |
2404 |
+ // In the XMM save block, save all the XMM argument registers. |
2405 |
+- for (int i = 3, e = MI->getNumOperands(); i != e; ++i) { |
2406 |
++ for (int i = 3, e = MI->getNumOperands() - 1; i != e; ++i) { |
2407 |
+ int64_t Offset = (i - 3) * 16 + VarArgsFPOffset; |
2408 |
+ MachineMemOperand *MMO = |
2409 |
+ F->getMachineMemOperand( |
2410 |
+diff -Naur llvm-3.4.orig/lib/Target/X86/X86InstrCompiler.td llvm-3.4/lib/Target/X86/X86InstrCompiler.td |
2411 |
+--- llvm-3.4.orig/lib/Target/X86/X86InstrCompiler.td 2014-01-08 11:22:23.374060109 +0100 |
2412 |
++++ llvm-3.4/lib/Target/X86/X86InstrCompiler.td 2014-01-08 11:23:39.654112857 +0100 |
2413 |
+@@ -72,7 +72,7 @@ |
2414 |
+ |
2415 |
+ |
2416 |
+ // x86-64 va_start lowering magic. |
2417 |
+-let usesCustomInserter = 1 in { |
2418 |
++let usesCustomInserter = 1, Defs = [EFLAGS] in { |
2419 |
+ def VASTART_SAVE_XMM_REGS : I<0, Pseudo, |
2420 |
+ (outs), |
2421 |
+ (ins GR8:$al, |
2422 |
+@@ -81,7 +81,8 @@ |
2423 |
+ "#VASTART_SAVE_XMM_REGS $al, $regsavefi, $offset", |
2424 |
+ [(X86vastart_save_xmm_regs GR8:$al, |
2425 |
+ imm:$regsavefi, |
2426 |
+- imm:$offset)]>; |
2427 |
++ imm:$offset), |
2428 |
++ (implicit EFLAGS)]>; |
2429 |
+ |
2430 |
+ // The VAARG_64 pseudo-instruction takes the address of the va_list, |
2431 |
+ // and places the address of the next argument into a register. |
2432 |
+diff -Naur llvm-3.4.orig/test/CodeGen/X86/vaargs.ll llvm-3.4/test/CodeGen/X86/vaargs.ll |
2433 |
+--- llvm-3.4.orig/test/CodeGen/X86/vaargs.ll 1970-01-01 01:00:00.000000000 +0100 |
2434 |
++++ llvm-3.4/test/CodeGen/X86/vaargs.ll 2014-01-08 11:23:53.451122402 +0100 |
2435 |
+@@ -0,0 +1,67 @@ |
2436 |
++; RUN: llc -mcpu=corei7-avx %s -o - | FileCheck %s --check-prefix=CHECK --check-prefix=NO-FLAGS |
2437 |
++target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" |
2438 |
++target triple = "x86_64-apple-macosx10.9.0" |
2439 |
++ |
2440 |
++%struct.__va_list_tag = type { i32, i32, i8*, i8* } |
2441 |
++ |
2442 |
++; Check that vastart gets the right thing. |
2443 |
++define i32 @sum(i32 %count, ...) nounwind optsize ssp uwtable { |
2444 |
++; CHECK: testb %al, %al |
2445 |
++; CHECK-NEXT: je |
2446 |
++; CHECK-NEXT: ## BB#{{[0-9]+}}: |
2447 |
++; CHECK-NEXT: vmovaps %xmm0, 48(%rsp) |
2448 |
++; CHECK-NEXT: vmovaps %xmm1, 64(%rsp) |
2449 |
++; CHECK-NEXT: vmovaps %xmm2, 80(%rsp) |
2450 |
++; CHECK-NEXT: vmovaps %xmm3, 96(%rsp) |
2451 |
++; CHECK-NEXT: vmovaps %xmm4, 112(%rsp) |
2452 |
++; CHECK-NEXT: vmovaps %xmm5, 128(%rsp) |
2453 |
++; CHECK-NEXT: vmovaps %xmm6, 144(%rsp) |
2454 |
++; CHECK-NEXT: vmovaps %xmm7, 160(%rsp) |
2455 |
++ |
2456 |
++; Check that [EFLAGS] hasn't been pulled in. |
2457 |
++; NO-FLAGS-NOT: %flags |
2458 |
++ |
2459 |
++ %ap = alloca [1 x %struct.__va_list_tag], align 16 |
2460 |
++ %1 = bitcast [1 x %struct.__va_list_tag]* %ap to i8* |
2461 |
++ call void @llvm.va_start(i8* %1) |
2462 |
++ %2 = icmp sgt i32 %count, 0 |
2463 |
++ br i1 %2, label %.lr.ph, label %._crit_edge |
2464 |
++ |
2465 |
++.lr.ph: ; preds = %0 |
2466 |
++ %3 = getelementptr inbounds [1 x %struct.__va_list_tag]* %ap, i64 0, i64 0, i32 0 |
2467 |
++ %4 = getelementptr inbounds [1 x %struct.__va_list_tag]* %ap, i64 0, i64 0, i32 2 |
2468 |
++ %.pre = load i32* %3, align 16 |
2469 |
++ br label %5 |
2470 |
++ |
2471 |
++; <label>:5 ; preds = %.lr.ph, %13 |
2472 |
++ %6 = phi i32 [ %.pre, %.lr.ph ], [ %14, %13 ] |
2473 |
++ %.01 = phi i32 [ %count, %.lr.ph ], [ %15, %13 ] |
2474 |
++ %7 = icmp ult i32 %6, 41 |
2475 |
++ br i1 %7, label %8, label %10 |
2476 |
++ |
2477 |
++; <label>:8 ; preds = %5 |
2478 |
++ %9 = add i32 %6, 8 |
2479 |
++ store i32 %9, i32* %3, align 16 |
2480 |
++ br label %13 |
2481 |
++ |
2482 |
++; <label>:10 ; preds = %5 |
2483 |
++ %11 = load i8** %4, align 8 |
2484 |
++ %12 = getelementptr i8* %11, i64 8 |
2485 |
++ store i8* %12, i8** %4, align 8 |
2486 |
++ br label %13 |
2487 |
++ |
2488 |
++; <label>:13 ; preds = %10, %8 |
2489 |
++ %14 = phi i32 [ %6, %10 ], [ %9, %8 ] |
2490 |
++ %15 = add nsw i32 %.01, 1 |
2491 |
++ %16 = icmp sgt i32 %15, 0 |
2492 |
++ br i1 %16, label %5, label %._crit_edge |
2493 |
++ |
2494 |
++._crit_edge: ; preds = %13, %0 |
2495 |
++ %.0.lcssa = phi i32 [ %count, %0 ], [ %15, %13 ] |
2496 |
++ call void @llvm.va_end(i8* %1) |
2497 |
++ ret i32 %.0.lcssa |
2498 |
++} |
2499 |
++ |
2500 |
++declare void @llvm.va_start(i8*) nounwind |
2501 |
++ |
2502 |
++declare void @llvm.va_end(i8*) nounwind |
2503 |
+diff -Naur llvm-3.4.orig/test/CodeGen/X86/vastart-defs-eflags.ll llvm-3.4/test/CodeGen/X86/vastart-defs-eflags.ll |
2504 |
+--- llvm-3.4.orig/test/CodeGen/X86/vastart-defs-eflags.ll 1970-01-01 01:00:00.000000000 +0100 |
2505 |
++++ llvm-3.4/test/CodeGen/X86/vastart-defs-eflags.ll 2014-01-08 11:23:39.654112857 +0100 |
2506 |
+@@ -0,0 +1,23 @@ |
2507 |
++; RUN: llc %s -o - | FileCheck %s |
2508 |
++ |
2509 |
++target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" |
2510 |
++target triple = "x86_64-apple-macosx10.10.0" |
2511 |
++ |
2512 |
++; Check that vastart handling doesn't get between testb and je for the branch. |
2513 |
++define i32 @check_flag(i32 %flags, ...) nounwind { |
2514 |
++entry: |
2515 |
++; CHECK: {{^}} testb $2, %bh |
2516 |
++; CHECK-NOT: test |
2517 |
++; CHECK: {{^}} je |
2518 |
++ %and = and i32 %flags, 512 |
2519 |
++ %tobool = icmp eq i32 %and, 0 |
2520 |
++ br i1 %tobool, label %if.end, label %if.then |
2521 |
++ |
2522 |
++if.then: ; preds = %entry |
2523 |
++ br label %if.end |
2524 |
++ |
2525 |
++if.end: ; preds = %entry, %if.then |
2526 |
++ %hasflag = phi i32 [ 1, %if.then ], [ 0, %entry ] |
2527 |
++ ret i32 %hasflag |
2528 |
++} |
2529 |
++ |
2530 |
|
2531 |
diff --git a/sys-devel/llvm/files/llvm-3.4-gentoo-install.patch b/sys-devel/llvm/files/llvm-3.4-gentoo-install.patch |
2532 |
new file mode 100644 |
2533 |
index 0000000..a2ba7de |
2534 |
--- /dev/null |
2535 |
+++ b/sys-devel/llvm/files/llvm-3.4-gentoo-install.patch |
2536 |
@@ -0,0 +1,96 @@ |
2537 |
+From b8846d389ff5e2b768a114f752cf39788accba26 Mon Sep 17 00:00:00 2001 |
2538 |
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
2539 |
+Date: Mon, 19 Aug 2013 13:22:46 +0200 |
2540 |
+Subject: [PATCH] gentoo install fixes |
2541 |
+ |
2542 |
+--- |
2543 |
+ Makefile.config.in | 6 +++--- |
2544 |
+ Makefile.rules | 6 +++--- |
2545 |
+ tools/llvm-config/BuildVariables.inc.in | 2 ++ |
2546 |
+ tools/llvm-config/Makefile | 4 ++++ |
2547 |
+ tools/llvm-config/llvm-config.cpp | 5 +++-- |
2548 |
+ utils/FileCheck/Makefile | 2 +- |
2549 |
+ 7 files changed, 17 insertions(+), 10 deletions(-) |
2550 |
+ |
2551 |
+diff --git a/Makefile.config.in b/Makefile.config.in |
2552 |
+index dcca45f..e75ae2e 100644 |
2553 |
+--- a/Makefile.config.in |
2554 |
++++ b/Makefile.config.in |
2555 |
+@@ -95,10 +95,10 @@ PROJ_internal_prefix := $(prefix) |
2556 |
+ endif |
2557 |
+ |
2558 |
+ PROJ_bindir := $(PROJ_prefix)/bin |
2559 |
+-PROJ_libdir := $(PROJ_prefix)/lib |
2560 |
++PROJ_libdir := $(PROJ_prefix)/$(GENTOO_LIBDIR) |
2561 |
+ PROJ_datadir := $(PROJ_prefix)/share |
2562 |
+-PROJ_docsdir := $(PROJ_prefix)/docs/llvm |
2563 |
+-PROJ_etcdir := $(PROJ_prefix)/etc/llvm |
2564 |
++PROJ_docsdir := $(PROJ_prefix)/share/doc/@PF@ |
2565 |
++PROJ_etcdir := @EPREFIX@/etc/llvm |
2566 |
+ PROJ_includedir := $(PROJ_prefix)/include |
2567 |
+ PROJ_infodir := $(PROJ_prefix)/info |
2568 |
+ PROJ_mandir := $(PROJ_prefix)/share/man |
2569 |
+diff --git a/Makefile.rules b/Makefile.rules |
2570 |
+index e53598b..217f754 100644 |
2571 |
+--- a/Makefile.rules |
2572 |
++++ b/Makefile.rules |
2573 |
+@@ -275,7 +275,7 @@ ifeq ($(ENABLE_OPTIMIZED),1) |
2574 |
+ BuildMode := Release |
2575 |
+ # Don't use -fomit-frame-pointer on Darwin or FreeBSD. |
2576 |
+ ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin Darwin DragonFly FreeBSD GNU/kFreeBSD)) |
2577 |
+- OmitFramePointer := -fomit-frame-pointer |
2578 |
++ OmitFramePointer := |
2579 |
+ endif |
2580 |
+ |
2581 |
+ CXX.Flags += $(OPTIMIZE_OPTION) $(OmitFramePointer) |
2582 |
+diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in |
2583 |
+index fe87afb..fd9f2c6 100644 |
2584 |
+--- a/tools/llvm-config/BuildVariables.inc.in |
2585 |
++++ b/tools/llvm-config/BuildVariables.inc.in |
2586 |
+@@ -25,3 +25,4 @@ |
2587 |
+ #define LLVM_BUILDMODE "@LLVM_BUILDMODE@" |
2588 |
+ #define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@" |
2589 |
+ #define LLVM_SYSTEM_LIBS "@LLVM_SYSTEM_LIBS@" |
2590 |
++#define LLVM_LIBDIR "@LLVM_LIBDIR@" |
2591 |
+diff --git a/tools/llvm-config/Makefile b/tools/llvm-config/Makefile |
2592 |
+index b20b6bf..fc56781 100644 |
2593 |
+--- a/tools/llvm-config/Makefile |
2594 |
++++ b/tools/llvm-config/Makefile |
2595 |
+@@ -55,6 +55,8 @@ $(ObjDir)/BuildVariables.inc: $(BUILDVARIABLES_SRCPATH) Makefile $(ObjDir)/.dir |
2596 |
+ >> temp.sed |
2597 |
+ $(Verb) $(ECHO) 's/@LLVM_TARGETS_BUILT@/$(subst /,\/,$(TARGETS_TO_BUILD))/' \ |
2598 |
+ >> temp.sed |
2599 |
++ $(Verb) $(ECHO) 's/@LLVM_LIBDIR@/$(subst /,\/,$(GENTOO_LIBDIR))/' \ |
2600 |
++ >> temp.sed |
2601 |
+ $(Verb) $(SED) -f temp.sed < $< > $@ |
2602 |
+ $(Verb) $(RM) temp.sed |
2603 |
+ |
2604 |
+diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp |
2605 |
+index 3924e2e..f439c60 100644 |
2606 |
+--- a/tools/llvm-config/llvm-config.cpp |
2607 |
++++ b/tools/llvm-config/llvm-config.cpp |
2608 |
+@@ -250,7 +250,7 @@ int main(int argc, char **argv) { |
2609 |
+ ActivePrefix = CurrentExecPrefix; |
2610 |
+ ActiveIncludeDir = ActivePrefix + "/include"; |
2611 |
+ ActiveBinDir = ActivePrefix + "/bin"; |
2612 |
+- ActiveLibDir = ActivePrefix + "/lib"; |
2613 |
++ ActiveLibDir = ActivePrefix + "/" LLVM_LIBDIR; |
2614 |
+ ActiveIncludeOption = "-I" + ActiveIncludeDir; |
2615 |
+ } |
2616 |
+ |
2617 |
+diff --git a/utils/FileCheck/Makefile b/utils/FileCheck/Makefile |
2618 |
+index 268b7bc..e7674f9 100644 |
2619 |
+--- a/utils/FileCheck/Makefile |
2620 |
++++ b/utils/FileCheck/Makefile |
2621 |
+@@ -15,7 +15,7 @@ USEDLIBS = LLVMSupport.a |
2622 |
+ TOOL_NO_EXPORTS = 1 |
2623 |
+ |
2624 |
+ # Don't install this utility |
2625 |
+-NO_INSTALL = 1 |
2626 |
++#NO_INSTALL = 1 |
2627 |
+ |
2628 |
+ include $(LEVEL)/Makefile.common |
2629 |
+ |
2630 |
+-- |
2631 |
+1.8.4.2 |
2632 |
+ |
2633 |
|
2634 |
diff --git a/sys-devel/llvm/files/llvm-3.5-gcc-4.9.patch b/sys-devel/llvm/files/llvm-3.5-gcc-4.9.patch |
2635 |
new file mode 100644 |
2636 |
index 0000000..7da657f |
2637 |
--- /dev/null |
2638 |
+++ b/sys-devel/llvm/files/llvm-3.5-gcc-4.9.patch |
2639 |
@@ -0,0 +1,43 @@ |
2640 |
+commit 080fb498017d17af2e4d7563608c7d8a848f20da |
2641 |
+Author: Sanjoy Das <sanjoy at azulsystems.com> |
2642 |
+Date: Thu Jun 19 15:38:02 2014 -0700 |
2643 |
+ |
2644 |
+ Fix the --enable-shared build. |
2645 |
+ |
2646 |
+ Currently a build configured with ./configure --enable-shared breaks |
2647 |
+ with an undefined "llvm::cl::parser<llvm::PassInfo |
2648 |
+ const*>::getOption(unsigned int) const" symbol when linking opt. This |
2649 |
+ body for this symbol gets emitted into Pass.o (along with the destructor |
2650 |
+ for PassNameParser), but gets linked into libLLVM-3.5svn.so with local |
2651 |
+ visibility, causing the link error. |
2652 |
+ |
2653 |
+ This fix uses the existing EXTERN_TEMPLATE machinery to force a globally |
2654 |
+ visible definition for the functions in parser<const PassInfo *> into |
2655 |
+ Pass.o. |
2656 |
+ |
2657 |
+diff --git a/include/llvm/IR/LegacyPassNameParser.h b/include/llvm/IR/LegacyPassNameParser.h |
2658 |
+index e2e4912..a07e3fd 100644 |
2659 |
+--- a/include/llvm/IR/LegacyPassNameParser.h |
2660 |
++++ b/include/llvm/IR/LegacyPassNameParser.h |
2661 |
+@@ -95,6 +95,8 @@ private: |
2662 |
+ } |
2663 |
+ }; |
2664 |
+ |
2665 |
++EXTERN_TEMPLATE_INSTANTIATION(class cl::parser<const PassInfo *>); |
2666 |
++ |
2667 |
+ ///===----------------------------------------------------------------------===// |
2668 |
+ /// FilteredPassNameParser class - Make use of the pass registration |
2669 |
+ /// mechanism to automatically add a command line argument to opt for |
2670 |
+diff --git a/lib/IR/Pass.cpp b/lib/IR/Pass.cpp |
2671 |
+index 91d86ae..00ce223 100644 |
2672 |
+--- a/lib/IR/Pass.cpp |
2673 |
++++ b/lib/IR/Pass.cpp |
2674 |
+@@ -234,6 +234,8 @@ PassNameParser::~PassNameParser() { |
2675 |
+ // attempting to remove the registration listener is an error. |
2676 |
+ } |
2677 |
+ |
2678 |
++TEMPLATE_INSTANTIATION(class cl::parser<const PassInfo *>); |
2679 |
++ |
2680 |
+ //===----------------------------------------------------------------------===// |
2681 |
+ // AnalysisUsage Class Implementation |
2682 |
+ // |
2683 |
|
2684 |
diff --git a/sys-devel/llvm/files/llvm-3.5-gentoo-install.patch b/sys-devel/llvm/files/llvm-3.5-gentoo-install.patch |
2685 |
new file mode 100644 |
2686 |
index 0000000..7a8c9f7 |
2687 |
--- /dev/null |
2688 |
+++ b/sys-devel/llvm/files/llvm-3.5-gentoo-install.patch |
2689 |
@@ -0,0 +1,83 @@ |
2690 |
+From b8846d389ff5e2b768a114f752cf39788accba26 Mon Sep 17 00:00:00 2001 |
2691 |
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
2692 |
+Date: Mon, 19 Aug 2013 13:22:46 +0200 |
2693 |
+Subject: [PATCH] gentoo install fixes |
2694 |
+ |
2695 |
+--- |
2696 |
+ Makefile.config.in | 6 +++--- |
2697 |
+ Makefile.rules | 6 +++--- |
2698 |
+ tools/llvm-config/BuildVariables.inc.in | 2 ++ |
2699 |
+ tools/llvm-config/Makefile | 4 ++++ |
2700 |
+ tools/llvm-config/llvm-config.cpp | 5 +++-- |
2701 |
+ utils/FileCheck/Makefile | 2 +- |
2702 |
+ 7 files changed, 17 insertions(+), 10 deletions(-) |
2703 |
+ |
2704 |
+diff --git a/Makefile.config.in b/Makefile.config.in |
2705 |
+index dcca45f..e75ae2e 100644 |
2706 |
+--- a/Makefile.config.in |
2707 |
++++ b/Makefile.config.in |
2708 |
+@@ -95,10 +95,10 @@ PROJ_internal_prefix := $(prefix) |
2709 |
+ endif |
2710 |
+ |
2711 |
+ PROJ_bindir := $(PROJ_prefix)/bin |
2712 |
+-PROJ_libdir := $(PROJ_prefix)/lib |
2713 |
++PROJ_libdir := $(PROJ_prefix)/$(GENTOO_LIBDIR) |
2714 |
+ PROJ_datadir := $(PROJ_prefix)/share |
2715 |
+-PROJ_docsdir := $(PROJ_prefix)/docs/llvm |
2716 |
+-PROJ_etcdir := $(PROJ_prefix)/etc/llvm |
2717 |
++PROJ_docsdir := $(PROJ_prefix)/share/doc/@PF@ |
2718 |
++PROJ_etcdir := @EPREFIX@/etc/llvm |
2719 |
+ PROJ_includedir := $(PROJ_prefix)/include |
2720 |
+ PROJ_infodir := $(PROJ_prefix)/info |
2721 |
+ PROJ_mandir := $(PROJ_prefix)/share/man |
2722 |
+diff --git a/Makefile.rules b/Makefile.rules |
2723 |
+index e53598b..217f754 100644 |
2724 |
+--- a/Makefile.rules |
2725 |
++++ b/Makefile.rules |
2726 |
+@@ -275,7 +275,7 @@ ifeq ($(ENABLE_OPTIMIZED),1) |
2727 |
+ BuildMode := Release |
2728 |
+ # Don't use -fomit-frame-pointer on Darwin or FreeBSD. |
2729 |
+ ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin Darwin DragonFly FreeBSD GNU/kFreeBSD)) |
2730 |
+- OmitFramePointer := -fomit-frame-pointer |
2731 |
++ OmitFramePointer := |
2732 |
+ endif |
2733 |
+ |
2734 |
+ CXX.Flags += $(OPTIMIZE_OPTION) $(OmitFramePointer) |
2735 |
+diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in |
2736 |
+index fe87afb..fd9f2c6 100644 |
2737 |
+--- a/tools/llvm-config/BuildVariables.inc.in |
2738 |
++++ b/tools/llvm-config/BuildVariables.inc.in |
2739 |
+@@ -25,3 +25,4 @@ |
2740 |
+ #define LLVM_BUILDMODE "@LLVM_BUILDMODE@" |
2741 |
+ #define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@" |
2742 |
+ #define LLVM_SYSTEM_LIBS "@LLVM_SYSTEM_LIBS@" |
2743 |
++#define LLVM_LIBDIR "@LLVM_LIBDIR@" |
2744 |
+diff --git a/tools/llvm-config/Makefile b/tools/llvm-config/Makefile |
2745 |
+index b20b6bf..fc56781 100644 |
2746 |
+--- a/tools/llvm-config/Makefile |
2747 |
++++ b/tools/llvm-config/Makefile |
2748 |
+@@ -55,6 +55,8 @@ $(ObjDir)/BuildVariables.inc: $(BUILDVARIABLES_SRCPATH) Makefile $(ObjDir)/.dir |
2749 |
+ >> temp.sed |
2750 |
+ $(Verb) $(ECHO) 's/@LLVM_TARGETS_BUILT@/$(subst /,\/,$(TARGETS_TO_BUILD))/' \ |
2751 |
+ >> temp.sed |
2752 |
++ $(Verb) $(ECHO) 's/@LLVM_LIBDIR@/$(subst /,\/,$(GENTOO_LIBDIR))/' \ |
2753 |
++ >> temp.sed |
2754 |
+ $(Verb) $(SED) -f temp.sed < $< > $@ |
2755 |
+ $(Verb) $(RM) temp.sed |
2756 |
+ |
2757 |
+diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp |
2758 |
+index 3924e2e..f439c60 100644 |
2759 |
+--- a/tools/llvm-config/llvm-config.cpp |
2760 |
++++ b/tools/llvm-config/llvm-config.cpp |
2761 |
+@@ -250,7 +250,7 @@ int main(int argc, char **argv) { |
2762 |
+ ActivePrefix = CurrentExecPrefix; |
2763 |
+ ActiveIncludeDir = ActivePrefix + "/include"; |
2764 |
+ ActiveBinDir = ActivePrefix + "/bin"; |
2765 |
+- ActiveLibDir = ActivePrefix + "/lib"; |
2766 |
++ ActiveLibDir = ActivePrefix + "/" LLVM_LIBDIR; |
2767 |
+ ActiveIncludeOption = "-I" + ActiveIncludeDir; |
2768 |
+ } |
2769 |
+ |
2770 |
+-- |
2771 |
+1.8.4.2 |
2772 |
+ |
2773 |
|
2774 |
diff --git a/sys-devel/llvm/files/llvm-3.5.0-fix_LLVMExports_cmake.patch b/sys-devel/llvm/files/llvm-3.5.0-fix_LLVMExports_cmake.patch |
2775 |
new file mode 100644 |
2776 |
index 0000000..9fbd7b7 |
2777 |
--- /dev/null |
2778 |
+++ b/sys-devel/llvm/files/llvm-3.5.0-fix_LLVMExports_cmake.patch |
2779 |
@@ -0,0 +1,39 @@ |
2780 |
+Index: cmake/modules/Makefile |
2781 |
+=================================================================== |
2782 |
+--- cmake/modules/Makefile (revision 217451) |
2783 |
++++ cmake/modules/Makefile (working copy) |
2784 |
+@@ -33,6 +33,16 @@ |
2785 |
+ LLVM_ENABLE_RTTI := 0 |
2786 |
+ endif |
2787 |
+ |
2788 |
++LLVM_LIBS_TO_EXPORT := $(subst -l,,$(shell $(LLVM_CONFIG) --libs $(LINK_COMPONENTS) || echo Error)) |
2789 |
++ |
2790 |
++ifeq ($(LLVM_LIBS_TO_EXPORT),Error) |
2791 |
++$(error llvm-config --libs failed) |
2792 |
++endif |
2793 |
++ |
2794 |
++ifndef LLVM_LIBS_TO_EXPORT |
2795 |
++$(error LLVM_LIBS_TO_EXPORT cannot be empty) |
2796 |
++endif |
2797 |
++ |
2798 |
+ OBJMODS := LLVMConfig.cmake LLVMConfigVersion.cmake LLVMExports.cmake |
2799 |
+ |
2800 |
+ $(PROJ_OBJ_DIR)/LLVMConfig.cmake: LLVMConfig.cmake.in $(LLVMBuildCMakeFrag) |
2801 |
+@@ -45,7 +55,7 @@ |
2802 |
+ -e 's/@LLVM_VERSION_PATCH@/'"$(LLVM_VERSION_PATCH)"'/' \ |
2803 |
+ -e 's/@PACKAGE_VERSION@/'"$(LLVMVersion)"'/' \ |
2804 |
+ -e 's/@LLVM_COMMON_DEPENDS@//' \ |
2805 |
+- -e 's/@LLVM_AVAILABLE_LIBS@/'"$(subst -l,,$(LLVMConfigLibs))"'/' \ |
2806 |
++ -e 's/@LLVM_AVAILABLE_LIBS@/'"$(LLVM_LIBS_TO_EXPORT)"'/' \ |
2807 |
+ -e 's/@LLVM_ALL_TARGETS@/'"$(ALL_TARGETS)"'/' \ |
2808 |
+ -e 's/@LLVM_TARGETS_TO_BUILD@/'"$(TARGETS_TO_BUILD)"'/' \ |
2809 |
+ -e 's/@LLVM_TARGETS_WITH_JIT@/'"$(TARGETS_WITH_JIT)"'/' \ |
2810 |
+@@ -83,7 +93,7 @@ |
2811 |
+ $(Echo) 'Generating LLVM CMake target exports file' |
2812 |
+ $(Verb) ( \ |
2813 |
+ echo '# LLVM CMake target exports. Do not include directly.' && \ |
2814 |
+- for lib in $(subst -l,,$(LLVMConfigLibs)); do \ |
2815 |
++ for lib in $(LLVM_LIBS_TO_EXPORT); do \ |
2816 |
+ echo 'add_library('"$$lib"' STATIC IMPORTED)' && \ |
2817 |
+ echo 'set_property(TARGET '"$$lib"' PROPERTY IMPORTED_LOCATION "'"$(PROJ_libdir)/lib$$lib.a"'")' ; \ |
2818 |
+ done && \ |
2819 |
|
2820 |
diff --git a/sys-devel/llvm/files/llvm-3.5.2-gcc-5.1.patch b/sys-devel/llvm/files/llvm-3.5.2-gcc-5.1.patch |
2821 |
new file mode 100644 |
2822 |
index 0000000..7cb2817 |
2823 |
--- /dev/null |
2824 |
+++ b/sys-devel/llvm/files/llvm-3.5.2-gcc-5.1.patch |
2825 |
@@ -0,0 +1,14 @@ |
2826 |
+Index: include/llvm/ADT/IntrusiveRefCntPtr.h |
2827 |
+=================================================================== |
2828 |
+--- include/llvm/ADT/IntrusiveRefCntPtr.h (revision 218294) |
2829 |
++++ include/llvm/ADT/IntrusiveRefCntPtr.h (revision 218295) |
2830 |
+@@ -197,6 +197,9 @@ |
2831 |
+ private: |
2832 |
+ void retain() { if (Obj) IntrusiveRefCntPtrInfo<T>::retain(Obj); } |
2833 |
+ void release() { if (Obj) IntrusiveRefCntPtrInfo<T>::release(Obj); } |
2834 |
++ |
2835 |
++ template <typename X> |
2836 |
++ friend class IntrusiveRefCntPtr; |
2837 |
+ }; |
2838 |
+ |
2839 |
+ template<class T, class U> |
2840 |
|
2841 |
diff --git a/sys-devel/llvm/files/llvm-3.6-gentoo-install.patch b/sys-devel/llvm/files/llvm-3.6-gentoo-install.patch |
2842 |
new file mode 100644 |
2843 |
index 0000000..c4d0db2 |
2844 |
--- /dev/null |
2845 |
+++ b/sys-devel/llvm/files/llvm-3.6-gentoo-install.patch |
2846 |
@@ -0,0 +1,82 @@ |
2847 |
+From bb016afeba4d9e886e776565a508634a261111a2 Mon Sep 17 00:00:00 2001 |
2848 |
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
2849 |
+Date: Wed, 31 Dec 2014 11:26:12 +0100 |
2850 |
+Subject: [PATCH] gentoo build fixes |
2851 |
+ |
2852 |
+--- |
2853 |
+ Makefile.config.in | 6 +++--- |
2854 |
+ Makefile.rules | 2 +- |
2855 |
+ tools/llvm-config/BuildVariables.inc.in | 1 + |
2856 |
+ tools/llvm-config/Makefile | 2 ++ |
2857 |
+ tools/llvm-config/llvm-config.cpp | 2 +- |
2858 |
+ 5 files changed, 8 insertions(+), 5 deletions(-) |
2859 |
+ |
2860 |
+diff --git a/Makefile.config.in b/Makefile.config.in |
2861 |
+index d34a2d5..a26cd08 100644 |
2862 |
+--- a/Makefile.config.in |
2863 |
++++ b/Makefile.config.in |
2864 |
+@@ -99,10 +99,10 @@ PROJ_internal_prefix := $(prefix) |
2865 |
+ endif |
2866 |
+ |
2867 |
+ PROJ_bindir := $(PROJ_prefix)/bin |
2868 |
+-PROJ_libdir := $(PROJ_prefix)/lib |
2869 |
++PROJ_libdir := $(PROJ_prefix)/$(GENTOO_LIBDIR) |
2870 |
+ PROJ_datadir := $(PROJ_prefix)/share |
2871 |
+-PROJ_docsdir := $(PROJ_prefix)/docs/llvm |
2872 |
+-PROJ_etcdir := $(PROJ_prefix)/etc/llvm |
2873 |
++PROJ_docsdir := $(PROJ_prefix)/share/doc/@PF@ |
2874 |
++PROJ_etcdir := @EPREFIX@/etc/llvm |
2875 |
+ PROJ_includedir := $(PROJ_prefix)/include |
2876 |
+ PROJ_infodir := $(PROJ_prefix)/info |
2877 |
+ PROJ_mandir := $(PROJ_prefix)/share/man |
2878 |
+diff --git a/Makefile.rules b/Makefile.rules |
2879 |
+index c8c971f..d1258b1 100644 |
2880 |
+--- a/Makefile.rules |
2881 |
++++ b/Makefile.rules |
2882 |
+@@ -283,7 +283,7 @@ ifeq ($(ENABLE_OPTIMIZED),1) |
2883 |
+ BuildMode := Release |
2884 |
+ # Don't use -fomit-frame-pointer on Darwin or FreeBSD. |
2885 |
+ ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin Darwin DragonFly FreeBSD GNU/kFreeBSD)) |
2886 |
+- OmitFramePointer := -fomit-frame-pointer |
2887 |
++ OmitFramePointer := |
2888 |
+ endif |
2889 |
+ |
2890 |
+ CXX.Flags += $(OPTIMIZE_OPTION) $(OmitFramePointer) |
2891 |
+diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in |
2892 |
+index 3f51f49..513ea89 100644 |
2893 |
+--- a/tools/llvm-config/BuildVariables.inc.in |
2894 |
++++ b/tools/llvm-config/BuildVariables.inc.in |
2895 |
+@@ -26,3 +26,4 @@ |
2896 |
+ #define LLVM_LIBDIR_SUFFIX "@LLVM_LIBDIR_SUFFIX@" |
2897 |
+ #define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@" |
2898 |
+ #define LLVM_SYSTEM_LIBS "@LLVM_SYSTEM_LIBS@" |
2899 |
++#define LLVM_LIBDIR "@LLVM_LIBDIR@" |
2900 |
+diff --git a/tools/llvm-config/Makefile b/tools/llvm-config/Makefile |
2901 |
+index 1ff8b6f..5d73c6e 100644 |
2902 |
+--- a/tools/llvm-config/Makefile |
2903 |
++++ b/tools/llvm-config/Makefile |
2904 |
+@@ -65,6 +65,8 @@ $(ObjDir)/BuildVariables.inc: $(BUILDVARIABLES_SRCPATH) Makefile $(ObjDir)/.dir |
2905 |
+ >> temp.sed |
2906 |
+ $(Verb) $(ECHO) 's/@LLVM_TARGETS_BUILT@/$(subst /,\/,$(TARGETS_TO_BUILD))/' \ |
2907 |
+ >> temp.sed |
2908 |
++ $(Verb) $(ECHO) 's/@LLVM_LIBDIR@/$(subst /,\/,$(GENTOO_LIBDIR))/' \ |
2909 |
++ >> temp.sed |
2910 |
+ $(Verb) $(SED) -f temp.sed < $< > $@ |
2911 |
+ $(Verb) $(RM) temp.sed |
2912 |
+ |
2913 |
+diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp |
2914 |
+index 224035a..57180ac 100644 |
2915 |
+--- a/tools/llvm-config/llvm-config.cpp |
2916 |
++++ b/tools/llvm-config/llvm-config.cpp |
2917 |
+@@ -265,7 +265,7 @@ int main(int argc, char **argv) { |
2918 |
+ ActivePrefix = CurrentExecPrefix; |
2919 |
+ ActiveIncludeDir = ActivePrefix + "/include"; |
2920 |
+ ActiveBinDir = ActivePrefix + "/bin"; |
2921 |
+- ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX; |
2922 |
++ ActiveLibDir = ActivePrefix + "/" LLVM_LIBDIR; |
2923 |
+ ActiveIncludeOption = "-I" + ActiveIncludeDir; |
2924 |
+ } |
2925 |
+ |
2926 |
+-- |
2927 |
+2.2.1 |
2928 |
+ |
2929 |
|
2930 |
diff --git a/sys-devel/llvm/files/llvm-3.6.0-ocaml-ctypes-0.4.0.patch b/sys-devel/llvm/files/llvm-3.6.0-ocaml-ctypes-0.4.0.patch |
2931 |
new file mode 100644 |
2932 |
index 0000000..154c9cc |
2933 |
--- /dev/null |
2934 |
+++ b/sys-devel/llvm/files/llvm-3.6.0-ocaml-ctypes-0.4.0.patch |
2935 |
@@ -0,0 +1,35 @@ |
2936 |
+diff -Naur llvm-3.6.0.src.orig/bindings/ocaml/executionengine/llvm_executionengine.ml llvm-3.6.0.src/bindings/ocaml/executionengine/llvm_executionengine.ml |
2937 |
+--- llvm-3.6.0.src.orig/bindings/ocaml/executionengine/llvm_executionengine.ml 2015-03-17 11:49:27.274824345 +0100 |
2938 |
++++ llvm-3.6.0.src/bindings/ocaml/executionengine/llvm_executionengine.ml 2015-03-17 11:49:40.333829421 +0100 |
2939 |
+@@ -43,11 +43,11 @@ |
2940 |
+ = "llvm_ee_run_static_dtors" |
2941 |
+ external data_layout : llexecutionengine -> Llvm_target.DataLayout.t |
2942 |
+ = "llvm_ee_get_data_layout" |
2943 |
+-external add_global_mapping_ : Llvm.llvalue -> int64 -> llexecutionengine -> unit |
2944 |
++external add_global_mapping_ : Llvm.llvalue -> nativeint -> llexecutionengine -> unit |
2945 |
+ = "llvm_ee_add_global_mapping" |
2946 |
+-external get_global_value_address_ : string -> llexecutionengine -> int64 |
2947 |
++external get_global_value_address_ : string -> llexecutionengine -> nativeint |
2948 |
+ = "llvm_ee_get_global_value_address" |
2949 |
+-external get_function_address_ : string -> llexecutionengine -> int64 |
2950 |
++external get_function_address_ : string -> llexecutionengine -> nativeint |
2951 |
+ = "llvm_ee_get_function_address" |
2952 |
+ |
2953 |
+ let add_global_mapping llval ptr ee = |
2954 |
+@@ -55,14 +55,14 @@ |
2955 |
+ |
2956 |
+ let get_global_value_address name typ ee = |
2957 |
+ let vptr = get_global_value_address_ name ee in |
2958 |
+- if Int64.to_int vptr <> 0 then |
2959 |
++ if Nativeint.to_int vptr <> 0 then |
2960 |
+ let open Ctypes in !@ (coerce (ptr void) (ptr typ) (ptr_of_raw_address vptr)) |
2961 |
+ else |
2962 |
+ raise (Error ("Value " ^ name ^ " not found")) |
2963 |
+ |
2964 |
+ let get_function_address name typ ee = |
2965 |
+ let fptr = get_function_address_ name ee in |
2966 |
+- if Int64.to_int fptr <> 0 then |
2967 |
++ if Nativeint.to_int fptr <> 0 then |
2968 |
+ let open Ctypes in coerce (ptr void) typ (ptr_of_raw_address fptr) |
2969 |
+ else |
2970 |
+ raise (Error ("Function " ^ name ^ " not found")) |
2971 |
|
2972 |
diff --git a/sys-devel/llvm/files/llvm-3.7-nodoctargz.patch b/sys-devel/llvm/files/llvm-3.7-nodoctargz.patch |
2973 |
new file mode 100644 |
2974 |
index 0000000..8690523 |
2975 |
--- /dev/null |
2976 |
+++ b/sys-devel/llvm/files/llvm-3.7-nodoctargz.patch |
2977 |
@@ -0,0 +1,49 @@ |
2978 |
+--- docs/Makefile.orig 2012-04-30 17:00:01.000000000 +0200 |
2979 |
++++ docs/Makefile 2012-04-30 17:15:52.000000000 +0200 |
2980 |
+@@ -52,11 +52,10 @@ |
2981 |
+ # 'make generated BUILD_FOR_WEBSITE=1' |
2982 |
+ generated:: $(generated_targets) |
2983 |
+ |
2984 |
+-install-html: $(PROJ_OBJ_DIR)/html.tar.gz |
2985 |
++install-html: |
2986 |
+ $(Echo) Installing HTML documentation |
2987 |
+ $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html |
2988 |
+ $(Verb) $(DataInstall) $(HTML) $(DESTDIR)$(PROJ_docsdir)/html |
2989 |
+- $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/html.tar.gz $(DESTDIR)$(PROJ_docsdir) |
2990 |
+ |
2991 |
+ $(PROJ_OBJ_DIR)/html.tar.gz: $(HTML) |
2992 |
+ $(Echo) Packaging HTML documentation |
2993 |
+@@ -68,12 +67,11 @@ |
2994 |
+ |
2995 |
+ install-doxygen: doxygen |
2996 |
+ $(Echo) Installing doxygen documentation |
2997 |
+- $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/doxygen.tar.gz $(DESTDIR)$(PROJ_docsdir) |
2998 |
+ $(Verb) cd $(PROJ_OBJ_DIR)/doxygen/html && \ |
2999 |
+ for DIR in $$($(FIND) . -type d); do \ |
3000 |
+ DESTSUB="$(DESTDIR)$(PROJ_docsdir)/html/doxygen/$$(echo $$DIR | cut -c 3-)"; \ |
3001 |
+ $(MKDIR) $$DESTSUB && \ |
3002 |
+ $(FIND) $$DIR -maxdepth 1 -type f -exec $(DataInstall) {} $$DESTSUB \; ; \ |
3003 |
+ if [ $$? != 0 ]; then exit 1; fi \ |
3004 |
+ done |
3005 |
+ |
3006 |
+-doxygen: regendoc $(PROJ_OBJ_DIR)/doxygen.tar.gz |
3007 |
++doxygen: regendoc |
3008 |
+ |
3009 |
+ regendoc: |
3010 |
+ $(Echo) Building doxygen documentation |
3011 |
+@@ -99,7 +97,6 @@ |
3012 |
+ install-ocamldoc: ocamldoc |
3013 |
+ $(Echo) Installing ocamldoc documentation |
3014 |
+ $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/ocamldoc/html |
3015 |
+- $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/ocamldoc.tar.gz $(DESTDIR)$(PROJ_docsdir) |
3016 |
+ $(Verb) cd $(PROJ_OBJ_DIR)/ocamldoc && \ |
3017 |
+ $(FIND) . -type f -exec \ |
3018 |
+ $(DataInstall) {} $(DESTDIR)$(PROJ_docsdir)/ocamldoc/html \; |
3019 |
+@@ -109,7 +106,6 @@ |
3020 |
+ $(Verb) $(RM) -rf $(PROJ_OBJ_DIR)/ocamldoc.tar* |
3021 |
+ $(Verb) $(TAR) cf $(PROJ_OBJ_DIR)/ocamldoc.tar ocamldoc |
3022 |
+ $(Verb) $(GZIPBIN) $(PROJ_OBJ_DIR)/ocamldoc.tar |
3023 |
+- $(Verb) $(CP) $(PROJ_OBJ_DIR)/ocamldoc.tar.gz $(PROJ_OBJ_DIR)/ocamldoc/html/ |
3024 |
+ |
3025 |
+ regen-ocamldoc: |
3026 |
+ $(Echo) Building ocamldoc documentation |
3027 |
|
3028 |
diff --git a/sys-devel/llvm/llvm-2.8-r2.ebuild b/sys-devel/llvm/llvm-2.8-r2.ebuild |
3029 |
new file mode 100644 |
3030 |
index 0000000..ed5e542 |
3031 |
--- /dev/null |
3032 |
+++ b/sys-devel/llvm/llvm-2.8-r2.ebuild |
3033 |
@@ -0,0 +1,168 @@ |
3034 |
+# Copyright 1999-2015 Gentoo Foundation |
3035 |
+# Distributed under the terms of the GNU General Public License v2 |
3036 |
+# $Id$ |
3037 |
+ |
3038 |
+EAPI="4" |
3039 |
+inherit eutils multilib toolchain-funcs |
3040 |
+ |
3041 |
+DESCRIPTION="Low Level Virtual Machine" |
3042 |
+HOMEPAGE="http://llvm.org/" |
3043 |
+# Upstream silently re-released the tarball... |
3044 |
+# drop the -> in 2.9 |
3045 |
+SRC_URI="http://llvm.org/releases/${PV}/${P}.tgz -> ${P}-r1.tgz" |
3046 |
+ |
3047 |
+LICENSE="UoI-NCSA" |
3048 |
+SLOT="0" |
3049 |
+KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux ~ppc-macos" |
3050 |
+IUSE="debug +libffi multitarget ocaml test udis86" |
3051 |
+ |
3052 |
+DEPEND="dev-lang/perl |
3053 |
+ >=sys-devel/make-3.79 |
3054 |
+ >=sys-devel/flex-2.5.4 |
3055 |
+ >=sys-devel/bison-1.875d |
3056 |
+ || ( >=sys-devel/gcc-3.0 >=sys-devel/gcc-apple-4.2.1 ) |
3057 |
+ || ( >=sys-devel/binutils-2.18 >=sys-devel/binutils-apple-3.2.3 ) |
3058 |
+ libffi? ( virtual/libffi ) |
3059 |
+ ocaml? ( dev-lang/ocaml ) |
3060 |
+ udis86? ( dev-libs/udis86[pic(+)] )" |
3061 |
+RDEPEND="dev-lang/perl" |
3062 |
+ |
3063 |
+S=${WORKDIR}/${PN}-${PV/_pre*} |
3064 |
+ |
3065 |
+pkg_setup() { |
3066 |
+ # need to check if the active compiler is ok |
3067 |
+ |
3068 |
+ broken_gcc=" 3.2.2 3.2.3 3.3.2 4.1.1 " |
3069 |
+ broken_gcc_x86=" 3.4.0 3.4.2 " |
3070 |
+ broken_gcc_amd64=" 3.4.6 " |
3071 |
+ |
3072 |
+ gcc_vers=$(gcc-fullversion) |
3073 |
+ |
3074 |
+ if [[ ${broken_gcc} == *" ${version} "* ]] ; then |
3075 |
+ elog "Your version of gcc is known to miscompile llvm." |
3076 |
+ elog "Check http://www.llvm.org/docs/GettingStarted.html for" |
3077 |
+ elog "possible solutions." |
3078 |
+ die "Your currently active version of gcc is known to miscompile llvm" |
3079 |
+ fi |
3080 |
+ |
3081 |
+ if [[ ${CHOST} == i*86-* && ${broken_gcc_x86} == *" ${version} "* ]] ; then |
3082 |
+ elog "Your version of gcc is known to miscompile llvm on x86" |
3083 |
+ elog "architectures. Check" |
3084 |
+ elog "http://www.llvm.org/docs/GettingStarted.html for possible" |
3085 |
+ elog "solutions." |
3086 |
+ die "Your currently active version of gcc is known to miscompile llvm" |
3087 |
+ fi |
3088 |
+ |
3089 |
+ if [[ ${CHOST} == x86_64-* && ${broken_gcc_amd64} == *" ${version} "* ]]; |
3090 |
+ then |
3091 |
+ elog "Your version of gcc is known to miscompile llvm in amd64" |
3092 |
+ elog "architectures. Check" |
3093 |
+ elog "http://www.llvm.org/docs/GettingStarted.html for possible" |
3094 |
+ elog "solutions." |
3095 |
+ die "Your currently active version of gcc is known to miscompile llvm" |
3096 |
+ fi |
3097 |
+} |
3098 |
+ |
3099 |
+src_prepare() { |
3100 |
+ # unfortunately ./configure won't listen to --mandir and the-like, so take |
3101 |
+ # care of this. |
3102 |
+ einfo "Fixing install dirs" |
3103 |
+ sed -e 's,^PROJ_docsdir.*,PROJ_docsdir := $(PROJ_prefix)/share/doc/'${PF}, \ |
3104 |
+ -e 's,^PROJ_etcdir.*,PROJ_etcdir := '"${EPREFIX}"'/etc/llvm,' \ |
3105 |
+ -e 's,^PROJ_libdir.*,PROJ_libdir := $(PROJ_prefix)/'$(get_libdir)/${PN}, \ |
3106 |
+ -i Makefile.config.in || die "Makefile.config sed failed" |
3107 |
+ sed -e 's,$ABS_RUN_DIR/lib,'"${EPREFIX}"/usr/$(get_libdir)/${PN}, \ |
3108 |
+ -i tools/llvm-config/llvm-config.in.in || die "llvm-config sed failed" |
3109 |
+ |
3110 |
+ einfo "Fixing rpath and CFLAGS" |
3111 |
+ sed -e 's,\$(RPATH) -Wl\,\$(\(ToolDir\|LibDir\)),$(RPATH) -Wl\,'"${EPREFIX}"/usr/$(get_libdir)/${PN}, \ |
3112 |
+ -e '/OmitFramePointer/s/-fomit-frame-pointer//' \ |
3113 |
+ -i Makefile.rules || die "rpath sed failed" |
3114 |
+ |
3115 |
+ epatch "${FILESDIR}"/${PN}-2.7-nodoctargz.patch |
3116 |
+ epatch "${FILESDIR}"/${PN}-2.6-commandguide-nops.patch |
3117 |
+ epatch "${FILESDIR}"/${PN}-2.8-darwin8.patch |
3118 |
+ # Upstream backport, r117774 |
3119 |
+ epatch "${FILESDIR}"/${P}-alignof.patch |
3120 |
+ |
3121 |
+ # Additional unistd.h include for GCC 4.7 |
3122 |
+ epatch "${FILESDIR}"/${PN}-2.9-gcc4.7.patch |
3123 |
+ |
3124 |
+ # User patches |
3125 |
+ epatch_user |
3126 |
+} |
3127 |
+ |
3128 |
+src_configure() { |
3129 |
+ local CONF_FLAGS="--enable-shared" |
3130 |
+ |
3131 |
+ if use debug; then |
3132 |
+ CONF_FLAGS="${CONF_FLAGS} --disable-optimized" |
3133 |
+ einfo "Note: Compiling LLVM in debug mode will create huge and slow binaries" |
3134 |
+ # ...and you probably shouldn't use tmpfs, unless it can hold 900MB |
3135 |
+ else |
3136 |
+ CONF_FLAGS="${CONF_FLAGS} \ |
3137 |
+ --enable-optimized \ |
3138 |
+ --with-optimize-option= \ |
3139 |
+ --disable-assertions \ |
3140 |
+ --disable-expensive-checks" |
3141 |
+ fi |
3142 |
+ |
3143 |
+ if use multitarget; then |
3144 |
+ CONF_FLAGS="${CONF_FLAGS} --enable-targets=all" |
3145 |
+ else |
3146 |
+ CONF_FLAGS="${CONF_FLAGS} --enable-targets=host-only" |
3147 |
+ fi |
3148 |
+ |
3149 |
+ if use amd64; then |
3150 |
+ CONF_FLAGS="${CONF_FLAGS} --enable-pic" |
3151 |
+ fi |
3152 |
+ |
3153 |
+ CONF_FLAGS="${CONF_FLAGS} \ |
3154 |
+ --with-llvmgccdir=/dev/null \ |
3155 |
+ --with-llvmgcc=nope \ |
3156 |
+ --with-llvmgxx=nope" |
3157 |
+ |
3158 |
+ if use ocaml; then |
3159 |
+ CONF_FLAGS="${CONF_FLAGS} --enable-bindings=ocaml" |
3160 |
+ else |
3161 |
+ CONF_FLAGS="${CONF_FLAGS} --enable-bindings=none" |
3162 |
+ fi |
3163 |
+ |
3164 |
+ if use udis86; then |
3165 |
+ CONF_FLAGS="${CONF_FLAGS} --with-udis86" |
3166 |
+ fi |
3167 |
+ CONF_FLAGS="${CONF_FLAGS} $(use_enable libffi)" |
3168 |
+ econf ${CONF_FLAGS} || die "econf failed" |
3169 |
+} |
3170 |
+ |
3171 |
+src_compile() { |
3172 |
+ emake VERBOSE=1 KEEP_SYMBOLS=1 REQUIRES_RTTI=1 || die "emake failed" |
3173 |
+} |
3174 |
+ |
3175 |
+src_install() { |
3176 |
+ emake KEEP_SYMBOLS=1 DESTDIR="${D}" install || die "install failed" |
3177 |
+ |
3178 |
+ # Fix install_names on Darwin. The build system is too complicated |
3179 |
+ # to just fix this, so we correct it post-install |
3180 |
+ local lib= f= odylib= |
3181 |
+ if [[ ${CHOST} == *-darwin* ]] ; then |
3182 |
+ for lib in lib{EnhancedDisassembly,LLVM-${PV},BugpointPasses,LLVMHello,LTO,profile_rt}.dylib ; do |
3183 |
+ # libEnhancedDisassembly is Darwin10 only, so non-fatal |
3184 |
+ [[ -f ${ED}/usr/lib/${PN}/${lib} ]] || continue |
3185 |
+ ebegin "fixing install_name of $lib" |
3186 |
+ install_name_tool \ |
3187 |
+ -id "${EPREFIX}"/usr/lib/${PN}/${lib} \ |
3188 |
+ "${ED}"/usr/lib/${PN}/${lib} |
3189 |
+ eend $? |
3190 |
+ done |
3191 |
+ for f in "${ED}"/usr/bin/* "${ED}"/usr/lib/${PN}/libLTO.dylib ; do |
3192 |
+ odylib=$(scanmacho -BF'%n#f' "${f}" | tr ',' '\n' | grep libLLVM-${PV}.dylib) |
3193 |
+ ebegin "fixing install_name reference to ${odylib} of ${f##*/}" |
3194 |
+ install_name_tool \ |
3195 |
+ -change "${odylib}" \ |
3196 |
+ "${EPREFIX}"/usr/lib/${PN}/libLLVM-${PV}.dylib \ |
3197 |
+ "${f}" |
3198 |
+ eend $? |
3199 |
+ done |
3200 |
+ fi |
3201 |
+} |
3202 |
|
3203 |
diff --git a/sys-devel/llvm/llvm-2.9-r2.ebuild b/sys-devel/llvm/llvm-2.9-r2.ebuild |
3204 |
new file mode 100644 |
3205 |
index 0000000..515e387 |
3206 |
--- /dev/null |
3207 |
+++ b/sys-devel/llvm/llvm-2.9-r2.ebuild |
3208 |
@@ -0,0 +1,175 @@ |
3209 |
+# Copyright 1999-2015 Gentoo Foundation |
3210 |
+# Distributed under the terms of the GNU General Public License v2 |
3211 |
+# $Id$ |
3212 |
+ |
3213 |
+EAPI="4" |
3214 |
+inherit eutils flag-o-matic multilib toolchain-funcs pax-utils |
3215 |
+ |
3216 |
+DESCRIPTION="Low Level Virtual Machine" |
3217 |
+HOMEPAGE="http://llvm.org/" |
3218 |
+SRC_URI="http://llvm.org/releases/${PV}/${P}.tgz" |
3219 |
+ |
3220 |
+LICENSE="UoI-NCSA" |
3221 |
+SLOT="0" |
3222 |
+KEYWORDS="amd64 ~ppc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos" |
3223 |
+IUSE="debug +libffi multitarget ocaml test udis86 vim-syntax" |
3224 |
+ |
3225 |
+DEPEND="dev-lang/perl |
3226 |
+ >=sys-devel/make-3.79 |
3227 |
+ >=sys-devel/flex-2.5.4 |
3228 |
+ >=sys-devel/bison-1.875d |
3229 |
+ || ( >=sys-devel/gcc-3.0 >=sys-devel/gcc-apple-4.2.1 ) |
3230 |
+ || ( >=sys-devel/binutils-2.18 >=sys-devel/binutils-apple-3.2.3 ) |
3231 |
+ libffi? ( virtual/pkgconfig |
3232 |
+ virtual/libffi ) |
3233 |
+ ocaml? ( dev-lang/ocaml ) |
3234 |
+ udis86? ( dev-libs/udis86[pic(+)] )" |
3235 |
+RDEPEND="dev-lang/perl |
3236 |
+ libffi? ( virtual/libffi ) |
3237 |
+ vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )" |
3238 |
+ |
3239 |
+S=${WORKDIR}/${PN}-${PV/_pre*} |
3240 |
+ |
3241 |
+pkg_setup() { |
3242 |
+ # need to check if the active compiler is ok |
3243 |
+ |
3244 |
+ broken_gcc=" 3.2.2 3.2.3 3.3.2 4.1.1 " |
3245 |
+ broken_gcc_x86=" 3.4.0 3.4.2 " |
3246 |
+ broken_gcc_amd64=" 3.4.6 " |
3247 |
+ |
3248 |
+ gcc_vers=$(gcc-fullversion) |
3249 |
+ |
3250 |
+ if [[ ${broken_gcc} == *" ${version} "* ]] ; then |
3251 |
+ elog "Your version of gcc is known to miscompile llvm." |
3252 |
+ elog "Check http://www.llvm.org/docs/GettingStarted.html for" |
3253 |
+ elog "possible solutions." |
3254 |
+ die "Your currently active version of gcc is known to miscompile llvm" |
3255 |
+ fi |
3256 |
+ |
3257 |
+ if [[ ${CHOST} == i*86-* && ${broken_gcc_x86} == *" ${version} "* ]] ; then |
3258 |
+ elog "Your version of gcc is known to miscompile llvm on x86" |
3259 |
+ elog "architectures. Check" |
3260 |
+ elog "http://www.llvm.org/docs/GettingStarted.html for possible" |
3261 |
+ elog "solutions." |
3262 |
+ die "Your currently active version of gcc is known to miscompile llvm" |
3263 |
+ fi |
3264 |
+ |
3265 |
+ if [[ ${CHOST} == x86_64-* && ${broken_gcc_amd64} == *" ${version} "* ]]; |
3266 |
+ then |
3267 |
+ elog "Your version of gcc is known to miscompile llvm in amd64" |
3268 |
+ elog "architectures. Check" |
3269 |
+ elog "http://www.llvm.org/docs/GettingStarted.html for possible" |
3270 |
+ elog "solutions." |
3271 |
+ die "Your currently active version of gcc is known to miscompile llvm" |
3272 |
+ fi |
3273 |
+} |
3274 |
+ |
3275 |
+src_prepare() { |
3276 |
+ # unfortunately ./configure won't listen to --mandir and the-like, so take |
3277 |
+ # care of this. |
3278 |
+ einfo "Fixing install dirs" |
3279 |
+ sed -e 's,^PROJ_docsdir.*,PROJ_docsdir := $(PROJ_prefix)/share/doc/'${PF}, \ |
3280 |
+ -e 's,^PROJ_etcdir.*,PROJ_etcdir := '"${EPREFIX}"'/etc/llvm,' \ |
3281 |
+ -e 's,^PROJ_libdir.*,PROJ_libdir := $(PROJ_prefix)/'$(get_libdir)/${PN}, \ |
3282 |
+ -i Makefile.config.in || die "Makefile.config sed failed" |
3283 |
+ sed -e 's,$ABS_RUN_DIR/lib,'"${EPREFIX}"/usr/$(get_libdir)/${PN}, \ |
3284 |
+ -i tools/llvm-config/llvm-config.in.in || die "llvm-config sed failed" |
3285 |
+ |
3286 |
+ einfo "Fixing rpath and CFLAGS" |
3287 |
+ sed -e 's,\$(RPATH) -Wl\,\$(\(ToolDir\|LibDir\)),$(RPATH) -Wl\,'"${EPREFIX}"/usr/$(get_libdir)/${PN}, \ |
3288 |
+ -e '/OmitFramePointer/s/-fomit-frame-pointer//' \ |
3289 |
+ -i Makefile.rules || die "rpath sed failed" |
3290 |
+ |
3291 |
+ epatch "${FILESDIR}"/${PN}-2.6-commandguide-nops.patch |
3292 |
+ epatch "${FILESDIR}"/${PN}-2.9-nodoctargz.patch |
3293 |
+ |
3294 |
+ # Upstream commit r131062 |
3295 |
+ epatch "${FILESDIR}"/${P}-Operator.h-c++0x.patch |
3296 |
+ |
3297 |
+ # Additional unistd.h include for GCC 4.7 |
3298 |
+ epatch "${FILESDIR}"/${P}-gcc4.7.patch |
3299 |
+ |
3300 |
+ # User patches |
3301 |
+ epatch_user |
3302 |
+} |
3303 |
+ |
3304 |
+src_configure() { |
3305 |
+ local CONF_FLAGS="--enable-shared |
3306 |
+ --with-optimize-option= |
3307 |
+ $(use_enable !debug optimized) |
3308 |
+ $(use_enable debug assertions) |
3309 |
+ $(use_enable debug expensive-checks)" |
3310 |
+ |
3311 |
+ if use multitarget; then |
3312 |
+ CONF_FLAGS="${CONF_FLAGS} --enable-targets=all" |
3313 |
+ else |
3314 |
+ CONF_FLAGS="${CONF_FLAGS} --enable-targets=host-only" |
3315 |
+ fi |
3316 |
+ |
3317 |
+ if use amd64; then |
3318 |
+ CONF_FLAGS="${CONF_FLAGS} --enable-pic" |
3319 |
+ fi |
3320 |
+ |
3321 |
+ CONF_FLAGS="${CONF_FLAGS} \ |
3322 |
+ --with-llvmgccdir=/dev/null \ |
3323 |
+ --with-llvmgcc=nope \ |
3324 |
+ --with-llvmgxx=nope" |
3325 |
+ |
3326 |
+ if use ocaml; then |
3327 |
+ CONF_FLAGS="${CONF_FLAGS} --enable-bindings=ocaml" |
3328 |
+ else |
3329 |
+ CONF_FLAGS="${CONF_FLAGS} --enable-bindings=none" |
3330 |
+ fi |
3331 |
+ |
3332 |
+ if use udis86; then |
3333 |
+ CONF_FLAGS="${CONF_FLAGS} --with-udis86" |
3334 |
+ fi |
3335 |
+ |
3336 |
+ if use libffi; then |
3337 |
+ append-cppflags "$(pkg-config --cflags libffi)" |
3338 |
+ fi |
3339 |
+ CONF_FLAGS="${CONF_FLAGS} $(use_enable libffi)" |
3340 |
+ econf ${CONF_FLAGS} || die "econf failed" |
3341 |
+} |
3342 |
+ |
3343 |
+src_compile() { |
3344 |
+ emake VERBOSE=1 KEEP_SYMBOLS=1 REQUIRES_RTTI=1 || die "emake failed" |
3345 |
+ |
3346 |
+ pax-mark m Release/bin/lli |
3347 |
+ if use test; then |
3348 |
+ pax-mark m unittests/ExecutionEngine/JIT/Release/JITTests |
3349 |
+ fi |
3350 |
+} |
3351 |
+ |
3352 |
+src_install() { |
3353 |
+ emake KEEP_SYMBOLS=1 DESTDIR="${D}" install || die "install failed" |
3354 |
+ |
3355 |
+ if use vim-syntax; then |
3356 |
+ insinto /usr/share/vim/vimfiles/syntax |
3357 |
+ doins utils/vim/*.vim |
3358 |
+ fi |
3359 |
+ |
3360 |
+ # Fix install_names on Darwin. The build system is too complicated |
3361 |
+ # to just fix this, so we correct it post-install |
3362 |
+ local lib= f= odylib= |
3363 |
+ if [[ ${CHOST} == *-darwin* ]] ; then |
3364 |
+ for lib in lib{EnhancedDisassembly,LLVM-${PV},LTO}.dylib {BugpointPasses,LLVMHello,profile_rt}.dylib ; do |
3365 |
+ # libEnhancedDisassembly is Darwin10 only, so non-fatal |
3366 |
+ [[ -f ${ED}/usr/lib/${PN}/${lib} ]] || continue |
3367 |
+ ebegin "fixing install_name of $lib" |
3368 |
+ install_name_tool \ |
3369 |
+ -id "${EPREFIX}"/usr/lib/${PN}/${lib} \ |
3370 |
+ "${ED}"/usr/lib/${PN}/${lib} |
3371 |
+ eend $? |
3372 |
+ done |
3373 |
+ for f in "${ED}"/usr/bin/* "${ED}"/usr/lib/${PN}/libLTO.dylib ; do |
3374 |
+ odylib=$(scanmacho -BF'%n#f' "${f}" | tr ',' '\n' | grep libLLVM-${PV}.dylib) |
3375 |
+ ebegin "fixing install_name reference to ${odylib} of ${f##*/}" |
3376 |
+ install_name_tool \ |
3377 |
+ -change "${odylib}" \ |
3378 |
+ "${EPREFIX}"/usr/lib/${PN}/libLLVM-${PV}.dylib \ |
3379 |
+ "${f}" |
3380 |
+ eend $? |
3381 |
+ done |
3382 |
+ fi |
3383 |
+} |
3384 |
|
3385 |
diff --git a/sys-devel/llvm/llvm-3.0-r2.ebuild b/sys-devel/llvm/llvm-3.0-r2.ebuild |
3386 |
new file mode 100644 |
3387 |
index 0000000..a0caca1 |
3388 |
--- /dev/null |
3389 |
+++ b/sys-devel/llvm/llvm-3.0-r2.ebuild |
3390 |
@@ -0,0 +1,181 @@ |
3391 |
+# Copyright 1999-2013 Gentoo Foundation |
3392 |
+# Distributed under the terms of the GNU General Public License v2 |
3393 |
+# $Id$ |
3394 |
+ |
3395 |
+EAPI="4" |
3396 |
+PYTHON_DEPEND="2" |
3397 |
+inherit eutils flag-o-matic multilib toolchain-funcs python pax-utils |
3398 |
+ |
3399 |
+DESCRIPTION="Low Level Virtual Machine" |
3400 |
+HOMEPAGE="http://llvm.org/" |
3401 |
+SRC_URI="http://llvm.org/releases/${PV}/${P}.tar.gz" |
3402 |
+ |
3403 |
+LICENSE="UoI-NCSA" |
3404 |
+SLOT="0" |
3405 |
+KEYWORDS="amd64 ~ppc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos" |
3406 |
+IUSE="debug gold +libffi multitarget ocaml test udis86 vim-syntax" |
3407 |
+ |
3408 |
+DEPEND="dev-lang/perl |
3409 |
+ >=sys-devel/make-3.79 |
3410 |
+ >=sys-devel/flex-2.5.4 |
3411 |
+ >=sys-devel/bison-1.875d |
3412 |
+ || ( >=sys-devel/gcc-3.0 >=sys-devel/gcc-apple-4.2.1 ) |
3413 |
+ || ( >=sys-devel/binutils-2.18 >=sys-devel/binutils-apple-3.2.3 ) |
3414 |
+ gold? ( >=sys-devel/binutils-2.22[cxx] ) |
3415 |
+ libffi? ( virtual/pkgconfig |
3416 |
+ virtual/libffi ) |
3417 |
+ ocaml? ( dev-lang/ocaml ) |
3418 |
+ udis86? ( dev-libs/udis86[pic(+)] )" |
3419 |
+RDEPEND="dev-lang/perl |
3420 |
+ libffi? ( virtual/libffi ) |
3421 |
+ vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )" |
3422 |
+ |
3423 |
+S=${WORKDIR}/${P}.src |
3424 |
+ |
3425 |
+pkg_setup() { |
3426 |
+ # Required for test and build |
3427 |
+ python_set_active_version 2 |
3428 |
+ python_pkg_setup |
3429 |
+ |
3430 |
+ # need to check if the active compiler is ok |
3431 |
+ |
3432 |
+ broken_gcc=" 3.2.2 3.2.3 3.3.2 4.1.1 " |
3433 |
+ broken_gcc_x86=" 3.4.0 3.4.2 " |
3434 |
+ broken_gcc_amd64=" 3.4.6 " |
3435 |
+ |
3436 |
+ gcc_vers=$(gcc-fullversion) |
3437 |
+ |
3438 |
+ if [[ ${broken_gcc} == *" ${version} "* ]] ; then |
3439 |
+ elog "Your version of gcc is known to miscompile llvm." |
3440 |
+ elog "Check http://www.llvm.org/docs/GettingStarted.html for" |
3441 |
+ elog "possible solutions." |
3442 |
+ die "Your currently active version of gcc is known to miscompile llvm" |
3443 |
+ fi |
3444 |
+ |
3445 |
+ if [[ ${CHOST} == i*86-* && ${broken_gcc_x86} == *" ${version} "* ]] ; then |
3446 |
+ elog "Your version of gcc is known to miscompile llvm on x86" |
3447 |
+ elog "architectures. Check" |
3448 |
+ elog "http://www.llvm.org/docs/GettingStarted.html for possible" |
3449 |
+ elog "solutions." |
3450 |
+ die "Your currently active version of gcc is known to miscompile llvm" |
3451 |
+ fi |
3452 |
+ |
3453 |
+ if [[ ${CHOST} == x86_64-* && ${broken_gcc_amd64} == *" ${version} "* ]]; |
3454 |
+ then |
3455 |
+ elog "Your version of gcc is known to miscompile llvm in amd64" |
3456 |
+ elog "architectures. Check" |
3457 |
+ elog "http://www.llvm.org/docs/GettingStarted.html for possible" |
3458 |
+ elog "solutions." |
3459 |
+ die "Your currently active version of gcc is known to miscompile llvm" |
3460 |
+ fi |
3461 |
+} |
3462 |
+ |
3463 |
+src_prepare() { |
3464 |
+ # unfortunately ./configure won't listen to --mandir and the-like, so take |
3465 |
+ # care of this. |
3466 |
+ einfo "Fixing install dirs" |
3467 |
+ sed -e 's,^PROJ_docsdir.*,PROJ_docsdir := $(PROJ_prefix)/share/doc/'${PF}, \ |
3468 |
+ -e 's,^PROJ_etcdir.*,PROJ_etcdir := '"${EPREFIX}"'/etc/llvm,' \ |
3469 |
+ -e 's,^PROJ_libdir.*,PROJ_libdir := $(PROJ_prefix)/'$(get_libdir)/${PN}, \ |
3470 |
+ -i Makefile.config.in || die "Makefile.config sed failed" |
3471 |
+ sed -e 's,$ABS_RUN_DIR/lib,'"${EPREFIX}"/usr/$(get_libdir)/${PN}, \ |
3472 |
+ -i tools/llvm-config/llvm-config.in.in || die "llvm-config sed failed" |
3473 |
+ |
3474 |
+ einfo "Fixing rpath and CFLAGS" |
3475 |
+ sed -e 's,\$(RPATH) -Wl\,\$(\(ToolDir\|LibDir\)),$(RPATH) -Wl\,'"${EPREFIX}"/usr/$(get_libdir)/${PN}, \ |
3476 |
+ -e '/OmitFramePointer/s/-fomit-frame-pointer//' \ |
3477 |
+ -i Makefile.rules || die "rpath sed failed" |
3478 |
+ |
3479 |
+ # Specify python version |
3480 |
+ python_convert_shebangs -r 2 test/Scripts |
3481 |
+ |
3482 |
+ epatch "${FILESDIR}"/${PN}-2.6-commandguide-nops.patch |
3483 |
+ epatch "${FILESDIR}"/${PN}-2.9-nodoctargz.patch |
3484 |
+ epatch "${FILESDIR}"/${P}-ocaml_install.patch |
3485 |
+ epatch "${FILESDIR}"/${P}-PPC_macro.patch |
3486 |
+ epatch "${FILESDIR}"/${P}-PPCCompilationCallbackC_static.patch |
3487 |
+ epatch "${FILESDIR}"/${P}-gold_LTO_link.patch |
3488 |
+ epatch "${FILESDIR}"/${P}-set_soname.patch |
3489 |
+ |
3490 |
+ # User patches |
3491 |
+ epatch_user |
3492 |
+} |
3493 |
+ |
3494 |
+src_configure() { |
3495 |
+ local CONF_FLAGS="--enable-shared |
3496 |
+ --with-optimize-option= |
3497 |
+ $(use_enable !debug optimized) |
3498 |
+ $(use_enable debug assertions) |
3499 |
+ $(use_enable debug expensive-checks)" |
3500 |
+ |
3501 |
+ if use multitarget; then |
3502 |
+ CONF_FLAGS="${CONF_FLAGS} --enable-targets=all" |
3503 |
+ else |
3504 |
+ CONF_FLAGS="${CONF_FLAGS} --enable-targets=host-only" |
3505 |
+ fi |
3506 |
+ |
3507 |
+ if use amd64; then |
3508 |
+ CONF_FLAGS="${CONF_FLAGS} --enable-pic" |
3509 |
+ fi |
3510 |
+ |
3511 |
+ if use gold; then |
3512 |
+ CONF_FLAGS="${CONF_FLAGS} --with-binutils-include=${EPREFIX}/usr/include/" |
3513 |
+ fi |
3514 |
+ if use ocaml; then |
3515 |
+ CONF_FLAGS="${CONF_FLAGS} --enable-bindings=ocaml" |
3516 |
+ else |
3517 |
+ CONF_FLAGS="${CONF_FLAGS} --enable-bindings=none" |
3518 |
+ fi |
3519 |
+ |
3520 |
+ if use udis86; then |
3521 |
+ CONF_FLAGS="${CONF_FLAGS} --with-udis86" |
3522 |
+ fi |
3523 |
+ |
3524 |
+ if use libffi; then |
3525 |
+ append-cppflags "$(pkg-config --cflags libffi)" |
3526 |
+ fi |
3527 |
+ CONF_FLAGS="${CONF_FLAGS} $(use_enable libffi)" |
3528 |
+ econf ${CONF_FLAGS} || die "econf failed" |
3529 |
+} |
3530 |
+ |
3531 |
+src_compile() { |
3532 |
+ emake VERBOSE=1 KEEP_SYMBOLS=1 REQUIRES_RTTI=1 || die "emake failed" |
3533 |
+ |
3534 |
+ pax-mark m Release/bin/lli |
3535 |
+ if use test; then |
3536 |
+ pax-mark m unittests/ExecutionEngine/JIT/Release/JITTests |
3537 |
+ fi |
3538 |
+} |
3539 |
+ |
3540 |
+src_install() { |
3541 |
+ emake KEEP_SYMBOLS=1 DESTDIR="${D}" install || die "install failed" |
3542 |
+ |
3543 |
+ if use vim-syntax; then |
3544 |
+ insinto /usr/share/vim/vimfiles/syntax |
3545 |
+ doins utils/vim/*.vim |
3546 |
+ fi |
3547 |
+ |
3548 |
+ # Fix install_names on Darwin. The build system is too complicated |
3549 |
+ # to just fix this, so we correct it post-install |
3550 |
+ local lib= f= odylib= |
3551 |
+ if [[ ${CHOST} == *-darwin* ]] ; then |
3552 |
+ for lib in lib{EnhancedDisassembly,LLVM-${PV},LTO,profile_rt}.dylib {BugpointPasses,LLVMHello}.dylib ; do |
3553 |
+ # libEnhancedDisassembly is Darwin10 only, so non-fatal |
3554 |
+ [[ -f ${ED}/usr/lib/${PN}/${lib} ]] || continue |
3555 |
+ ebegin "fixing install_name of $lib" |
3556 |
+ install_name_tool \ |
3557 |
+ -id "${EPREFIX}"/usr/lib/${PN}/${lib} \ |
3558 |
+ "${ED}"/usr/lib/${PN}/${lib} |
3559 |
+ eend $? |
3560 |
+ done |
3561 |
+ for f in "${ED}"/usr/bin/* "${ED}"/usr/lib/${PN}/libLTO.dylib ; do |
3562 |
+ odylib=$(scanmacho -BF'%n#f' "${f}" | tr ',' '\n' | grep libLLVM-${PV}.dylib) |
3563 |
+ ebegin "fixing install_name reference to ${odylib} of ${f##*/}" |
3564 |
+ install_name_tool \ |
3565 |
+ -change "${odylib}" \ |
3566 |
+ "${EPREFIX}"/usr/lib/${PN}/libLLVM-${PV}.dylib \ |
3567 |
+ "${f}" |
3568 |
+ eend $? |
3569 |
+ done |
3570 |
+ fi |
3571 |
+} |
3572 |
|
3573 |
diff --git a/sys-devel/llvm/llvm-3.1-r2.ebuild b/sys-devel/llvm/llvm-3.1-r2.ebuild |
3574 |
new file mode 100644 |
3575 |
index 0000000..fd9ce13 |
3576 |
--- /dev/null |
3577 |
+++ b/sys-devel/llvm/llvm-3.1-r2.ebuild |
3578 |
@@ -0,0 +1,191 @@ |
3579 |
+# Copyright 1999-2015 Gentoo Foundation |
3580 |
+# Distributed under the terms of the GNU General Public License v2 |
3581 |
+# $Id$ |
3582 |
+ |
3583 |
+EAPI="4" |
3584 |
+PYTHON_DEPEND="2" |
3585 |
+inherit eutils flag-o-matic multilib toolchain-funcs python pax-utils |
3586 |
+ |
3587 |
+DESCRIPTION="Low Level Virtual Machine" |
3588 |
+HOMEPAGE="http://llvm.org/" |
3589 |
+SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.gz" |
3590 |
+ |
3591 |
+LICENSE="UoI-NCSA" |
3592 |
+SLOT="0" |
3593 |
+KEYWORDS="amd64 arm ppc x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" |
3594 |
+IUSE="debug gold +libffi multitarget ocaml test udis86 vim-syntax" |
3595 |
+ |
3596 |
+DEPEND="dev-lang/perl |
3597 |
+ >=sys-devel/make-3.79 |
3598 |
+ >=sys-devel/flex-2.5.4 |
3599 |
+ >=sys-devel/bison-1.875d |
3600 |
+ || ( >=sys-devel/gcc-3.0 >=sys-devel/gcc-apple-4.2.1 ) |
3601 |
+ || ( >=sys-devel/binutils-2.18 >=sys-devel/binutils-apple-3.2.3 ) |
3602 |
+ gold? ( >=sys-devel/binutils-2.22[cxx] ) |
3603 |
+ libffi? ( virtual/pkgconfig |
3604 |
+ virtual/libffi ) |
3605 |
+ ocaml? ( dev-lang/ocaml ) |
3606 |
+ udis86? ( dev-libs/udis86[pic(+)] )" |
3607 |
+RDEPEND="dev-lang/perl |
3608 |
+ libffi? ( virtual/libffi ) |
3609 |
+ vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )" |
3610 |
+ |
3611 |
+S=${WORKDIR}/${P}.src |
3612 |
+ |
3613 |
+pkg_setup() { |
3614 |
+ # Required for test and build |
3615 |
+ python_set_active_version 2 |
3616 |
+ python_pkg_setup |
3617 |
+ |
3618 |
+ # need to check if the active compiler is ok |
3619 |
+ |
3620 |
+ broken_gcc=" 3.2.2 3.2.3 3.3.2 4.1.1 " |
3621 |
+ broken_gcc_x86=" 3.4.0 3.4.2 " |
3622 |
+ broken_gcc_amd64=" 3.4.6 " |
3623 |
+ |
3624 |
+ gcc_vers=$(gcc-fullversion) |
3625 |
+ |
3626 |
+ if [[ ${broken_gcc} == *" ${version} "* ]] ; then |
3627 |
+ elog "Your version of gcc is known to miscompile llvm." |
3628 |
+ elog "Check http://www.llvm.org/docs/GettingStarted.html for" |
3629 |
+ elog "possible solutions." |
3630 |
+ die "Your currently active version of gcc is known to miscompile llvm" |
3631 |
+ fi |
3632 |
+ |
3633 |
+ if [[ ${CHOST} == i*86-* && ${broken_gcc_x86} == *" ${version} "* ]] ; then |
3634 |
+ elog "Your version of gcc is known to miscompile llvm on x86" |
3635 |
+ elog "architectures. Check" |
3636 |
+ elog "http://www.llvm.org/docs/GettingStarted.html for possible" |
3637 |
+ elog "solutions." |
3638 |
+ die "Your currently active version of gcc is known to miscompile llvm" |
3639 |
+ fi |
3640 |
+ |
3641 |
+ if [[ ${CHOST} == x86_64-* && ${broken_gcc_amd64} == *" ${version} "* ]]; |
3642 |
+ then |
3643 |
+ elog "Your version of gcc is known to miscompile llvm in amd64" |
3644 |
+ elog "architectures. Check" |
3645 |
+ elog "http://www.llvm.org/docs/GettingStarted.html for possible" |
3646 |
+ elog "solutions." |
3647 |
+ die "Your currently active version of gcc is known to miscompile llvm" |
3648 |
+ fi |
3649 |
+} |
3650 |
+ |
3651 |
+src_prepare() { |
3652 |
+ # unfortunately ./configure won't listen to --mandir and the-like, so take |
3653 |
+ # care of this. |
3654 |
+ einfo "Fixing install dirs" |
3655 |
+ sed -e 's,^PROJ_docsdir.*,PROJ_docsdir := $(PROJ_prefix)/share/doc/'${PF}, \ |
3656 |
+ -e 's,^PROJ_etcdir.*,PROJ_etcdir := '"${EPREFIX}"'/etc/llvm,' \ |
3657 |
+ -e 's,^PROJ_libdir.*,PROJ_libdir := $(PROJ_prefix)/'$(get_libdir)/${PN}, \ |
3658 |
+ -i Makefile.config.in || die "Makefile.config sed failed" |
3659 |
+ sed -e "/ActiveLibDir = ActivePrefix/s/lib/$(get_libdir)\/${PN}/" \ |
3660 |
+ -i tools/llvm-config/llvm-config.cpp || die "llvm-config sed failed" |
3661 |
+ |
3662 |
+ einfo "Fixing rpath and CFLAGS" |
3663 |
+ sed -e 's,\$(RPATH) -Wl\,\$(\(ToolDir\|LibDir\)),$(RPATH) -Wl\,'"${EPREFIX}"/usr/$(get_libdir)/${PN}, \ |
3664 |
+ -e '/OmitFramePointer/s/-fomit-frame-pointer//' \ |
3665 |
+ -i Makefile.rules || die "rpath sed failed" |
3666 |
+ if use gold; then |
3667 |
+ sed -e 's,\$(SharedLibDir),'"${EPREFIX}"/usr/$(get_libdir)/${PN}, \ |
3668 |
+ -i tools/gold/Makefile || die "gold rpath sed failed" |
3669 |
+ fi |
3670 |
+ |
3671 |
+ # Specify python version |
3672 |
+ python_convert_shebangs -r 2 test/Scripts |
3673 |
+ |
3674 |
+ epatch "${FILESDIR}"/${PN}-2.6-commandguide-nops.patch |
3675 |
+ epatch "${FILESDIR}"/${PN}-2.9-nodoctargz.patch |
3676 |
+ epatch "${FILESDIR}"/${PN}-3.0-PPC_macro.patch |
3677 |
+ epatch "${FILESDIR}"/${P}-ivybridge_support.patch |
3678 |
+ epatch "${FILESDIR}"/${P}-fix_debug_line_info.patch |
3679 |
+ epatch "${FILESDIR}"/${P}-ExecutionEngine_tests_xfail_arm.patch |
3680 |
+ epatch "${FILESDIR}"/${P}-docs-pod-markup-fixes.patch |
3681 |
+ |
3682 |
+ # Apply r600 OpenCL-related patches, bug #425688 |
3683 |
+ epatch "${FILESDIR}"/cl-patches/*.patch |
3684 |
+ |
3685 |
+ # User patches |
3686 |
+ epatch_user |
3687 |
+} |
3688 |
+ |
3689 |
+src_configure() { |
3690 |
+ local CONF_FLAGS="--enable-shared |
3691 |
+ --with-optimize-option= |
3692 |
+ $(use_enable !debug optimized) |
3693 |
+ $(use_enable debug assertions) |
3694 |
+ $(use_enable debug expensive-checks)" |
3695 |
+ |
3696 |
+ if use multitarget; then |
3697 |
+ CONF_FLAGS="${CONF_FLAGS} --enable-targets=all" |
3698 |
+ else |
3699 |
+ CONF_FLAGS="${CONF_FLAGS} --enable-targets=host,cpp" |
3700 |
+ fi |
3701 |
+ |
3702 |
+ if use amd64; then |
3703 |
+ CONF_FLAGS="${CONF_FLAGS} --enable-pic" |
3704 |
+ fi |
3705 |
+ |
3706 |
+ if use gold; then |
3707 |
+ CONF_FLAGS="${CONF_FLAGS} --with-binutils-include=${EPREFIX}/usr/include/" |
3708 |
+ fi |
3709 |
+ if use ocaml; then |
3710 |
+ CONF_FLAGS="${CONF_FLAGS} --enable-bindings=ocaml" |
3711 |
+ else |
3712 |
+ CONF_FLAGS="${CONF_FLAGS} --enable-bindings=none" |
3713 |
+ fi |
3714 |
+ |
3715 |
+ if use udis86; then |
3716 |
+ CONF_FLAGS="${CONF_FLAGS} --with-udis86" |
3717 |
+ fi |
3718 |
+ |
3719 |
+ if use libffi; then |
3720 |
+ append-cppflags "$(pkg-config --cflags libffi)" |
3721 |
+ fi |
3722 |
+ CONF_FLAGS="${CONF_FLAGS} $(use_enable libffi)" |
3723 |
+ |
3724 |
+ # llvm prefers clang over gcc, so we may need to force that |
3725 |
+ tc-export CC CXX |
3726 |
+ econf ${CONF_FLAGS} |
3727 |
+} |
3728 |
+ |
3729 |
+src_compile() { |
3730 |
+ emake VERBOSE=1 KEEP_SYMBOLS=1 REQUIRES_RTTI=1 |
3731 |
+ |
3732 |
+ pax-mark m Release/bin/lli |
3733 |
+ if use test; then |
3734 |
+ pax-mark m unittests/ExecutionEngine/JIT/Release/JITTests |
3735 |
+ fi |
3736 |
+} |
3737 |
+ |
3738 |
+src_install() { |
3739 |
+ emake KEEP_SYMBOLS=1 DESTDIR="${D}" install |
3740 |
+ |
3741 |
+ if use vim-syntax; then |
3742 |
+ insinto /usr/share/vim/vimfiles/syntax |
3743 |
+ doins utils/vim/*.vim |
3744 |
+ fi |
3745 |
+ |
3746 |
+ # Fix install_names on Darwin. The build system is too complicated |
3747 |
+ # to just fix this, so we correct it post-install |
3748 |
+ local lib= f= odylib= |
3749 |
+ if [[ ${CHOST} == *-darwin* ]] ; then |
3750 |
+ for lib in lib{EnhancedDisassembly,LLVM-${PV},LTO,profile_rt}.dylib {BugpointPasses,LLVMHello}.dylib ; do |
3751 |
+ # libEnhancedDisassembly is Darwin10 only, so non-fatal |
3752 |
+ [[ -f ${ED}/usr/lib/${PN}/${lib} ]] || continue |
3753 |
+ ebegin "fixing install_name of $lib" |
3754 |
+ install_name_tool \ |
3755 |
+ -id "${EPREFIX}"/usr/lib/${PN}/${lib} \ |
3756 |
+ "${ED}"/usr/lib/${PN}/${lib} |
3757 |
+ eend $? |
3758 |
+ done |
3759 |
+ for f in "${ED}"/usr/bin/* "${ED}"/usr/lib/${PN}/libLTO.dylib ; do |
3760 |
+ odylib=$(scanmacho -BF'%n#f' "${f}" | tr ',' '\n' | grep libLLVM-${PV}.dylib) |
3761 |
+ ebegin "fixing install_name reference to ${odylib} of ${f##*/}" |
3762 |
+ install_name_tool \ |
3763 |
+ -change "${odylib}" \ |
3764 |
+ "${EPREFIX}"/usr/lib/${PN}/libLLVM-${PV}.dylib \ |
3765 |
+ "${f}" |
3766 |
+ eend $? |
3767 |
+ done |
3768 |
+ fi |
3769 |
+} |
3770 |
|
3771 |
diff --git a/sys-devel/llvm/llvm-3.2.ebuild b/sys-devel/llvm/llvm-3.2.ebuild |
3772 |
new file mode 100644 |
3773 |
index 0000000..3b7ebd1 |
3774 |
--- /dev/null |
3775 |
+++ b/sys-devel/llvm/llvm-3.2.ebuild |
3776 |
@@ -0,0 +1,206 @@ |
3777 |
+# Copyright 1999-2015 Gentoo Foundation |
3778 |
+# Distributed under the terms of the GNU General Public License v2 |
3779 |
+# $Id$ |
3780 |
+ |
3781 |
+EAPI=5 |
3782 |
+ |
3783 |
+# pypy gives me around 1700 unresolved tests due to open file limit |
3784 |
+# being exceeded. probably GC does not close them fast enough. |
3785 |
+PYTHON_COMPAT=( python2_7 ) |
3786 |
+ |
3787 |
+inherit eutils flag-o-matic multilib python-any-r1 toolchain-funcs pax-utils |
3788 |
+ |
3789 |
+DESCRIPTION="Low Level Virtual Machine" |
3790 |
+HOMEPAGE="http://llvm.org/" |
3791 |
+SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.gz |
3792 |
+ !doc? ( https://dev.gentoo.org/~voyageur/distfiles/${P}-manpages.tar.bz2 )" |
3793 |
+ |
3794 |
+LICENSE="UoI-NCSA" |
3795 |
+SLOT="0/${PV}" |
3796 |
+KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos" |
3797 |
+IUSE="debug doc gold +libffi multitarget ocaml test udis86 vim-syntax" |
3798 |
+ |
3799 |
+DEPEND="dev-lang/perl |
3800 |
+ >=sys-devel/make-3.79 |
3801 |
+ >=sys-devel/flex-2.5.4 |
3802 |
+ >=sys-devel/bison-1.875d |
3803 |
+ || ( >=sys-devel/gcc-3.0 >=sys-devel/gcc-apple-4.2.1 ) |
3804 |
+ || ( >=sys-devel/binutils-2.18 >=sys-devel/binutils-apple-3.2.3 ) |
3805 |
+ doc? ( dev-python/sphinx ) |
3806 |
+ gold? ( >=sys-devel/binutils-2.22[cxx] ) |
3807 |
+ libffi? ( virtual/pkgconfig |
3808 |
+ virtual/libffi ) |
3809 |
+ ocaml? ( dev-lang/ocaml ) |
3810 |
+ udis86? ( dev-libs/udis86[pic(+)] ) |
3811 |
+ ${PYTHON_DEPS}" |
3812 |
+RDEPEND="dev-lang/perl |
3813 |
+ libffi? ( virtual/libffi ) |
3814 |
+ vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )" |
3815 |
+ |
3816 |
+S=${WORKDIR}/${P}.src |
3817 |
+ |
3818 |
+pkg_setup() { |
3819 |
+ # Required for test and build |
3820 |
+ python-any-r1_pkg_setup |
3821 |
+ |
3822 |
+ # need to check if the active compiler is ok |
3823 |
+ |
3824 |
+ broken_gcc=" 3.2.2 3.2.3 3.3.2 4.1.1 " |
3825 |
+ broken_gcc_x86=" 3.4.0 3.4.2 " |
3826 |
+ broken_gcc_amd64=" 3.4.6 " |
3827 |
+ |
3828 |
+ gcc_vers=$(gcc-fullversion) |
3829 |
+ |
3830 |
+ if [[ ${broken_gcc} == *" ${version} "* ]] ; then |
3831 |
+ elog "Your version of gcc is known to miscompile llvm." |
3832 |
+ elog "Check http://www.llvm.org/docs/GettingStarted.html for" |
3833 |
+ elog "possible solutions." |
3834 |
+ die "Your currently active version of gcc is known to miscompile llvm" |
3835 |
+ fi |
3836 |
+ |
3837 |
+ if [[ ${CHOST} == i*86-* && ${broken_gcc_x86} == *" ${version} "* ]] ; then |
3838 |
+ elog "Your version of gcc is known to miscompile llvm on x86" |
3839 |
+ elog "architectures. Check" |
3840 |
+ elog "http://www.llvm.org/docs/GettingStarted.html for possible" |
3841 |
+ elog "solutions." |
3842 |
+ die "Your currently active version of gcc is known to miscompile llvm" |
3843 |
+ fi |
3844 |
+ |
3845 |
+ if [[ ${CHOST} == x86_64-* && ${broken_gcc_amd64} == *" ${version} "* ]]; |
3846 |
+ then |
3847 |
+ elog "Your version of gcc is known to miscompile llvm in amd64" |
3848 |
+ elog "architectures. Check" |
3849 |
+ elog "http://www.llvm.org/docs/GettingStarted.html for possible" |
3850 |
+ elog "solutions." |
3851 |
+ die "Your currently active version of gcc is known to miscompile llvm" |
3852 |
+ fi |
3853 |
+} |
3854 |
+ |
3855 |
+src_prepare() { |
3856 |
+ # unfortunately ./configure won't listen to --mandir and the-like, so take |
3857 |
+ # care of this. |
3858 |
+ einfo "Fixing install dirs" |
3859 |
+ sed -e 's,^PROJ_docsdir.*,PROJ_docsdir := $(PROJ_prefix)/share/doc/'${PF}, \ |
3860 |
+ -e 's,^PROJ_etcdir.*,PROJ_etcdir := '"${EPREFIX}"'/etc/llvm,' \ |
3861 |
+ -e 's,^PROJ_libdir.*,PROJ_libdir := $(PROJ_prefix)/'$(get_libdir)/${PN}, \ |
3862 |
+ -i Makefile.config.in || die "Makefile.config sed failed" |
3863 |
+ sed -e "/ActiveLibDir = ActivePrefix/s/lib/$(get_libdir)\/${PN}/" \ |
3864 |
+ -i tools/llvm-config/llvm-config.cpp || die "llvm-config sed failed" |
3865 |
+ |
3866 |
+ einfo "Fixing rpath and CFLAGS" |
3867 |
+ sed -e 's,\$(RPATH) -Wl\,\$(\(ToolDir\|LibDir\)),$(RPATH) -Wl\,'"${EPREFIX}"/usr/$(get_libdir)/${PN}, \ |
3868 |
+ -e '/OmitFramePointer/s/-fomit-frame-pointer//' \ |
3869 |
+ -i Makefile.rules || die "rpath sed failed" |
3870 |
+ if use gold; then |
3871 |
+ sed -e 's,\$(SharedLibDir),'"${EPREFIX}"/usr/$(get_libdir)/${PN}, \ |
3872 |
+ -i tools/gold/Makefile || die "gold rpath sed failed" |
3873 |
+ fi |
3874 |
+ |
3875 |
+ # FileCheck is needed at least for dragonegg tests |
3876 |
+ sed -e "/NO_INSTALL = 1/s/^/#/" -i utils/FileCheck/Makefile \ |
3877 |
+ || die "FileCheck Makefile sed failed" |
3878 |
+ |
3879 |
+ epatch "${FILESDIR}"/${PN}-3.2-nodoctargz.patch |
3880 |
+ epatch "${FILESDIR}"/${PN}-3.0-PPC_macro.patch |
3881 |
+ |
3882 |
+ # User patches |
3883 |
+ epatch_user |
3884 |
+} |
3885 |
+ |
3886 |
+src_configure() { |
3887 |
+ local CONF_FLAGS="--enable-shared |
3888 |
+ --with-optimize-option= |
3889 |
+ $(use_enable !debug optimized) |
3890 |
+ $(use_enable debug assertions) |
3891 |
+ $(use_enable debug expensive-checks)" |
3892 |
+ |
3893 |
+ if use multitarget; then |
3894 |
+ CONF_FLAGS="${CONF_FLAGS} --enable-targets=all" |
3895 |
+ else |
3896 |
+ CONF_FLAGS="${CONF_FLAGS} --enable-targets=host,cpp" |
3897 |
+ fi |
3898 |
+ |
3899 |
+ if use amd64; then |
3900 |
+ CONF_FLAGS="${CONF_FLAGS} --enable-pic" |
3901 |
+ fi |
3902 |
+ |
3903 |
+ if use gold; then |
3904 |
+ CONF_FLAGS="${CONF_FLAGS} --with-binutils-include=${EPREFIX}/usr/include/" |
3905 |
+ fi |
3906 |
+ if use ocaml; then |
3907 |
+ CONF_FLAGS="${CONF_FLAGS} --enable-bindings=ocaml" |
3908 |
+ else |
3909 |
+ CONF_FLAGS="${CONF_FLAGS} --enable-bindings=none" |
3910 |
+ fi |
3911 |
+ |
3912 |
+ if use udis86; then |
3913 |
+ CONF_FLAGS="${CONF_FLAGS} --with-udis86" |
3914 |
+ fi |
3915 |
+ |
3916 |
+ if use libffi; then |
3917 |
+ append-cppflags "$(pkg-config --cflags libffi)" |
3918 |
+ fi |
3919 |
+ CONF_FLAGS="${CONF_FLAGS} $(use_enable libffi)" |
3920 |
+ |
3921 |
+ # llvm prefers clang over gcc, so we may need to force that |
3922 |
+ tc-export CC CXX |
3923 |
+ econf ${CONF_FLAGS} |
3924 |
+} |
3925 |
+ |
3926 |
+src_compile() { |
3927 |
+ emake VERBOSE=1 KEEP_SYMBOLS=1 REQUIRES_RTTI=1 |
3928 |
+ |
3929 |
+ if use doc; then |
3930 |
+ emake -C docs -f Makefile.sphinx man |
3931 |
+ emake -C docs -f Makefile.sphinx html |
3932 |
+ fi |
3933 |
+ |
3934 |
+ pax-mark m Release/bin/lli |
3935 |
+ if use test; then |
3936 |
+ pax-mark m unittests/ExecutionEngine/JIT/Release/JITTests |
3937 |
+ pax-mark m unittests/ExecutionEngine/MCJIT/Release/MCJITTests |
3938 |
+ pax-mark m unittests/Support/Release/SupportTests |
3939 |
+ fi |
3940 |
+} |
3941 |
+ |
3942 |
+src_install() { |
3943 |
+ emake KEEP_SYMBOLS=1 DESTDIR="${D}" install |
3944 |
+ |
3945 |
+ if use doc; then |
3946 |
+ doman docs/_build/man/*.1 |
3947 |
+ dohtml -r docs/_build/html/ |
3948 |
+ else |
3949 |
+ doman "${WORKDIR}"/${P}-manpages/*.1 |
3950 |
+ fi |
3951 |
+ |
3952 |
+ if use vim-syntax; then |
3953 |
+ insinto /usr/share/vim/vimfiles/syntax |
3954 |
+ doins utils/vim/*.vim |
3955 |
+ fi |
3956 |
+ |
3957 |
+ # Fix install_names on Darwin. The build system is too complicated |
3958 |
+ # to just fix this, so we correct it post-install |
3959 |
+ local lib= f= odylib= libpv=${PV} |
3960 |
+ if [[ ${CHOST} == *-darwin* ]] ; then |
3961 |
+ eval $(grep PACKAGE_VERSION= configure) |
3962 |
+ [[ -n ${PACKAGE_VERSION} ]] && libpv=${PACKAGE_VERSION} |
3963 |
+ for lib in lib{EnhancedDisassembly,LLVM-${libpv},LTO,profile_rt}.dylib {BugpointPasses,LLVMHello}.dylib ; do |
3964 |
+ # libEnhancedDisassembly is Darwin10 only, so non-fatal |
3965 |
+ [[ -f ${ED}/usr/lib/${PN}/${lib} ]] || continue |
3966 |
+ ebegin "fixing install_name of $lib" |
3967 |
+ install_name_tool \ |
3968 |
+ -id "${EPREFIX}"/usr/lib/${PN}/${lib} \ |
3969 |
+ "${ED}"/usr/lib/${PN}/${lib} |
3970 |
+ eend $? |
3971 |
+ done |
3972 |
+ for f in "${ED}"/usr/bin/* "${ED}"/usr/lib/${PN}/libLTO.dylib ; do |
3973 |
+ odylib=$(scanmacho -BF'%n#f' "${f}" | tr ',' '\n' | grep libLLVM-${libpv}.dylib) |
3974 |
+ ebegin "fixing install_name reference to ${odylib} of ${f##*/}" |
3975 |
+ install_name_tool \ |
3976 |
+ -change "${odylib}" \ |
3977 |
+ "${EPREFIX}"/usr/lib/${PN}/libLLVM-${libpv}.dylib \ |
3978 |
+ "${f}" |
3979 |
+ eend $? |
3980 |
+ done |
3981 |
+ fi |
3982 |
+} |
3983 |
|
3984 |
diff --git a/sys-devel/llvm/llvm-3.3-r3.ebuild b/sys-devel/llvm/llvm-3.3-r3.ebuild |
3985 |
new file mode 100644 |
3986 |
index 0000000..d3b2aa8 |
3987 |
--- /dev/null |
3988 |
+++ b/sys-devel/llvm/llvm-3.3-r3.ebuild |
3989 |
@@ -0,0 +1,500 @@ |
3990 |
+# Copyright 1999-2015 Gentoo Foundation |
3991 |
+# Distributed under the terms of the GNU General Public License v2 |
3992 |
+# $Id$ |
3993 |
+ |
3994 |
+EAPI=5 |
3995 |
+ |
3996 |
+PYTHON_COMPAT=( python2_7 pypy ) |
3997 |
+ |
3998 |
+inherit cmake-utils eutils flag-o-matic multilib multilib-minimal \ |
3999 |
+ python-r1 toolchain-funcs pax-utils check-reqs |
4000 |
+ |
4001 |
+DESCRIPTION="Low Level Virtual Machine" |
4002 |
+HOMEPAGE="http://llvm.org/" |
4003 |
+SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.gz |
4004 |
+ clang? ( http://llvm.org/releases/${PV}/compiler-rt-${PV}.src.tar.gz |
4005 |
+ http://llvm.org/releases/${PV}/cfe-${PV}.src.tar.gz ) |
4006 |
+ !doc? ( https://dev.gentoo.org/~voyageur/distfiles/${P}-manpages.tar.bz2 )" |
4007 |
+ |
4008 |
+LICENSE="UoI-NCSA" |
4009 |
+SLOT="0/${PV}" |
4010 |
+KEYWORDS="amd64 arm ppc ppc64 x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos" |
4011 |
+IUSE="clang debug doc gold +libffi multitarget ocaml python |
4012 |
+ +static-analyzer test udis86 xml video_cards_radeon |
4013 |
+ kernel_Darwin kernel_FreeBSD" |
4014 |
+ |
4015 |
+COMMON_DEPEND=" |
4016 |
+ sys-libs/zlib:0= |
4017 |
+ clang? ( |
4018 |
+ python? ( ${PYTHON_DEPS} ) |
4019 |
+ static-analyzer? ( |
4020 |
+ dev-lang/perl:* |
4021 |
+ ${PYTHON_DEPS} |
4022 |
+ ) |
4023 |
+ xml? ( dev-libs/libxml2:2= ) |
4024 |
+ ) |
4025 |
+ gold? ( >=sys-devel/binutils-2.22:*[cxx] ) |
4026 |
+ libffi? ( >=virtual/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] ) |
4027 |
+ ocaml? ( dev-lang/ocaml:0= ) |
4028 |
+ udis86? ( >=dev-libs/udis86-1.7-r2:0=[pic(+),${MULTILIB_USEDEP}] )" |
4029 |
+DEPEND="${COMMON_DEPEND} |
4030 |
+ dev-lang/perl |
4031 |
+ >=sys-devel/make-3.81 |
4032 |
+ >=sys-devel/flex-2.5.4 |
4033 |
+ >=sys-devel/bison-1.875d |
4034 |
+ || ( >=sys-devel/gcc-3.0 >=sys-devel/gcc-apple-4.2.1 |
4035 |
+ ( >=sys-freebsd/freebsd-lib-9.1-r10 sys-libs/libcxx ) |
4036 |
+ ) |
4037 |
+ || ( >=sys-devel/binutils-2.18 >=sys-devel/binutils-apple-3.2.3 ) |
4038 |
+ clang? ( xml? ( virtual/pkgconfig ) ) |
4039 |
+ doc? ( dev-python/sphinx ) |
4040 |
+ libffi? ( virtual/pkgconfig ) |
4041 |
+ ${PYTHON_DEPS}" |
4042 |
+RDEPEND="${COMMON_DEPEND} |
4043 |
+ clang? ( !<=sys-devel/clang-3.3-r99 |
4044 |
+ !>=sys-devel/clang-9999 ) |
4045 |
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r2 |
4046 |
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )" |
4047 |
+ |
4048 |
+# pypy gives me around 1700 unresolved tests due to open file limit |
4049 |
+# being exceeded. probably GC does not close them fast enough. |
4050 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE} |
4051 |
+ test? ( || ( $(python_gen_useflags 'python*') ) )" |
4052 |
+ |
4053 |
+S=${WORKDIR}/${P}.src |
4054 |
+ |
4055 |
+# Some people actually override that in make.conf. That sucks since |
4056 |
+# we need to run install per-directory, and ninja can't do that... |
4057 |
+# so why did it call itself ninja in the first place? |
4058 |
+CMAKE_MAKEFILE_GENERATOR=emake |
4059 |
+ |
4060 |
+pkg_pretend() { |
4061 |
+ # in megs |
4062 |
+ # !clang !debug !multitarget -O2 400 |
4063 |
+ # !clang !debug multitarget -O2 550 |
4064 |
+ # clang !debug !multitarget -O2 950 |
4065 |
+ # clang !debug multitarget -O2 1200 |
4066 |
+ # !clang debug multitarget -O2 5G |
4067 |
+ # clang !debug multitarget -O0 -g 12G |
4068 |
+ # clang debug multitarget -O2 16G |
4069 |
+ # clang debug multitarget -O0 -g 14G |
4070 |
+ |
4071 |
+ local build_size=550 |
4072 |
+ use clang && build_size=1200 |
4073 |
+ |
4074 |
+ if use debug; then |
4075 |
+ ewarn "USE=debug is known to increase the size of package considerably" |
4076 |
+ ewarn "and cause the tests to fail." |
4077 |
+ ewarn |
4078 |
+ |
4079 |
+ (( build_size *= 14 )) |
4080 |
+ elif is-flagq '-g?(gdb)?([1-9])'; then |
4081 |
+ ewarn "The C++ compiler -g option is known to increase the size of the package" |
4082 |
+ ewarn "considerably. If you run out of space, please consider removing it." |
4083 |
+ ewarn |
4084 |
+ |
4085 |
+ (( build_size *= 10 )) |
4086 |
+ fi |
4087 |
+ |
4088 |
+ # Multiply by number of ABIs :). |
4089 |
+ local abis=( $(multilib_get_enabled_abis) ) |
4090 |
+ (( build_size *= ${#abis[@]} )) |
4091 |
+ |
4092 |
+ local CHECKREQS_DISK_BUILD=${build_size}M |
4093 |
+ check-reqs_pkg_pretend |
4094 |
+} |
4095 |
+ |
4096 |
+pkg_setup() { |
4097 |
+ pkg_pretend |
4098 |
+ |
4099 |
+ # need to check if the active compiler is ok |
4100 |
+ |
4101 |
+ broken_gcc=( 3.2.2 3.2.3 3.3.2 4.1.1 ) |
4102 |
+ broken_gcc_x86=( 3.4.0 3.4.2 ) |
4103 |
+ broken_gcc_amd64=( 3.4.6 ) |
4104 |
+ |
4105 |
+ gcc_vers=$(gcc-fullversion) |
4106 |
+ |
4107 |
+ if has "${gcc_vers}" "${broken_gcc[@]}"; then |
4108 |
+ elog "Your version of gcc is known to miscompile llvm." |
4109 |
+ elog "Check http://www.llvm.org/docs/GettingStarted.html for" |
4110 |
+ elog "possible solutions." |
4111 |
+ die "Your currently active version of gcc is known to miscompile llvm" |
4112 |
+ fi |
4113 |
+ |
4114 |
+ if use abi_x86_32 && has "${gcc_vers}" "${broken_gcc_x86[@]}"; then |
4115 |
+ elog "Your version of gcc is known to miscompile llvm on x86" |
4116 |
+ elog "architectures. Check" |
4117 |
+ elog "http://www.llvm.org/docs/GettingStarted.html for possible" |
4118 |
+ elog "solutions." |
4119 |
+ die "Your currently active version of gcc is known to miscompile llvm" |
4120 |
+ fi |
4121 |
+ |
4122 |
+ if use abi_x86_64 && has "${gcc_vers}" "${broken_gcc_amd64[@]}"; then |
4123 |
+ elog "Your version of gcc is known to miscompile llvm in amd64" |
4124 |
+ elog "architectures. Check" |
4125 |
+ elog "http://www.llvm.org/docs/GettingStarted.html for possible" |
4126 |
+ elog "solutions." |
4127 |
+ die "Your currently active version of gcc is known to miscompile llvm" |
4128 |
+ fi |
4129 |
+} |
4130 |
+ |
4131 |
+src_unpack() { |
4132 |
+ default |
4133 |
+ |
4134 |
+ rm -f "${S}"/tools/clang "${S}"/projects/compiler-rt \ |
4135 |
+ || die "symlinks removal failed" |
4136 |
+ |
4137 |
+ if use clang; then |
4138 |
+ mv "${WORKDIR}"/cfe-${PV}.src "${S}"/tools/clang \ |
4139 |
+ || die "clang source directory move failed" |
4140 |
+ mv "${WORKDIR}"/compiler-rt-${PV}.src "${S}"/projects/compiler-rt \ |
4141 |
+ || die "compiler-rt source directory move failed" |
4142 |
+ fi |
4143 |
+} |
4144 |
+ |
4145 |
+src_prepare() { |
4146 |
+ epatch "${FILESDIR}"/${PN}-3.2-nodoctargz.patch |
4147 |
+ epatch "${FILESDIR}"/${P}-R600_debug.patch |
4148 |
+ epatch "${FILESDIR}"/${PN}-3.3-r2-gentoo-install.patch |
4149 |
+ |
4150 |
+ # Hack cmake search path for Gentoo, bug #496480 |
4151 |
+ epatch "${FILESDIR}"/${PN}-3.3-cmake-modulepath.patch |
4152 |
+ |
4153 |
+ if use clang; then |
4154 |
+ # Automatically select active system GCC's libraries, bugs #406163 and #417913 |
4155 |
+ epatch "${FILESDIR}"/clang-3.1-gentoo-runtime-gcc-detection-v3.patch |
4156 |
+ |
4157 |
+ epatch "${FILESDIR}"/clang-3.3-gentoo-install.patch |
4158 |
+ |
4159 |
+ # backport support for g++-X.Y header location |
4160 |
+ epatch "${FILESDIR}"/clang-3.3-gcc-header-path.patch |
4161 |
+ fi |
4162 |
+ |
4163 |
+ local sub_files=( |
4164 |
+ Makefile.config.in |
4165 |
+ Makefile.rules |
4166 |
+ tools/llvm-config/llvm-config.cpp |
4167 |
+ ) |
4168 |
+ use clang && sub_files+=( |
4169 |
+ tools/clang/lib/Driver/Tools.cpp |
4170 |
+ tools/clang/tools/scan-build/scan-build |
4171 |
+ ) |
4172 |
+ |
4173 |
+ # unfortunately ./configure won't listen to --mandir and the-like, so take |
4174 |
+ # care of this. |
4175 |
+ # note: we're setting the main libdir intentionally. |
4176 |
+ # where per-ABI is appropriate, we use $(GENTOO_LIBDIR) make. |
4177 |
+ einfo "Fixing install dirs" |
4178 |
+ sed -e "s,@libdir@,$(get_libdir),g" \ |
4179 |
+ -e "s,@PF@,${PF},g" \ |
4180 |
+ -e "s,@EPREFIX@,${EPREFIX},g" \ |
4181 |
+ -i "${sub_files[@]}" \ |
4182 |
+ || die "install paths sed failed" |
4183 |
+ |
4184 |
+ # User patches |
4185 |
+ epatch_user |
4186 |
+ |
4187 |
+ python_setup |
4188 |
+} |
4189 |
+ |
4190 |
+multilib_src_configure() { |
4191 |
+ # disable timestamps since they confuse ccache |
4192 |
+ local conf_flags=( |
4193 |
+ --disable-timestamps |
4194 |
+ --enable-keep-symbols |
4195 |
+ --enable-shared |
4196 |
+ --with-optimize-option= |
4197 |
+ $(use_enable !debug optimized) |
4198 |
+ $(use_enable debug assertions) |
4199 |
+ $(use_enable debug expensive-checks) |
4200 |
+ $(use_enable libffi) |
4201 |
+ ) |
4202 |
+ |
4203 |
+ if use clang; then |
4204 |
+ conf_flags+=( --with-clang-resource-dir=../lib/clang/${PV} ) |
4205 |
+ fi |
4206 |
+ # well, it's used only by clang executable c-index-test |
4207 |
+ if multilib_is_native_abi && use clang && use xml; then |
4208 |
+ conf_flags+=( XML2CONFIG="$(tc-getPKG_CONFIG) libxml-2.0" ) |
4209 |
+ else |
4210 |
+ conf_flags+=( ac_cv_prog_XML2CONFIG="" ) |
4211 |
+ fi |
4212 |
+ |
4213 |
+ local targets bindings |
4214 |
+ if use multitarget; then |
4215 |
+ targets='all' |
4216 |
+ else |
4217 |
+ targets='host,cpp' |
4218 |
+ fi |
4219 |
+ conf_flags+=( --enable-targets=${targets} ) |
4220 |
+ |
4221 |
+ if use video_cards_radeon; then |
4222 |
+ conf_flags+=( --enable-experimental-targets=R600 ) |
4223 |
+ fi |
4224 |
+ |
4225 |
+ if multilib_is_native_abi; then |
4226 |
+ use gold && conf_flags+=( --with-binutils-include="${EPREFIX}"/usr/include/ ) |
4227 |
+ # extra commas don't hurt |
4228 |
+ use ocaml && bindings+=',ocaml' |
4229 |
+ fi |
4230 |
+ |
4231 |
+ [[ ${bindings} ]] || bindings='none' |
4232 |
+ conf_flags+=( --enable-bindings=${bindings} ) |
4233 |
+ |
4234 |
+ if use udis86; then |
4235 |
+ conf_flags+=( --with-udis86 ) |
4236 |
+ fi |
4237 |
+ |
4238 |
+ if use libffi; then |
4239 |
+ local CPPFLAGS=${CPPFLAGS} |
4240 |
+ append-cppflags "$(pkg-config --cflags libffi)" |
4241 |
+ fi |
4242 |
+ |
4243 |
+ # llvm prefers clang over gcc, so we may need to force that |
4244 |
+ tc-export CC CXX |
4245 |
+ |
4246 |
+ ECONF_SOURCE=${S} \ |
4247 |
+ econf "${conf_flags[@]}" |
4248 |
+ |
4249 |
+ multilib_is_native_abi && cmake_configure |
4250 |
+} |
4251 |
+ |
4252 |
+cmake_configure() { |
4253 |
+ # sadly, cmake doesn't seem to have host autodetection |
4254 |
+ # but it's fairly easy to steal this from configured autotools |
4255 |
+ local targets=$(sed -n -e 's/^TARGETS_TO_BUILD=//p' Makefile.config || die) |
4256 |
+ local libdir=$(get_libdir) |
4257 |
+ |
4258 |
+ # cmake doesn't have R600 in 3.3 |
4259 |
+ targets=${targets/R600 /} |
4260 |
+ |
4261 |
+ local mycmakeargs=( |
4262 |
+ -DLLVM_TARGETS_TO_BUILD="${targets// /;}" |
4263 |
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib} |
4264 |
+ ) |
4265 |
+ |
4266 |
+ BUILD_DIR=${S%/}_cmake \ |
4267 |
+ cmake-utils_src_configure |
4268 |
+} |
4269 |
+ |
4270 |
+set_makeargs() { |
4271 |
+ MAKEARGS=( |
4272 |
+ VERBOSE=1 |
4273 |
+ REQUIRES_RTTI=1 |
4274 |
+ GENTOO_LIBDIR=$(get_libdir) |
4275 |
+ ) |
4276 |
+ |
4277 |
+ # for tests, we want it all! otherwise, we may use a little filtering... |
4278 |
+ # adding ONLY_TOOLS also disables unittest building... |
4279 |
+ if [[ ${EBUILD_PHASE_FUNC} != src_test ]]; then |
4280 |
+ local tools=( llvm-config ) |
4281 |
+ use clang && tools+=( clang ) |
4282 |
+ |
4283 |
+ if multilib_is_native_abi; then |
4284 |
+ tools+=( |
4285 |
+ opt llvm-as llvm-dis llc llvm-ar llvm-nm llvm-link lli |
4286 |
+ llvm-extract llvm-mc llvm-bcanalyzer llvm-diff macho-dump |
4287 |
+ llvm-objdump llvm-readobj llvm-rtdyld llvm-dwarfdump llvm-cov |
4288 |
+ llvm-size llvm-stress llvm-mcmarkup llvm-symbolizer obj2yaml |
4289 |
+ yaml2obj lto llvm-prof llvm-ranlib bugpoint |
4290 |
+ ) |
4291 |
+ |
4292 |
+ # those tools require 'lto' built first, so we need to delay |
4293 |
+ # building them to a second run |
4294 |
+ if [[ ${1} != -1 ]]; then |
4295 |
+ use gold && tools+=( gold ) |
4296 |
+ fi |
4297 |
+ fi |
4298 |
+ |
4299 |
+ MAKEARGS+=( |
4300 |
+ # filter tools + disable unittests implicitly |
4301 |
+ ONLY_TOOLS="${tools[*]}" |
4302 |
+ |
4303 |
+ # this disables unittests & docs from clang |
4304 |
+ BUILD_CLANG_ONLY=YES |
4305 |
+ ) |
4306 |
+ fi |
4307 |
+} |
4308 |
+ |
4309 |
+multilib_src_compile() { |
4310 |
+ local MAKEARGS |
4311 |
+ set_makeargs -1 |
4312 |
+ emake "${MAKEARGS[@]}" |
4313 |
+ |
4314 |
+ if multilib_is_native_abi; then |
4315 |
+ set_makeargs |
4316 |
+ emake -C tools "${MAKEARGS[@]}" |
4317 |
+ |
4318 |
+ if use doc; then |
4319 |
+ emake -C "${S}"/docs -f Makefile.sphinx man |
4320 |
+ use clang && emake -C "${S}"/tools/clang/docs/tools \ |
4321 |
+ BUILD_FOR_WEBSITE=1 DST_MAN_DIR="${T}"/ man |
4322 |
+ emake -C "${S}"/docs -f Makefile.sphinx html |
4323 |
+ fi |
4324 |
+ fi |
4325 |
+ |
4326 |
+ if use debug; then |
4327 |
+ pax-mark m Debug+Asserts+Checks/bin/llvm-rtdyld |
4328 |
+ pax-mark m Debug+Asserts+Checks/bin/lli |
4329 |
+ else |
4330 |
+ pax-mark m Release/bin/llvm-rtdyld |
4331 |
+ pax-mark m Release/bin/lli |
4332 |
+ fi |
4333 |
+} |
4334 |
+ |
4335 |
+multilib_src_test() { |
4336 |
+ local MAKEARGS |
4337 |
+ set_makeargs |
4338 |
+ |
4339 |
+ # build the remaining tools & unittests |
4340 |
+ emake "${MAKEARGS[@]}" |
4341 |
+ |
4342 |
+ pax-mark m unittests/ExecutionEngine/JIT/Release/JITTests |
4343 |
+ pax-mark m unittests/ExecutionEngine/MCJIT/Release/MCJITTests |
4344 |
+ pax-mark m unittests/Support/Release/SupportTests |
4345 |
+ |
4346 |
+ emake "${MAKEARGS[@]}" check |
4347 |
+ use clang && emake "${MAKEARGS[@]}" -C tools/clang test |
4348 |
+} |
4349 |
+ |
4350 |
+src_install() { |
4351 |
+ local MULTILIB_WRAPPED_HEADERS=( |
4352 |
+ /usr/include/llvm/Config/config.h |
4353 |
+ /usr/include/llvm/Config/llvm-config.h |
4354 |
+ ) |
4355 |
+ |
4356 |
+ use clang && MULTILIB_WRAPPED_HEADERS+=( |
4357 |
+ /usr/include/clang/Config/config.h |
4358 |
+ ) |
4359 |
+ |
4360 |
+ multilib-minimal_src_install |
4361 |
+ |
4362 |
+ # Remove unnecessary headers on FreeBSD, bug #417171 |
4363 |
+ use kernel_FreeBSD && use clang && rm "${ED}"usr/lib/clang/${PV}/include/{std,float,iso,limits,tgmath,varargs}*.h |
4364 |
+} |
4365 |
+ |
4366 |
+multilib_src_install() { |
4367 |
+ local MAKEARGS |
4368 |
+ set_makeargs |
4369 |
+ |
4370 |
+ emake "${MAKEARGS[@]}" DESTDIR="${D}" install |
4371 |
+ |
4372 |
+ # Preserve ABI-variant of llvm-config. |
4373 |
+ dodir /tmp |
4374 |
+ mv "${ED}"/usr/bin/llvm-config "${ED}"/tmp/"${CHOST}"-llvm-config || die |
4375 |
+ |
4376 |
+ if ! multilib_is_native_abi; then |
4377 |
+ # Drop all the executables since LLVM doesn't like to |
4378 |
+ # clobber when installing. |
4379 |
+ rm -r "${ED}"/usr/bin || die |
4380 |
+ |
4381 |
+ # Backwards compat, will be happily removed someday. |
4382 |
+ dosym "${CHOST}"-llvm-config /tmp/llvm-config.${ABI} |
4383 |
+ else |
4384 |
+ # Move files back. |
4385 |
+ mv "${ED}"/tmp/*llvm-config* "${ED}"/usr/bin || die |
4386 |
+ # Create a symlink for host's llvm-config. |
4387 |
+ dosym "${CHOST}"-llvm-config /usr/bin/llvm-config |
4388 |
+ |
4389 |
+ # Install docs. |
4390 |
+ if use doc; then |
4391 |
+ doman "${S}"/docs/_build/man/*.1 |
4392 |
+ use clang && doman "${T}"/clang.1 |
4393 |
+ dohtml -r "${S}"/docs/_build/html/ |
4394 |
+ else |
4395 |
+ doman "${WORKDIR}"/${P}-manpages/*.1 |
4396 |
+ fi |
4397 |
+ |
4398 |
+ # Symlink the gold plugin. |
4399 |
+ if use gold; then |
4400 |
+ dodir /usr/${CHOST}/binutils-bin/lib/bfd-plugins |
4401 |
+ dosym ../../../../$(get_libdir)/LLVMgold.so \ |
4402 |
+ /usr/${CHOST}/binutils-bin/lib/bfd-plugins/LLVMgold.so |
4403 |
+ fi |
4404 |
+ |
4405 |
+ # install cmake modules |
4406 |
+ emake -C "${S%/}"_cmake/cmake/modules DESTDIR="${D}" install |
4407 |
+ fi |
4408 |
+ |
4409 |
+ # Fix install_names on Darwin. The build system is too complicated |
4410 |
+ # to just fix this, so we correct it post-install |
4411 |
+ local lib= f= odylib= libpv=${PV} |
4412 |
+ if [[ ${CHOST} == *-darwin* ]] ; then |
4413 |
+ eval $(grep PACKAGE_VERSION= configure) |
4414 |
+ [[ -n ${PACKAGE_VERSION} ]] && libpv=${PACKAGE_VERSION} |
4415 |
+ for lib in lib{EnhancedDisassembly,LLVM-${libpv},LTO,profile_rt,clang}.dylib LLVMHello.dylib ; do |
4416 |
+ # libEnhancedDisassembly is Darwin10 only, so non-fatal |
4417 |
+ # + omit clang libs if not enabled |
4418 |
+ [[ -f ${ED}/usr/lib/${lib} ]] || continue |
4419 |
+ |
4420 |
+ ebegin "fixing install_name of $lib" |
4421 |
+ install_name_tool \ |
4422 |
+ -id "${EPREFIX}"/usr/lib/${lib} \ |
4423 |
+ "${ED}"/usr/lib/${lib} |
4424 |
+ eend $? |
4425 |
+ done |
4426 |
+ for f in "${ED}"/usr/bin/* "${ED}"/usr/lib/lib{LTO,clang}.dylib ; do |
4427 |
+ # omit clang libs if not enabled |
4428 |
+ [[ -f ${ED}/usr/lib/${lib} ]] || continue |
4429 |
+ |
4430 |
+ odylib=$(scanmacho -BF'%n#f' "${f}" | tr ',' '\n' | grep libLLVM-${libpv}.dylib) |
4431 |
+ ebegin "fixing install_name reference to ${odylib} of ${f##*/}" |
4432 |
+ install_name_tool \ |
4433 |
+ -change "${odylib}" \ |
4434 |
+ "${EPREFIX}"/usr/lib/libLLVM-${libpv}.dylib \ |
4435 |
+ -change "@rpath/libclang.dylib" \ |
4436 |
+ "${EPREFIX}"/usr/lib/libclang.dylib \ |
4437 |
+ -change "${S}"/Release/lib/libclang.dylib \ |
4438 |
+ "${EPREFIX}"/usr/lib/libclang.dylib \ |
4439 |
+ "${f}" |
4440 |
+ eend $? |
4441 |
+ done |
4442 |
+ fi |
4443 |
+} |
4444 |
+ |
4445 |
+multilib_src_install_all() { |
4446 |
+ insinto /usr/share/vim/vimfiles/syntax |
4447 |
+ doins utils/vim/*.vim |
4448 |
+ |
4449 |
+ if use clang; then |
4450 |
+ cd tools/clang || die |
4451 |
+ |
4452 |
+ if use static-analyzer ; then |
4453 |
+ dobin tools/scan-build/ccc-analyzer |
4454 |
+ dosym ccc-analyzer /usr/bin/c++-analyzer |
4455 |
+ dobin tools/scan-build/scan-build |
4456 |
+ |
4457 |
+ insinto /usr/share/${PN} |
4458 |
+ doins tools/scan-build/scanview.css |
4459 |
+ doins tools/scan-build/sorttable.js |
4460 |
+ fi |
4461 |
+ |
4462 |
+ python_inst() { |
4463 |
+ if use static-analyzer ; then |
4464 |
+ pushd tools/scan-view >/dev/null || die |
4465 |
+ |
4466 |
+ python_doscript scan-view |
4467 |
+ |
4468 |
+ touch __init__.py || die |
4469 |
+ python_moduleinto clang |
4470 |
+ python_domodule __init__.py Reporter.py Resources ScanView.py startfile.py |
4471 |
+ |
4472 |
+ popd >/dev/null || die |
4473 |
+ fi |
4474 |
+ |
4475 |
+ if use python ; then |
4476 |
+ pushd bindings/python/clang >/dev/null || die |
4477 |
+ |
4478 |
+ python_moduleinto clang |
4479 |
+ python_domodule __init__.py cindex.py enumerations.py |
4480 |
+ |
4481 |
+ popd >/dev/null || die |
4482 |
+ fi |
4483 |
+ |
4484 |
+ # AddressSanitizer symbolizer (currently separate) |
4485 |
+ python_doscript "${S}"/projects/compiler-rt/lib/asan/scripts/asan_symbolize.py |
4486 |
+ } |
4487 |
+ python_foreach_impl python_inst |
4488 |
+ fi |
4489 |
+} |
4490 |
|
4491 |
diff --git a/sys-devel/llvm/llvm-3.4.2.ebuild b/sys-devel/llvm/llvm-3.4.2.ebuild |
4492 |
new file mode 100644 |
4493 |
index 0000000..5268c28 |
4494 |
--- /dev/null |
4495 |
+++ b/sys-devel/llvm/llvm-3.4.2.ebuild |
4496 |
@@ -0,0 +1,543 @@ |
4497 |
+# Copyright 1999-2015 Gentoo Foundation |
4498 |
+# Distributed under the terms of the GNU General Public License v2 |
4499 |
+# $Id$ |
4500 |
+ |
4501 |
+EAPI=5 |
4502 |
+ |
4503 |
+PYTHON_COMPAT=( python2_7 pypy ) |
4504 |
+# this causes some issues so make it optional for now. |
4505 |
+# 3.5 will have CMakeFiles support in autotools. |
4506 |
+WANT_CMAKE=cmake |
4507 |
+ |
4508 |
+inherit cmake-utils eutils flag-o-matic multibuild multilib \ |
4509 |
+ multilib-minimal python-r1 toolchain-funcs pax-utils check-reqs prefix |
4510 |
+ |
4511 |
+DESCRIPTION="Low Level Virtual Machine" |
4512 |
+HOMEPAGE="http://llvm.org/" |
4513 |
+SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.gz |
4514 |
+ clang? ( http://llvm.org/releases/${PV}/compiler-rt-3.4.src.tar.gz |
4515 |
+ http://llvm.org/releases/${PV}/cfe-${PV}.src.tar.gz |
4516 |
+ http://llvm.org/releases/${PV}/clang-tools-extra-3.4.src.tar.gz ) |
4517 |
+ !doc? ( https://dev.gentoo.org/~mgorny/dist/${PN}-3.4-manpages.tar.bz2 )" |
4518 |
+ |
4519 |
+LICENSE="UoI-NCSA" |
4520 |
+SLOT="0/3.4" |
4521 |
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
4522 |
+IUSE="clang debug doc gold +libffi multitarget ncurses ocaml python |
4523 |
+ +static-analyzer test udis86 xml video_cards_radeon |
4524 |
+ kernel_Darwin kernel_FreeBSD" |
4525 |
+ |
4526 |
+COMMON_DEPEND=" |
4527 |
+ sys-libs/zlib:0= |
4528 |
+ clang? ( |
4529 |
+ python? ( ${PYTHON_DEPS} ) |
4530 |
+ static-analyzer? ( |
4531 |
+ dev-lang/perl:* |
4532 |
+ ${PYTHON_DEPS} |
4533 |
+ ) |
4534 |
+ xml? ( dev-libs/libxml2:2= ) |
4535 |
+ ) |
4536 |
+ gold? ( >=sys-devel/binutils-2.22:*[cxx] ) |
4537 |
+ libffi? ( >=virtual/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] ) |
4538 |
+ ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] ) |
4539 |
+ ocaml? ( dev-lang/ocaml:0= ) |
4540 |
+ udis86? ( >=dev-libs/udis86-1.7-r2:0=[pic(+),${MULTILIB_USEDEP}] )" |
4541 |
+DEPEND="${COMMON_DEPEND} |
4542 |
+ dev-lang/perl |
4543 |
+ >=sys-devel/make-3.81 |
4544 |
+ >=sys-devel/flex-2.5.4 |
4545 |
+ >=sys-devel/bison-1.875d |
4546 |
+ || ( >=sys-devel/gcc-3.0 >=sys-devel/gcc-apple-4.2.1 >=sys-devel/llvm-3.3 |
4547 |
+ ( >=sys-freebsd/freebsd-lib-9.1-r10 sys-libs/libcxx ) |
4548 |
+ ) |
4549 |
+ || ( >=sys-devel/binutils-2.18 >=sys-devel/binutils-apple-5.1 ) |
4550 |
+ clang? ( xml? ( virtual/pkgconfig ) ) |
4551 |
+ doc? ( dev-python/sphinx ) |
4552 |
+ libffi? ( virtual/pkgconfig ) |
4553 |
+ ${PYTHON_DEPS}" |
4554 |
+RDEPEND="${COMMON_DEPEND} |
4555 |
+ clang? ( !<=sys-devel/clang-${PV}-r99 |
4556 |
+ !>=sys-devel/clang-9999 ) |
4557 |
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r2 |
4558 |
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )" |
4559 |
+PDEPEND="clang? ( =sys-devel/clang-${PV}-r100 )" |
4560 |
+ |
4561 |
+# pypy gives me around 1700 unresolved tests due to open file limit |
4562 |
+# being exceeded. probably GC does not close them fast enough. |
4563 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE} |
4564 |
+ test? ( || ( $(python_gen_useflags 'python*') ) )" |
4565 |
+ |
4566 |
+S=${WORKDIR}/${P}.src |
4567 |
+ |
4568 |
+# Some people actually override that in make.conf. That sucks since |
4569 |
+# we need to run install per-directory, and ninja can't do that... |
4570 |
+# so why did it call itself ninja in the first place? |
4571 |
+CMAKE_MAKEFILE_GENERATOR=emake |
4572 |
+ |
4573 |
+MULTILIB_CHOST_TOOLS=( |
4574 |
+ /usr/bin/llvm-config |
4575 |
+) |
4576 |
+ |
4577 |
+pkg_pretend() { |
4578 |
+ # in megs |
4579 |
+ # !clang !debug !multitarget -O2 400 |
4580 |
+ # !clang !debug multitarget -O2 550 |
4581 |
+ # clang !debug !multitarget -O2 950 |
4582 |
+ # clang !debug multitarget -O2 1200 |
4583 |
+ # !clang debug multitarget -O2 5G |
4584 |
+ # clang !debug multitarget -O0 -g 12G |
4585 |
+ # clang debug multitarget -O2 16G |
4586 |
+ # clang debug multitarget -O0 -g 14G |
4587 |
+ |
4588 |
+ local build_size=550 |
4589 |
+ use clang && build_size=1200 |
4590 |
+ |
4591 |
+ if use debug; then |
4592 |
+ ewarn "USE=debug is known to increase the size of package considerably" |
4593 |
+ ewarn "and cause the tests to fail." |
4594 |
+ ewarn |
4595 |
+ |
4596 |
+ (( build_size *= 14 )) |
4597 |
+ elif is-flagq '-g?(gdb)?([1-9])'; then |
4598 |
+ ewarn "The C++ compiler -g option is known to increase the size of the package" |
4599 |
+ ewarn "considerably. If you run out of space, please consider removing it." |
4600 |
+ ewarn |
4601 |
+ |
4602 |
+ (( build_size *= 10 )) |
4603 |
+ fi |
4604 |
+ |
4605 |
+ # Multiply by number of ABIs :). |
4606 |
+ local abis=( $(multilib_get_enabled_abis) ) |
4607 |
+ (( build_size *= ${#abis[@]} )) |
4608 |
+ |
4609 |
+ local CHECKREQS_DISK_BUILD=${build_size}M |
4610 |
+ check-reqs_pkg_pretend |
4611 |
+} |
4612 |
+ |
4613 |
+pkg_setup() { |
4614 |
+ pkg_pretend |
4615 |
+ |
4616 |
+ # need to check if the active compiler is ok |
4617 |
+ |
4618 |
+ broken_gcc=( 3.2.2 3.2.3 3.3.2 4.1.1 ) |
4619 |
+ broken_gcc_x86=( 3.4.0 3.4.2 ) |
4620 |
+ broken_gcc_amd64=( 3.4.6 ) |
4621 |
+ |
4622 |
+ gcc_vers=$(gcc-fullversion) |
4623 |
+ |
4624 |
+ if has "${gcc_vers}" "${broken_gcc[@]}"; then |
4625 |
+ elog "Your version of gcc is known to miscompile llvm." |
4626 |
+ elog "Check http://www.llvm.org/docs/GettingStarted.html for" |
4627 |
+ elog "possible solutions." |
4628 |
+ die "Your currently active version of gcc is known to miscompile llvm" |
4629 |
+ fi |
4630 |
+ |
4631 |
+ if use abi_x86_32 && has "${gcc_vers}" "${broken_gcc_x86[@]}"; then |
4632 |
+ elog "Your version of gcc is known to miscompile llvm on x86" |
4633 |
+ elog "architectures. Check" |
4634 |
+ elog "http://www.llvm.org/docs/GettingStarted.html for possible" |
4635 |
+ elog "solutions." |
4636 |
+ die "Your currently active version of gcc is known to miscompile llvm" |
4637 |
+ fi |
4638 |
+ |
4639 |
+ if use abi_x86_64 && has "${gcc_vers}" "${broken_gcc_amd64[@]}"; then |
4640 |
+ elog "Your version of gcc is known to miscompile llvm in amd64" |
4641 |
+ elog "architectures. Check" |
4642 |
+ elog "http://www.llvm.org/docs/GettingStarted.html for possible" |
4643 |
+ elog "solutions." |
4644 |
+ die "Your currently active version of gcc is known to miscompile llvm" |
4645 |
+ fi |
4646 |
+} |
4647 |
+ |
4648 |
+src_unpack() { |
4649 |
+ default |
4650 |
+ |
4651 |
+ rm -f "${S}"/tools/clang "${S}"/projects/compiler-rt \ |
4652 |
+ || die "symlinks removal failed" |
4653 |
+ |
4654 |
+ if use clang; then |
4655 |
+ mv "${WORKDIR}"/cfe-${PV}.src "${S}"/tools/clang \ |
4656 |
+ || die "clang source directory move failed" |
4657 |
+ mv "${WORKDIR}"/compiler-rt-3.4 "${S}"/projects/compiler-rt \ |
4658 |
+ || die "compiler-rt source directory move failed" |
4659 |
+ mv "${WORKDIR}"/clang-tools-extra-3.4 "${S}"/tools/clang/tools/extra \ |
4660 |
+ || die "clang-tools-extra source directory move failed" |
4661 |
+ fi |
4662 |
+} |
4663 |
+ |
4664 |
+src_prepare() { |
4665 |
+ epatch "${FILESDIR}"/${PN}-3.2-nodoctargz.patch |
4666 |
+ epatch "${FILESDIR}"/${PN}-3.4-gentoo-install.patch |
4667 |
+ # Hack cmake search path for Gentoo, bug #496480 |
4668 |
+ epatch "${FILESDIR}"/${PN}-3.3-cmake-modulepath.patch |
4669 |
+ # Use built-in ConfigParser to avoid failures with configparser-3.2 |
4670 |
+ # https://bugs.gentoo.org/show_bug.cgi?id=500856 |
4671 |
+ epatch "${FILESDIR}"/${PN}-3.4-cmake-configparser.patch |
4672 |
+ |
4673 |
+ if use clang; then |
4674 |
+ # Automatically select active system GCC's libraries, bugs #406163 and #417913 |
4675 |
+ epatch "${FILESDIR}"/clang-3.1-gentoo-runtime-gcc-detection-v3.patch |
4676 |
+ |
4677 |
+ epatch "${FILESDIR}"/clang-3.4-gentoo-install.patch |
4678 |
+ epatch "${FILESDIR}"/clang-3.4-darwin_build_fix.patch |
4679 |
+ epatch "${FILESDIR}"/clang-3.4-darwin_prefix-include-paths.patch |
4680 |
+ eprefixify tools/clang/lib/Frontend/InitHeaderSearch.cpp |
4681 |
+ fi |
4682 |
+ |
4683 |
+ if use prefix && use clang; then |
4684 |
+ sed -i -e "/^CFLAGS /s@-Werror@-I${EPREFIX}/usr/include@" \ |
4685 |
+ projects/compiler-rt/make/platform/clang_*.mk || die |
4686 |
+ fi |
4687 |
+ |
4688 |
+ local sub_files=( |
4689 |
+ Makefile.config.in |
4690 |
+ Makefile.rules |
4691 |
+ tools/llvm-config/llvm-config.cpp |
4692 |
+ ) |
4693 |
+ use clang && sub_files+=( |
4694 |
+ tools/clang/lib/Driver/Tools.cpp |
4695 |
+ tools/clang/tools/scan-build/scan-build |
4696 |
+ ) |
4697 |
+ |
4698 |
+ # unfortunately ./configure won't listen to --mandir and the-like, so take |
4699 |
+ # care of this. |
4700 |
+ # note: we're setting the main libdir intentionally. |
4701 |
+ # where per-ABI is appropriate, we use $(GENTOO_LIBDIR) make. |
4702 |
+ einfo "Fixing install dirs" |
4703 |
+ sed -e "s,@libdir@,$(get_libdir),g" \ |
4704 |
+ -e "s,@PF@,${PF},g" \ |
4705 |
+ -e "s,@EPREFIX@,${EPREFIX},g" \ |
4706 |
+ -i "${sub_files[@]}" \ |
4707 |
+ || die "install paths sed failed" |
4708 |
+ |
4709 |
+ if use clang; then |
4710 |
+ # constantly fails for a long time, likely due to our patches |
4711 |
+ rm tools/clang/test/Driver/cross-linux.c || die |
4712 |
+ fi |
4713 |
+ |
4714 |
+ # User patches |
4715 |
+ epatch_user |
4716 |
+ |
4717 |
+ python_setup |
4718 |
+} |
4719 |
+ |
4720 |
+multilib_src_configure() { |
4721 |
+ # disable timestamps since they confuse ccache |
4722 |
+ local conf_flags=( |
4723 |
+ --disable-timestamps |
4724 |
+ --enable-keep-symbols |
4725 |
+ --enable-shared |
4726 |
+ --with-optimize-option= |
4727 |
+ $(use_enable !debug optimized) |
4728 |
+ $(use_enable debug assertions) |
4729 |
+ $(use_enable debug expensive-checks) |
4730 |
+ $(use_enable ncurses terminfo) |
4731 |
+ $(use_enable libffi) |
4732 |
+ ) |
4733 |
+ |
4734 |
+ if use clang; then |
4735 |
+ conf_flags+=( --with-clang-resource-dir=../lib/clang/${PV} ) |
4736 |
+ fi |
4737 |
+ # well, it's used only by clang executable c-index-test |
4738 |
+ if multilib_is_native_abi && use clang && use xml; then |
4739 |
+ conf_flags+=( XML2CONFIG="$(tc-getPKG_CONFIG) libxml-2.0" ) |
4740 |
+ else |
4741 |
+ conf_flags+=( ac_cv_prog_XML2CONFIG="" ) |
4742 |
+ fi |
4743 |
+ |
4744 |
+ local targets bindings |
4745 |
+ if use multitarget; then |
4746 |
+ targets='all' |
4747 |
+ else |
4748 |
+ targets='host,cpp' |
4749 |
+ use video_cards_radeon && targets+=',r600' |
4750 |
+ fi |
4751 |
+ conf_flags+=( --enable-targets=${targets} ) |
4752 |
+ |
4753 |
+ if multilib_is_native_abi; then |
4754 |
+ use gold && conf_flags+=( --with-binutils-include="${EPREFIX}"/usr/include/ ) |
4755 |
+ # extra commas don't hurt |
4756 |
+ use ocaml && bindings+=',ocaml' |
4757 |
+ fi |
4758 |
+ |
4759 |
+ [[ ${bindings} ]] || bindings='none' |
4760 |
+ conf_flags+=( --enable-bindings=${bindings} ) |
4761 |
+ |
4762 |
+ if use udis86; then |
4763 |
+ conf_flags+=( --with-udis86 ) |
4764 |
+ fi |
4765 |
+ |
4766 |
+ if use libffi; then |
4767 |
+ local CPPFLAGS=${CPPFLAGS} |
4768 |
+ append-cppflags "$(pkg-config --cflags libffi)" |
4769 |
+ fi |
4770 |
+ |
4771 |
+ # llvm prefers clang over gcc, so we may need to force that |
4772 |
+ tc-export CC CXX |
4773 |
+ |
4774 |
+ ECONF_SOURCE=${S} \ |
4775 |
+ econf "${conf_flags[@]}" |
4776 |
+ |
4777 |
+ multilib_is_native_abi && cmake_configure |
4778 |
+} |
4779 |
+ |
4780 |
+cmake_configure() { |
4781 |
+ # sadly, cmake doesn't seem to have host autodetection |
4782 |
+ # but it's fairly easy to steal this from configured autotools |
4783 |
+ local targets=$(sed -n -e 's/^TARGETS_TO_BUILD=//p' Makefile.config || die) |
4784 |
+ local libdir=$(get_libdir) |
4785 |
+ local mycmakeargs=( |
4786 |
+ # just the stuff needed to get correct cmake modules |
4787 |
+ $(cmake-utils_use ncurses LLVM_ENABLE_TERMINFO) |
4788 |
+ |
4789 |
+ -DLLVM_TARGETS_TO_BUILD="${targets// /;}" |
4790 |
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib} |
4791 |
+ ) |
4792 |
+ |
4793 |
+ BUILD_DIR=${S%/}_cmake \ |
4794 |
+ cmake-utils_src_configure |
4795 |
+} |
4796 |
+ |
4797 |
+set_makeargs() { |
4798 |
+ MAKEARGS=( |
4799 |
+ VERBOSE=1 |
4800 |
+ REQUIRES_RTTI=1 |
4801 |
+ GENTOO_LIBDIR=$(get_libdir) |
4802 |
+ ) |
4803 |
+ |
4804 |
+ # for tests, we want it all! otherwise, we may use a little filtering... |
4805 |
+ # adding ONLY_TOOLS also disables unittest building... |
4806 |
+ if [[ ${EBUILD_PHASE_FUNC} != src_test ]]; then |
4807 |
+ local tools=( llvm-config ) |
4808 |
+ use clang && tools+=( clang ) |
4809 |
+ |
4810 |
+ if multilib_is_native_abi; then |
4811 |
+ tools+=( |
4812 |
+ opt llvm-as llvm-dis llc llvm-ar llvm-nm llvm-link lli |
4813 |
+ llvm-extract llvm-mc llvm-bcanalyzer llvm-diff macho-dump |
4814 |
+ llvm-objdump llvm-readobj llvm-rtdyld llvm-dwarfdump llvm-cov |
4815 |
+ llvm-size llvm-stress llvm-mcmarkup llvm-symbolizer obj2yaml |
4816 |
+ yaml2obj lto bugpoint |
4817 |
+ ) |
4818 |
+ |
4819 |
+ # the build system runs explicitly specified tools in parallel, |
4820 |
+ # so we need to split it into two runs |
4821 |
+ if [[ ${1} != -1 ]]; then |
4822 |
+ # those require lto |
4823 |
+ tools+=( llvm-lto ) |
4824 |
+ use gold && tools+=( gold ) |
4825 |
+ |
4826 |
+ # those require clang :) |
4827 |
+ # we need to explicitly specify all its tools |
4828 |
+ # since we're passing BUILD_CLANG_ONLY |
4829 |
+ use clang && tools+=( |
4830 |
+ clang/tools/{clang-check,clang-format,extra} |
4831 |
+ ) |
4832 |
+ fi |
4833 |
+ fi |
4834 |
+ |
4835 |
+ MAKEARGS+=( |
4836 |
+ # filter tools + disable unittests implicitly |
4837 |
+ ONLY_TOOLS="${tools[*]}" |
4838 |
+ |
4839 |
+ # this disables unittests & docs from clang |
4840 |
+ BUILD_CLANG_ONLY=YES |
4841 |
+ ) |
4842 |
+ fi |
4843 |
+} |
4844 |
+ |
4845 |
+multilib_src_compile() { |
4846 |
+ local MAKEARGS |
4847 |
+ set_makeargs -1 |
4848 |
+ emake "${MAKEARGS[@]}" |
4849 |
+ |
4850 |
+ if multilib_is_native_abi; then |
4851 |
+ set_makeargs |
4852 |
+ emake -C tools "${MAKEARGS[@]}" |
4853 |
+ |
4854 |
+ if use doc; then |
4855 |
+ emake -C "${S}"/docs -f Makefile.sphinx man |
4856 |
+ use clang && emake -C "${S}"/tools/clang/docs/tools \ |
4857 |
+ BUILD_FOR_WEBSITE=1 DST_MAN_DIR="${T}"/ man |
4858 |
+ emake -C "${S}"/docs -f Makefile.sphinx html |
4859 |
+ fi |
4860 |
+ fi |
4861 |
+ |
4862 |
+ if use debug; then |
4863 |
+ pax-mark m Debug+Asserts+Checks/bin/llvm-rtdyld |
4864 |
+ pax-mark m Debug+Asserts+Checks/bin/lli |
4865 |
+ pax-mark m Debug+Asserts+Checks/bin/lli-child-target |
4866 |
+ else |
4867 |
+ pax-mark m Release/bin/llvm-rtdyld |
4868 |
+ pax-mark m Release/bin/lli |
4869 |
+ pax-mark m Release/bin/lli-child-target |
4870 |
+ fi |
4871 |
+} |
4872 |
+ |
4873 |
+multilib_src_test() { |
4874 |
+ local MAKEARGS |
4875 |
+ set_makeargs |
4876 |
+ |
4877 |
+ # build the remaining tools & unittests |
4878 |
+ emake "${MAKEARGS[@]}" |
4879 |
+ |
4880 |
+ pax-mark m unittests/ExecutionEngine/JIT/Release/JITTests |
4881 |
+ pax-mark m unittests/ExecutionEngine/MCJIT/Release/MCJITTests |
4882 |
+ pax-mark m unittests/Support/Release/SupportTests |
4883 |
+ |
4884 |
+ # respect TMPDIR! |
4885 |
+ local -x LIT_PRESERVES_TMP=1 |
4886 |
+ emake "${MAKEARGS[@]}" check |
4887 |
+ use clang && emake "${MAKEARGS[@]}" -C tools/clang test |
4888 |
+} |
4889 |
+ |
4890 |
+src_install() { |
4891 |
+ local MULTILIB_WRAPPED_HEADERS=( |
4892 |
+ /usr/include/llvm/Config/config.h |
4893 |
+ /usr/include/llvm/Config/llvm-config.h |
4894 |
+ ) |
4895 |
+ |
4896 |
+ use clang && MULTILIB_WRAPPED_HEADERS+=( |
4897 |
+ /usr/include/clang/Config/config.h |
4898 |
+ ) |
4899 |
+ |
4900 |
+ multilib-minimal_src_install |
4901 |
+ |
4902 |
+ # Remove unnecessary headers on FreeBSD, bug #417171 |
4903 |
+ use kernel_FreeBSD && use clang && rm "${ED}"usr/lib/clang/${PV}/include/{std,float,iso,limits,tgmath,varargs}*.h |
4904 |
+} |
4905 |
+ |
4906 |
+multilib_src_install() { |
4907 |
+ local MAKEARGS |
4908 |
+ set_makeargs |
4909 |
+ |
4910 |
+ local root=${D}/_${ABI} |
4911 |
+ |
4912 |
+ emake "${MAKEARGS[@]}" DESTDIR="${root}" install |
4913 |
+ multibuild_merge_root "${root}" "${D}" |
4914 |
+ |
4915 |
+ if ! multilib_is_native_abi; then |
4916 |
+ # Backwards compat, will be happily removed someday. |
4917 |
+ dosym "${CHOST}"-llvm-config /usr/bin/llvm-config.${ABI} |
4918 |
+ else |
4919 |
+ # Install docs. |
4920 |
+ if use doc; then |
4921 |
+ doman "${S}"/docs/_build/man/*.1 |
4922 |
+ use clang && doman "${T}"/clang.1 |
4923 |
+ dohtml -r "${S}"/docs/_build/html/ |
4924 |
+ else |
4925 |
+ if ! use clang; then |
4926 |
+ rm "${WORKDIR}"/${PN}-3.4-manpages/clang.1 || die |
4927 |
+ fi |
4928 |
+ doman "${WORKDIR}"/${PN}-3.4-manpages/*.1 |
4929 |
+ fi |
4930 |
+ |
4931 |
+ # Symlink the gold plugin. |
4932 |
+ if use gold; then |
4933 |
+ dodir /usr/${CHOST}/binutils-bin/lib/bfd-plugins |
4934 |
+ dosym ../../../../$(get_libdir)/LLVMgold.so \ |
4935 |
+ /usr/${CHOST}/binutils-bin/lib/bfd-plugins/LLVMgold.so |
4936 |
+ fi |
4937 |
+ |
4938 |
+ # install cmake modules |
4939 |
+ if use cmake; then |
4940 |
+ emake -C "${S%/}"_cmake/cmake/modules DESTDIR="${D}" install |
4941 |
+ fi |
4942 |
+ fi |
4943 |
+ |
4944 |
+ # Fix install_names on Darwin. The build system is too complicated |
4945 |
+ # to just fix this, so we correct it post-install |
4946 |
+ local lib= f= odylib= ndylib= libpv=${PV} |
4947 |
+ if [[ ${CHOST} == *-darwin* ]] ; then |
4948 |
+ eval $(grep PACKAGE_VERSION= configure) |
4949 |
+ [[ -n ${PACKAGE_VERSION} ]] && libpv=${PACKAGE_VERSION} |
4950 |
+ libpvminor=${libpv%.[0-9]*} |
4951 |
+ for lib in lib{EnhancedDisassembly,LLVM-${libpv},LTO,profile_rt,clang}.dylib LLVMHello.dylib clang/${libpv}/lib/darwin/libclang_rt.asan_{osx,iossim}_dynamic.dylib; do |
4952 |
+ # libEnhancedDisassembly is Darwin10 only, so non-fatal |
4953 |
+ # + omit clang libs if not enabled |
4954 |
+ [[ -f ${ED}/usr/lib/${lib} ]] || continue |
4955 |
+ |
4956 |
+ ebegin "fixing install_name of $lib" |
4957 |
+ install_name_tool \ |
4958 |
+ -id "${EPREFIX}"/usr/lib/${lib} \ |
4959 |
+ "${ED}"/usr/lib/${lib} |
4960 |
+ eend $? |
4961 |
+ done |
4962 |
+ for f in "${ED}"/usr/bin/* "${ED}"/usr/lib/lib*.dylib "${ED}"/usr/lib/clang/${libpv}/lib/darwin/*.dylib ; do |
4963 |
+ # omit clang libs if not enabled |
4964 |
+ [[ -f "${f}" ]] || continue |
4965 |
+ |
4966 |
+ scanmacho -BF'%n#f' "${f}" | tr ',' '\n' | \ |
4967 |
+ while read odylib ; do |
4968 |
+ ndylib= |
4969 |
+ case ${odylib} in |
4970 |
+ */libclang.dylib) |
4971 |
+ ndylib="${EPREFIX}"/usr/lib/libclang.dylib |
4972 |
+ ;; |
4973 |
+ */libLLVM-${libpv}.dylib) |
4974 |
+ ndylib="${EPREFIX}"/usr/lib/libLLVM-${libpv}.dylib |
4975 |
+ ;; |
4976 |
+ */libLLVM-${libpvminor}.dylib) |
4977 |
+ ndylib="${EPREFIX}"/usr/lib/libLLVM-${libpvminor}.dylib |
4978 |
+ ;; |
4979 |
+ */libLTO.dylib) |
4980 |
+ ndylib="${EPREFIX}"/usr/lib/libLTO.dylib |
4981 |
+ ;; |
4982 |
+ esac |
4983 |
+ if [[ -n ${ndylib} ]] ; then |
4984 |
+ ebegin "fixing install_name reference to ${odylib} of ${f##*/}" |
4985 |
+ install_name_tool \ |
4986 |
+ -change "${odylib}" "${ndylib}" \ |
4987 |
+ "${f}" |
4988 |
+ eend $? |
4989 |
+ fi |
4990 |
+ done |
4991 |
+ done |
4992 |
+ fi |
4993 |
+} |
4994 |
+ |
4995 |
+multilib_src_install_all() { |
4996 |
+ insinto /usr/share/vim/vimfiles/syntax |
4997 |
+ doins utils/vim/*.vim |
4998 |
+ |
4999 |
+ if use clang; then |
5000 |
+ cd tools/clang || die |
5001 |
+ |
5002 |
+ if use static-analyzer ; then |
5003 |
+ dobin tools/scan-build/ccc-analyzer |
5004 |
+ dosym ccc-analyzer /usr/bin/c++-analyzer |
5005 |
+ dobin tools/scan-build/scan-build |
5006 |
+ |
5007 |
+ insinto /usr/share/${PN} |
5008 |
+ doins tools/scan-build/scanview.css |
5009 |
+ doins tools/scan-build/sorttable.js |
5010 |
+ fi |
5011 |
+ |
5012 |
+ python_inst() { |
5013 |
+ if use static-analyzer ; then |
5014 |
+ pushd tools/scan-view >/dev/null || die |
5015 |
+ |
5016 |
+ python_doscript scan-view |
5017 |
+ |
5018 |
+ touch __init__.py || die |
5019 |
+ python_moduleinto clang |
5020 |
+ python_domodule __init__.py Reporter.py Resources ScanView.py startfile.py |
5021 |
+ |
5022 |
+ popd >/dev/null || die |
5023 |
+ fi |
5024 |
+ |
5025 |
+ if use python ; then |
5026 |
+ pushd bindings/python/clang >/dev/null || die |
5027 |
+ |
5028 |
+ python_moduleinto clang |
5029 |
+ python_domodule __init__.py cindex.py enumerations.py |
5030 |
+ |
5031 |
+ popd >/dev/null || die |
5032 |
+ fi |
5033 |
+ |
5034 |
+ # AddressSanitizer symbolizer (currently separate) |
5035 |
+ python_doscript "${S}"/projects/compiler-rt/lib/asan/scripts/asan_symbolize.py |
5036 |
+ } |
5037 |
+ python_foreach_impl python_inst |
5038 |
+ fi |
5039 |
+} |
5040 |
|
5041 |
diff --git a/sys-devel/llvm/llvm-3.5.0.ebuild b/sys-devel/llvm/llvm-3.5.0.ebuild |
5042 |
new file mode 100644 |
5043 |
index 0000000..d6019fc |
5044 |
--- /dev/null |
5045 |
+++ b/sys-devel/llvm/llvm-3.5.0.ebuild |
5046 |
@@ -0,0 +1,530 @@ |
5047 |
+# Copyright 1999-2015 Gentoo Foundation |
5048 |
+# Distributed under the terms of the GNU General Public License v2 |
5049 |
+# $Id$ |
5050 |
+ |
5051 |
+EAPI=5 |
5052 |
+ |
5053 |
+PYTHON_COMPAT=( python2_7 pypy ) |
5054 |
+ |
5055 |
+inherit eutils flag-o-matic multibuild multilib \ |
5056 |
+ multilib-minimal python-r1 toolchain-funcs pax-utils check-reqs prefix |
5057 |
+ |
5058 |
+DESCRIPTION="Low Level Virtual Machine" |
5059 |
+HOMEPAGE="http://llvm.org/" |
5060 |
+SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.xz |
5061 |
+ clang? ( http://llvm.org/releases/${PV}/compiler-rt-${PV}.src.tar.xz |
5062 |
+ http://llvm.org/releases/${PV}/cfe-${PV}.src.tar.xz |
5063 |
+ http://llvm.org/releases/${PV}/clang-tools-extra-${PV}.src.tar.xz ) |
5064 |
+ !doc? ( https://dev.gentoo.org/~voyageur/distfiles/${P}-manpages.tar.bz2 )" |
5065 |
+ |
5066 |
+LICENSE="UoI-NCSA" |
5067 |
+SLOT="0/3.5" |
5068 |
+KEYWORDS="amd64 arm ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
5069 |
+IUSE="clang debug doc gold libedit +libffi multitarget ncurses ocaml python |
5070 |
+ +static-analyzer test xml video_cards_radeon |
5071 |
+ kernel_Darwin kernel_FreeBSD" |
5072 |
+ |
5073 |
+COMMON_DEPEND=" |
5074 |
+ sys-libs/zlib:0= |
5075 |
+ clang? ( |
5076 |
+ python? ( ${PYTHON_DEPS} ) |
5077 |
+ static-analyzer? ( |
5078 |
+ dev-lang/perl:* |
5079 |
+ ${PYTHON_DEPS} |
5080 |
+ ) |
5081 |
+ xml? ( dev-libs/libxml2:2= ) |
5082 |
+ ) |
5083 |
+ gold? ( >=sys-devel/binutils-2.22:*[cxx] ) |
5084 |
+ libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] ) |
5085 |
+ libffi? ( >=virtual/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] ) |
5086 |
+ ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] ) |
5087 |
+ ocaml? ( dev-lang/ocaml:0= )" |
5088 |
+# configparser-3.2 breaks the build (3.3 or none at all are fine) |
5089 |
+DEPEND="${COMMON_DEPEND} |
5090 |
+ app-arch/xz-utils |
5091 |
+ dev-lang/perl |
5092 |
+ >=sys-devel/make-3.81 |
5093 |
+ >=sys-devel/flex-2.5.4 |
5094 |
+ >=sys-devel/bison-1.875d |
5095 |
+ || ( >=sys-devel/gcc-3.0 >=sys-devel/gcc-apple-4.2.1 |
5096 |
+ ( >=sys-freebsd/freebsd-lib-9.1-r10 sys-libs/libcxx ) |
5097 |
+ ) |
5098 |
+ || ( >=sys-devel/binutils-2.18 >=sys-devel/binutils-apple-5.1 ) |
5099 |
+ clang? ( xml? ( virtual/pkgconfig ) ) |
5100 |
+ doc? ( dev-python/sphinx ) |
5101 |
+ libffi? ( virtual/pkgconfig ) |
5102 |
+ !!<dev-python/configparser-3.3.0.2 |
5103 |
+ ${PYTHON_DEPS}" |
5104 |
+RDEPEND="${COMMON_DEPEND} |
5105 |
+ clang? ( !<=sys-devel/clang-${PV}-r99 |
5106 |
+ !>=sys-devel/clang-9999 ) |
5107 |
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r2 |
5108 |
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )" |
5109 |
+PDEPEND="clang? ( =sys-devel/clang-${PV}-r100 )" |
5110 |
+ |
5111 |
+# pypy gives me around 1700 unresolved tests due to open file limit |
5112 |
+# being exceeded. probably GC does not close them fast enough. |
5113 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE} |
5114 |
+ test? ( || ( $(python_gen_useflags 'python*') ) )" |
5115 |
+ |
5116 |
+S=${WORKDIR}/${P}.src |
5117 |
+ |
5118 |
+# Some people actually override that in make.conf. That sucks since |
5119 |
+# we need to run install per-directory, and ninja can't do that... |
5120 |
+# so why did it call itself ninja in the first place? |
5121 |
+CMAKE_MAKEFILE_GENERATOR=emake |
5122 |
+ |
5123 |
+pkg_pretend() { |
5124 |
+ # in megs |
5125 |
+ # !clang !debug !multitarget -O2 400 |
5126 |
+ # !clang !debug multitarget -O2 550 |
5127 |
+ # clang !debug !multitarget -O2 950 |
5128 |
+ # clang !debug multitarget -O2 1200 |
5129 |
+ # !clang debug multitarget -O2 5G |
5130 |
+ # clang !debug multitarget -O0 -g 12G |
5131 |
+ # clang debug multitarget -O2 16G |
5132 |
+ # clang debug multitarget -O0 -g 14G |
5133 |
+ |
5134 |
+ local build_size=550 |
5135 |
+ use clang && build_size=1200 |
5136 |
+ |
5137 |
+ if use debug; then |
5138 |
+ ewarn "USE=debug is known to increase the size of package considerably" |
5139 |
+ ewarn "and cause the tests to fail." |
5140 |
+ ewarn |
5141 |
+ |
5142 |
+ (( build_size *= 14 )) |
5143 |
+ elif is-flagq '-g?(gdb)?([1-9])'; then |
5144 |
+ ewarn "The C++ compiler -g option is known to increase the size of the package" |
5145 |
+ ewarn "considerably. If you run out of space, please consider removing it." |
5146 |
+ ewarn |
5147 |
+ |
5148 |
+ (( build_size *= 10 )) |
5149 |
+ fi |
5150 |
+ |
5151 |
+ # Multiply by number of ABIs :). |
5152 |
+ local abis=( $(multilib_get_enabled_abis) ) |
5153 |
+ (( build_size *= ${#abis[@]} )) |
5154 |
+ |
5155 |
+ local CHECKREQS_DISK_BUILD=${build_size}M |
5156 |
+ check-reqs_pkg_pretend |
5157 |
+ |
5158 |
+ if [[ ${MERGE_TYPE} != binary ]]; then |
5159 |
+ echo 'int main() {return 0;}' > "${T}"/test.cxx || die |
5160 |
+ ebegin "Trying to build a C++11 test program" |
5161 |
+ if ! $(tc-getCXX) -std=c++11 -o /dev/null "${T}"/test.cxx; then |
5162 |
+ eerror "LLVM-${PV} requires C++11-capable C++ compiler. Your current compiler" |
5163 |
+ eerror "does not seem to support -std=c++11 option. Please upgrade your compiler" |
5164 |
+ eerror "to gcc-4.7 or an equivalent version supporting C++11." |
5165 |
+ die "Currently active compiler does not support -std=c++11" |
5166 |
+ fi |
5167 |
+ eend ${?} |
5168 |
+ fi |
5169 |
+} |
5170 |
+ |
5171 |
+pkg_setup() { |
5172 |
+ pkg_pretend |
5173 |
+} |
5174 |
+ |
5175 |
+src_unpack() { |
5176 |
+ default |
5177 |
+ |
5178 |
+ rm -f "${S}"/tools/clang "${S}"/projects/compiler-rt \ |
5179 |
+ || die "symlinks removal failed" |
5180 |
+ |
5181 |
+ if use clang; then |
5182 |
+ mv "${WORKDIR}"/cfe-${PV}.src "${S}"/tools/clang \ |
5183 |
+ || die "clang source directory move failed" |
5184 |
+ mv "${WORKDIR}"/compiler-rt-${PV}.src "${S}"/projects/compiler-rt \ |
5185 |
+ || die "compiler-rt source directory move failed" |
5186 |
+ mv "${WORKDIR}"/clang-tools-extra-${PV}.src "${S}"/tools/clang/tools/extra \ |
5187 |
+ || die "clang-tools-extra source directory move failed" |
5188 |
+ fi |
5189 |
+} |
5190 |
+ |
5191 |
+src_prepare() { |
5192 |
+ epatch "${FILESDIR}"/${PN}-3.2-nodoctargz.patch |
5193 |
+ epatch "${FILESDIR}"/${PN}-3.5-gcc-4.9.patch |
5194 |
+ epatch "${FILESDIR}"/${PN}-3.5-gentoo-install.patch |
5195 |
+ |
5196 |
+ epatch "${FILESDIR}"/${P}-fix_LLVMExports_cmake.patch |
5197 |
+ |
5198 |
+ if use clang; then |
5199 |
+ # Automatically select active system GCC's libraries, bugs #406163 and #417913 |
5200 |
+ epatch "${FILESDIR}"/clang-3.5-gentoo-runtime-gcc-detection-v3.patch |
5201 |
+ |
5202 |
+ epatch "${FILESDIR}"/clang-3.5-gentoo-install.patch |
5203 |
+ epatch "${FILESDIR}"/clang-3.4-darwin_prefix-include-paths.patch |
5204 |
+ eprefixify tools/clang/lib/Frontend/InitHeaderSearch.cpp |
5205 |
+ fi |
5206 |
+ |
5207 |
+ if use prefix && use clang; then |
5208 |
+ sed -i -e "/^CFLAGS /s@-Werror@-I${EPREFIX}/usr/include@" \ |
5209 |
+ projects/compiler-rt/make/platform/clang_*.mk || die |
5210 |
+ fi |
5211 |
+ |
5212 |
+ local sub_files=( |
5213 |
+ Makefile.config.in |
5214 |
+ Makefile.rules |
5215 |
+ tools/llvm-config/llvm-config.cpp |
5216 |
+ ) |
5217 |
+ use clang && sub_files+=( |
5218 |
+ tools/clang/lib/Driver/Tools.cpp |
5219 |
+ tools/clang/tools/scan-build/scan-build |
5220 |
+ ) |
5221 |
+ |
5222 |
+ # unfortunately ./configure won't listen to --mandir and the-like, so take |
5223 |
+ # care of this. |
5224 |
+ # note: we're setting the main libdir intentionally. |
5225 |
+ # where per-ABI is appropriate, we use $(GENTOO_LIBDIR) make. |
5226 |
+ einfo "Fixing install dirs" |
5227 |
+ sed -e "s,@libdir@,$(get_libdir),g" \ |
5228 |
+ -e "s,@PF@,${PF},g" \ |
5229 |
+ -e "s,@EPREFIX@,${EPREFIX},g" \ |
5230 |
+ -i "${sub_files[@]}" \ |
5231 |
+ || die "install paths sed failed" |
5232 |
+ |
5233 |
+ if use clang; then |
5234 |
+ # constantly fails for a long time, likely due to our patches |
5235 |
+ rm tools/clang/test/Driver/cross-linux.c || die |
5236 |
+ fi |
5237 |
+ |
5238 |
+ # User patches |
5239 |
+ epatch_user |
5240 |
+ |
5241 |
+ python_setup |
5242 |
+} |
5243 |
+ |
5244 |
+multilib_src_configure() { |
5245 |
+ # disable timestamps since they confuse ccache |
5246 |
+ local conf_flags=( |
5247 |
+ --disable-timestamps |
5248 |
+ --enable-keep-symbols |
5249 |
+ --enable-shared |
5250 |
+ --with-optimize-option= |
5251 |
+ $(tc-is-static-only && echo --disable-shared) |
5252 |
+ $(use_enable !debug optimized) |
5253 |
+ $(use_enable debug assertions) |
5254 |
+ $(use_enable debug expensive-checks) |
5255 |
+ $(use_enable libedit) |
5256 |
+ $(use_enable ncurses terminfo) |
5257 |
+ $(use_enable libffi) |
5258 |
+ ) |
5259 |
+ |
5260 |
+ # well, it's used only by clang executable c-index-test |
5261 |
+ if multilib_is_native_abi && use clang && use xml; then |
5262 |
+ conf_flags+=( XML2CONFIG="$(tc-getPKG_CONFIG) libxml-2.0" ) |
5263 |
+ else |
5264 |
+ conf_flags+=( ac_cv_prog_XML2CONFIG="" ) |
5265 |
+ fi |
5266 |
+ |
5267 |
+ local targets bindings |
5268 |
+ if use multitarget; then |
5269 |
+ targets='all' |
5270 |
+ else |
5271 |
+ targets='host,cpp' |
5272 |
+ use video_cards_radeon && targets+=',r600' |
5273 |
+ fi |
5274 |
+ conf_flags+=( --enable-targets=${targets} ) |
5275 |
+ |
5276 |
+ if multilib_is_native_abi; then |
5277 |
+ use gold && conf_flags+=( --with-binutils-include="${EPREFIX}"/usr/include/ ) |
5278 |
+ # extra commas don't hurt |
5279 |
+ use ocaml && bindings+=',ocaml' |
5280 |
+ fi |
5281 |
+ |
5282 |
+ [[ ${bindings} ]] || bindings='none' |
5283 |
+ conf_flags+=( --enable-bindings=${bindings} ) |
5284 |
+ |
5285 |
+ if use libffi; then |
5286 |
+ local CPPFLAGS=${CPPFLAGS} |
5287 |
+ append-cppflags "$(pkg-config --cflags libffi)" |
5288 |
+ fi |
5289 |
+ |
5290 |
+ # llvm prefers clang over gcc, so we may need to force that |
5291 |
+ tc-export CC CXX |
5292 |
+ |
5293 |
+ ECONF_SOURCE=${S} \ |
5294 |
+ econf "${conf_flags[@]}" |
5295 |
+} |
5296 |
+ |
5297 |
+set_makeargs() { |
5298 |
+ MAKEARGS=( |
5299 |
+ VERBOSE=1 |
5300 |
+ REQUIRES_RTTI=1 |
5301 |
+ GENTOO_LIBDIR=$(get_libdir) |
5302 |
+ ) |
5303 |
+ |
5304 |
+ # for tests, we want it all! otherwise, we may use a little filtering... |
5305 |
+ # adding ONLY_TOOLS also disables unittest building... |
5306 |
+ if [[ ${EBUILD_PHASE_FUNC} != src_test ]]; then |
5307 |
+ local tools=( llvm-config ) |
5308 |
+ use clang && tools+=( clang ) |
5309 |
+ |
5310 |
+ if multilib_is_native_abi; then |
5311 |
+ tools+=( |
5312 |
+ opt llvm-as llvm-dis llc llvm-ar llvm-nm llvm-link lli |
5313 |
+ llvm-extract llvm-mc llvm-bcanalyzer llvm-diff macho-dump |
5314 |
+ llvm-objdump llvm-readobj llvm-rtdyld llvm-dwarfdump llvm-cov |
5315 |
+ llvm-size llvm-stress llvm-mcmarkup llvm-profdata |
5316 |
+ llvm-symbolizer obj2yaml yaml2obj lto bugpoint |
5317 |
+ ) |
5318 |
+ |
5319 |
+ # the build system runs explicitly specified tools in parallel, |
5320 |
+ # so we need to split it into two runs |
5321 |
+ if [[ ${1} != -1 ]]; then |
5322 |
+ # those require lto |
5323 |
+ tools+=( llvm-lto ) |
5324 |
+ use gold && tools+=( gold ) |
5325 |
+ |
5326 |
+ # those require clang :) |
5327 |
+ # we need to explicitly specify all its tools |
5328 |
+ # since we're passing BUILD_CLANG_ONLY |
5329 |
+ use clang && tools+=( |
5330 |
+ clang/tools/{clang-check,clang-format,extra} |
5331 |
+ ) |
5332 |
+ fi |
5333 |
+ fi |
5334 |
+ |
5335 |
+ MAKEARGS+=( |
5336 |
+ # filter tools + disable unittests implicitly |
5337 |
+ ONLY_TOOLS="${tools[*]}" |
5338 |
+ |
5339 |
+ # this disables unittests & docs from clang |
5340 |
+ BUILD_CLANG_ONLY=YES |
5341 |
+ ) |
5342 |
+ fi |
5343 |
+} |
5344 |
+ |
5345 |
+multilib_src_compile() { |
5346 |
+ local MAKEARGS |
5347 |
+ set_makeargs -1 |
5348 |
+ emake "${MAKEARGS[@]}" |
5349 |
+ |
5350 |
+ if multilib_is_native_abi; then |
5351 |
+ set_makeargs |
5352 |
+ emake -C tools "${MAKEARGS[@]}" |
5353 |
+ |
5354 |
+ if use doc; then |
5355 |
+ emake -C "${S}"/docs -f Makefile.sphinx man |
5356 |
+ use clang && emake -C "${S}"/tools/clang/docs/tools \ |
5357 |
+ BUILD_FOR_WEBSITE=1 DST_MAN_DIR="${T}"/ man |
5358 |
+ emake -C "${S}"/docs -f Makefile.sphinx html |
5359 |
+ fi |
5360 |
+ fi |
5361 |
+ |
5362 |
+ if use debug; then |
5363 |
+ pax-mark m Debug+Asserts+Checks/bin/llvm-rtdyld |
5364 |
+ pax-mark m Debug+Asserts+Checks/bin/lli |
5365 |
+ pax-mark m Debug+Asserts+Checks/bin/lli-child-target |
5366 |
+ else |
5367 |
+ pax-mark m Release/bin/llvm-rtdyld |
5368 |
+ pax-mark m Release/bin/lli |
5369 |
+ pax-mark m Release/bin/lli-child-target |
5370 |
+ fi |
5371 |
+} |
5372 |
+ |
5373 |
+multilib_src_test() { |
5374 |
+ local MAKEARGS |
5375 |
+ set_makeargs |
5376 |
+ |
5377 |
+ # build the remaining tools & unittests |
5378 |
+ emake "${MAKEARGS[@]}" |
5379 |
+ |
5380 |
+ pax-mark m unittests/ExecutionEngine/JIT/Release/JITTests |
5381 |
+ pax-mark m unittests/ExecutionEngine/MCJIT/Release/MCJITTests |
5382 |
+ pax-mark m unittests/Support/Release/SupportTests |
5383 |
+ |
5384 |
+ # respect TMPDIR! |
5385 |
+ local -x LIT_PRESERVES_TMP=1 |
5386 |
+ emake "${MAKEARGS[@]}" check |
5387 |
+ use clang && emake "${MAKEARGS[@]}" -C tools/clang test |
5388 |
+} |
5389 |
+ |
5390 |
+src_install() { |
5391 |
+ local MULTILIB_CHOST_TOOLS=( |
5392 |
+ /usr/bin/llvm-config |
5393 |
+ ) |
5394 |
+ |
5395 |
+ local MULTILIB_WRAPPED_HEADERS=( |
5396 |
+ /usr/include/llvm/Config/config.h |
5397 |
+ /usr/include/llvm/Config/llvm-config.h |
5398 |
+ ) |
5399 |
+ |
5400 |
+ if use clang; then |
5401 |
+ # note: magic applied below |
5402 |
+ MULTILIB_CHOST_TOOLS+=( |
5403 |
+ /usr/bin/clang |
5404 |
+ /usr/bin/clang++ |
5405 |
+ /usr/bin/clang-${PV} |
5406 |
+ /usr/bin/clang++-${PV} |
5407 |
+ ) |
5408 |
+ |
5409 |
+ MULTILIB_WRAPPED_HEADERS+=( |
5410 |
+ /usr/include/clang/Config/config.h |
5411 |
+ ) |
5412 |
+ fi |
5413 |
+ |
5414 |
+ multilib-minimal_src_install |
5415 |
+ |
5416 |
+ # Remove unnecessary headers on FreeBSD, bug #417171 |
5417 |
+ use kernel_FreeBSD && use clang && rm "${ED}"usr/lib/clang/${PV}/include/{std,float,iso,limits,tgmath,varargs}*.h |
5418 |
+} |
5419 |
+ |
5420 |
+multilib_src_install() { |
5421 |
+ local MAKEARGS |
5422 |
+ set_makeargs |
5423 |
+ |
5424 |
+ local root=${D}/_${ABI} |
5425 |
+ |
5426 |
+ emake "${MAKEARGS[@]}" DESTDIR="${root}" install |
5427 |
+ multibuild_merge_root "${root}" "${D}" |
5428 |
+ |
5429 |
+ if ! multilib_is_native_abi; then |
5430 |
+ # Backwards compat, will be happily removed someday. |
5431 |
+ dosym "${CHOST}"-llvm-config /usr/bin/llvm-config.${ABI} |
5432 |
+ else |
5433 |
+ # Install docs. |
5434 |
+ if use doc; then |
5435 |
+ doman "${S}"/docs/_build/man/*.1 |
5436 |
+ use clang && doman "${T}"/clang.1 |
5437 |
+ dohtml -r "${S}"/docs/_build/html/ |
5438 |
+ else |
5439 |
+ if ! use clang; then |
5440 |
+ rm "${WORKDIR}"/${P}-manpages/clang.1 || die |
5441 |
+ fi |
5442 |
+ doman "${WORKDIR}"/${P}-manpages/*.1 |
5443 |
+ fi |
5444 |
+ |
5445 |
+ # Symlink the gold plugin. |
5446 |
+ if use gold; then |
5447 |
+ dodir /usr/${CHOST}/binutils-bin/lib/bfd-plugins |
5448 |
+ dosym ../../../../$(get_libdir)/LLVMgold.so \ |
5449 |
+ /usr/${CHOST}/binutils-bin/lib/bfd-plugins/LLVMgold.so |
5450 |
+ fi |
5451 |
+ fi |
5452 |
+ |
5453 |
+ # apply CHOST and PV to clang executables |
5454 |
+ # they're statically linked so we don't have to worry about the lib |
5455 |
+ if use clang; then |
5456 |
+ local clang_tools=( clang clang++ ) |
5457 |
+ local i |
5458 |
+ |
5459 |
+ # append ${PV} and symlink back |
5460 |
+ # TODO: use alternatives.eclass? does that make any sense? |
5461 |
+ # maybe with USE=-clang on :0 and USE=clang on older |
5462 |
+ for i in "${clang_tools[@]}"; do |
5463 |
+ mv "${ED%/}/usr/bin/${i}"{,-${PV}} || die |
5464 |
+ dosym "${i}"-${PV} /usr/bin/${i} |
5465 |
+ done |
5466 |
+ |
5467 |
+ # now prepend ${CHOST} and let the multilib-build.eclass symlink it |
5468 |
+ if ! multilib_is_native_abi; then |
5469 |
+ # non-native? let's replace it with a simple wrapper |
5470 |
+ for i in "${clang_tools[@]}"; do |
5471 |
+ rm "${ED%/}/usr/bin/${i}-${PV}" || die |
5472 |
+ cat > "${T}"/wrapper.tmp <<-_EOF_ |
5473 |
+ #!${EPREFIX}/bin/sh |
5474 |
+ exec "${i}-${PV}" $(get_abi_CFLAGS) "\${@}" |
5475 |
+ _EOF_ |
5476 |
+ newbin "${T}"/wrapper.tmp "${i}-${PV}" |
5477 |
+ done |
5478 |
+ fi |
5479 |
+ fi |
5480 |
+ |
5481 |
+ # Fix install_names on Darwin. The build system is too complicated |
5482 |
+ # to just fix this, so we correct it post-install |
5483 |
+ local lib= f= odylib= ndylib= libpv=${PV} |
5484 |
+ if [[ ${CHOST} == *-darwin* ]] ; then |
5485 |
+ eval $(grep PACKAGE_VERSION= configure) |
5486 |
+ [[ -n ${PACKAGE_VERSION} ]] && libpv=${PACKAGE_VERSION} |
5487 |
+ libpvminor=${libpv%.[0-9]*} |
5488 |
+ for lib in lib{EnhancedDisassembly,LLVM-${libpv},LTO,profile_rt,clang}.dylib LLVMHello.dylib clang/${libpv}/lib/darwin/libclang_rt.asan_{osx,iossim}_dynamic.dylib; do |
5489 |
+ # libEnhancedDisassembly is Darwin10 only, so non-fatal |
5490 |
+ # + omit clang libs if not enabled |
5491 |
+ [[ -f ${ED}/usr/lib/${lib} ]] || continue |
5492 |
+ |
5493 |
+ ebegin "fixing install_name of $lib" |
5494 |
+ install_name_tool \ |
5495 |
+ -id "${EPREFIX}"/usr/lib/${lib} \ |
5496 |
+ "${ED}"/usr/lib/${lib} |
5497 |
+ eend $? |
5498 |
+ done |
5499 |
+ for f in "${ED}"/usr/bin/* "${ED}"/usr/lib/lib*.dylib "${ED}"/usr/lib/clang/${libpv}/lib/darwin/*.dylib ; do |
5500 |
+ # omit clang libs if not enabled |
5501 |
+ [[ -f "${f}" ]] || continue |
5502 |
+ |
5503 |
+ scanmacho -BF'%n#f' "${f}" | tr ',' '\n' | \ |
5504 |
+ while read odylib ; do |
5505 |
+ ndylib= |
5506 |
+ case ${odylib} in |
5507 |
+ */libclang.dylib) |
5508 |
+ ndylib="${EPREFIX}"/usr/lib/libclang.dylib |
5509 |
+ ;; |
5510 |
+ */libLLVM-${libpv}.dylib) |
5511 |
+ ndylib="${EPREFIX}"/usr/lib/libLLVM-${libpv}.dylib |
5512 |
+ ;; |
5513 |
+ */libLLVM-${libpvminor}.dylib) |
5514 |
+ ndylib="${EPREFIX}"/usr/lib/libLLVM-${libpvminor}.dylib |
5515 |
+ ;; |
5516 |
+ */libLTO.dylib) |
5517 |
+ ndylib="${EPREFIX}"/usr/lib/libLTO.dylib |
5518 |
+ ;; |
5519 |
+ esac |
5520 |
+ if [[ -n ${ndylib} ]] ; then |
5521 |
+ ebegin "fixing install_name reference to ${odylib} of ${f##*/}" |
5522 |
+ install_name_tool \ |
5523 |
+ -change "${odylib}" "${ndylib}" \ |
5524 |
+ "${f}" |
5525 |
+ eend $? |
5526 |
+ fi |
5527 |
+ done |
5528 |
+ done |
5529 |
+ fi |
5530 |
+} |
5531 |
+ |
5532 |
+multilib_src_install_all() { |
5533 |
+ insinto /usr/share/vim/vimfiles/syntax |
5534 |
+ doins utils/vim/*.vim |
5535 |
+ |
5536 |
+ if use clang; then |
5537 |
+ cd tools/clang || die |
5538 |
+ |
5539 |
+ if use static-analyzer ; then |
5540 |
+ dobin tools/scan-build/ccc-analyzer |
5541 |
+ dosym ccc-analyzer /usr/bin/c++-analyzer |
5542 |
+ dobin tools/scan-build/scan-build |
5543 |
+ |
5544 |
+ insinto /usr/share/${PN} |
5545 |
+ doins tools/scan-build/scanview.css |
5546 |
+ doins tools/scan-build/sorttable.js |
5547 |
+ fi |
5548 |
+ |
5549 |
+ python_inst() { |
5550 |
+ if use static-analyzer ; then |
5551 |
+ pushd tools/scan-view >/dev/null || die |
5552 |
+ |
5553 |
+ python_doscript scan-view |
5554 |
+ |
5555 |
+ touch __init__.py || die |
5556 |
+ python_moduleinto clang |
5557 |
+ python_domodule __init__.py Reporter.py Resources ScanView.py startfile.py |
5558 |
+ |
5559 |
+ popd >/dev/null || die |
5560 |
+ fi |
5561 |
+ |
5562 |
+ if use python ; then |
5563 |
+ pushd bindings/python/clang >/dev/null || die |
5564 |
+ |
5565 |
+ python_moduleinto clang |
5566 |
+ python_domodule __init__.py cindex.py enumerations.py |
5567 |
+ |
5568 |
+ popd >/dev/null || die |
5569 |
+ fi |
5570 |
+ |
5571 |
+ # AddressSanitizer symbolizer (currently separate) |
5572 |
+ python_doscript "${S}"/projects/compiler-rt/lib/asan/scripts/asan_symbolize.py |
5573 |
+ } |
5574 |
+ python_foreach_impl python_inst |
5575 |
+ fi |
5576 |
+} |
5577 |
|
5578 |
diff --git a/sys-devel/llvm/llvm-3.5.1.ebuild b/sys-devel/llvm/llvm-3.5.1.ebuild |
5579 |
new file mode 100644 |
5580 |
index 0000000..52f8309 |
5581 |
--- /dev/null |
5582 |
+++ b/sys-devel/llvm/llvm-3.5.1.ebuild |
5583 |
@@ -0,0 +1,530 @@ |
5584 |
+# Copyright 1999-2015 Gentoo Foundation |
5585 |
+# Distributed under the terms of the GNU General Public License v2 |
5586 |
+# $Id$ |
5587 |
+ |
5588 |
+EAPI=5 |
5589 |
+ |
5590 |
+PYTHON_COMPAT=( python2_7 pypy ) |
5591 |
+ |
5592 |
+inherit eutils flag-o-matic multibuild multilib \ |
5593 |
+ multilib-minimal python-r1 toolchain-funcs pax-utils check-reqs prefix |
5594 |
+ |
5595 |
+DESCRIPTION="Low Level Virtual Machine" |
5596 |
+HOMEPAGE="http://llvm.org/" |
5597 |
+SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.xz |
5598 |
+ clang? ( http://llvm.org/releases/${PV}/compiler-rt-${PV}.src.tar.xz |
5599 |
+ http://llvm.org/releases/${PV}/cfe-${PV}.src.tar.xz |
5600 |
+ http://llvm.org/releases/${PV}/clang-tools-extra-${PV}.src.tar.xz ) |
5601 |
+ !doc? ( https://dev.gentoo.org/~voyageur/distfiles/${PN}-3.5.0-manpages.tar.bz2 )" |
5602 |
+ |
5603 |
+LICENSE="UoI-NCSA" |
5604 |
+SLOT="0/3.5" |
5605 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
5606 |
+IUSE="clang debug doc gold libedit +libffi multitarget ncurses ocaml python |
5607 |
+ +static-analyzer test xml video_cards_radeon |
5608 |
+ kernel_Darwin kernel_FreeBSD" |
5609 |
+ |
5610 |
+COMMON_DEPEND=" |
5611 |
+ sys-libs/zlib:0= |
5612 |
+ clang? ( |
5613 |
+ python? ( ${PYTHON_DEPS} ) |
5614 |
+ static-analyzer? ( |
5615 |
+ dev-lang/perl:* |
5616 |
+ ${PYTHON_DEPS} |
5617 |
+ ) |
5618 |
+ xml? ( dev-libs/libxml2:2= ) |
5619 |
+ ) |
5620 |
+ gold? ( >=sys-devel/binutils-2.22:*[cxx] ) |
5621 |
+ libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] ) |
5622 |
+ libffi? ( >=virtual/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] ) |
5623 |
+ ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] ) |
5624 |
+ ocaml? ( dev-lang/ocaml:0= )" |
5625 |
+# configparser-3.2 breaks the build (3.3 or none at all are fine) |
5626 |
+DEPEND="${COMMON_DEPEND} |
5627 |
+ app-arch/xz-utils |
5628 |
+ dev-lang/perl |
5629 |
+ >=sys-devel/make-3.81 |
5630 |
+ >=sys-devel/flex-2.5.4 |
5631 |
+ >=sys-devel/bison-1.875d |
5632 |
+ || ( >=sys-devel/gcc-3.0 >=sys-devel/gcc-apple-4.2.1 |
5633 |
+ ( >=sys-freebsd/freebsd-lib-9.1-r10 sys-libs/libcxx ) |
5634 |
+ ) |
5635 |
+ || ( >=sys-devel/binutils-2.18 >=sys-devel/binutils-apple-5.1 ) |
5636 |
+ clang? ( xml? ( virtual/pkgconfig ) ) |
5637 |
+ doc? ( dev-python/sphinx ) |
5638 |
+ libffi? ( virtual/pkgconfig ) |
5639 |
+ !!<dev-python/configparser-3.3.0.2 |
5640 |
+ ${PYTHON_DEPS}" |
5641 |
+RDEPEND="${COMMON_DEPEND} |
5642 |
+ clang? ( !<=sys-devel/clang-${PV}-r99 |
5643 |
+ !>=sys-devel/clang-9999 ) |
5644 |
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r2 |
5645 |
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )" |
5646 |
+PDEPEND="clang? ( =sys-devel/clang-${PV}-r100 )" |
5647 |
+ |
5648 |
+# pypy gives me around 1700 unresolved tests due to open file limit |
5649 |
+# being exceeded. probably GC does not close them fast enough. |
5650 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE} |
5651 |
+ test? ( || ( $(python_gen_useflags 'python*') ) )" |
5652 |
+ |
5653 |
+S=${WORKDIR}/${P}.src |
5654 |
+ |
5655 |
+# Some people actually override that in make.conf. That sucks since |
5656 |
+# we need to run install per-directory, and ninja can't do that... |
5657 |
+# so why did it call itself ninja in the first place? |
5658 |
+CMAKE_MAKEFILE_GENERATOR=emake |
5659 |
+ |
5660 |
+pkg_pretend() { |
5661 |
+ # in megs |
5662 |
+ # !clang !debug !multitarget -O2 400 |
5663 |
+ # !clang !debug multitarget -O2 550 |
5664 |
+ # clang !debug !multitarget -O2 950 |
5665 |
+ # clang !debug multitarget -O2 1200 |
5666 |
+ # !clang debug multitarget -O2 5G |
5667 |
+ # clang !debug multitarget -O0 -g 12G |
5668 |
+ # clang debug multitarget -O2 16G |
5669 |
+ # clang debug multitarget -O0 -g 14G |
5670 |
+ |
5671 |
+ local build_size=550 |
5672 |
+ use clang && build_size=1200 |
5673 |
+ |
5674 |
+ if use debug; then |
5675 |
+ ewarn "USE=debug is known to increase the size of package considerably" |
5676 |
+ ewarn "and cause the tests to fail." |
5677 |
+ ewarn |
5678 |
+ |
5679 |
+ (( build_size *= 14 )) |
5680 |
+ elif is-flagq '-g?(gdb)?([1-9])'; then |
5681 |
+ ewarn "The C++ compiler -g option is known to increase the size of the package" |
5682 |
+ ewarn "considerably. If you run out of space, please consider removing it." |
5683 |
+ ewarn |
5684 |
+ |
5685 |
+ (( build_size *= 10 )) |
5686 |
+ fi |
5687 |
+ |
5688 |
+ # Multiply by number of ABIs :). |
5689 |
+ local abis=( $(multilib_get_enabled_abis) ) |
5690 |
+ (( build_size *= ${#abis[@]} )) |
5691 |
+ |
5692 |
+ local CHECKREQS_DISK_BUILD=${build_size}M |
5693 |
+ check-reqs_pkg_pretend |
5694 |
+ |
5695 |
+ if [[ ${MERGE_TYPE} != binary ]]; then |
5696 |
+ echo 'int main() {return 0;}' > "${T}"/test.cxx || die |
5697 |
+ ebegin "Trying to build a C++11 test program" |
5698 |
+ if ! $(tc-getCXX) -std=c++11 -o /dev/null "${T}"/test.cxx; then |
5699 |
+ eerror "LLVM-${PV} requires C++11-capable C++ compiler. Your current compiler" |
5700 |
+ eerror "does not seem to support -std=c++11 option. Please upgrade your compiler" |
5701 |
+ eerror "to gcc-4.7 or an equivalent version supporting C++11." |
5702 |
+ die "Currently active compiler does not support -std=c++11" |
5703 |
+ fi |
5704 |
+ eend ${?} |
5705 |
+ fi |
5706 |
+} |
5707 |
+ |
5708 |
+pkg_setup() { |
5709 |
+ pkg_pretend |
5710 |
+} |
5711 |
+ |
5712 |
+src_unpack() { |
5713 |
+ default |
5714 |
+ |
5715 |
+ rm -f "${S}"/tools/clang "${S}"/projects/compiler-rt \ |
5716 |
+ || die "symlinks removal failed" |
5717 |
+ |
5718 |
+ if use clang; then |
5719 |
+ mv "${WORKDIR}"/cfe-${PV}.src "${S}"/tools/clang \ |
5720 |
+ || die "clang source directory move failed" |
5721 |
+ mv "${WORKDIR}"/compiler-rt-${PV}.src "${S}"/projects/compiler-rt \ |
5722 |
+ || die "compiler-rt source directory move failed" |
5723 |
+ mv "${WORKDIR}"/clang-tools-extra-${PV}.src "${S}"/tools/clang/tools/extra \ |
5724 |
+ || die "clang-tools-extra source directory move failed" |
5725 |
+ fi |
5726 |
+} |
5727 |
+ |
5728 |
+src_prepare() { |
5729 |
+ epatch "${FILESDIR}"/${PN}-3.2-nodoctargz.patch |
5730 |
+ epatch "${FILESDIR}"/${PN}-3.5-gcc-4.9.patch |
5731 |
+ epatch "${FILESDIR}"/${PN}-3.5-gentoo-install.patch |
5732 |
+ # Make ocaml warnings non-fatal, bug #537308 |
5733 |
+ sed -e "/RUN/s/-warn-error A//" -i test/Bindings/Ocaml/*ml || die |
5734 |
+ |
5735 |
+ if use clang; then |
5736 |
+ # Automatically select active system GCC's libraries, bugs #406163 and #417913 |
5737 |
+ epatch "${FILESDIR}"/clang-3.5-gentoo-runtime-gcc-detection-v3.patch |
5738 |
+ |
5739 |
+ epatch "${FILESDIR}"/clang-3.5-gentoo-install.patch |
5740 |
+ epatch "${FILESDIR}"/clang-3.4-darwin_prefix-include-paths.patch |
5741 |
+ eprefixify tools/clang/lib/Frontend/InitHeaderSearch.cpp |
5742 |
+ fi |
5743 |
+ |
5744 |
+ if use prefix && use clang; then |
5745 |
+ sed -i -e "/^CFLAGS /s@-Werror@-I${EPREFIX}/usr/include@" \ |
5746 |
+ projects/compiler-rt/make/platform/clang_*.mk || die |
5747 |
+ fi |
5748 |
+ |
5749 |
+ local sub_files=( |
5750 |
+ Makefile.config.in |
5751 |
+ Makefile.rules |
5752 |
+ tools/llvm-config/llvm-config.cpp |
5753 |
+ ) |
5754 |
+ use clang && sub_files+=( |
5755 |
+ tools/clang/lib/Driver/Tools.cpp |
5756 |
+ tools/clang/tools/scan-build/scan-build |
5757 |
+ ) |
5758 |
+ |
5759 |
+ # unfortunately ./configure won't listen to --mandir and the-like, so take |
5760 |
+ # care of this. |
5761 |
+ # note: we're setting the main libdir intentionally. |
5762 |
+ # where per-ABI is appropriate, we use $(GENTOO_LIBDIR) make. |
5763 |
+ einfo "Fixing install dirs" |
5764 |
+ sed -e "s,@libdir@,$(get_libdir),g" \ |
5765 |
+ -e "s,@PF@,${PF},g" \ |
5766 |
+ -e "s,@EPREFIX@,${EPREFIX},g" \ |
5767 |
+ -i "${sub_files[@]}" \ |
5768 |
+ || die "install paths sed failed" |
5769 |
+ |
5770 |
+ if use clang; then |
5771 |
+ # constantly fails for a long time, likely due to our patches |
5772 |
+ rm tools/clang/test/Driver/cross-linux.c || die |
5773 |
+ fi |
5774 |
+ |
5775 |
+ # User patches |
5776 |
+ epatch_user |
5777 |
+ |
5778 |
+ python_setup |
5779 |
+} |
5780 |
+ |
5781 |
+multilib_src_configure() { |
5782 |
+ # disable timestamps since they confuse ccache |
5783 |
+ local conf_flags=( |
5784 |
+ --disable-timestamps |
5785 |
+ --enable-keep-symbols |
5786 |
+ --enable-shared |
5787 |
+ --with-optimize-option= |
5788 |
+ $(tc-is-static-only && echo --disable-shared) |
5789 |
+ $(use_enable !debug optimized) |
5790 |
+ $(use_enable debug assertions) |
5791 |
+ $(use_enable debug expensive-checks) |
5792 |
+ $(use_enable libedit) |
5793 |
+ $(use_enable ncurses terminfo) |
5794 |
+ $(use_enable libffi) |
5795 |
+ ) |
5796 |
+ |
5797 |
+ # well, it's used only by clang executable c-index-test |
5798 |
+ if multilib_is_native_abi && use clang && use xml; then |
5799 |
+ conf_flags+=( XML2CONFIG="$(tc-getPKG_CONFIG) libxml-2.0" ) |
5800 |
+ else |
5801 |
+ conf_flags+=( ac_cv_prog_XML2CONFIG="" ) |
5802 |
+ fi |
5803 |
+ |
5804 |
+ local targets bindings |
5805 |
+ if use multitarget; then |
5806 |
+ targets='all' |
5807 |
+ else |
5808 |
+ targets='host,cpp' |
5809 |
+ use video_cards_radeon && targets+=',r600' |
5810 |
+ fi |
5811 |
+ conf_flags+=( --enable-targets=${targets} ) |
5812 |
+ |
5813 |
+ if multilib_is_native_abi; then |
5814 |
+ use gold && conf_flags+=( --with-binutils-include="${EPREFIX}"/usr/include/ ) |
5815 |
+ # extra commas don't hurt |
5816 |
+ use ocaml && bindings+=',ocaml' |
5817 |
+ fi |
5818 |
+ |
5819 |
+ [[ ${bindings} ]] || bindings='none' |
5820 |
+ conf_flags+=( --enable-bindings=${bindings} ) |
5821 |
+ |
5822 |
+ if use libffi; then |
5823 |
+ local CPPFLAGS=${CPPFLAGS} |
5824 |
+ append-cppflags "$(pkg-config --cflags libffi)" |
5825 |
+ fi |
5826 |
+ |
5827 |
+ # llvm prefers clang over gcc, so we may need to force that |
5828 |
+ tc-export CC CXX |
5829 |
+ |
5830 |
+ ECONF_SOURCE=${S} \ |
5831 |
+ econf "${conf_flags[@]}" |
5832 |
+} |
5833 |
+ |
5834 |
+set_makeargs() { |
5835 |
+ MAKEARGS=( |
5836 |
+ VERBOSE=1 |
5837 |
+ REQUIRES_RTTI=1 |
5838 |
+ GENTOO_LIBDIR=$(get_libdir) |
5839 |
+ ) |
5840 |
+ |
5841 |
+ # for tests, we want it all! otherwise, we may use a little filtering... |
5842 |
+ # adding ONLY_TOOLS also disables unittest building... |
5843 |
+ if [[ ${EBUILD_PHASE_FUNC} != src_test ]]; then |
5844 |
+ local tools=( llvm-config ) |
5845 |
+ use clang && tools+=( clang ) |
5846 |
+ |
5847 |
+ if multilib_is_native_abi; then |
5848 |
+ tools+=( |
5849 |
+ opt llvm-as llvm-dis llc llvm-ar llvm-nm llvm-link lli |
5850 |
+ llvm-extract llvm-mc llvm-bcanalyzer llvm-diff macho-dump |
5851 |
+ llvm-objdump llvm-readobj llvm-rtdyld llvm-dwarfdump llvm-cov |
5852 |
+ llvm-size llvm-stress llvm-mcmarkup llvm-profdata |
5853 |
+ llvm-symbolizer obj2yaml yaml2obj lto bugpoint |
5854 |
+ ) |
5855 |
+ |
5856 |
+ # the build system runs explicitly specified tools in parallel, |
5857 |
+ # so we need to split it into two runs |
5858 |
+ if [[ ${1} != -1 ]]; then |
5859 |
+ # those require lto |
5860 |
+ tools+=( llvm-lto ) |
5861 |
+ use gold && tools+=( gold ) |
5862 |
+ |
5863 |
+ # those require clang :) |
5864 |
+ # we need to explicitly specify all its tools |
5865 |
+ # since we're passing BUILD_CLANG_ONLY |
5866 |
+ use clang && tools+=( |
5867 |
+ clang/tools/{clang-check,clang-format,extra} |
5868 |
+ ) |
5869 |
+ fi |
5870 |
+ fi |
5871 |
+ |
5872 |
+ MAKEARGS+=( |
5873 |
+ # filter tools + disable unittests implicitly |
5874 |
+ ONLY_TOOLS="${tools[*]}" |
5875 |
+ |
5876 |
+ # this disables unittests & docs from clang |
5877 |
+ BUILD_CLANG_ONLY=YES |
5878 |
+ ) |
5879 |
+ fi |
5880 |
+} |
5881 |
+ |
5882 |
+multilib_src_compile() { |
5883 |
+ local MAKEARGS |
5884 |
+ set_makeargs -1 |
5885 |
+ emake "${MAKEARGS[@]}" |
5886 |
+ |
5887 |
+ if multilib_is_native_abi; then |
5888 |
+ set_makeargs |
5889 |
+ emake -C tools "${MAKEARGS[@]}" |
5890 |
+ |
5891 |
+ if use doc; then |
5892 |
+ emake -C "${S}"/docs -f Makefile.sphinx man |
5893 |
+ use clang && emake -C "${S}"/tools/clang/docs/tools \ |
5894 |
+ BUILD_FOR_WEBSITE=1 DST_MAN_DIR="${T}"/ man |
5895 |
+ emake -C "${S}"/docs -f Makefile.sphinx html |
5896 |
+ fi |
5897 |
+ fi |
5898 |
+ |
5899 |
+ if use debug; then |
5900 |
+ pax-mark m Debug+Asserts+Checks/bin/llvm-rtdyld |
5901 |
+ pax-mark m Debug+Asserts+Checks/bin/lli |
5902 |
+ pax-mark m Debug+Asserts+Checks/bin/lli-child-target |
5903 |
+ else |
5904 |
+ pax-mark m Release/bin/llvm-rtdyld |
5905 |
+ pax-mark m Release/bin/lli |
5906 |
+ pax-mark m Release/bin/lli-child-target |
5907 |
+ fi |
5908 |
+} |
5909 |
+ |
5910 |
+multilib_src_test() { |
5911 |
+ local MAKEARGS |
5912 |
+ set_makeargs |
5913 |
+ |
5914 |
+ # build the remaining tools & unittests |
5915 |
+ emake "${MAKEARGS[@]}" |
5916 |
+ |
5917 |
+ pax-mark m unittests/ExecutionEngine/JIT/Release/JITTests |
5918 |
+ pax-mark m unittests/ExecutionEngine/MCJIT/Release/MCJITTests |
5919 |
+ pax-mark m unittests/Support/Release/SupportTests |
5920 |
+ |
5921 |
+ # respect TMPDIR! |
5922 |
+ local -x LIT_PRESERVES_TMP=1 |
5923 |
+ emake "${MAKEARGS[@]}" check |
5924 |
+ use clang && emake "${MAKEARGS[@]}" -C tools/clang test |
5925 |
+} |
5926 |
+ |
5927 |
+src_install() { |
5928 |
+ local MULTILIB_CHOST_TOOLS=( |
5929 |
+ /usr/bin/llvm-config |
5930 |
+ ) |
5931 |
+ |
5932 |
+ local MULTILIB_WRAPPED_HEADERS=( |
5933 |
+ /usr/include/llvm/Config/config.h |
5934 |
+ /usr/include/llvm/Config/llvm-config.h |
5935 |
+ ) |
5936 |
+ |
5937 |
+ if use clang; then |
5938 |
+ # note: magic applied below |
5939 |
+ MULTILIB_CHOST_TOOLS+=( |
5940 |
+ /usr/bin/clang |
5941 |
+ /usr/bin/clang++ |
5942 |
+ /usr/bin/clang-${PV} |
5943 |
+ /usr/bin/clang++-${PV} |
5944 |
+ ) |
5945 |
+ |
5946 |
+ MULTILIB_WRAPPED_HEADERS+=( |
5947 |
+ /usr/include/clang/Config/config.h |
5948 |
+ ) |
5949 |
+ fi |
5950 |
+ |
5951 |
+ multilib-minimal_src_install |
5952 |
+ |
5953 |
+ # Remove unnecessary headers on FreeBSD, bug #417171 |
5954 |
+ use kernel_FreeBSD && use clang && rm "${ED}"usr/lib/clang/${PV}/include/{std,float,iso,limits,tgmath,varargs}*.h |
5955 |
+} |
5956 |
+ |
5957 |
+multilib_src_install() { |
5958 |
+ local MAKEARGS |
5959 |
+ set_makeargs |
5960 |
+ |
5961 |
+ local root=${D}/_${ABI} |
5962 |
+ |
5963 |
+ emake "${MAKEARGS[@]}" DESTDIR="${root}" install |
5964 |
+ multibuild_merge_root "${root}" "${D}" |
5965 |
+ |
5966 |
+ if ! multilib_is_native_abi; then |
5967 |
+ # Backwards compat, will be happily removed someday. |
5968 |
+ dosym "${CHOST}"-llvm-config /usr/bin/llvm-config.${ABI} |
5969 |
+ else |
5970 |
+ # Install docs. |
5971 |
+ if use doc; then |
5972 |
+ doman "${S}"/docs/_build/man/*.1 |
5973 |
+ use clang && doman "${T}"/clang.1 |
5974 |
+ dohtml -r "${S}"/docs/_build/html/ |
5975 |
+ else |
5976 |
+ if ! use clang; then |
5977 |
+ rm "${WORKDIR}"/${PN}-3.5.0-manpages/clang.1 || die |
5978 |
+ fi |
5979 |
+ doman "${WORKDIR}"/${PN}-3.5.0-manpages/*.1 |
5980 |
+ fi |
5981 |
+ |
5982 |
+ # Symlink the gold plugin. |
5983 |
+ if use gold; then |
5984 |
+ dodir /usr/${CHOST}/binutils-bin/lib/bfd-plugins |
5985 |
+ dosym ../../../../$(get_libdir)/LLVMgold.so \ |
5986 |
+ /usr/${CHOST}/binutils-bin/lib/bfd-plugins/LLVMgold.so |
5987 |
+ fi |
5988 |
+ fi |
5989 |
+ |
5990 |
+ # apply CHOST and PV to clang executables |
5991 |
+ # they're statically linked so we don't have to worry about the lib |
5992 |
+ if use clang; then |
5993 |
+ local clang_tools=( clang clang++ ) |
5994 |
+ local i |
5995 |
+ |
5996 |
+ # append ${PV} and symlink back |
5997 |
+ # TODO: use alternatives.eclass? does that make any sense? |
5998 |
+ # maybe with USE=-clang on :0 and USE=clang on older |
5999 |
+ for i in "${clang_tools[@]}"; do |
6000 |
+ mv "${ED%/}/usr/bin/${i}"{,-${PV}} || die |
6001 |
+ dosym "${i}"-${PV} /usr/bin/${i} |
6002 |
+ done |
6003 |
+ |
6004 |
+ # now prepend ${CHOST} and let the multilib-build.eclass symlink it |
6005 |
+ if ! multilib_is_native_abi; then |
6006 |
+ # non-native? let's replace it with a simple wrapper |
6007 |
+ for i in "${clang_tools[@]}"; do |
6008 |
+ rm "${ED%/}/usr/bin/${i}-${PV}" || die |
6009 |
+ cat > "${T}"/wrapper.tmp <<-_EOF_ |
6010 |
+ #!${EPREFIX}/bin/sh |
6011 |
+ exec "${i}-${PV}" $(get_abi_CFLAGS) "\${@}" |
6012 |
+ _EOF_ |
6013 |
+ newbin "${T}"/wrapper.tmp "${i}-${PV}" |
6014 |
+ done |
6015 |
+ fi |
6016 |
+ fi |
6017 |
+ |
6018 |
+ # Fix install_names on Darwin. The build system is too complicated |
6019 |
+ # to just fix this, so we correct it post-install |
6020 |
+ local lib= f= odylib= ndylib= libpv=${PV} |
6021 |
+ if [[ ${CHOST} == *-darwin* ]] ; then |
6022 |
+ eval $(grep PACKAGE_VERSION= configure) |
6023 |
+ [[ -n ${PACKAGE_VERSION} ]] && libpv=${PACKAGE_VERSION} |
6024 |
+ libpvminor=${libpv%.[0-9]*} |
6025 |
+ for lib in lib{EnhancedDisassembly,LLVM-${libpv},LTO,profile_rt,clang}.dylib LLVMHello.dylib clang/${libpv}/lib/darwin/libclang_rt.asan_{osx,iossim}_dynamic.dylib; do |
6026 |
+ # libEnhancedDisassembly is Darwin10 only, so non-fatal |
6027 |
+ # + omit clang libs if not enabled |
6028 |
+ [[ -f ${ED}/usr/lib/${lib} ]] || continue |
6029 |
+ |
6030 |
+ ebegin "fixing install_name of $lib" |
6031 |
+ install_name_tool \ |
6032 |
+ -id "${EPREFIX}"/usr/lib/${lib} \ |
6033 |
+ "${ED}"/usr/lib/${lib} |
6034 |
+ eend $? |
6035 |
+ done |
6036 |
+ for f in "${ED}"/usr/bin/* "${ED}"/usr/lib/lib*.dylib "${ED}"/usr/lib/clang/${libpv}/lib/darwin/*.dylib ; do |
6037 |
+ # omit clang libs if not enabled |
6038 |
+ [[ -f "${f}" ]] || continue |
6039 |
+ |
6040 |
+ scanmacho -BF'%n#f' "${f}" | tr ',' '\n' | \ |
6041 |
+ while read odylib ; do |
6042 |
+ ndylib= |
6043 |
+ case ${odylib} in |
6044 |
+ */libclang.dylib) |
6045 |
+ ndylib="${EPREFIX}"/usr/lib/libclang.dylib |
6046 |
+ ;; |
6047 |
+ */libLLVM-${libpv}.dylib) |
6048 |
+ ndylib="${EPREFIX}"/usr/lib/libLLVM-${libpv}.dylib |
6049 |
+ ;; |
6050 |
+ */libLLVM-${libpvminor}.dylib) |
6051 |
+ ndylib="${EPREFIX}"/usr/lib/libLLVM-${libpvminor}.dylib |
6052 |
+ ;; |
6053 |
+ */libLTO.dylib) |
6054 |
+ ndylib="${EPREFIX}"/usr/lib/libLTO.dylib |
6055 |
+ ;; |
6056 |
+ esac |
6057 |
+ if [[ -n ${ndylib} ]] ; then |
6058 |
+ ebegin "fixing install_name reference to ${odylib} of ${f##*/}" |
6059 |
+ install_name_tool \ |
6060 |
+ -change "${odylib}" "${ndylib}" \ |
6061 |
+ "${f}" |
6062 |
+ eend $? |
6063 |
+ fi |
6064 |
+ done |
6065 |
+ done |
6066 |
+ fi |
6067 |
+} |
6068 |
+ |
6069 |
+multilib_src_install_all() { |
6070 |
+ insinto /usr/share/vim/vimfiles/syntax |
6071 |
+ doins utils/vim/*.vim |
6072 |
+ |
6073 |
+ if use clang; then |
6074 |
+ cd tools/clang || die |
6075 |
+ |
6076 |
+ if use static-analyzer ; then |
6077 |
+ dobin tools/scan-build/ccc-analyzer |
6078 |
+ dosym ccc-analyzer /usr/bin/c++-analyzer |
6079 |
+ dobin tools/scan-build/scan-build |
6080 |
+ |
6081 |
+ insinto /usr/share/${PN} |
6082 |
+ doins tools/scan-build/scanview.css |
6083 |
+ doins tools/scan-build/sorttable.js |
6084 |
+ fi |
6085 |
+ |
6086 |
+ python_inst() { |
6087 |
+ if use static-analyzer ; then |
6088 |
+ pushd tools/scan-view >/dev/null || die |
6089 |
+ |
6090 |
+ python_doscript scan-view |
6091 |
+ |
6092 |
+ touch __init__.py || die |
6093 |
+ python_moduleinto clang |
6094 |
+ python_domodule __init__.py Reporter.py Resources ScanView.py startfile.py |
6095 |
+ |
6096 |
+ popd >/dev/null || die |
6097 |
+ fi |
6098 |
+ |
6099 |
+ if use python ; then |
6100 |
+ pushd bindings/python/clang >/dev/null || die |
6101 |
+ |
6102 |
+ python_moduleinto clang |
6103 |
+ python_domodule __init__.py cindex.py enumerations.py |
6104 |
+ |
6105 |
+ popd >/dev/null || die |
6106 |
+ fi |
6107 |
+ |
6108 |
+ # AddressSanitizer symbolizer (currently separate) |
6109 |
+ python_doscript "${S}"/projects/compiler-rt/lib/asan/scripts/asan_symbolize.py |
6110 |
+ } |
6111 |
+ python_foreach_impl python_inst |
6112 |
+ fi |
6113 |
+} |
6114 |
|
6115 |
diff --git a/sys-devel/llvm/llvm-3.5.2.ebuild b/sys-devel/llvm/llvm-3.5.2.ebuild |
6116 |
new file mode 100644 |
6117 |
index 0000000..8a8c32c |
6118 |
--- /dev/null |
6119 |
+++ b/sys-devel/llvm/llvm-3.5.2.ebuild |
6120 |
@@ -0,0 +1,532 @@ |
6121 |
+# Copyright 1999-2015 Gentoo Foundation |
6122 |
+# Distributed under the terms of the GNU General Public License v2 |
6123 |
+# $Id$ |
6124 |
+ |
6125 |
+EAPI=5 |
6126 |
+ |
6127 |
+PYTHON_COMPAT=( python2_7 pypy ) |
6128 |
+ |
6129 |
+inherit eutils flag-o-matic multibuild multilib \ |
6130 |
+ multilib-minimal python-r1 toolchain-funcs pax-utils check-reqs prefix |
6131 |
+ |
6132 |
+DESCRIPTION="Low Level Virtual Machine" |
6133 |
+HOMEPAGE="http://llvm.org/" |
6134 |
+SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.xz |
6135 |
+ clang? ( http://llvm.org/releases/${PV}/compiler-rt-${PV}.src.tar.xz |
6136 |
+ http://llvm.org/releases/${PV}/cfe-${PV}.src.tar.xz |
6137 |
+ http://llvm.org/releases/${PV}/clang-tools-extra-${PV}.src.tar.xz ) |
6138 |
+ !doc? ( https://dev.gentoo.org/~voyageur/distfiles/${PN}-3.5.0-manpages.tar.bz2 )" |
6139 |
+ |
6140 |
+LICENSE="UoI-NCSA" |
6141 |
+SLOT="0/3.5" |
6142 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
6143 |
+IUSE="clang debug doc gold libedit +libffi multitarget ncurses ocaml python |
6144 |
+ +static-analyzer test xml video_cards_radeon |
6145 |
+ kernel_Darwin kernel_FreeBSD" |
6146 |
+ |
6147 |
+COMMON_DEPEND=" |
6148 |
+ sys-libs/zlib:0= |
6149 |
+ clang? ( |
6150 |
+ python? ( ${PYTHON_DEPS} ) |
6151 |
+ static-analyzer? ( |
6152 |
+ dev-lang/perl:* |
6153 |
+ ${PYTHON_DEPS} |
6154 |
+ ) |
6155 |
+ xml? ( dev-libs/libxml2:2= ) |
6156 |
+ ) |
6157 |
+ gold? ( >=sys-devel/binutils-2.22:*[cxx] ) |
6158 |
+ libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] ) |
6159 |
+ libffi? ( >=virtual/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] ) |
6160 |
+ ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] ) |
6161 |
+ ocaml? ( dev-lang/ocaml:0= )" |
6162 |
+# configparser-3.2 breaks the build (3.3 or none at all are fine) |
6163 |
+DEPEND="${COMMON_DEPEND} |
6164 |
+ app-arch/xz-utils |
6165 |
+ dev-lang/perl |
6166 |
+ >=sys-devel/make-3.81 |
6167 |
+ >=sys-devel/flex-2.5.4 |
6168 |
+ >=sys-devel/bison-1.875d |
6169 |
+ || ( >=sys-devel/gcc-3.0 >=sys-devel/llvm-3.3 |
6170 |
+ ( >=sys-freebsd/freebsd-lib-9.1-r10 sys-libs/libcxx ) |
6171 |
+ ) |
6172 |
+ || ( >=sys-devel/binutils-2.18 >=sys-devel/binutils-apple-5.1 ) |
6173 |
+ kernel_Darwin? ( sys-libs/libcxx ) |
6174 |
+ clang? ( xml? ( virtual/pkgconfig ) ) |
6175 |
+ doc? ( dev-python/sphinx ) |
6176 |
+ libffi? ( virtual/pkgconfig ) |
6177 |
+ !!<dev-python/configparser-3.3.0.2 |
6178 |
+ ${PYTHON_DEPS}" |
6179 |
+RDEPEND="${COMMON_DEPEND} |
6180 |
+ clang? ( !<=sys-devel/clang-${PV}-r99 |
6181 |
+ !>=sys-devel/clang-9999 ) |
6182 |
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r2 |
6183 |
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )" |
6184 |
+PDEPEND="clang? ( =sys-devel/clang-${PV}-r100 )" |
6185 |
+ |
6186 |
+# pypy gives me around 1700 unresolved tests due to open file limit |
6187 |
+# being exceeded. probably GC does not close them fast enough. |
6188 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE} |
6189 |
+ test? ( || ( $(python_gen_useflags 'python*') ) )" |
6190 |
+ |
6191 |
+S=${WORKDIR}/${P}.src |
6192 |
+ |
6193 |
+# Some people actually override that in make.conf. That sucks since |
6194 |
+# we need to run install per-directory, and ninja can't do that... |
6195 |
+# so why did it call itself ninja in the first place? |
6196 |
+CMAKE_MAKEFILE_GENERATOR=emake |
6197 |
+ |
6198 |
+pkg_pretend() { |
6199 |
+ # in megs |
6200 |
+ # !clang !debug !multitarget -O2 400 |
6201 |
+ # !clang !debug multitarget -O2 550 |
6202 |
+ # clang !debug !multitarget -O2 950 |
6203 |
+ # clang !debug multitarget -O2 1200 |
6204 |
+ # !clang debug multitarget -O2 5G |
6205 |
+ # clang !debug multitarget -O0 -g 12G |
6206 |
+ # clang debug multitarget -O2 16G |
6207 |
+ # clang debug multitarget -O0 -g 14G |
6208 |
+ |
6209 |
+ local build_size=550 |
6210 |
+ use clang && build_size=1200 |
6211 |
+ |
6212 |
+ if use debug; then |
6213 |
+ ewarn "USE=debug is known to increase the size of package considerably" |
6214 |
+ ewarn "and cause the tests to fail." |
6215 |
+ ewarn |
6216 |
+ |
6217 |
+ (( build_size *= 14 )) |
6218 |
+ elif is-flagq '-g?(gdb)?([1-9])'; then |
6219 |
+ ewarn "The C++ compiler -g option is known to increase the size of the package" |
6220 |
+ ewarn "considerably. If you run out of space, please consider removing it." |
6221 |
+ ewarn |
6222 |
+ |
6223 |
+ (( build_size *= 10 )) |
6224 |
+ fi |
6225 |
+ |
6226 |
+ # Multiply by number of ABIs :). |
6227 |
+ local abis=( $(multilib_get_enabled_abis) ) |
6228 |
+ (( build_size *= ${#abis[@]} )) |
6229 |
+ |
6230 |
+ local CHECKREQS_DISK_BUILD=${build_size}M |
6231 |
+ check-reqs_pkg_pretend |
6232 |
+ |
6233 |
+ if [[ ${MERGE_TYPE} != binary ]]; then |
6234 |
+ echo 'int main() {return 0;}' > "${T}"/test.cxx || die |
6235 |
+ ebegin "Trying to build a C++11 test program" |
6236 |
+ if ! $(tc-getCXX) -std=c++11 -o /dev/null "${T}"/test.cxx; then |
6237 |
+ eerror "LLVM-${PV} requires C++11-capable C++ compiler. Your current compiler" |
6238 |
+ eerror "does not seem to support -std=c++11 option. Please upgrade your compiler" |
6239 |
+ eerror "to gcc-4.7 or an equivalent version supporting C++11." |
6240 |
+ die "Currently active compiler does not support -std=c++11" |
6241 |
+ fi |
6242 |
+ eend ${?} |
6243 |
+ fi |
6244 |
+} |
6245 |
+ |
6246 |
+pkg_setup() { |
6247 |
+ pkg_pretend |
6248 |
+} |
6249 |
+ |
6250 |
+src_unpack() { |
6251 |
+ default |
6252 |
+ |
6253 |
+ rm -f "${S}"/tools/clang "${S}"/projects/compiler-rt \ |
6254 |
+ || die "symlinks removal failed" |
6255 |
+ |
6256 |
+ if use clang; then |
6257 |
+ mv "${WORKDIR}"/cfe-${PV}.src "${S}"/tools/clang \ |
6258 |
+ || die "clang source directory move failed" |
6259 |
+ mv "${WORKDIR}"/compiler-rt-${PV}.src "${S}"/projects/compiler-rt \ |
6260 |
+ || die "compiler-rt source directory move failed" |
6261 |
+ mv "${WORKDIR}"/clang-tools-extra-${PV}.src "${S}"/tools/clang/tools/extra \ |
6262 |
+ || die "clang-tools-extra source directory move failed" |
6263 |
+ fi |
6264 |
+} |
6265 |
+ |
6266 |
+src_prepare() { |
6267 |
+ epatch "${FILESDIR}"/${PN}-3.2-nodoctargz.patch |
6268 |
+ epatch "${FILESDIR}"/${PN}-3.5-gcc-4.9.patch |
6269 |
+ epatch "${FILESDIR}"/${PN}-3.5-gentoo-install.patch |
6270 |
+ epatch "${FILESDIR}"/${P}-gcc-5.1.patch |
6271 |
+ # Make ocaml warnings non-fatal, bug #537308 |
6272 |
+ sed -e "/RUN/s/-warn-error A//" -i test/Bindings/Ocaml/*ml || die |
6273 |
+ |
6274 |
+ if use clang; then |
6275 |
+ # Automatically select active system GCC's libraries, bugs #406163 and #417913 |
6276 |
+ epatch "${FILESDIR}"/clang-3.5-gentoo-runtime-gcc-detection-v3.patch |
6277 |
+ |
6278 |
+ epatch "${FILESDIR}"/clang-3.5-gentoo-install.patch |
6279 |
+ epatch "${FILESDIR}"/clang-3.4-darwin_prefix-include-paths.patch |
6280 |
+ eprefixify tools/clang/lib/Frontend/InitHeaderSearch.cpp |
6281 |
+ fi |
6282 |
+ |
6283 |
+ if use prefix && use clang; then |
6284 |
+ sed -i -e "/^CFLAGS /s@-Werror@-I${EPREFIX}/usr/include@" \ |
6285 |
+ projects/compiler-rt/make/platform/clang_*.mk || die |
6286 |
+ fi |
6287 |
+ |
6288 |
+ local sub_files=( |
6289 |
+ Makefile.config.in |
6290 |
+ Makefile.rules |
6291 |
+ tools/llvm-config/llvm-config.cpp |
6292 |
+ ) |
6293 |
+ use clang && sub_files+=( |
6294 |
+ tools/clang/lib/Driver/Tools.cpp |
6295 |
+ tools/clang/tools/scan-build/scan-build |
6296 |
+ ) |
6297 |
+ |
6298 |
+ # unfortunately ./configure won't listen to --mandir and the-like, so take |
6299 |
+ # care of this. |
6300 |
+ # note: we're setting the main libdir intentionally. |
6301 |
+ # where per-ABI is appropriate, we use $(GENTOO_LIBDIR) make. |
6302 |
+ einfo "Fixing install dirs" |
6303 |
+ sed -e "s,@libdir@,$(get_libdir),g" \ |
6304 |
+ -e "s,@PF@,${PF},g" \ |
6305 |
+ -e "s,@EPREFIX@,${EPREFIX},g" \ |
6306 |
+ -i "${sub_files[@]}" \ |
6307 |
+ || die "install paths sed failed" |
6308 |
+ |
6309 |
+ if use clang; then |
6310 |
+ # constantly fails for a long time, likely due to our patches |
6311 |
+ rm tools/clang/test/Driver/cross-linux.c || die |
6312 |
+ fi |
6313 |
+ |
6314 |
+ # User patches |
6315 |
+ epatch_user |
6316 |
+ |
6317 |
+ python_setup |
6318 |
+} |
6319 |
+ |
6320 |
+multilib_src_configure() { |
6321 |
+ # disable timestamps since they confuse ccache |
6322 |
+ local conf_flags=( |
6323 |
+ --disable-timestamps |
6324 |
+ --enable-keep-symbols |
6325 |
+ --enable-shared |
6326 |
+ --with-optimize-option= |
6327 |
+ $(tc-is-static-only && echo --disable-shared) |
6328 |
+ $(use_enable !debug optimized) |
6329 |
+ $(use_enable debug assertions) |
6330 |
+ $(use_enable debug expensive-checks) |
6331 |
+ $(use_enable libedit) |
6332 |
+ $(use_enable ncurses terminfo) |
6333 |
+ $(use_enable libffi) |
6334 |
+ ) |
6335 |
+ |
6336 |
+ # well, it's used only by clang executable c-index-test |
6337 |
+ if multilib_is_native_abi && use clang && use xml; then |
6338 |
+ conf_flags+=( XML2CONFIG="$(tc-getPKG_CONFIG) libxml-2.0" ) |
6339 |
+ else |
6340 |
+ conf_flags+=( ac_cv_prog_XML2CONFIG="" ) |
6341 |
+ fi |
6342 |
+ |
6343 |
+ local targets bindings |
6344 |
+ if use multitarget; then |
6345 |
+ targets='all' |
6346 |
+ else |
6347 |
+ targets='host,cpp' |
6348 |
+ use video_cards_radeon && targets+=',r600' |
6349 |
+ fi |
6350 |
+ conf_flags+=( --enable-targets=${targets} ) |
6351 |
+ |
6352 |
+ if multilib_is_native_abi; then |
6353 |
+ use gold && conf_flags+=( --with-binutils-include="${EPREFIX}"/usr/include/ ) |
6354 |
+ # extra commas don't hurt |
6355 |
+ use ocaml && bindings+=',ocaml' |
6356 |
+ fi |
6357 |
+ |
6358 |
+ [[ ${bindings} ]] || bindings='none' |
6359 |
+ conf_flags+=( --enable-bindings=${bindings} ) |
6360 |
+ |
6361 |
+ if use libffi; then |
6362 |
+ local CPPFLAGS=${CPPFLAGS} |
6363 |
+ append-cppflags "$(pkg-config --cflags libffi)" |
6364 |
+ fi |
6365 |
+ |
6366 |
+ # llvm prefers clang over gcc, so we may need to force that |
6367 |
+ tc-export CC CXX |
6368 |
+ |
6369 |
+ ECONF_SOURCE=${S} \ |
6370 |
+ econf "${conf_flags[@]}" |
6371 |
+} |
6372 |
+ |
6373 |
+set_makeargs() { |
6374 |
+ MAKEARGS=( |
6375 |
+ VERBOSE=1 |
6376 |
+ REQUIRES_RTTI=1 |
6377 |
+ GENTOO_LIBDIR=$(get_libdir) |
6378 |
+ ) |
6379 |
+ |
6380 |
+ # for tests, we want it all! otherwise, we may use a little filtering... |
6381 |
+ # adding ONLY_TOOLS also disables unittest building... |
6382 |
+ if [[ ${EBUILD_PHASE_FUNC} != src_test ]]; then |
6383 |
+ local tools=( llvm-config ) |
6384 |
+ use clang && tools+=( clang ) |
6385 |
+ |
6386 |
+ if multilib_is_native_abi; then |
6387 |
+ tools+=( |
6388 |
+ opt llvm-as llvm-dis llc llvm-ar llvm-nm llvm-link lli |
6389 |
+ llvm-extract llvm-mc llvm-bcanalyzer llvm-diff macho-dump |
6390 |
+ llvm-objdump llvm-readobj llvm-rtdyld llvm-dwarfdump llvm-cov |
6391 |
+ llvm-size llvm-stress llvm-mcmarkup llvm-profdata |
6392 |
+ llvm-symbolizer obj2yaml yaml2obj lto bugpoint |
6393 |
+ ) |
6394 |
+ |
6395 |
+ # the build system runs explicitly specified tools in parallel, |
6396 |
+ # so we need to split it into two runs |
6397 |
+ if [[ ${1} != -1 ]]; then |
6398 |
+ # those require lto |
6399 |
+ tools+=( llvm-lto ) |
6400 |
+ use gold && tools+=( gold ) |
6401 |
+ |
6402 |
+ # those require clang :) |
6403 |
+ # we need to explicitly specify all its tools |
6404 |
+ # since we're passing BUILD_CLANG_ONLY |
6405 |
+ use clang && tools+=( |
6406 |
+ clang/tools/{clang-check,clang-format,extra} |
6407 |
+ ) |
6408 |
+ fi |
6409 |
+ fi |
6410 |
+ |
6411 |
+ MAKEARGS+=( |
6412 |
+ # filter tools + disable unittests implicitly |
6413 |
+ ONLY_TOOLS="${tools[*]}" |
6414 |
+ |
6415 |
+ # this disables unittests & docs from clang |
6416 |
+ BUILD_CLANG_ONLY=YES |
6417 |
+ ) |
6418 |
+ fi |
6419 |
+} |
6420 |
+ |
6421 |
+multilib_src_compile() { |
6422 |
+ local MAKEARGS |
6423 |
+ set_makeargs -1 |
6424 |
+ emake "${MAKEARGS[@]}" |
6425 |
+ |
6426 |
+ if multilib_is_native_abi; then |
6427 |
+ set_makeargs |
6428 |
+ emake -C tools "${MAKEARGS[@]}" |
6429 |
+ |
6430 |
+ if use doc; then |
6431 |
+ emake -C "${S}"/docs -f Makefile.sphinx man |
6432 |
+ use clang && emake -C "${S}"/tools/clang/docs/tools \ |
6433 |
+ BUILD_FOR_WEBSITE=1 DST_MAN_DIR="${T}"/ man |
6434 |
+ emake -C "${S}"/docs -f Makefile.sphinx html |
6435 |
+ fi |
6436 |
+ fi |
6437 |
+ |
6438 |
+ if use debug; then |
6439 |
+ pax-mark m Debug+Asserts+Checks/bin/llvm-rtdyld |
6440 |
+ pax-mark m Debug+Asserts+Checks/bin/lli |
6441 |
+ pax-mark m Debug+Asserts+Checks/bin/lli-child-target |
6442 |
+ else |
6443 |
+ pax-mark m Release/bin/llvm-rtdyld |
6444 |
+ pax-mark m Release/bin/lli |
6445 |
+ pax-mark m Release/bin/lli-child-target |
6446 |
+ fi |
6447 |
+} |
6448 |
+ |
6449 |
+multilib_src_test() { |
6450 |
+ local MAKEARGS |
6451 |
+ set_makeargs |
6452 |
+ |
6453 |
+ # build the remaining tools & unittests |
6454 |
+ emake "${MAKEARGS[@]}" |
6455 |
+ |
6456 |
+ pax-mark m unittests/ExecutionEngine/JIT/Release/JITTests |
6457 |
+ pax-mark m unittests/ExecutionEngine/MCJIT/Release/MCJITTests |
6458 |
+ pax-mark m unittests/Support/Release/SupportTests |
6459 |
+ |
6460 |
+ # respect TMPDIR! |
6461 |
+ local -x LIT_PRESERVES_TMP=1 |
6462 |
+ emake "${MAKEARGS[@]}" check |
6463 |
+ use clang && emake "${MAKEARGS[@]}" -C tools/clang test |
6464 |
+} |
6465 |
+ |
6466 |
+src_install() { |
6467 |
+ local MULTILIB_CHOST_TOOLS=( |
6468 |
+ /usr/bin/llvm-config |
6469 |
+ ) |
6470 |
+ |
6471 |
+ local MULTILIB_WRAPPED_HEADERS=( |
6472 |
+ /usr/include/llvm/Config/config.h |
6473 |
+ /usr/include/llvm/Config/llvm-config.h |
6474 |
+ ) |
6475 |
+ |
6476 |
+ if use clang; then |
6477 |
+ # note: magic applied below |
6478 |
+ MULTILIB_CHOST_TOOLS+=( |
6479 |
+ /usr/bin/clang |
6480 |
+ /usr/bin/clang++ |
6481 |
+ /usr/bin/clang-${PV} |
6482 |
+ /usr/bin/clang++-${PV} |
6483 |
+ ) |
6484 |
+ |
6485 |
+ MULTILIB_WRAPPED_HEADERS+=( |
6486 |
+ /usr/include/clang/Config/config.h |
6487 |
+ ) |
6488 |
+ fi |
6489 |
+ |
6490 |
+ multilib-minimal_src_install |
6491 |
+ |
6492 |
+ # Remove unnecessary headers on FreeBSD, bug #417171 |
6493 |
+ use kernel_FreeBSD && use clang && rm "${ED}"usr/lib/clang/${PV}/include/{std,float,iso,limits,tgmath,varargs}*.h |
6494 |
+} |
6495 |
+ |
6496 |
+multilib_src_install() { |
6497 |
+ local MAKEARGS |
6498 |
+ set_makeargs |
6499 |
+ |
6500 |
+ local root=${D}/_${ABI} |
6501 |
+ |
6502 |
+ emake "${MAKEARGS[@]}" DESTDIR="${root}" install |
6503 |
+ multibuild_merge_root "${root}" "${D}" |
6504 |
+ |
6505 |
+ if ! multilib_is_native_abi; then |
6506 |
+ # Backwards compat, will be happily removed someday. |
6507 |
+ dosym "${CHOST}"-llvm-config /usr/bin/llvm-config.${ABI} |
6508 |
+ else |
6509 |
+ # Install docs. |
6510 |
+ if use doc; then |
6511 |
+ doman "${S}"/docs/_build/man/*.1 |
6512 |
+ use clang && doman "${T}"/clang.1 |
6513 |
+ dohtml -r "${S}"/docs/_build/html/ |
6514 |
+ else |
6515 |
+ if ! use clang; then |
6516 |
+ rm "${WORKDIR}"/${PN}-3.5.0-manpages/clang.1 || die |
6517 |
+ fi |
6518 |
+ doman "${WORKDIR}"/${PN}-3.5.0-manpages/*.1 |
6519 |
+ fi |
6520 |
+ |
6521 |
+ # Symlink the gold plugin. |
6522 |
+ if use gold; then |
6523 |
+ dodir /usr/${CHOST}/binutils-bin/lib/bfd-plugins |
6524 |
+ dosym ../../../../$(get_libdir)/LLVMgold.so \ |
6525 |
+ /usr/${CHOST}/binutils-bin/lib/bfd-plugins/LLVMgold.so |
6526 |
+ fi |
6527 |
+ fi |
6528 |
+ |
6529 |
+ # apply CHOST and PV to clang executables |
6530 |
+ # they're statically linked so we don't have to worry about the lib |
6531 |
+ if use clang; then |
6532 |
+ local clang_tools=( clang clang++ ) |
6533 |
+ local i |
6534 |
+ |
6535 |
+ # append ${PV} and symlink back |
6536 |
+ # TODO: use alternatives.eclass? does that make any sense? |
6537 |
+ # maybe with USE=-clang on :0 and USE=clang on older |
6538 |
+ for i in "${clang_tools[@]}"; do |
6539 |
+ mv "${ED%/}/usr/bin/${i}"{,-${PV}} || die |
6540 |
+ dosym "${i}"-${PV} /usr/bin/${i} |
6541 |
+ done |
6542 |
+ |
6543 |
+ # now prepend ${CHOST} and let the multilib-build.eclass symlink it |
6544 |
+ if ! multilib_is_native_abi; then |
6545 |
+ # non-native? let's replace it with a simple wrapper |
6546 |
+ for i in "${clang_tools[@]}"; do |
6547 |
+ rm "${ED%/}/usr/bin/${i}-${PV}" || die |
6548 |
+ cat > "${T}"/wrapper.tmp <<-_EOF_ |
6549 |
+ #!${EPREFIX}/bin/sh |
6550 |
+ exec "${i}-${PV}" $(get_abi_CFLAGS) "\${@}" |
6551 |
+ _EOF_ |
6552 |
+ newbin "${T}"/wrapper.tmp "${i}-${PV}" |
6553 |
+ done |
6554 |
+ fi |
6555 |
+ fi |
6556 |
+ |
6557 |
+ # Fix install_names on Darwin. The build system is too complicated |
6558 |
+ # to just fix this, so we correct it post-install |
6559 |
+ local lib= f= odylib= ndylib= libpv=${PV} |
6560 |
+ if [[ ${CHOST} == *-darwin* ]] ; then |
6561 |
+ eval $(grep PACKAGE_VERSION= configure) |
6562 |
+ [[ -n ${PACKAGE_VERSION} ]] && libpv=${PACKAGE_VERSION} |
6563 |
+ libpvminor=${libpv%.[0-9]*} |
6564 |
+ for lib in lib{EnhancedDisassembly,LLVM-${libpv},LTO,profile_rt,clang}.dylib LLVMHello.dylib clang/${libpv}/lib/darwin/libclang_rt.asan_{osx,iossim}_dynamic.dylib; do |
6565 |
+ # libEnhancedDisassembly is Darwin10 only, so non-fatal |
6566 |
+ # + omit clang libs if not enabled |
6567 |
+ [[ -f ${ED}/usr/lib/${lib} ]] || continue |
6568 |
+ |
6569 |
+ ebegin "fixing install_name of $lib" |
6570 |
+ install_name_tool \ |
6571 |
+ -id "${EPREFIX}"/usr/lib/${lib} \ |
6572 |
+ "${ED}"/usr/lib/${lib} |
6573 |
+ eend $? |
6574 |
+ done |
6575 |
+ for f in "${ED}"/usr/bin/* "${ED}"/usr/lib/lib*.dylib "${ED}"/usr/lib/clang/${libpv}/lib/darwin/*.dylib ; do |
6576 |
+ # omit clang libs if not enabled |
6577 |
+ [[ -f "${f}" ]] || continue |
6578 |
+ |
6579 |
+ scanmacho -BF'%n#f' "${f}" | tr ',' '\n' | \ |
6580 |
+ while read odylib ; do |
6581 |
+ ndylib= |
6582 |
+ case ${odylib} in |
6583 |
+ */libclang.dylib) |
6584 |
+ ndylib="${EPREFIX}"/usr/lib/libclang.dylib |
6585 |
+ ;; |
6586 |
+ */libLLVM-${libpv}.dylib) |
6587 |
+ ndylib="${EPREFIX}"/usr/lib/libLLVM-${libpv}.dylib |
6588 |
+ ;; |
6589 |
+ */libLLVM-${libpvminor}.dylib) |
6590 |
+ ndylib="${EPREFIX}"/usr/lib/libLLVM-${libpvminor}.dylib |
6591 |
+ ;; |
6592 |
+ */libLTO.dylib) |
6593 |
+ ndylib="${EPREFIX}"/usr/lib/libLTO.dylib |
6594 |
+ ;; |
6595 |
+ esac |
6596 |
+ if [[ -n ${ndylib} ]] ; then |
6597 |
+ ebegin "fixing install_name reference to ${odylib} of ${f##*/}" |
6598 |
+ install_name_tool \ |
6599 |
+ -change "${odylib}" "${ndylib}" \ |
6600 |
+ "${f}" |
6601 |
+ eend $? |
6602 |
+ fi |
6603 |
+ done |
6604 |
+ done |
6605 |
+ fi |
6606 |
+} |
6607 |
+ |
6608 |
+multilib_src_install_all() { |
6609 |
+ insinto /usr/share/vim/vimfiles/syntax |
6610 |
+ doins utils/vim/*.vim |
6611 |
+ |
6612 |
+ if use clang; then |
6613 |
+ cd tools/clang || die |
6614 |
+ |
6615 |
+ if use static-analyzer ; then |
6616 |
+ dobin tools/scan-build/ccc-analyzer |
6617 |
+ dosym ccc-analyzer /usr/bin/c++-analyzer |
6618 |
+ dobin tools/scan-build/scan-build |
6619 |
+ |
6620 |
+ insinto /usr/share/${PN} |
6621 |
+ doins tools/scan-build/scanview.css |
6622 |
+ doins tools/scan-build/sorttable.js |
6623 |
+ fi |
6624 |
+ |
6625 |
+ python_inst() { |
6626 |
+ if use static-analyzer ; then |
6627 |
+ pushd tools/scan-view >/dev/null || die |
6628 |
+ |
6629 |
+ python_doscript scan-view |
6630 |
+ |
6631 |
+ touch __init__.py || die |
6632 |
+ python_moduleinto clang |
6633 |
+ python_domodule __init__.py Reporter.py Resources ScanView.py startfile.py |
6634 |
+ |
6635 |
+ popd >/dev/null || die |
6636 |
+ fi |
6637 |
+ |
6638 |
+ if use python ; then |
6639 |
+ pushd bindings/python/clang >/dev/null || die |
6640 |
+ |
6641 |
+ python_moduleinto clang |
6642 |
+ python_domodule __init__.py cindex.py enumerations.py |
6643 |
+ |
6644 |
+ popd >/dev/null || die |
6645 |
+ fi |
6646 |
+ |
6647 |
+ # AddressSanitizer symbolizer (currently separate) |
6648 |
+ python_doscript "${S}"/projects/compiler-rt/lib/asan/scripts/asan_symbolize.py |
6649 |
+ } |
6650 |
+ python_foreach_impl python_inst |
6651 |
+ fi |
6652 |
+} |
6653 |
|
6654 |
diff --git a/sys-devel/llvm/llvm-3.6.0.ebuild b/sys-devel/llvm/llvm-3.6.0.ebuild |
6655 |
new file mode 100644 |
6656 |
index 0000000..b789793 |
6657 |
--- /dev/null |
6658 |
+++ b/sys-devel/llvm/llvm-3.6.0.ebuild |
6659 |
@@ -0,0 +1,534 @@ |
6660 |
+# Copyright 1999-2015 Gentoo Foundation |
6661 |
+# Distributed under the terms of the GNU General Public License v2 |
6662 |
+# $Id$ |
6663 |
+ |
6664 |
+EAPI=5 |
6665 |
+ |
6666 |
+PYTHON_COMPAT=( python2_7 pypy ) |
6667 |
+ |
6668 |
+inherit eutils flag-o-matic multibuild multilib \ |
6669 |
+ multilib-minimal python-r1 toolchain-funcs pax-utils check-reqs prefix |
6670 |
+ |
6671 |
+DESCRIPTION="Low Level Virtual Machine" |
6672 |
+HOMEPAGE="http://llvm.org/" |
6673 |
+SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.xz |
6674 |
+ clang? ( http://llvm.org/releases/${PV}/compiler-rt-${PV}.src.tar.xz |
6675 |
+ http://llvm.org/releases/${PV}/cfe-${PV}.src.tar.xz |
6676 |
+ http://llvm.org/releases/${PV}/clang-tools-extra-${PV}.src.tar.xz ) |
6677 |
+ !doc? ( https://dev.gentoo.org/~voyageur/distfiles/${P}-manpages.tar.bz2 )" |
6678 |
+ |
6679 |
+LICENSE="UoI-NCSA" |
6680 |
+SLOT="0/3.6" |
6681 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
6682 |
+IUSE="clang debug doc gold libedit +libffi multitarget ncurses ocaml python |
6683 |
+ +static-analyzer test xml video_cards_radeon |
6684 |
+ kernel_Darwin kernel_FreeBSD" |
6685 |
+ |
6686 |
+COMMON_DEPEND=" |
6687 |
+ sys-libs/zlib:0= |
6688 |
+ clang? ( |
6689 |
+ python? ( ${PYTHON_DEPS} ) |
6690 |
+ static-analyzer? ( |
6691 |
+ dev-lang/perl:* |
6692 |
+ ${PYTHON_DEPS} |
6693 |
+ ) |
6694 |
+ xml? ( dev-libs/libxml2:2= ) |
6695 |
+ ) |
6696 |
+ gold? ( >=sys-devel/binutils-2.22:*[cxx] ) |
6697 |
+ libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] ) |
6698 |
+ libffi? ( >=virtual/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] ) |
6699 |
+ ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] ) |
6700 |
+ ocaml? ( |
6701 |
+ dev-lang/ocaml:0= |
6702 |
+ dev-ml/findlib |
6703 |
+ dev-ml/ocaml-ctypes )" |
6704 |
+# configparser-3.2 breaks the build (3.3 or none at all are fine) |
6705 |
+DEPEND="${COMMON_DEPEND} |
6706 |
+ app-arch/xz-utils |
6707 |
+ dev-lang/perl |
6708 |
+ >=sys-devel/make-3.81 |
6709 |
+ >=sys-devel/flex-2.5.4 |
6710 |
+ >=sys-devel/bison-1.875d |
6711 |
+ || ( >=sys-devel/gcc-3.0 >=sys-devel/gcc-apple-4.2.1 |
6712 |
+ ( >=sys-freebsd/freebsd-lib-9.1-r10 sys-libs/libcxx ) |
6713 |
+ ) |
6714 |
+ || ( >=sys-devel/binutils-2.18 >=sys-devel/binutils-apple-5.1 ) |
6715 |
+ clang? ( xml? ( virtual/pkgconfig ) ) |
6716 |
+ doc? ( dev-python/sphinx ) |
6717 |
+ libffi? ( virtual/pkgconfig ) |
6718 |
+ !!<dev-python/configparser-3.3.0.2 |
6719 |
+ ocaml? ( test? ( dev-ml/ounit ) ) |
6720 |
+ ${PYTHON_DEPS}" |
6721 |
+RDEPEND="${COMMON_DEPEND} |
6722 |
+ clang? ( !<=sys-devel/clang-${PV}-r99 |
6723 |
+ !>=sys-devel/clang-9999 ) |
6724 |
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r2 |
6725 |
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )" |
6726 |
+PDEPEND="clang? ( =sys-devel/clang-${PV}-r100 )" |
6727 |
+ |
6728 |
+# pypy gives me around 1700 unresolved tests due to open file limit |
6729 |
+# being exceeded. probably GC does not close them fast enough. |
6730 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE} |
6731 |
+ test? ( || ( $(python_gen_useflags 'python*') ) )" |
6732 |
+ |
6733 |
+S=${WORKDIR}/${P/_}.src |
6734 |
+ |
6735 |
+# Some people actually override that in make.conf. That sucks since |
6736 |
+# we need to run install per-directory, and ninja can't do that... |
6737 |
+# so why did it call itself ninja in the first place? |
6738 |
+CMAKE_MAKEFILE_GENERATOR=emake |
6739 |
+ |
6740 |
+pkg_pretend() { |
6741 |
+ # in megs |
6742 |
+ # !clang !debug !multitarget -O2 400 |
6743 |
+ # !clang !debug multitarget -O2 550 |
6744 |
+ # clang !debug !multitarget -O2 950 |
6745 |
+ # clang !debug multitarget -O2 1200 |
6746 |
+ # !clang debug multitarget -O2 5G |
6747 |
+ # clang !debug multitarget -O0 -g 12G |
6748 |
+ # clang debug multitarget -O2 16G |
6749 |
+ # clang debug multitarget -O0 -g 14G |
6750 |
+ |
6751 |
+ local build_size=550 |
6752 |
+ use clang && build_size=1200 |
6753 |
+ |
6754 |
+ if use debug; then |
6755 |
+ ewarn "USE=debug is known to increase the size of package considerably" |
6756 |
+ ewarn "and cause the tests to fail." |
6757 |
+ ewarn |
6758 |
+ |
6759 |
+ (( build_size *= 14 )) |
6760 |
+ elif is-flagq '-g?(gdb)?([1-9])'; then |
6761 |
+ ewarn "The C++ compiler -g option is known to increase the size of the package" |
6762 |
+ ewarn "considerably. If you run out of space, please consider removing it." |
6763 |
+ ewarn |
6764 |
+ |
6765 |
+ (( build_size *= 10 )) |
6766 |
+ fi |
6767 |
+ |
6768 |
+ # Multiply by number of ABIs :). |
6769 |
+ local abis=( $(multilib_get_enabled_abis) ) |
6770 |
+ (( build_size *= ${#abis[@]} )) |
6771 |
+ |
6772 |
+ local CHECKREQS_DISK_BUILD=${build_size}M |
6773 |
+ check-reqs_pkg_pretend |
6774 |
+ |
6775 |
+ if [[ ${MERGE_TYPE} != binary ]]; then |
6776 |
+ echo 'int main() {return 0;}' > "${T}"/test.cxx || die |
6777 |
+ ebegin "Trying to build a C++11 test program" |
6778 |
+ if ! $(tc-getCXX) -std=c++11 -o /dev/null "${T}"/test.cxx; then |
6779 |
+ eerror "LLVM-${PV} requires C++11-capable C++ compiler. Your current compiler" |
6780 |
+ eerror "does not seem to support -std=c++11 option. Please upgrade your compiler" |
6781 |
+ eerror "to gcc-4.7 or an equivalent version supporting C++11." |
6782 |
+ die "Currently active compiler does not support -std=c++11" |
6783 |
+ fi |
6784 |
+ eend ${?} |
6785 |
+ fi |
6786 |
+} |
6787 |
+ |
6788 |
+pkg_setup() { |
6789 |
+ pkg_pretend |
6790 |
+} |
6791 |
+ |
6792 |
+src_unpack() { |
6793 |
+ default |
6794 |
+ |
6795 |
+ rm -f "${S}"/tools/clang "${S}"/projects/compiler-rt \ |
6796 |
+ || die "symlinks removal failed" |
6797 |
+ |
6798 |
+ if use clang; then |
6799 |
+ mv "${WORKDIR}"/cfe-${PV/_}.src "${S}"/tools/clang \ |
6800 |
+ || die "clang source directory move failed" |
6801 |
+ mv "${WORKDIR}"/compiler-rt-${PV/_}.src "${S}"/projects/compiler-rt \ |
6802 |
+ || die "compiler-rt source directory move failed" |
6803 |
+ mv "${WORKDIR}"/clang-tools-extra-${PV/_}.src "${S}"/tools/clang/tools/extra \ |
6804 |
+ || die "clang-tools-extra source directory move failed" |
6805 |
+ fi |
6806 |
+} |
6807 |
+ |
6808 |
+src_prepare() { |
6809 |
+ epatch "${FILESDIR}"/${PN}-3.2-nodoctargz.patch |
6810 |
+ epatch "${FILESDIR}"/${PN}-3.5-gcc-4.9.patch |
6811 |
+ epatch "${FILESDIR}"/${PN}-3.6-gentoo-install.patch |
6812 |
+ # Make ocaml warnings non-fatal, bug #537308 |
6813 |
+ sed -e "/RUN/s/-warn-error A//" -i test/Bindings/OCaml/*ml || die |
6814 |
+ |
6815 |
+ if use clang; then |
6816 |
+ # Automatically select active system GCC's libraries, bugs #406163 and #417913 |
6817 |
+ epatch "${FILESDIR}"/clang-3.5-gentoo-runtime-gcc-detection-v3.patch |
6818 |
+ |
6819 |
+ epatch "${FILESDIR}"/clang-3.6-gentoo-install.patch |
6820 |
+ epatch "${FILESDIR}"/clang-3.4-darwin_prefix-include-paths.patch |
6821 |
+ eprefixify tools/clang/lib/Frontend/InitHeaderSearch.cpp |
6822 |
+ fi |
6823 |
+ |
6824 |
+ if use prefix && use clang; then |
6825 |
+ sed -i -e "/^CFLAGS /s@-Werror@-I${EPREFIX}/usr/include@" \ |
6826 |
+ projects/compiler-rt/make/platform/clang_*.mk || die |
6827 |
+ fi |
6828 |
+ |
6829 |
+ local sub_files=( |
6830 |
+ Makefile.config.in |
6831 |
+ Makefile.rules |
6832 |
+ tools/llvm-config/llvm-config.cpp |
6833 |
+ ) |
6834 |
+ use clang && sub_files+=( |
6835 |
+ tools/clang/lib/Driver/Tools.cpp |
6836 |
+ tools/clang/tools/scan-build/scan-build |
6837 |
+ ) |
6838 |
+ |
6839 |
+ # unfortunately ./configure won't listen to --mandir and the-like, so take |
6840 |
+ # care of this. |
6841 |
+ # note: we're setting the main libdir intentionally. |
6842 |
+ # where per-ABI is appropriate, we use $(GENTOO_LIBDIR) make. |
6843 |
+ einfo "Fixing install dirs" |
6844 |
+ sed -e "s,@libdir@,$(get_libdir),g" \ |
6845 |
+ -e "s,@PF@,${PF},g" \ |
6846 |
+ -e "s,@EPREFIX@,${EPREFIX},g" \ |
6847 |
+ -i "${sub_files[@]}" \ |
6848 |
+ || die "install paths sed failed" |
6849 |
+ |
6850 |
+ if use clang; then |
6851 |
+ # constantly fails for a long time, likely due to our patches |
6852 |
+ rm tools/clang/test/Driver/cross-linux.c || die |
6853 |
+ fi |
6854 |
+ |
6855 |
+ # User patches |
6856 |
+ epatch_user |
6857 |
+ |
6858 |
+ python_setup |
6859 |
+} |
6860 |
+ |
6861 |
+multilib_src_configure() { |
6862 |
+ # disable timestamps since they confuse ccache |
6863 |
+ local conf_flags=( |
6864 |
+ --disable-timestamps |
6865 |
+ --enable-keep-symbols |
6866 |
+ --enable-shared |
6867 |
+ --with-optimize-option= |
6868 |
+ $(tc-is-static-only && echo --disable-shared) |
6869 |
+ $(use_enable !debug optimized) |
6870 |
+ $(use_enable debug assertions) |
6871 |
+ $(use_enable debug expensive-checks) |
6872 |
+ $(use_enable libedit) |
6873 |
+ $(use_enable ncurses terminfo) |
6874 |
+ $(use_enable libffi) |
6875 |
+ ) |
6876 |
+ |
6877 |
+ # well, it's used only by clang executable c-index-test |
6878 |
+ if multilib_is_native_abi && use clang && use xml; then |
6879 |
+ conf_flags+=( XML2CONFIG="$(tc-getPKG_CONFIG) libxml-2.0" ) |
6880 |
+ else |
6881 |
+ conf_flags+=( ac_cv_prog_XML2CONFIG="" ) |
6882 |
+ fi |
6883 |
+ |
6884 |
+ local targets bindings |
6885 |
+ if use multitarget; then |
6886 |
+ targets='all' |
6887 |
+ else |
6888 |
+ targets='host,cpp' |
6889 |
+ use video_cards_radeon && targets+=',r600' |
6890 |
+ fi |
6891 |
+ conf_flags+=( --enable-targets=${targets} ) |
6892 |
+ |
6893 |
+ if multilib_is_native_abi; then |
6894 |
+ use gold && conf_flags+=( --with-binutils-include="${EPREFIX}"/usr/include/ ) |
6895 |
+ # extra commas don't hurt |
6896 |
+ use ocaml && bindings+=',ocaml' |
6897 |
+ fi |
6898 |
+ |
6899 |
+ [[ ${bindings} ]] || bindings='none' |
6900 |
+ conf_flags+=( --enable-bindings=${bindings} ) |
6901 |
+ |
6902 |
+ if use libffi; then |
6903 |
+ local CPPFLAGS=${CPPFLAGS} |
6904 |
+ append-cppflags "$(pkg-config --cflags libffi)" |
6905 |
+ fi |
6906 |
+ |
6907 |
+ # llvm prefers clang over gcc, so we may need to force that |
6908 |
+ tc-export CC CXX |
6909 |
+ |
6910 |
+ ECONF_SOURCE=${S} \ |
6911 |
+ econf "${conf_flags[@]}" |
6912 |
+} |
6913 |
+ |
6914 |
+set_makeargs() { |
6915 |
+ MAKEARGS=( |
6916 |
+ VERBOSE=1 |
6917 |
+ REQUIRES_RTTI=1 |
6918 |
+ GENTOO_LIBDIR=$(get_libdir) |
6919 |
+ ) |
6920 |
+ |
6921 |
+ # for tests, we want it all! otherwise, we may use a little filtering... |
6922 |
+ # adding ONLY_TOOLS also disables unittest building... |
6923 |
+ if [[ ${EBUILD_PHASE_FUNC} != src_test ]]; then |
6924 |
+ local tools=( llvm-config ) |
6925 |
+ use clang && tools+=( clang ) |
6926 |
+ |
6927 |
+ if multilib_is_native_abi; then |
6928 |
+ tools+=( |
6929 |
+ opt llvm-as llvm-dis llc llvm-ar llvm-nm llvm-link lli |
6930 |
+ llvm-extract llvm-mc llvm-bcanalyzer llvm-diff macho-dump |
6931 |
+ llvm-objdump llvm-readobj llvm-rtdyld llvm-dwarfdump llvm-cov |
6932 |
+ llvm-size llvm-stress llvm-mcmarkup llvm-profdata |
6933 |
+ llvm-symbolizer obj2yaml yaml2obj lto bugpoint |
6934 |
+ ) |
6935 |
+ |
6936 |
+ # the build system runs explicitly specified tools in parallel, |
6937 |
+ # so we need to split it into two runs |
6938 |
+ if [[ ${1} != -1 ]]; then |
6939 |
+ # those require lto |
6940 |
+ tools+=( llvm-lto ) |
6941 |
+ use gold && tools+=( gold ) |
6942 |
+ |
6943 |
+ # those require clang :) |
6944 |
+ # we need to explicitly specify all its tools |
6945 |
+ # since we're passing BUILD_CLANG_ONLY |
6946 |
+ use clang && tools+=( |
6947 |
+ clang/tools/{clang-check,clang-format,extra} |
6948 |
+ ) |
6949 |
+ fi |
6950 |
+ fi |
6951 |
+ |
6952 |
+ MAKEARGS+=( |
6953 |
+ # filter tools + disable unittests implicitly |
6954 |
+ ONLY_TOOLS="${tools[*]}" |
6955 |
+ |
6956 |
+ # this disables unittests & docs from clang |
6957 |
+ BUILD_CLANG_ONLY=YES |
6958 |
+ ) |
6959 |
+ fi |
6960 |
+} |
6961 |
+ |
6962 |
+multilib_src_compile() { |
6963 |
+ local MAKEARGS |
6964 |
+ set_makeargs -1 |
6965 |
+ emake "${MAKEARGS[@]}" |
6966 |
+ |
6967 |
+ if multilib_is_native_abi; then |
6968 |
+ set_makeargs |
6969 |
+ emake -C tools "${MAKEARGS[@]}" |
6970 |
+ |
6971 |
+ if use doc; then |
6972 |
+ emake -C "${S}"/docs -f Makefile.sphinx man |
6973 |
+ use clang && emake -C "${S}"/tools/clang/docs/tools \ |
6974 |
+ BUILD_FOR_WEBSITE=1 DST_MAN_DIR="${T}"/ man |
6975 |
+ emake -C "${S}"/docs -f Makefile.sphinx html |
6976 |
+ fi |
6977 |
+ fi |
6978 |
+ |
6979 |
+ if use debug; then |
6980 |
+ pax-mark m Debug+Asserts+Checks/bin/llvm-rtdyld |
6981 |
+ pax-mark m Debug+Asserts+Checks/bin/lli |
6982 |
+ pax-mark m Debug+Asserts+Checks/bin/lli-child-target |
6983 |
+ else |
6984 |
+ pax-mark m Release/bin/llvm-rtdyld |
6985 |
+ pax-mark m Release/bin/lli |
6986 |
+ pax-mark m Release/bin/lli-child-target |
6987 |
+ fi |
6988 |
+} |
6989 |
+ |
6990 |
+multilib_src_test() { |
6991 |
+ local MAKEARGS |
6992 |
+ set_makeargs |
6993 |
+ |
6994 |
+ # build the remaining tools & unittests |
6995 |
+ emake "${MAKEARGS[@]}" |
6996 |
+ |
6997 |
+ pax-mark m unittests/ExecutionEngine/JIT/Release/JITTests |
6998 |
+ pax-mark m unittests/ExecutionEngine/MCJIT/Release/MCJITTests |
6999 |
+ pax-mark m unittests/Support/Release/SupportTests |
7000 |
+ |
7001 |
+ # respect TMPDIR! |
7002 |
+ local -x LIT_PRESERVES_TMP=1 |
7003 |
+ emake "${MAKEARGS[@]}" check |
7004 |
+ use clang && emake "${MAKEARGS[@]}" -C tools/clang test |
7005 |
+} |
7006 |
+ |
7007 |
+src_install() { |
7008 |
+ local MULTILIB_CHOST_TOOLS=( |
7009 |
+ /usr/bin/llvm-config |
7010 |
+ ) |
7011 |
+ |
7012 |
+ local MULTILIB_WRAPPED_HEADERS=( |
7013 |
+ /usr/include/llvm/Config/config.h |
7014 |
+ /usr/include/llvm/Config/llvm-config.h |
7015 |
+ ) |
7016 |
+ |
7017 |
+ if use clang; then |
7018 |
+ # note: magic applied below |
7019 |
+ MULTILIB_CHOST_TOOLS+=( |
7020 |
+ /usr/bin/clang |
7021 |
+ /usr/bin/clang++ |
7022 |
+ /usr/bin/clang-${PV} |
7023 |
+ /usr/bin/clang++-${PV} |
7024 |
+ ) |
7025 |
+ |
7026 |
+ MULTILIB_WRAPPED_HEADERS+=( |
7027 |
+ /usr/include/clang/Config/config.h |
7028 |
+ ) |
7029 |
+ fi |
7030 |
+ |
7031 |
+ multilib-minimal_src_install |
7032 |
+ |
7033 |
+ # Remove unnecessary headers on FreeBSD, bug #417171 |
7034 |
+ use kernel_FreeBSD && use clang && rm "${ED}"usr/lib/clang/${PV}/include/{std,float,iso,limits,tgmath,varargs}*.h |
7035 |
+} |
7036 |
+ |
7037 |
+multilib_src_install() { |
7038 |
+ local MAKEARGS |
7039 |
+ set_makeargs |
7040 |
+ |
7041 |
+ local root=${D}/_${ABI} |
7042 |
+ |
7043 |
+ emake "${MAKEARGS[@]}" DESTDIR="${root}" install |
7044 |
+ multibuild_merge_root "${root}" "${D}" |
7045 |
+ |
7046 |
+ if ! multilib_is_native_abi; then |
7047 |
+ # Backwards compat, will be happily removed someday. |
7048 |
+ dosym "${CHOST}"-llvm-config /usr/bin/llvm-config.${ABI} |
7049 |
+ else |
7050 |
+ # Install docs. |
7051 |
+ if use doc; then |
7052 |
+ doman "${S}"/docs/_build/man/*.1 |
7053 |
+ use clang && doman "${T}"/clang.1 |
7054 |
+ dohtml -r "${S}"/docs/_build/html/ |
7055 |
+ else |
7056 |
+ if ! use clang; then |
7057 |
+ rm "${WORKDIR}"/${P}-manpages/clang.1 || die |
7058 |
+ fi |
7059 |
+ doman "${WORKDIR}"/${P}-manpages/*.1 |
7060 |
+ fi |
7061 |
+ |
7062 |
+ # Symlink the gold plugin. |
7063 |
+ if use gold; then |
7064 |
+ dodir /usr/${CHOST}/binutils-bin/lib/bfd-plugins |
7065 |
+ dosym ../../../../$(get_libdir)/LLVMgold.so \ |
7066 |
+ /usr/${CHOST}/binutils-bin/lib/bfd-plugins/LLVMgold.so |
7067 |
+ fi |
7068 |
+ fi |
7069 |
+ |
7070 |
+ # apply CHOST and PV to clang executables |
7071 |
+ # they're statically linked so we don't have to worry about the lib |
7072 |
+ if use clang; then |
7073 |
+ local clang_tools=( clang clang++ ) |
7074 |
+ local i |
7075 |
+ |
7076 |
+ # append ${PV} and symlink back |
7077 |
+ # TODO: use alternatives.eclass? does that make any sense? |
7078 |
+ # maybe with USE=-clang on :0 and USE=clang on older |
7079 |
+ for i in "${clang_tools[@]}"; do |
7080 |
+ mv "${ED%/}/usr/bin/${i}"{,-${PV}} || die |
7081 |
+ dosym "${i}"-${PV} /usr/bin/${i} |
7082 |
+ done |
7083 |
+ |
7084 |
+ # now prepend ${CHOST} and let the multilib-build.eclass symlink it |
7085 |
+ if ! multilib_is_native_abi; then |
7086 |
+ # non-native? let's replace it with a simple wrapper |
7087 |
+ for i in "${clang_tools[@]}"; do |
7088 |
+ rm "${ED%/}/usr/bin/${i}-${PV}" || die |
7089 |
+ cat > "${T}"/wrapper.tmp <<-_EOF_ |
7090 |
+ #!${EPREFIX}/bin/sh |
7091 |
+ exec "${i}-${PV}" $(get_abi_CFLAGS) "\${@}" |
7092 |
+ _EOF_ |
7093 |
+ newbin "${T}"/wrapper.tmp "${i}-${PV}" |
7094 |
+ done |
7095 |
+ fi |
7096 |
+ fi |
7097 |
+ |
7098 |
+ # Fix install_names on Darwin. The build system is too complicated |
7099 |
+ # to just fix this, so we correct it post-install |
7100 |
+ local lib= f= odylib= ndylib= libpv=${PV} |
7101 |
+ if [[ ${CHOST} == *-darwin* ]] ; then |
7102 |
+ eval $(grep PACKAGE_VERSION= configure) |
7103 |
+ [[ -n ${PACKAGE_VERSION} ]] && libpv=${PACKAGE_VERSION} |
7104 |
+ libpvminor=${libpv%.[0-9]*} |
7105 |
+ for lib in lib{EnhancedDisassembly,LLVM-${libpv},LTO,profile_rt,clang}.dylib LLVMHello.dylib clang/${libpv}/lib/darwin/libclang_rt.asan_{osx,iossim}_dynamic.dylib; do |
7106 |
+ # libEnhancedDisassembly is Darwin10 only, so non-fatal |
7107 |
+ # + omit clang libs if not enabled |
7108 |
+ [[ -f ${ED}/usr/lib/${lib} ]] || continue |
7109 |
+ |
7110 |
+ ebegin "fixing install_name of $lib" |
7111 |
+ install_name_tool \ |
7112 |
+ -id "${EPREFIX}"/usr/lib/${lib} \ |
7113 |
+ "${ED}"/usr/lib/${lib} |
7114 |
+ eend $? |
7115 |
+ done |
7116 |
+ for f in "${ED}"/usr/bin/* "${ED}"/usr/lib/lib*.dylib "${ED}"/usr/lib/clang/${libpv}/lib/darwin/*.dylib ; do |
7117 |
+ # omit clang libs if not enabled |
7118 |
+ [[ -f "${f}" ]] || continue |
7119 |
+ |
7120 |
+ scanmacho -BF'%n#f' "${f}" | tr ',' '\n' | \ |
7121 |
+ while read odylib ; do |
7122 |
+ ndylib= |
7123 |
+ case ${odylib} in |
7124 |
+ */libclang.dylib) |
7125 |
+ ndylib="${EPREFIX}"/usr/lib/libclang.dylib |
7126 |
+ ;; |
7127 |
+ */libLLVM-${libpv}.dylib) |
7128 |
+ ndylib="${EPREFIX}"/usr/lib/libLLVM-${libpv}.dylib |
7129 |
+ ;; |
7130 |
+ */libLLVM-${libpvminor}.dylib) |
7131 |
+ ndylib="${EPREFIX}"/usr/lib/libLLVM-${libpvminor}.dylib |
7132 |
+ ;; |
7133 |
+ */libLTO.dylib) |
7134 |
+ ndylib="${EPREFIX}"/usr/lib/libLTO.dylib |
7135 |
+ ;; |
7136 |
+ esac |
7137 |
+ if [[ -n ${ndylib} ]] ; then |
7138 |
+ ebegin "fixing install_name reference to ${odylib} of ${f##*/}" |
7139 |
+ install_name_tool \ |
7140 |
+ -change "${odylib}" "${ndylib}" \ |
7141 |
+ "${f}" |
7142 |
+ eend $? |
7143 |
+ fi |
7144 |
+ done |
7145 |
+ done |
7146 |
+ fi |
7147 |
+} |
7148 |
+ |
7149 |
+multilib_src_install_all() { |
7150 |
+ insinto /usr/share/vim/vimfiles/syntax |
7151 |
+ doins utils/vim/*.vim |
7152 |
+ |
7153 |
+ if use clang; then |
7154 |
+ cd tools/clang || die |
7155 |
+ |
7156 |
+ if use static-analyzer ; then |
7157 |
+ dobin tools/scan-build/ccc-analyzer |
7158 |
+ dosym ccc-analyzer /usr/bin/c++-analyzer |
7159 |
+ dobin tools/scan-build/scan-build |
7160 |
+ |
7161 |
+ insinto /usr/share/${PN} |
7162 |
+ doins tools/scan-build/scanview.css |
7163 |
+ doins tools/scan-build/sorttable.js |
7164 |
+ fi |
7165 |
+ |
7166 |
+ python_inst() { |
7167 |
+ if use static-analyzer ; then |
7168 |
+ pushd tools/scan-view >/dev/null || die |
7169 |
+ |
7170 |
+ python_doscript scan-view |
7171 |
+ |
7172 |
+ touch __init__.py || die |
7173 |
+ python_moduleinto clang |
7174 |
+ python_domodule __init__.py Reporter.py Resources ScanView.py startfile.py |
7175 |
+ |
7176 |
+ popd >/dev/null || die |
7177 |
+ fi |
7178 |
+ |
7179 |
+ if use python ; then |
7180 |
+ pushd bindings/python/clang >/dev/null || die |
7181 |
+ |
7182 |
+ python_moduleinto clang |
7183 |
+ python_domodule __init__.py cindex.py enumerations.py |
7184 |
+ |
7185 |
+ popd >/dev/null || die |
7186 |
+ fi |
7187 |
+ |
7188 |
+ # AddressSanitizer symbolizer (currently separate) |
7189 |
+ python_doscript "${S}"/projects/compiler-rt/lib/asan/scripts/asan_symbolize.py |
7190 |
+ } |
7191 |
+ python_foreach_impl python_inst |
7192 |
+ fi |
7193 |
+} |
7194 |
|
7195 |
diff --git a/sys-devel/llvm/llvm-3.6.1.ebuild b/sys-devel/llvm/llvm-3.6.1.ebuild |
7196 |
new file mode 100644 |
7197 |
index 0000000..6cc8a46 |
7198 |
--- /dev/null |
7199 |
+++ b/sys-devel/llvm/llvm-3.6.1.ebuild |
7200 |
@@ -0,0 +1,541 @@ |
7201 |
+# Copyright 1999-2015 Gentoo Foundation |
7202 |
+# Distributed under the terms of the GNU General Public License v2 |
7203 |
+# $Id$ |
7204 |
+ |
7205 |
+EAPI=5 |
7206 |
+ |
7207 |
+PYTHON_COMPAT=( python2_7 pypy ) |
7208 |
+ |
7209 |
+inherit eutils flag-o-matic multibuild multilib \ |
7210 |
+ multilib-minimal python-r1 toolchain-funcs pax-utils check-reqs prefix |
7211 |
+ |
7212 |
+DESCRIPTION="Low Level Virtual Machine" |
7213 |
+HOMEPAGE="http://llvm.org/" |
7214 |
+SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.xz |
7215 |
+ clang? ( http://llvm.org/releases/${PV}/compiler-rt-${PV}.src.tar.xz |
7216 |
+ http://llvm.org/releases/${PV}/cfe-${PV}.src.tar.xz |
7217 |
+ http://llvm.org/releases/${PV}/clang-tools-extra-${PV}.src.tar.xz ) |
7218 |
+ !doc? ( https://dev.gentoo.org/~voyageur/distfiles/${P}-manpages.tar.bz2 )" |
7219 |
+ |
7220 |
+LICENSE="UoI-NCSA" |
7221 |
+SLOT="0/3.6" |
7222 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
7223 |
+IUSE="clang debug doc gold libedit +libffi multitarget ncurses ocaml python |
7224 |
+ +static-analyzer test xml video_cards_radeon |
7225 |
+ kernel_Darwin kernel_FreeBSD" |
7226 |
+ |
7227 |
+COMMON_DEPEND=" |
7228 |
+ sys-libs/zlib:0= |
7229 |
+ clang? ( |
7230 |
+ python? ( ${PYTHON_DEPS} ) |
7231 |
+ static-analyzer? ( |
7232 |
+ dev-lang/perl:* |
7233 |
+ ${PYTHON_DEPS} |
7234 |
+ ) |
7235 |
+ xml? ( dev-libs/libxml2:2= ) |
7236 |
+ ) |
7237 |
+ gold? ( >=sys-devel/binutils-2.22:*[cxx] ) |
7238 |
+ libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] ) |
7239 |
+ libffi? ( >=virtual/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] ) |
7240 |
+ ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] ) |
7241 |
+ ocaml? ( |
7242 |
+ dev-lang/ocaml:0= |
7243 |
+ dev-ml/findlib |
7244 |
+ dev-ml/ocaml-ctypes )" |
7245 |
+# configparser-3.2 breaks the build (3.3 or none at all are fine) |
7246 |
+DEPEND="${COMMON_DEPEND} |
7247 |
+ app-arch/xz-utils |
7248 |
+ dev-lang/perl |
7249 |
+ >=sys-devel/make-3.81 |
7250 |
+ >=sys-devel/flex-2.5.4 |
7251 |
+ >=sys-devel/bison-1.875d |
7252 |
+ || ( >=sys-devel/gcc-3.0 >=sys-devel/llvm-3.5 |
7253 |
+ ( >=sys-freebsd/freebsd-lib-9.1-r10 sys-libs/libcxx ) |
7254 |
+ ) |
7255 |
+ || ( >=sys-devel/binutils-2.18 >=sys-devel/binutils-apple-5.1 ) |
7256 |
+ kernel_Darwin? ( sys-libs/libcxx ) |
7257 |
+ clang? ( xml? ( virtual/pkgconfig ) ) |
7258 |
+ doc? ( dev-python/sphinx ) |
7259 |
+ libffi? ( virtual/pkgconfig ) |
7260 |
+ !!<dev-python/configparser-3.3.0.2 |
7261 |
+ ocaml? ( test? ( dev-ml/ounit ) ) |
7262 |
+ ${PYTHON_DEPS}" |
7263 |
+RDEPEND="${COMMON_DEPEND} |
7264 |
+ clang? ( !<=sys-devel/clang-${PV}-r99 |
7265 |
+ !>=sys-devel/clang-9999 ) |
7266 |
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r2 |
7267 |
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )" |
7268 |
+PDEPEND="clang? ( =sys-devel/clang-${PV}-r100 )" |
7269 |
+ |
7270 |
+# pypy gives me around 1700 unresolved tests due to open file limit |
7271 |
+# being exceeded. probably GC does not close them fast enough. |
7272 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE} |
7273 |
+ test? ( || ( $(python_gen_useflags 'python*') ) )" |
7274 |
+ |
7275 |
+S=${WORKDIR}/${P/_}.src |
7276 |
+ |
7277 |
+# Some people actually override that in make.conf. That sucks since |
7278 |
+# we need to run install per-directory, and ninja can't do that... |
7279 |
+# so why did it call itself ninja in the first place? |
7280 |
+CMAKE_MAKEFILE_GENERATOR=emake |
7281 |
+ |
7282 |
+pkg_pretend() { |
7283 |
+ # in megs |
7284 |
+ # !clang !debug !multitarget -O2 400 |
7285 |
+ # !clang !debug multitarget -O2 550 |
7286 |
+ # clang !debug !multitarget -O2 950 |
7287 |
+ # clang !debug multitarget -O2 1200 |
7288 |
+ # !clang debug multitarget -O2 5G |
7289 |
+ # clang !debug multitarget -O0 -g 12G |
7290 |
+ # clang debug multitarget -O2 16G |
7291 |
+ # clang debug multitarget -O0 -g 14G |
7292 |
+ |
7293 |
+ local build_size=550 |
7294 |
+ use clang && build_size=1200 |
7295 |
+ |
7296 |
+ if use debug; then |
7297 |
+ ewarn "USE=debug is known to increase the size of package considerably" |
7298 |
+ ewarn "and cause the tests to fail." |
7299 |
+ ewarn |
7300 |
+ |
7301 |
+ (( build_size *= 14 )) |
7302 |
+ elif is-flagq '-g?(gdb)?([1-9])'; then |
7303 |
+ ewarn "The C++ compiler -g option is known to increase the size of the package" |
7304 |
+ ewarn "considerably. If you run out of space, please consider removing it." |
7305 |
+ ewarn |
7306 |
+ |
7307 |
+ (( build_size *= 10 )) |
7308 |
+ fi |
7309 |
+ |
7310 |
+ # Multiply by number of ABIs :). |
7311 |
+ local abis=( $(multilib_get_enabled_abis) ) |
7312 |
+ (( build_size *= ${#abis[@]} )) |
7313 |
+ |
7314 |
+ local CHECKREQS_DISK_BUILD=${build_size}M |
7315 |
+ check-reqs_pkg_pretend |
7316 |
+ |
7317 |
+ if [[ ${MERGE_TYPE} != binary ]]; then |
7318 |
+ echo 'int main() {return 0;}' > "${T}"/test.cxx || die |
7319 |
+ ebegin "Trying to build a C++11 test program" |
7320 |
+ if ! $(tc-getCXX) -std=c++11 -o /dev/null "${T}"/test.cxx; then |
7321 |
+ eerror "LLVM-${PV} requires C++11-capable C++ compiler. Your current compiler" |
7322 |
+ eerror "does not seem to support -std=c++11 option. Please upgrade your compiler" |
7323 |
+ eerror "to gcc-4.7 or an equivalent version supporting C++11." |
7324 |
+ die "Currently active compiler does not support -std=c++11" |
7325 |
+ fi |
7326 |
+ eend ${?} |
7327 |
+ fi |
7328 |
+} |
7329 |
+ |
7330 |
+pkg_setup() { |
7331 |
+ pkg_pretend |
7332 |
+} |
7333 |
+ |
7334 |
+src_unpack() { |
7335 |
+ default |
7336 |
+ |
7337 |
+ rm -f "${S}"/tools/clang "${S}"/projects/compiler-rt \ |
7338 |
+ || die "symlinks removal failed" |
7339 |
+ |
7340 |
+ if use clang; then |
7341 |
+ mv "${WORKDIR}"/cfe-${PV/_}.src "${S}"/tools/clang \ |
7342 |
+ || die "clang source directory move failed" |
7343 |
+ mv "${WORKDIR}"/compiler-rt-${PV/_}.src "${S}"/projects/compiler-rt \ |
7344 |
+ || die "compiler-rt source directory move failed" |
7345 |
+ mv "${WORKDIR}"/clang-tools-extra-${PV/_}.src "${S}"/tools/clang/tools/extra \ |
7346 |
+ || die "clang-tools-extra source directory move failed" |
7347 |
+ fi |
7348 |
+} |
7349 |
+ |
7350 |
+src_prepare() { |
7351 |
+ epatch "${FILESDIR}"/${PN}-3.2-nodoctargz.patch |
7352 |
+ epatch "${FILESDIR}"/${PN}-3.5-gcc-4.9.patch |
7353 |
+ epatch "${FILESDIR}"/${PN}-3.6-gentoo-install.patch |
7354 |
+ epatch "${FILESDIR}"/${PN}-3.6.0-ocaml-ctypes-0.4.0.patch |
7355 |
+ # Make ocaml warnings non-fatal, bug #537308 |
7356 |
+ sed -e "/RUN/s/-warn-error A//" -i test/Bindings/OCaml/*ml || die |
7357 |
+ |
7358 |
+ if use clang; then |
7359 |
+ # Automatically select active system GCC's libraries, bugs #406163 and #417913 |
7360 |
+ epatch "${FILESDIR}"/clang-3.5-gentoo-runtime-gcc-detection-v3.patch |
7361 |
+ |
7362 |
+ epatch "${FILESDIR}"/clang-3.6-gentoo-install.patch |
7363 |
+ epatch "${FILESDIR}"/clang-3.4-darwin_prefix-include-paths.patch |
7364 |
+ eprefixify tools/clang/lib/Frontend/InitHeaderSearch.cpp |
7365 |
+ |
7366 |
+ # Fix build fails with using gcc-4.9 on Gentoo/FreeBSD, bug #548444 |
7367 |
+ epatch "${FILESDIR}"/clang-3.6-fbsd-gcc49.patch |
7368 |
+ fi |
7369 |
+ |
7370 |
+ if use prefix && use clang; then |
7371 |
+ sed -i -e "/^CFLAGS /s@-Werror@-I${EPREFIX}/usr/include@" \ |
7372 |
+ projects/compiler-rt/make/platform/clang_*.mk || die |
7373 |
+ fi |
7374 |
+ |
7375 |
+ local sub_files=( |
7376 |
+ Makefile.config.in |
7377 |
+ Makefile.rules |
7378 |
+ tools/llvm-config/llvm-config.cpp |
7379 |
+ ) |
7380 |
+ use clang && sub_files+=( |
7381 |
+ tools/clang/lib/Driver/Tools.cpp |
7382 |
+ tools/clang/tools/scan-build/scan-build |
7383 |
+ ) |
7384 |
+ |
7385 |
+ # unfortunately ./configure won't listen to --mandir and the-like, so take |
7386 |
+ # care of this. |
7387 |
+ # note: we're setting the main libdir intentionally. |
7388 |
+ # where per-ABI is appropriate, we use $(GENTOO_LIBDIR) make. |
7389 |
+ einfo "Fixing install dirs" |
7390 |
+ sed -e "s,@libdir@,$(get_libdir),g" \ |
7391 |
+ -e "s,@PF@,${PF},g" \ |
7392 |
+ -e "s,@EPREFIX@,${EPREFIX},g" \ |
7393 |
+ -i "${sub_files[@]}" \ |
7394 |
+ || die "install paths sed failed" |
7395 |
+ |
7396 |
+ if use clang; then |
7397 |
+ # constantly fails for a long time, likely due to our patches |
7398 |
+ rm tools/clang/test/Driver/cross-linux.c || die |
7399 |
+ fi |
7400 |
+ |
7401 |
+ # User patches |
7402 |
+ epatch_user |
7403 |
+ |
7404 |
+ python_setup |
7405 |
+} |
7406 |
+ |
7407 |
+multilib_src_configure() { |
7408 |
+ # disable timestamps since they confuse ccache |
7409 |
+ local conf_flags=( |
7410 |
+ --disable-timestamps |
7411 |
+ --enable-keep-symbols |
7412 |
+ --enable-shared |
7413 |
+ --with-optimize-option= |
7414 |
+ $(tc-is-static-only && echo --disable-shared) |
7415 |
+ $(use_enable !debug optimized) |
7416 |
+ $(use_enable debug assertions) |
7417 |
+ $(use_enable debug expensive-checks) |
7418 |
+ $(use_enable libedit) |
7419 |
+ $(use_enable ncurses terminfo) |
7420 |
+ $(use_enable libffi) |
7421 |
+ ) |
7422 |
+ |
7423 |
+ # well, it's used only by clang executable c-index-test |
7424 |
+ if multilib_is_native_abi && use clang && use xml; then |
7425 |
+ conf_flags+=( XML2CONFIG="$(tc-getPKG_CONFIG) libxml-2.0" ) |
7426 |
+ else |
7427 |
+ conf_flags+=( ac_cv_prog_XML2CONFIG="" ) |
7428 |
+ fi |
7429 |
+ |
7430 |
+ local targets bindings |
7431 |
+ if use multitarget; then |
7432 |
+ targets='all' |
7433 |
+ else |
7434 |
+ targets='host,cpp' |
7435 |
+ use video_cards_radeon && targets+=',r600' |
7436 |
+ fi |
7437 |
+ conf_flags+=( --enable-targets=${targets} ) |
7438 |
+ |
7439 |
+ if multilib_is_native_abi; then |
7440 |
+ use gold && conf_flags+=( --with-binutils-include="${EPREFIX}"/usr/include/ ) |
7441 |
+ # extra commas don't hurt |
7442 |
+ use ocaml && bindings+=',ocaml' |
7443 |
+ fi |
7444 |
+ |
7445 |
+ [[ ${bindings} ]] || bindings='none' |
7446 |
+ conf_flags+=( --enable-bindings=${bindings} ) |
7447 |
+ |
7448 |
+ if use libffi; then |
7449 |
+ local CPPFLAGS=${CPPFLAGS} |
7450 |
+ append-cppflags "$(pkg-config --cflags libffi)" |
7451 |
+ fi |
7452 |
+ |
7453 |
+ # Enable large file support, bug #550708 |
7454 |
+ append-lfs-flags |
7455 |
+ # llvm prefers clang over gcc, so we may need to force that |
7456 |
+ tc-export CC CXX |
7457 |
+ |
7458 |
+ ECONF_SOURCE=${S} \ |
7459 |
+ econf "${conf_flags[@]}" |
7460 |
+} |
7461 |
+ |
7462 |
+set_makeargs() { |
7463 |
+ MAKEARGS=( |
7464 |
+ VERBOSE=1 |
7465 |
+ REQUIRES_RTTI=1 |
7466 |
+ GENTOO_LIBDIR=$(get_libdir) |
7467 |
+ ) |
7468 |
+ |
7469 |
+ # for tests, we want it all! otherwise, we may use a little filtering... |
7470 |
+ # adding ONLY_TOOLS also disables unittest building... |
7471 |
+ if [[ ${EBUILD_PHASE_FUNC} != src_test ]]; then |
7472 |
+ local tools=( llvm-config ) |
7473 |
+ use clang && tools+=( clang ) |
7474 |
+ |
7475 |
+ if multilib_is_native_abi; then |
7476 |
+ tools+=( |
7477 |
+ opt llvm-as llvm-dis llc llvm-ar llvm-nm llvm-link lli |
7478 |
+ llvm-extract llvm-mc llvm-bcanalyzer llvm-diff macho-dump |
7479 |
+ llvm-objdump llvm-readobj llvm-rtdyld llvm-dwarfdump llvm-cov |
7480 |
+ llvm-size llvm-stress llvm-mcmarkup llvm-profdata |
7481 |
+ llvm-symbolizer obj2yaml yaml2obj lto bugpoint |
7482 |
+ ) |
7483 |
+ |
7484 |
+ # the build system runs explicitly specified tools in parallel, |
7485 |
+ # so we need to split it into two runs |
7486 |
+ if [[ ${1} != -1 ]]; then |
7487 |
+ # those require lto |
7488 |
+ tools+=( llvm-lto ) |
7489 |
+ use gold && tools+=( gold ) |
7490 |
+ |
7491 |
+ # those require clang :) |
7492 |
+ # we need to explicitly specify all its tools |
7493 |
+ # since we're passing BUILD_CLANG_ONLY |
7494 |
+ use clang && tools+=( |
7495 |
+ clang/tools/{clang-check,clang-format,extra} |
7496 |
+ ) |
7497 |
+ fi |
7498 |
+ fi |
7499 |
+ |
7500 |
+ MAKEARGS+=( |
7501 |
+ # filter tools + disable unittests implicitly |
7502 |
+ ONLY_TOOLS="${tools[*]}" |
7503 |
+ |
7504 |
+ # this disables unittests & docs from clang |
7505 |
+ BUILD_CLANG_ONLY=YES |
7506 |
+ ) |
7507 |
+ fi |
7508 |
+} |
7509 |
+ |
7510 |
+multilib_src_compile() { |
7511 |
+ local MAKEARGS |
7512 |
+ set_makeargs -1 |
7513 |
+ emake "${MAKEARGS[@]}" |
7514 |
+ |
7515 |
+ if multilib_is_native_abi; then |
7516 |
+ set_makeargs |
7517 |
+ emake -C tools "${MAKEARGS[@]}" |
7518 |
+ |
7519 |
+ if use doc; then |
7520 |
+ emake -C "${S}"/docs -f Makefile.sphinx man |
7521 |
+ use clang && emake -C "${S}"/tools/clang/docs/tools \ |
7522 |
+ BUILD_FOR_WEBSITE=1 DST_MAN_DIR="${T}"/ man |
7523 |
+ emake -C "${S}"/docs -f Makefile.sphinx html |
7524 |
+ fi |
7525 |
+ fi |
7526 |
+ |
7527 |
+ if use debug; then |
7528 |
+ pax-mark m Debug+Asserts+Checks/bin/llvm-rtdyld |
7529 |
+ pax-mark m Debug+Asserts+Checks/bin/lli |
7530 |
+ pax-mark m Debug+Asserts+Checks/bin/lli-child-target |
7531 |
+ else |
7532 |
+ pax-mark m Release/bin/llvm-rtdyld |
7533 |
+ pax-mark m Release/bin/lli |
7534 |
+ pax-mark m Release/bin/lli-child-target |
7535 |
+ fi |
7536 |
+} |
7537 |
+ |
7538 |
+multilib_src_test() { |
7539 |
+ local MAKEARGS |
7540 |
+ set_makeargs |
7541 |
+ |
7542 |
+ # build the remaining tools & unittests |
7543 |
+ emake "${MAKEARGS[@]}" |
7544 |
+ |
7545 |
+ pax-mark m unittests/ExecutionEngine/JIT/Release/JITTests |
7546 |
+ pax-mark m unittests/ExecutionEngine/MCJIT/Release/MCJITTests |
7547 |
+ pax-mark m unittests/Support/Release/SupportTests |
7548 |
+ |
7549 |
+ # respect TMPDIR! |
7550 |
+ local -x LIT_PRESERVES_TMP=1 |
7551 |
+ emake "${MAKEARGS[@]}" check |
7552 |
+ use clang && emake "${MAKEARGS[@]}" -C tools/clang test |
7553 |
+} |
7554 |
+ |
7555 |
+src_install() { |
7556 |
+ local MULTILIB_CHOST_TOOLS=( |
7557 |
+ /usr/bin/llvm-config |
7558 |
+ ) |
7559 |
+ |
7560 |
+ local MULTILIB_WRAPPED_HEADERS=( |
7561 |
+ /usr/include/llvm/Config/config.h |
7562 |
+ /usr/include/llvm/Config/llvm-config.h |
7563 |
+ ) |
7564 |
+ |
7565 |
+ if use clang; then |
7566 |
+ # note: magic applied below |
7567 |
+ MULTILIB_CHOST_TOOLS+=( |
7568 |
+ /usr/bin/clang |
7569 |
+ /usr/bin/clang++ |
7570 |
+ /usr/bin/clang-${PV} |
7571 |
+ /usr/bin/clang++-${PV} |
7572 |
+ ) |
7573 |
+ |
7574 |
+ MULTILIB_WRAPPED_HEADERS+=( |
7575 |
+ /usr/include/clang/Config/config.h |
7576 |
+ ) |
7577 |
+ fi |
7578 |
+ |
7579 |
+ multilib-minimal_src_install |
7580 |
+ |
7581 |
+ # Remove unnecessary headers on FreeBSD, bug #417171 |
7582 |
+ use kernel_FreeBSD && use clang && rm "${ED}"usr/lib/clang/${PV}/include/{std,float,iso,limits,tgmath,varargs}*.h |
7583 |
+} |
7584 |
+ |
7585 |
+multilib_src_install() { |
7586 |
+ local MAKEARGS |
7587 |
+ set_makeargs |
7588 |
+ |
7589 |
+ local root=${D}/_${ABI} |
7590 |
+ |
7591 |
+ emake "${MAKEARGS[@]}" DESTDIR="${root}" install |
7592 |
+ multibuild_merge_root "${root}" "${D}" |
7593 |
+ |
7594 |
+ if ! multilib_is_native_abi; then |
7595 |
+ # Backwards compat, will be happily removed someday. |
7596 |
+ dosym "${CHOST}"-llvm-config /usr/bin/llvm-config.${ABI} |
7597 |
+ else |
7598 |
+ # Install docs. |
7599 |
+ if use doc; then |
7600 |
+ doman "${S}"/docs/_build/man/*.1 |
7601 |
+ use clang && doman "${T}"/clang.1 |
7602 |
+ dohtml -r "${S}"/docs/_build/html/ |
7603 |
+ else |
7604 |
+ if ! use clang; then |
7605 |
+ rm "${WORKDIR}"/${P}-manpages/clang.1 || die |
7606 |
+ fi |
7607 |
+ doman "${WORKDIR}"/${P}-manpages/*.1 |
7608 |
+ fi |
7609 |
+ |
7610 |
+ # Symlink the gold plugin. |
7611 |
+ if use gold; then |
7612 |
+ dodir /usr/${CHOST}/binutils-bin/lib/bfd-plugins |
7613 |
+ dosym ../../../../$(get_libdir)/LLVMgold.so \ |
7614 |
+ /usr/${CHOST}/binutils-bin/lib/bfd-plugins/LLVMgold.so |
7615 |
+ fi |
7616 |
+ fi |
7617 |
+ |
7618 |
+ # apply CHOST and PV to clang executables |
7619 |
+ # they're statically linked so we don't have to worry about the lib |
7620 |
+ if use clang; then |
7621 |
+ local clang_tools=( clang clang++ ) |
7622 |
+ local i |
7623 |
+ |
7624 |
+ # append ${PV} and symlink back |
7625 |
+ # TODO: use alternatives.eclass? does that make any sense? |
7626 |
+ # maybe with USE=-clang on :0 and USE=clang on older |
7627 |
+ for i in "${clang_tools[@]}"; do |
7628 |
+ mv "${ED%/}/usr/bin/${i}"{,-${PV}} || die |
7629 |
+ dosym "${i}"-${PV} /usr/bin/${i} |
7630 |
+ done |
7631 |
+ |
7632 |
+ # now prepend ${CHOST} and let the multilib-build.eclass symlink it |
7633 |
+ if ! multilib_is_native_abi; then |
7634 |
+ # non-native? let's replace it with a simple wrapper |
7635 |
+ for i in "${clang_tools[@]}"; do |
7636 |
+ rm "${ED%/}/usr/bin/${i}-${PV}" || die |
7637 |
+ cat > "${T}"/wrapper.tmp <<-_EOF_ |
7638 |
+ #!${EPREFIX}/bin/sh |
7639 |
+ exec "${i}-${PV}" $(get_abi_CFLAGS) "\${@}" |
7640 |
+ _EOF_ |
7641 |
+ newbin "${T}"/wrapper.tmp "${i}-${PV}" |
7642 |
+ done |
7643 |
+ fi |
7644 |
+ fi |
7645 |
+ |
7646 |
+ # Fix install_names on Darwin. The build system is too complicated |
7647 |
+ # to just fix this, so we correct it post-install |
7648 |
+ local lib= f= odylib= ndylib= libpv=${PV} |
7649 |
+ if [[ ${CHOST} == *-darwin* ]] ; then |
7650 |
+ eval $(grep PACKAGE_VERSION= configure) |
7651 |
+ [[ -n ${PACKAGE_VERSION} ]] && libpv=${PACKAGE_VERSION} |
7652 |
+ libpvminor=${libpv%.[0-9]*} |
7653 |
+ for lib in lib{EnhancedDisassembly,LLVM-${libpv},LTO,profile_rt,clang}.dylib LLVMHello.dylib clang/${libpv}/lib/darwin/libclang_rt.asan_{osx,iossim}_dynamic.dylib; do |
7654 |
+ # libEnhancedDisassembly is Darwin10 only, so non-fatal |
7655 |
+ # + omit clang libs if not enabled |
7656 |
+ [[ -f ${ED}/usr/lib/${lib} ]] || continue |
7657 |
+ |
7658 |
+ ebegin "fixing install_name of $lib" |
7659 |
+ install_name_tool \ |
7660 |
+ -id "${EPREFIX}"/usr/lib/${lib} \ |
7661 |
+ "${ED}"/usr/lib/${lib} |
7662 |
+ eend $? |
7663 |
+ done |
7664 |
+ for f in "${ED}"/usr/bin/* "${ED}"/usr/lib/lib*.dylib "${ED}"/usr/lib/clang/${libpv}/lib/darwin/*.dylib ; do |
7665 |
+ # omit clang libs if not enabled |
7666 |
+ [[ -f "${f}" ]] || continue |
7667 |
+ |
7668 |
+ scanmacho -BF'%n#f' "${f}" | tr ',' '\n' | \ |
7669 |
+ while read odylib ; do |
7670 |
+ ndylib= |
7671 |
+ case ${odylib} in |
7672 |
+ */libclang.dylib) |
7673 |
+ ndylib="${EPREFIX}"/usr/lib/libclang.dylib |
7674 |
+ ;; |
7675 |
+ */libLLVM-${libpv}.dylib) |
7676 |
+ ndylib="${EPREFIX}"/usr/lib/libLLVM-${libpv}.dylib |
7677 |
+ ;; |
7678 |
+ */libLLVM-${libpvminor}.dylib) |
7679 |
+ ndylib="${EPREFIX}"/usr/lib/libLLVM-${libpvminor}.dylib |
7680 |
+ ;; |
7681 |
+ */libLTO.dylib) |
7682 |
+ ndylib="${EPREFIX}"/usr/lib/libLTO.dylib |
7683 |
+ ;; |
7684 |
+ esac |
7685 |
+ if [[ -n ${ndylib} ]] ; then |
7686 |
+ ebegin "fixing install_name reference to ${odylib} of ${f##*/}" |
7687 |
+ install_name_tool \ |
7688 |
+ -change "${odylib}" "${ndylib}" \ |
7689 |
+ "${f}" |
7690 |
+ eend $? |
7691 |
+ fi |
7692 |
+ done |
7693 |
+ done |
7694 |
+ fi |
7695 |
+} |
7696 |
+ |
7697 |
+multilib_src_install_all() { |
7698 |
+ insinto /usr/share/vim/vimfiles/syntax |
7699 |
+ doins utils/vim/*.vim |
7700 |
+ |
7701 |
+ if use clang; then |
7702 |
+ cd tools/clang || die |
7703 |
+ |
7704 |
+ if use static-analyzer ; then |
7705 |
+ dobin tools/scan-build/ccc-analyzer |
7706 |
+ dosym ccc-analyzer /usr/bin/c++-analyzer |
7707 |
+ dobin tools/scan-build/scan-build |
7708 |
+ |
7709 |
+ insinto /usr/share/${PN} |
7710 |
+ doins tools/scan-build/scanview.css |
7711 |
+ doins tools/scan-build/sorttable.js |
7712 |
+ fi |
7713 |
+ |
7714 |
+ python_inst() { |
7715 |
+ if use static-analyzer ; then |
7716 |
+ pushd tools/scan-view >/dev/null || die |
7717 |
+ |
7718 |
+ python_doscript scan-view |
7719 |
+ |
7720 |
+ touch __init__.py || die |
7721 |
+ python_moduleinto clang |
7722 |
+ python_domodule __init__.py Reporter.py Resources ScanView.py startfile.py |
7723 |
+ |
7724 |
+ popd >/dev/null || die |
7725 |
+ fi |
7726 |
+ |
7727 |
+ if use python ; then |
7728 |
+ pushd bindings/python/clang >/dev/null || die |
7729 |
+ |
7730 |
+ python_moduleinto clang |
7731 |
+ python_domodule __init__.py cindex.py enumerations.py |
7732 |
+ |
7733 |
+ popd >/dev/null || die |
7734 |
+ fi |
7735 |
+ |
7736 |
+ # AddressSanitizer symbolizer (currently separate) |
7737 |
+ python_doscript "${S}"/projects/compiler-rt/lib/asan/scripts/asan_symbolize.py |
7738 |
+ } |
7739 |
+ python_foreach_impl python_inst |
7740 |
+ fi |
7741 |
+} |
7742 |
|
7743 |
diff --git a/sys-devel/llvm/llvm-3.6.2.ebuild b/sys-devel/llvm/llvm-3.6.2.ebuild |
7744 |
new file mode 100644 |
7745 |
index 0000000..2e7bc9a |
7746 |
--- /dev/null |
7747 |
+++ b/sys-devel/llvm/llvm-3.6.2.ebuild |
7748 |
@@ -0,0 +1,541 @@ |
7749 |
+# Copyright 1999-2015 Gentoo Foundation |
7750 |
+# Distributed under the terms of the GNU General Public License v2 |
7751 |
+# $Id$ |
7752 |
+ |
7753 |
+EAPI=5 |
7754 |
+ |
7755 |
+PYTHON_COMPAT=( python2_7 pypy ) |
7756 |
+ |
7757 |
+inherit eutils flag-o-matic multibuild multilib \ |
7758 |
+ multilib-minimal python-r1 toolchain-funcs pax-utils check-reqs prefix |
7759 |
+ |
7760 |
+DESCRIPTION="Low Level Virtual Machine" |
7761 |
+HOMEPAGE="http://llvm.org/" |
7762 |
+SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.xz |
7763 |
+ clang? ( http://llvm.org/releases/${PV}/compiler-rt-${PV}.src.tar.xz |
7764 |
+ http://llvm.org/releases/${PV}/cfe-${PV}.src.tar.xz |
7765 |
+ http://llvm.org/releases/${PV}/clang-tools-extra-${PV}.src.tar.xz ) |
7766 |
+ !doc? ( https://dev.gentoo.org/~voyageur/distfiles/${PN}-3.6.1-manpages.tar.bz2 )" |
7767 |
+ |
7768 |
+LICENSE="UoI-NCSA" |
7769 |
+SLOT="0/3.6" |
7770 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
7771 |
+IUSE="clang debug doc gold libedit +libffi multitarget ncurses ocaml python |
7772 |
+ +static-analyzer test xml video_cards_radeon |
7773 |
+ kernel_Darwin kernel_FreeBSD" |
7774 |
+ |
7775 |
+COMMON_DEPEND=" |
7776 |
+ sys-libs/zlib:0= |
7777 |
+ clang? ( |
7778 |
+ python? ( ${PYTHON_DEPS} ) |
7779 |
+ static-analyzer? ( |
7780 |
+ dev-lang/perl:* |
7781 |
+ ${PYTHON_DEPS} |
7782 |
+ ) |
7783 |
+ xml? ( dev-libs/libxml2:2= ) |
7784 |
+ ) |
7785 |
+ gold? ( >=sys-devel/binutils-2.22:*[cxx] ) |
7786 |
+ libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] ) |
7787 |
+ libffi? ( >=virtual/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] ) |
7788 |
+ ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] ) |
7789 |
+ ocaml? ( |
7790 |
+ dev-lang/ocaml:0= |
7791 |
+ dev-ml/findlib |
7792 |
+ dev-ml/ocaml-ctypes )" |
7793 |
+# configparser-3.2 breaks the build (3.3 or none at all are fine) |
7794 |
+DEPEND="${COMMON_DEPEND} |
7795 |
+ app-arch/xz-utils |
7796 |
+ dev-lang/perl |
7797 |
+ >=sys-devel/make-3.81 |
7798 |
+ >=sys-devel/flex-2.5.4 |
7799 |
+ >=sys-devel/bison-1.875d |
7800 |
+ || ( >=sys-devel/gcc-3.0 >=sys-devel/llvm-3.5 |
7801 |
+ ( >=sys-freebsd/freebsd-lib-9.1-r10 sys-libs/libcxx ) |
7802 |
+ ) |
7803 |
+ || ( >=sys-devel/binutils-2.18 >=sys-devel/binutils-apple-5.1 ) |
7804 |
+ kernel_Darwin? ( sys-libs/libcxx ) |
7805 |
+ clang? ( xml? ( virtual/pkgconfig ) ) |
7806 |
+ doc? ( dev-python/sphinx ) |
7807 |
+ libffi? ( virtual/pkgconfig ) |
7808 |
+ !!<dev-python/configparser-3.3.0.2 |
7809 |
+ ocaml? ( test? ( dev-ml/ounit ) ) |
7810 |
+ ${PYTHON_DEPS}" |
7811 |
+RDEPEND="${COMMON_DEPEND} |
7812 |
+ clang? ( !<=sys-devel/clang-${PV}-r99 |
7813 |
+ !>=sys-devel/clang-9999 ) |
7814 |
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r2 |
7815 |
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )" |
7816 |
+PDEPEND="clang? ( =sys-devel/clang-${PV}-r100 )" |
7817 |
+ |
7818 |
+# pypy gives me around 1700 unresolved tests due to open file limit |
7819 |
+# being exceeded. probably GC does not close them fast enough. |
7820 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE} |
7821 |
+ test? ( || ( $(python_gen_useflags 'python*') ) )" |
7822 |
+ |
7823 |
+S=${WORKDIR}/${P/_}.src |
7824 |
+ |
7825 |
+# Some people actually override that in make.conf. That sucks since |
7826 |
+# we need to run install per-directory, and ninja can't do that... |
7827 |
+# so why did it call itself ninja in the first place? |
7828 |
+CMAKE_MAKEFILE_GENERATOR=emake |
7829 |
+ |
7830 |
+pkg_pretend() { |
7831 |
+ # in megs |
7832 |
+ # !clang !debug !multitarget -O2 400 |
7833 |
+ # !clang !debug multitarget -O2 550 |
7834 |
+ # clang !debug !multitarget -O2 950 |
7835 |
+ # clang !debug multitarget -O2 1200 |
7836 |
+ # !clang debug multitarget -O2 5G |
7837 |
+ # clang !debug multitarget -O0 -g 12G |
7838 |
+ # clang debug multitarget -O2 16G |
7839 |
+ # clang debug multitarget -O0 -g 14G |
7840 |
+ |
7841 |
+ local build_size=550 |
7842 |
+ use clang && build_size=1200 |
7843 |
+ |
7844 |
+ if use debug; then |
7845 |
+ ewarn "USE=debug is known to increase the size of package considerably" |
7846 |
+ ewarn "and cause the tests to fail." |
7847 |
+ ewarn |
7848 |
+ |
7849 |
+ (( build_size *= 14 )) |
7850 |
+ elif is-flagq '-g?(gdb)?([1-9])'; then |
7851 |
+ ewarn "The C++ compiler -g option is known to increase the size of the package" |
7852 |
+ ewarn "considerably. If you run out of space, please consider removing it." |
7853 |
+ ewarn |
7854 |
+ |
7855 |
+ (( build_size *= 10 )) |
7856 |
+ fi |
7857 |
+ |
7858 |
+ # Multiply by number of ABIs :). |
7859 |
+ local abis=( $(multilib_get_enabled_abis) ) |
7860 |
+ (( build_size *= ${#abis[@]} )) |
7861 |
+ |
7862 |
+ local CHECKREQS_DISK_BUILD=${build_size}M |
7863 |
+ check-reqs_pkg_pretend |
7864 |
+ |
7865 |
+ if [[ ${MERGE_TYPE} != binary ]]; then |
7866 |
+ echo 'int main() {return 0;}' > "${T}"/test.cxx || die |
7867 |
+ ebegin "Trying to build a C++11 test program" |
7868 |
+ if ! $(tc-getCXX) -std=c++11 -o /dev/null "${T}"/test.cxx; then |
7869 |
+ eerror "LLVM-${PV} requires C++11-capable C++ compiler. Your current compiler" |
7870 |
+ eerror "does not seem to support -std=c++11 option. Please upgrade your compiler" |
7871 |
+ eerror "to gcc-4.7 or an equivalent version supporting C++11." |
7872 |
+ die "Currently active compiler does not support -std=c++11" |
7873 |
+ fi |
7874 |
+ eend ${?} |
7875 |
+ fi |
7876 |
+} |
7877 |
+ |
7878 |
+pkg_setup() { |
7879 |
+ pkg_pretend |
7880 |
+} |
7881 |
+ |
7882 |
+src_unpack() { |
7883 |
+ default |
7884 |
+ |
7885 |
+ rm -f "${S}"/tools/clang "${S}"/projects/compiler-rt \ |
7886 |
+ || die "symlinks removal failed" |
7887 |
+ |
7888 |
+ if use clang; then |
7889 |
+ mv "${WORKDIR}"/cfe-${PV/_}.src "${S}"/tools/clang \ |
7890 |
+ || die "clang source directory move failed" |
7891 |
+ mv "${WORKDIR}"/compiler-rt-${PV/_}.src "${S}"/projects/compiler-rt \ |
7892 |
+ || die "compiler-rt source directory move failed" |
7893 |
+ mv "${WORKDIR}"/clang-tools-extra-${PV/_}.src "${S}"/tools/clang/tools/extra \ |
7894 |
+ || die "clang-tools-extra source directory move failed" |
7895 |
+ fi |
7896 |
+} |
7897 |
+ |
7898 |
+src_prepare() { |
7899 |
+ epatch "${FILESDIR}"/${PN}-3.2-nodoctargz.patch |
7900 |
+ epatch "${FILESDIR}"/${PN}-3.5-gcc-4.9.patch |
7901 |
+ epatch "${FILESDIR}"/${PN}-3.6-gentoo-install.patch |
7902 |
+ epatch "${FILESDIR}"/${PN}-3.6.0-ocaml-ctypes-0.4.0.patch |
7903 |
+ # Make ocaml warnings non-fatal, bug #537308 |
7904 |
+ sed -e "/RUN/s/-warn-error A//" -i test/Bindings/OCaml/*ml || die |
7905 |
+ |
7906 |
+ if use clang; then |
7907 |
+ # Automatically select active system GCC's libraries, bugs #406163 and #417913 |
7908 |
+ epatch "${FILESDIR}"/clang-3.5-gentoo-runtime-gcc-detection-v3.patch |
7909 |
+ |
7910 |
+ epatch "${FILESDIR}"/clang-3.6-gentoo-install.patch |
7911 |
+ epatch "${FILESDIR}"/clang-3.4-darwin_prefix-include-paths.patch |
7912 |
+ eprefixify tools/clang/lib/Frontend/InitHeaderSearch.cpp |
7913 |
+ |
7914 |
+ # Fix build fails with using gcc-4.9 on Gentoo/FreeBSD, bug #548444 |
7915 |
+ epatch "${FILESDIR}"/clang-3.6-fbsd-gcc49.patch |
7916 |
+ fi |
7917 |
+ |
7918 |
+ if use prefix && use clang; then |
7919 |
+ sed -i -e "/^CFLAGS /s@-Werror@-I${EPREFIX}/usr/include@" \ |
7920 |
+ projects/compiler-rt/make/platform/clang_*.mk || die |
7921 |
+ fi |
7922 |
+ |
7923 |
+ local sub_files=( |
7924 |
+ Makefile.config.in |
7925 |
+ Makefile.rules |
7926 |
+ tools/llvm-config/llvm-config.cpp |
7927 |
+ ) |
7928 |
+ use clang && sub_files+=( |
7929 |
+ tools/clang/lib/Driver/Tools.cpp |
7930 |
+ tools/clang/tools/scan-build/scan-build |
7931 |
+ ) |
7932 |
+ |
7933 |
+ # unfortunately ./configure won't listen to --mandir and the-like, so take |
7934 |
+ # care of this. |
7935 |
+ # note: we're setting the main libdir intentionally. |
7936 |
+ # where per-ABI is appropriate, we use $(GENTOO_LIBDIR) make. |
7937 |
+ einfo "Fixing install dirs" |
7938 |
+ sed -e "s,@libdir@,$(get_libdir),g" \ |
7939 |
+ -e "s,@PF@,${PF},g" \ |
7940 |
+ -e "s,@EPREFIX@,${EPREFIX},g" \ |
7941 |
+ -i "${sub_files[@]}" \ |
7942 |
+ || die "install paths sed failed" |
7943 |
+ |
7944 |
+ if use clang; then |
7945 |
+ # constantly fails for a long time, likely due to our patches |
7946 |
+ rm tools/clang/test/Driver/cross-linux.c || die |
7947 |
+ fi |
7948 |
+ |
7949 |
+ # User patches |
7950 |
+ epatch_user |
7951 |
+ |
7952 |
+ python_setup |
7953 |
+} |
7954 |
+ |
7955 |
+multilib_src_configure() { |
7956 |
+ # disable timestamps since they confuse ccache |
7957 |
+ local conf_flags=( |
7958 |
+ --disable-timestamps |
7959 |
+ --enable-keep-symbols |
7960 |
+ --enable-shared |
7961 |
+ --with-optimize-option= |
7962 |
+ $(tc-is-static-only && echo --disable-shared) |
7963 |
+ $(use_enable !debug optimized) |
7964 |
+ $(use_enable debug assertions) |
7965 |
+ $(use_enable debug expensive-checks) |
7966 |
+ $(use_enable libedit) |
7967 |
+ $(use_enable ncurses terminfo) |
7968 |
+ $(use_enable libffi) |
7969 |
+ ) |
7970 |
+ |
7971 |
+ # well, it's used only by clang executable c-index-test |
7972 |
+ if multilib_is_native_abi && use clang && use xml; then |
7973 |
+ conf_flags+=( XML2CONFIG="$(tc-getPKG_CONFIG) libxml-2.0" ) |
7974 |
+ else |
7975 |
+ conf_flags+=( ac_cv_prog_XML2CONFIG="" ) |
7976 |
+ fi |
7977 |
+ |
7978 |
+ local targets bindings |
7979 |
+ if use multitarget; then |
7980 |
+ targets='all' |
7981 |
+ else |
7982 |
+ targets='host,cpp' |
7983 |
+ use video_cards_radeon && targets+=',r600' |
7984 |
+ fi |
7985 |
+ conf_flags+=( --enable-targets=${targets} ) |
7986 |
+ |
7987 |
+ if multilib_is_native_abi; then |
7988 |
+ use gold && conf_flags+=( --with-binutils-include="${EPREFIX}"/usr/include/ ) |
7989 |
+ # extra commas don't hurt |
7990 |
+ use ocaml && bindings+=',ocaml' |
7991 |
+ fi |
7992 |
+ |
7993 |
+ [[ ${bindings} ]] || bindings='none' |
7994 |
+ conf_flags+=( --enable-bindings=${bindings} ) |
7995 |
+ |
7996 |
+ if use libffi; then |
7997 |
+ local CPPFLAGS=${CPPFLAGS} |
7998 |
+ append-cppflags "$(pkg-config --cflags libffi)" |
7999 |
+ fi |
8000 |
+ |
8001 |
+ # Enable large file support, bug #550708 |
8002 |
+ append-lfs-flags |
8003 |
+ # llvm prefers clang over gcc, so we may need to force that |
8004 |
+ tc-export CC CXX |
8005 |
+ |
8006 |
+ ECONF_SOURCE=${S} \ |
8007 |
+ econf "${conf_flags[@]}" |
8008 |
+} |
8009 |
+ |
8010 |
+set_makeargs() { |
8011 |
+ MAKEARGS=( |
8012 |
+ VERBOSE=1 |
8013 |
+ REQUIRES_RTTI=1 |
8014 |
+ GENTOO_LIBDIR=$(get_libdir) |
8015 |
+ ) |
8016 |
+ |
8017 |
+ # for tests, we want it all! otherwise, we may use a little filtering... |
8018 |
+ # adding ONLY_TOOLS also disables unittest building... |
8019 |
+ if [[ ${EBUILD_PHASE_FUNC} != src_test ]]; then |
8020 |
+ local tools=( llvm-config ) |
8021 |
+ use clang && tools+=( clang ) |
8022 |
+ |
8023 |
+ if multilib_is_native_abi; then |
8024 |
+ tools+=( |
8025 |
+ opt llvm-as llvm-dis llc llvm-ar llvm-nm llvm-link lli |
8026 |
+ llvm-extract llvm-mc llvm-bcanalyzer llvm-diff macho-dump |
8027 |
+ llvm-objdump llvm-readobj llvm-rtdyld llvm-dwarfdump llvm-cov |
8028 |
+ llvm-size llvm-stress llvm-mcmarkup llvm-profdata |
8029 |
+ llvm-symbolizer obj2yaml yaml2obj lto bugpoint |
8030 |
+ ) |
8031 |
+ |
8032 |
+ # the build system runs explicitly specified tools in parallel, |
8033 |
+ # so we need to split it into two runs |
8034 |
+ if [[ ${1} != -1 ]]; then |
8035 |
+ # those require lto |
8036 |
+ tools+=( llvm-lto ) |
8037 |
+ use gold && tools+=( gold ) |
8038 |
+ |
8039 |
+ # those require clang :) |
8040 |
+ # we need to explicitly specify all its tools |
8041 |
+ # since we're passing BUILD_CLANG_ONLY |
8042 |
+ use clang && tools+=( |
8043 |
+ clang/tools/{clang-check,clang-format,extra} |
8044 |
+ ) |
8045 |
+ fi |
8046 |
+ fi |
8047 |
+ |
8048 |
+ MAKEARGS+=( |
8049 |
+ # filter tools + disable unittests implicitly |
8050 |
+ ONLY_TOOLS="${tools[*]}" |
8051 |
+ |
8052 |
+ # this disables unittests & docs from clang |
8053 |
+ BUILD_CLANG_ONLY=YES |
8054 |
+ ) |
8055 |
+ fi |
8056 |
+} |
8057 |
+ |
8058 |
+multilib_src_compile() { |
8059 |
+ local MAKEARGS |
8060 |
+ set_makeargs -1 |
8061 |
+ emake "${MAKEARGS[@]}" |
8062 |
+ |
8063 |
+ if multilib_is_native_abi; then |
8064 |
+ set_makeargs |
8065 |
+ emake -C tools "${MAKEARGS[@]}" |
8066 |
+ |
8067 |
+ if use doc; then |
8068 |
+ emake -C "${S}"/docs -f Makefile.sphinx man |
8069 |
+ use clang && emake -C "${S}"/tools/clang/docs/tools \ |
8070 |
+ BUILD_FOR_WEBSITE=1 DST_MAN_DIR="${T}"/ man |
8071 |
+ emake -C "${S}"/docs -f Makefile.sphinx html |
8072 |
+ fi |
8073 |
+ fi |
8074 |
+ |
8075 |
+ if use debug; then |
8076 |
+ pax-mark m Debug+Asserts+Checks/bin/llvm-rtdyld |
8077 |
+ pax-mark m Debug+Asserts+Checks/bin/lli |
8078 |
+ pax-mark m Debug+Asserts+Checks/bin/lli-child-target |
8079 |
+ else |
8080 |
+ pax-mark m Release/bin/llvm-rtdyld |
8081 |
+ pax-mark m Release/bin/lli |
8082 |
+ pax-mark m Release/bin/lli-child-target |
8083 |
+ fi |
8084 |
+} |
8085 |
+ |
8086 |
+multilib_src_test() { |
8087 |
+ local MAKEARGS |
8088 |
+ set_makeargs |
8089 |
+ |
8090 |
+ # build the remaining tools & unittests |
8091 |
+ emake "${MAKEARGS[@]}" |
8092 |
+ |
8093 |
+ pax-mark m unittests/ExecutionEngine/JIT/Release/JITTests |
8094 |
+ pax-mark m unittests/ExecutionEngine/MCJIT/Release/MCJITTests |
8095 |
+ pax-mark m unittests/Support/Release/SupportTests |
8096 |
+ |
8097 |
+ # respect TMPDIR! |
8098 |
+ local -x LIT_PRESERVES_TMP=1 |
8099 |
+ emake "${MAKEARGS[@]}" check |
8100 |
+ use clang && emake "${MAKEARGS[@]}" -C tools/clang test |
8101 |
+} |
8102 |
+ |
8103 |
+src_install() { |
8104 |
+ local MULTILIB_CHOST_TOOLS=( |
8105 |
+ /usr/bin/llvm-config |
8106 |
+ ) |
8107 |
+ |
8108 |
+ local MULTILIB_WRAPPED_HEADERS=( |
8109 |
+ /usr/include/llvm/Config/config.h |
8110 |
+ /usr/include/llvm/Config/llvm-config.h |
8111 |
+ ) |
8112 |
+ |
8113 |
+ if use clang; then |
8114 |
+ # note: magic applied below |
8115 |
+ MULTILIB_CHOST_TOOLS+=( |
8116 |
+ /usr/bin/clang |
8117 |
+ /usr/bin/clang++ |
8118 |
+ /usr/bin/clang-${PV} |
8119 |
+ /usr/bin/clang++-${PV} |
8120 |
+ ) |
8121 |
+ |
8122 |
+ MULTILIB_WRAPPED_HEADERS+=( |
8123 |
+ /usr/include/clang/Config/config.h |
8124 |
+ ) |
8125 |
+ fi |
8126 |
+ |
8127 |
+ multilib-minimal_src_install |
8128 |
+ |
8129 |
+ # Remove unnecessary headers on FreeBSD, bug #417171 |
8130 |
+ use kernel_FreeBSD && use clang && rm "${ED}"usr/lib/clang/${PV}/include/{std,float,iso,limits,tgmath,varargs}*.h |
8131 |
+} |
8132 |
+ |
8133 |
+multilib_src_install() { |
8134 |
+ local MAKEARGS |
8135 |
+ set_makeargs |
8136 |
+ |
8137 |
+ local root=${D}/_${ABI} |
8138 |
+ |
8139 |
+ emake "${MAKEARGS[@]}" DESTDIR="${root}" install |
8140 |
+ multibuild_merge_root "${root}" "${D}" |
8141 |
+ |
8142 |
+ if ! multilib_is_native_abi; then |
8143 |
+ # Backwards compat, will be happily removed someday. |
8144 |
+ dosym "${CHOST}"-llvm-config /usr/bin/llvm-config.${ABI} |
8145 |
+ else |
8146 |
+ # Install docs. |
8147 |
+ if use doc; then |
8148 |
+ doman "${S}"/docs/_build/man/*.1 |
8149 |
+ use clang && doman "${T}"/clang.1 |
8150 |
+ dohtml -r "${S}"/docs/_build/html/ |
8151 |
+ else |
8152 |
+ if ! use clang; then |
8153 |
+ rm "${WORKDIR}"/${PN}-3.6.1-manpages/clang.1 || die |
8154 |
+ fi |
8155 |
+ doman "${WORKDIR}"/${PN}-3.6.1-manpages/*.1 |
8156 |
+ fi |
8157 |
+ |
8158 |
+ # Symlink the gold plugin. |
8159 |
+ if use gold; then |
8160 |
+ dodir /usr/${CHOST}/binutils-bin/lib/bfd-plugins |
8161 |
+ dosym ../../../../$(get_libdir)/LLVMgold.so \ |
8162 |
+ /usr/${CHOST}/binutils-bin/lib/bfd-plugins/LLVMgold.so |
8163 |
+ fi |
8164 |
+ fi |
8165 |
+ |
8166 |
+ # apply CHOST and PV to clang executables |
8167 |
+ # they're statically linked so we don't have to worry about the lib |
8168 |
+ if use clang; then |
8169 |
+ local clang_tools=( clang clang++ ) |
8170 |
+ local i |
8171 |
+ |
8172 |
+ # append ${PV} and symlink back |
8173 |
+ # TODO: use alternatives.eclass? does that make any sense? |
8174 |
+ # maybe with USE=-clang on :0 and USE=clang on older |
8175 |
+ for i in "${clang_tools[@]}"; do |
8176 |
+ mv "${ED%/}/usr/bin/${i}"{,-${PV}} || die |
8177 |
+ dosym "${i}"-${PV} /usr/bin/${i} |
8178 |
+ done |
8179 |
+ |
8180 |
+ # now prepend ${CHOST} and let the multilib-build.eclass symlink it |
8181 |
+ if ! multilib_is_native_abi; then |
8182 |
+ # non-native? let's replace it with a simple wrapper |
8183 |
+ for i in "${clang_tools[@]}"; do |
8184 |
+ rm "${ED%/}/usr/bin/${i}-${PV}" || die |
8185 |
+ cat > "${T}"/wrapper.tmp <<-_EOF_ |
8186 |
+ #!${EPREFIX}/bin/sh |
8187 |
+ exec "${i}-${PV}" $(get_abi_CFLAGS) "\${@}" |
8188 |
+ _EOF_ |
8189 |
+ newbin "${T}"/wrapper.tmp "${i}-${PV}" |
8190 |
+ done |
8191 |
+ fi |
8192 |
+ fi |
8193 |
+ |
8194 |
+ # Fix install_names on Darwin. The build system is too complicated |
8195 |
+ # to just fix this, so we correct it post-install |
8196 |
+ local lib= f= odylib= ndylib= libpv=${PV} |
8197 |
+ if [[ ${CHOST} == *-darwin* ]] ; then |
8198 |
+ eval $(grep PACKAGE_VERSION= configure) |
8199 |
+ [[ -n ${PACKAGE_VERSION} ]] && libpv=${PACKAGE_VERSION} |
8200 |
+ libpvminor=${libpv%.[0-9]*} |
8201 |
+ for lib in lib{EnhancedDisassembly,LLVM-${libpv},LTO,profile_rt,clang}.dylib LLVMHello.dylib clang/${libpv}/lib/darwin/libclang_rt.asan_{osx,iossim}_dynamic.dylib; do |
8202 |
+ # libEnhancedDisassembly is Darwin10 only, so non-fatal |
8203 |
+ # + omit clang libs if not enabled |
8204 |
+ [[ -f ${ED}/usr/lib/${lib} ]] || continue |
8205 |
+ |
8206 |
+ ebegin "fixing install_name of $lib" |
8207 |
+ install_name_tool \ |
8208 |
+ -id "${EPREFIX}"/usr/lib/${lib} \ |
8209 |
+ "${ED}"/usr/lib/${lib} |
8210 |
+ eend $? |
8211 |
+ done |
8212 |
+ for f in "${ED}"/usr/bin/* "${ED}"/usr/lib/lib*.dylib "${ED}"/usr/lib/clang/${libpv}/lib/darwin/*.dylib ; do |
8213 |
+ # omit clang libs if not enabled |
8214 |
+ [[ -f "${f}" ]] || continue |
8215 |
+ |
8216 |
+ scanmacho -BF'%n#f' "${f}" | tr ',' '\n' | \ |
8217 |
+ while read odylib ; do |
8218 |
+ ndylib= |
8219 |
+ case ${odylib} in |
8220 |
+ */libclang.dylib) |
8221 |
+ ndylib="${EPREFIX}"/usr/lib/libclang.dylib |
8222 |
+ ;; |
8223 |
+ */libLLVM-${libpv}.dylib) |
8224 |
+ ndylib="${EPREFIX}"/usr/lib/libLLVM-${libpv}.dylib |
8225 |
+ ;; |
8226 |
+ */libLLVM-${libpvminor}.dylib) |
8227 |
+ ndylib="${EPREFIX}"/usr/lib/libLLVM-${libpvminor}.dylib |
8228 |
+ ;; |
8229 |
+ */libLTO.dylib) |
8230 |
+ ndylib="${EPREFIX}"/usr/lib/libLTO.dylib |
8231 |
+ ;; |
8232 |
+ esac |
8233 |
+ if [[ -n ${ndylib} ]] ; then |
8234 |
+ ebegin "fixing install_name reference to ${odylib} of ${f##*/}" |
8235 |
+ install_name_tool \ |
8236 |
+ -change "${odylib}" "${ndylib}" \ |
8237 |
+ "${f}" |
8238 |
+ eend $? |
8239 |
+ fi |
8240 |
+ done |
8241 |
+ done |
8242 |
+ fi |
8243 |
+} |
8244 |
+ |
8245 |
+multilib_src_install_all() { |
8246 |
+ insinto /usr/share/vim/vimfiles/syntax |
8247 |
+ doins utils/vim/*.vim |
8248 |
+ |
8249 |
+ if use clang; then |
8250 |
+ cd tools/clang || die |
8251 |
+ |
8252 |
+ if use static-analyzer ; then |
8253 |
+ dobin tools/scan-build/ccc-analyzer |
8254 |
+ dosym ccc-analyzer /usr/bin/c++-analyzer |
8255 |
+ dobin tools/scan-build/scan-build |
8256 |
+ |
8257 |
+ insinto /usr/share/${PN} |
8258 |
+ doins tools/scan-build/scanview.css |
8259 |
+ doins tools/scan-build/sorttable.js |
8260 |
+ fi |
8261 |
+ |
8262 |
+ python_inst() { |
8263 |
+ if use static-analyzer ; then |
8264 |
+ pushd tools/scan-view >/dev/null || die |
8265 |
+ |
8266 |
+ python_doscript scan-view |
8267 |
+ |
8268 |
+ touch __init__.py || die |
8269 |
+ python_moduleinto clang |
8270 |
+ python_domodule __init__.py Reporter.py Resources ScanView.py startfile.py |
8271 |
+ |
8272 |
+ popd >/dev/null || die |
8273 |
+ fi |
8274 |
+ |
8275 |
+ if use python ; then |
8276 |
+ pushd bindings/python/clang >/dev/null || die |
8277 |
+ |
8278 |
+ python_moduleinto clang |
8279 |
+ python_domodule __init__.py cindex.py enumerations.py |
8280 |
+ |
8281 |
+ popd >/dev/null || die |
8282 |
+ fi |
8283 |
+ |
8284 |
+ # AddressSanitizer symbolizer (currently separate) |
8285 |
+ python_doscript "${S}"/projects/compiler-rt/lib/asan/scripts/asan_symbolize.py |
8286 |
+ } |
8287 |
+ python_foreach_impl python_inst |
8288 |
+ fi |
8289 |
+} |
8290 |
|
8291 |
diff --git a/sys-devel/llvm/llvm-3.7.0-r1.ebuild b/sys-devel/llvm/llvm-3.7.0-r1.ebuild |
8292 |
new file mode 100644 |
8293 |
index 0000000..931796d |
8294 |
--- /dev/null |
8295 |
+++ b/sys-devel/llvm/llvm-3.7.0-r1.ebuild |
8296 |
@@ -0,0 +1,509 @@ |
8297 |
+# Copyright 1999-2015 Gentoo Foundation |
8298 |
+# Distributed under the terms of the GNU General Public License v2 |
8299 |
+# $Id$ |
8300 |
+ |
8301 |
+EAPI=5 |
8302 |
+ |
8303 |
+: ${CMAKE_MAKEFILE_GENERATOR:=ninja} |
8304 |
+PYTHON_COMPAT=( python2_7 pypy ) |
8305 |
+ |
8306 |
+inherit check-reqs cmake-utils eutils flag-o-matic multilib \ |
8307 |
+ multilib-minimal python-r1 toolchain-funcs pax-utils \ |
8308 |
+ linux-info |
8309 |
+ |
8310 |
+DESCRIPTION="Low Level Virtual Machine" |
8311 |
+HOMEPAGE="http://llvm.org/" |
8312 |
+SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.xz |
8313 |
+ clang? ( http://llvm.org/releases/${PV}/compiler-rt-${PV}.src.tar.xz |
8314 |
+ http://llvm.org/releases/${PV}/cfe-${PV}.src.tar.xz |
8315 |
+ http://llvm.org/releases/${PV}/clang-tools-extra-${PV}.src.tar.xz ) |
8316 |
+ lldb? ( http://llvm.org/releases/${PV}/lldb-${PV}.src.tar.xz ) |
8317 |
+ !doc? ( http://dev.gentoo.org/~voyageur/distfiles/${P}-manpages.tar.bz2 )" |
8318 |
+ |
8319 |
+LICENSE="UoI-NCSA" |
8320 |
+SLOT="0/${PV}" |
8321 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
8322 |
+IUSE="clang debug doc gold libedit +libffi lldb multitarget ncurses ocaml |
8323 |
+ python +static-analyzer test xml video_cards_radeon kernel_Darwin" |
8324 |
+ |
8325 |
+COMMON_DEPEND=" |
8326 |
+ sys-libs/zlib:0= |
8327 |
+ clang? ( |
8328 |
+ python? ( ${PYTHON_DEPS} ) |
8329 |
+ static-analyzer? ( |
8330 |
+ dev-lang/perl:* |
8331 |
+ ${PYTHON_DEPS} |
8332 |
+ ) |
8333 |
+ xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) |
8334 |
+ ) |
8335 |
+ gold? ( >=sys-devel/binutils-2.22:*[cxx] ) |
8336 |
+ libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] ) |
8337 |
+ libffi? ( >=virtual/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] ) |
8338 |
+ ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] ) |
8339 |
+ ocaml? ( |
8340 |
+ dev-lang/ocaml:0= |
8341 |
+ dev-ml/findlib |
8342 |
+ dev-ml/ocaml-ctypes )" |
8343 |
+# configparser-3.2 breaks the build (3.3 or none at all are fine) |
8344 |
+DEPEND="${COMMON_DEPEND} |
8345 |
+ dev-lang/perl |
8346 |
+ >=sys-devel/make-3.81 |
8347 |
+ >=sys-devel/flex-2.5.4 |
8348 |
+ >=sys-devel/bison-1.875d |
8349 |
+ || ( >=sys-devel/gcc-3.0 >=sys-devel/llvm-3.5 |
8350 |
+ ( >=sys-freebsd/freebsd-lib-9.1-r10 sys-libs/libcxx ) |
8351 |
+ ) |
8352 |
+ || ( >=sys-devel/binutils-2.18 >=sys-devel/binutils-apple-5.1 ) |
8353 |
+ kernel_Darwin? ( sys-libs/libcxx ) |
8354 |
+ clang? ( xml? ( virtual/pkgconfig ) ) |
8355 |
+ doc? ( dev-python/sphinx ) |
8356 |
+ gold? ( sys-libs/binutils-libs ) |
8357 |
+ libffi? ( virtual/pkgconfig ) |
8358 |
+ lldb? ( dev-lang/swig ) |
8359 |
+ !!<dev-python/configparser-3.3.0.2 |
8360 |
+ ocaml? ( test? ( dev-ml/ounit ) ) |
8361 |
+ ${PYTHON_DEPS}" |
8362 |
+RDEPEND="${COMMON_DEPEND} |
8363 |
+ clang? ( !<=sys-devel/clang-${PV}-r99 ) |
8364 |
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r2 |
8365 |
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )" |
8366 |
+PDEPEND="clang? ( =sys-devel/clang-${PV}-r100 )" |
8367 |
+ |
8368 |
+# pypy gives me around 1700 unresolved tests due to open file limit |
8369 |
+# being exceeded. probably GC does not close them fast enough. |
8370 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE} |
8371 |
+ lldb? ( clang ) |
8372 |
+ test? ( || ( $(python_gen_useflags 'python*') ) )" |
8373 |
+ |
8374 |
+S=${WORKDIR}/${P/_}.src |
8375 |
+ |
8376 |
+pkg_pretend() { |
8377 |
+ # in megs |
8378 |
+ # !clang !debug !multitarget -O2 400 |
8379 |
+ # !clang !debug multitarget -O2 550 |
8380 |
+ # clang !debug !multitarget -O2 950 |
8381 |
+ # clang !debug multitarget -O2 1200 |
8382 |
+ # !clang debug multitarget -O2 5G |
8383 |
+ # clang !debug multitarget -O0 -g 12G |
8384 |
+ # clang debug multitarget -O2 16G |
8385 |
+ # clang debug multitarget -O0 -g 14G |
8386 |
+ |
8387 |
+ local build_size=550 |
8388 |
+ use clang && build_size=1200 |
8389 |
+ |
8390 |
+ if use debug; then |
8391 |
+ ewarn "USE=debug is known to increase the size of package considerably" |
8392 |
+ ewarn "and cause the tests to fail." |
8393 |
+ ewarn |
8394 |
+ |
8395 |
+ (( build_size *= 14 )) |
8396 |
+ elif is-flagq '-g?(gdb)?([1-9])'; then |
8397 |
+ ewarn "The C++ compiler -g option is known to increase the size of the package" |
8398 |
+ ewarn "considerably. If you run out of space, please consider removing it." |
8399 |
+ ewarn |
8400 |
+ |
8401 |
+ (( build_size *= 10 )) |
8402 |
+ fi |
8403 |
+ |
8404 |
+ # Multiply by number of ABIs :). |
8405 |
+ local abis=( $(multilib_get_enabled_abis) ) |
8406 |
+ (( build_size *= ${#abis[@]} )) |
8407 |
+ |
8408 |
+ local CHECKREQS_DISK_BUILD=${build_size}M |
8409 |
+ check-reqs_pkg_pretend |
8410 |
+ |
8411 |
+ if [[ ${MERGE_TYPE} != binary ]]; then |
8412 |
+ echo 'int main() {return 0;}' > "${T}"/test.cxx || die |
8413 |
+ ebegin "Trying to build a C++11 test program" |
8414 |
+ if ! $(tc-getCXX) -std=c++11 -o /dev/null "${T}"/test.cxx; then |
8415 |
+ eerror "LLVM-${PV} requires C++11-capable C++ compiler. Your current compiler" |
8416 |
+ eerror "does not seem to support -std=c++11 option. Please upgrade your compiler" |
8417 |
+ eerror "to gcc-4.7 or an equivalent version supporting C++11." |
8418 |
+ die "Currently active compiler does not support -std=c++11" |
8419 |
+ fi |
8420 |
+ eend ${?} |
8421 |
+ fi |
8422 |
+} |
8423 |
+ |
8424 |
+pkg_setup() { |
8425 |
+ pkg_pretend |
8426 |
+} |
8427 |
+ |
8428 |
+src_unpack() { |
8429 |
+ default |
8430 |
+ |
8431 |
+ if use clang; then |
8432 |
+ mv "${WORKDIR}"/cfe-${PV/_}.src "${S}"/tools/clang \ |
8433 |
+ || die "clang source directory move failed" |
8434 |
+ mv "${WORKDIR}"/compiler-rt-${PV/_}.src "${S}"/projects/compiler-rt \ |
8435 |
+ || die "compiler-rt source directory move failed" |
8436 |
+ mv "${WORKDIR}"/clang-tools-extra-${PV/_}.src "${S}"/tools/clang/tools/extra \ |
8437 |
+ || die "clang-tools-extra source directory move failed" |
8438 |
+ fi |
8439 |
+ |
8440 |
+ if use lldb; then |
8441 |
+ mv "${WORKDIR}"/lldb-${PV/_}.src "${S}"/tools/lldb \ |
8442 |
+ || die "lldb source directory move failed" |
8443 |
+ fi |
8444 |
+} |
8445 |
+ |
8446 |
+src_prepare() { |
8447 |
+ # Make ocaml warnings non-fatal, bug #537308 |
8448 |
+ sed -e "/RUN/s/-warn-error A//" -i test/Bindings/OCaml/*ml || die |
8449 |
+ # Fix libdir for ocaml bindings install, bug #559134 |
8450 |
+ epatch "${FILESDIR}"/cmake/${P}-ocaml-multilib.patch |
8451 |
+ |
8452 |
+ # Make it possible to override Sphinx HTML install dirs |
8453 |
+ # https://llvm.org/bugs/show_bug.cgi?id=23780 |
8454 |
+ epatch "${FILESDIR}"/cmake/0002-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch |
8455 |
+ |
8456 |
+ # Prevent race conditions with parallel Sphinx runs |
8457 |
+ # https://llvm.org/bugs/show_bug.cgi?id=23781 |
8458 |
+ epatch "${FILESDIR}"/cmake/0003-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch |
8459 |
+ |
8460 |
+ # Prevent installing libgtest |
8461 |
+ # https://llvm.org/bugs/show_bug.cgi?id=18341 |
8462 |
+ epatch "${FILESDIR}"/cmake/0004-cmake-Do-not-install-libgtest.patch |
8463 |
+ |
8464 |
+ if use clang; then |
8465 |
+ # Automatically select active system GCC's libraries, bugs #406163 and #417913 |
8466 |
+ epatch "${FILESDIR}"/clang-3.5-gentoo-runtime-gcc-detection-v3.patch |
8467 |
+ |
8468 |
+ epatch "${FILESDIR}"/clang-3.6-gentoo-install.patch |
8469 |
+ |
8470 |
+ sed -i -e "s^@EPREFIX@^${EPREFIX}^" \ |
8471 |
+ tools/clang/tools/scan-build/scan-build || die |
8472 |
+ |
8473 |
+ # Install clang runtime into /usr/lib/clang |
8474 |
+ # https://llvm.org/bugs/show_bug.cgi?id=23792 |
8475 |
+ epatch "${FILESDIR}"/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix.patch |
8476 |
+ epatch "${FILESDIR}"/cmake/compiler-rt-0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi.patch |
8477 |
+ |
8478 |
+ # Make it possible to override CLANG_LIBDIR_SUFFIX |
8479 |
+ # (that is used only to find LLVMgold.so) |
8480 |
+ # https://llvm.org/bugs/show_bug.cgi?id=23793 |
8481 |
+ epatch "${FILESDIR}"/cmake/clang-0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch |
8482 |
+ |
8483 |
+ # Fix WX sections, bug #421527 |
8484 |
+ find "${S}"/projects/compiler-rt/lib/builtins -type f -name \*.S -exec sed \ |
8485 |
+ -e '$a\\n#if defined(__linux__) && defined(__ELF__)\n.section .note.GNU-stack,"",%progbits\n#endif' \ |
8486 |
+ -i {} \; || die |
8487 |
+ fi |
8488 |
+ |
8489 |
+ if use lldb; then |
8490 |
+ # Do not install dummy readline.so module from |
8491 |
+ # https://llvm.org/bugs/show_bug.cgi?id=18841 |
8492 |
+ sed -e 's/add_subdirectory(readline)/#&/' \ |
8493 |
+ -i tools/lldb/scripts/Python/modules/CMakeLists.txt || die |
8494 |
+ fi |
8495 |
+ |
8496 |
+ # User patches |
8497 |
+ epatch_user |
8498 |
+ if kernel_is -lt 2 6 32; then |
8499 |
+ # on RHEL5, linux/perf_event.h (needing kernel >=2.6.32) is not available. |
8500 |
+ # https://llvm.org/bugs/show_bug.cgi?id=17901 |
8501 |
+ elog "Removing compiler-rt on RHEL 5..." |
8502 |
+ rm -r projects/compiler-rt || die "Removing compiler-rt failed." |
8503 |
+ fi |
8504 |
+ |
8505 |
+ python_setup |
8506 |
+ |
8507 |
+ # Native libdir is used to hold LLVMgold.so |
8508 |
+ NATIVE_LIBDIR=$(get_libdir) |
8509 |
+} |
8510 |
+ |
8511 |
+multilib_src_configure() { |
8512 |
+ local targets |
8513 |
+ if use multitarget; then |
8514 |
+ targets=all |
8515 |
+ else |
8516 |
+ targets='host;CppBackend' |
8517 |
+ use video_cards_radeon && targets+=';AMDGPU' |
8518 |
+ fi |
8519 |
+ |
8520 |
+ local ffi_cflags ffi_ldflags |
8521 |
+ if use libffi; then |
8522 |
+ ffi_cflags=$(pkg-config --cflags-only-I libffi) |
8523 |
+ ffi_ldflags=$(pkg-config --libs-only-L libffi) |
8524 |
+ fi |
8525 |
+ |
8526 |
+ local libdir=$(get_libdir) |
8527 |
+ local mycmakeargs=( |
8528 |
+ "${mycmakeargs[@]}" |
8529 |
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib} |
8530 |
+ |
8531 |
+ -DBUILD_SHARED_LIBS=ON |
8532 |
+ -DLLVM_ENABLE_TIMESTAMPS=OFF |
8533 |
+ -DLLVM_TARGETS_TO_BUILD="${targets}" |
8534 |
+ -DLLVM_BUILD_TESTS=$(usex test) |
8535 |
+ |
8536 |
+ -DLLVM_ENABLE_FFI=$(usex libffi) |
8537 |
+ -DLLVM_ENABLE_TERMINFO=$(usex ncurses) |
8538 |
+ -DLLVM_ENABLE_ASSERTIONS=$(usex debug) |
8539 |
+ -DLLVM_ENABLE_EH=ON |
8540 |
+ -DLLVM_ENABLE_RTTI=ON |
8541 |
+ |
8542 |
+ -DWITH_POLLY=OFF # TODO |
8543 |
+ |
8544 |
+ -DLLVM_HOST_TRIPLE="${CHOST}" |
8545 |
+ |
8546 |
+ -DFFI_INCLUDE_DIR="${ffi_cflags#-I}" |
8547 |
+ -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}" |
8548 |
+ |
8549 |
+ -DHAVE_HISTEDIT_H=$(usex libedit) |
8550 |
+ ) |
8551 |
+ |
8552 |
+ if use lldb; then |
8553 |
+ mycmakeargs+=( |
8554 |
+ -DLLDB_DISABLE_LIBEDIT=$(usex !libedit) |
8555 |
+ -DLLDB_DISABLE_CURSES=$(usex !ncurses) |
8556 |
+ -DLLDB_ENABLE_TERMINFO=$(usex ncurses) |
8557 |
+ ) |
8558 |
+ fi |
8559 |
+ |
8560 |
+ if ! multilib_is_native_abi || ! use ocaml; then |
8561 |
+ mycmakeargs+=( |
8562 |
+ -DOCAMLFIND=NO |
8563 |
+ ) |
8564 |
+ fi |
8565 |
+# Note: go bindings have no CMake rules at the moment |
8566 |
+# but let's kill the check in case they are introduced |
8567 |
+# if ! multilib_is_native_abi || ! use go; then |
8568 |
+ mycmakeargs+=( |
8569 |
+ -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND |
8570 |
+ ) |
8571 |
+# fi |
8572 |
+ |
8573 |
+ if multilib_is_native_abi; then |
8574 |
+ mycmakeargs+=( |
8575 |
+ -DLLVM_BUILD_DOCS=$(usex doc) |
8576 |
+ -DLLVM_ENABLE_SPHINX=$(usex doc) |
8577 |
+ -DLLVM_ENABLE_DOXYGEN=OFF |
8578 |
+ -DLLVM_INSTALL_HTML="${EPREFIX}/usr/share/doc/${PF}/html" |
8579 |
+ -DSPHINX_WARNINGS_AS_ERRORS=OFF |
8580 |
+ -DLLVM_INSTALL_UTILS=ON |
8581 |
+ ) |
8582 |
+ |
8583 |
+ if use clang; then |
8584 |
+ mycmakeargs+=( |
8585 |
+ -DCLANG_INSTALL_HTML="${EPREFIX}/usr/share/doc/${PF}/clang" |
8586 |
+ ) |
8587 |
+ fi |
8588 |
+ |
8589 |
+ if use gold; then |
8590 |
+ mycmakeargs+=( |
8591 |
+ -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include |
8592 |
+ ) |
8593 |
+ fi |
8594 |
+ |
8595 |
+ if use lldb; then |
8596 |
+ mycmakeargs+=( |
8597 |
+ -DLLDB_DISABLE_PYTHON=$(usex !python) |
8598 |
+ ) |
8599 |
+ fi |
8600 |
+ |
8601 |
+ else |
8602 |
+ if use clang; then |
8603 |
+ mycmakeargs+=( |
8604 |
+ # disable compiler-rt on non-native ABI because: |
8605 |
+ # 1. it fails to configure because of -m32 |
8606 |
+ # 2. it is shared between ABIs so no point building |
8607 |
+ # it multiple times |
8608 |
+ -DLLVM_EXTERNAL_COMPILER_RT_BUILD=OFF |
8609 |
+ -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_BUILD=OFF |
8610 |
+ ) |
8611 |
+ fi |
8612 |
+ if use lldb; then |
8613 |
+ mycmakeargs+=( |
8614 |
+ # only run swig on native abi |
8615 |
+ -DLLDB_DISABLE_PYTHON=ON |
8616 |
+ ) |
8617 |
+ fi |
8618 |
+ fi |
8619 |
+ |
8620 |
+ if use clang; then |
8621 |
+ mycmakeargs+=( |
8622 |
+ -DCLANG_ENABLE_ARCMT=$(usex static-analyzer) |
8623 |
+ -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer) |
8624 |
+ -DCLANG_LIBDIR_SUFFIX="${NATIVE_LIBDIR#lib}" |
8625 |
+ ) |
8626 |
+ |
8627 |
+ # -- not needed when compiler-rt is built with host compiler -- |
8628 |
+ # cmake passes host C*FLAGS to compiler-rt build |
8629 |
+ # which is performed using clang, so we need to filter out |
8630 |
+ # some flags clang does not support |
8631 |
+ # (if you know some more flags that don't work, let us know) |
8632 |
+ #filter-flags -msahf -frecord-gcc-switches |
8633 |
+ fi |
8634 |
+ |
8635 |
+ cmake-utils_src_configure |
8636 |
+} |
8637 |
+ |
8638 |
+multilib_src_compile() { |
8639 |
+ cmake-utils_src_compile |
8640 |
+ # TODO: not sure why this target is not correctly called |
8641 |
+ multilib_is_native_abi && use doc && use ocaml && cmake-utils_src_make docs/ocaml_doc |
8642 |
+ |
8643 |
+ pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld |
8644 |
+ pax-mark m "${BUILD_DIR}"/bin/lli |
8645 |
+ pax-mark m "${BUILD_DIR}"/bin/lli-child-target |
8646 |
+ |
8647 |
+ if use test; then |
8648 |
+ pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/Orc/OrcJITTests |
8649 |
+ pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/MCJIT/MCJITTests |
8650 |
+ pax-mark m "${BUILD_DIR}"/unittests/Support/SupportTests |
8651 |
+ fi |
8652 |
+} |
8653 |
+ |
8654 |
+multilib_src_test() { |
8655 |
+ # respect TMPDIR! |
8656 |
+ local -x LIT_PRESERVES_TMP=1 |
8657 |
+ local test_targets=( check ) |
8658 |
+ # clang tests won't work on non-native ABI because we skip compiler-rt |
8659 |
+ multilib_is_native_abi && use clang && test_targets+=( check-clang ) |
8660 |
+ cmake-utils_src_make "${test_targets[@]}" |
8661 |
+} |
8662 |
+ |
8663 |
+src_install() { |
8664 |
+ local MULTILIB_CHOST_TOOLS=( |
8665 |
+ /usr/bin/llvm-config |
8666 |
+ ) |
8667 |
+ |
8668 |
+ local MULTILIB_WRAPPED_HEADERS=( |
8669 |
+ /usr/include/llvm/Config/config.h |
8670 |
+ /usr/include/llvm/Config/llvm-config.h |
8671 |
+ ) |
8672 |
+ |
8673 |
+ if use clang; then |
8674 |
+ # note: magic applied in multilib_src_install()! |
8675 |
+ CLANG_VERSION=${PV%.*} |
8676 |
+ |
8677 |
+ MULTILIB_CHOST_TOOLS+=( |
8678 |
+ /usr/bin/clang |
8679 |
+ /usr/bin/clang++ |
8680 |
+ /usr/bin/clang-cl |
8681 |
+ /usr/bin/clang-${CLANG_VERSION} |
8682 |
+ /usr/bin/clang++-${CLANG_VERSION} |
8683 |
+ /usr/bin/clang-cl-${CLANG_VERSION} |
8684 |
+ ) |
8685 |
+ |
8686 |
+ MULTILIB_WRAPPED_HEADERS+=( |
8687 |
+ /usr/include/clang/Config/config.h |
8688 |
+ ) |
8689 |
+ fi |
8690 |
+ |
8691 |
+ multilib-minimal_src_install |
8692 |
+} |
8693 |
+ |
8694 |
+multilib_src_install() { |
8695 |
+ cmake-utils_src_install |
8696 |
+ |
8697 |
+ if multilib_is_native_abi; then |
8698 |
+ # Install man pages. |
8699 |
+ use doc || doman "${WORKDIR}"/${P}-manpages/*.1 |
8700 |
+ |
8701 |
+ # Symlink the gold plugin. |
8702 |
+ if use gold; then |
8703 |
+ dodir "/usr/${CHOST}/binutils-bin/lib/bfd-plugins" |
8704 |
+ dosym "../../../../$(get_libdir)/LLVMgold.so" \ |
8705 |
+ "/usr/${CHOST}/binutils-bin/lib/bfd-plugins/LLVMgold.so" |
8706 |
+ fi |
8707 |
+ fi |
8708 |
+ |
8709 |
+ # apply CHOST and CLANG_VERSION to clang executables |
8710 |
+ # they're statically linked so we don't have to worry about the lib |
8711 |
+ if use clang; then |
8712 |
+ local clang_tools=( clang clang++ clang-cl ) |
8713 |
+ local i |
8714 |
+ |
8715 |
+ # cmake gives us: |
8716 |
+ # - clang-X.Y |
8717 |
+ # - clang -> clang-X.Y |
8718 |
+ # - clang++, clang-cl -> clang |
8719 |
+ # we want to have: |
8720 |
+ # - clang-X.Y |
8721 |
+ # - clang++-X.Y, clang-cl-X.Y -> clang-X.Y |
8722 |
+ # - clang, clang++, clang-cl -> clang*-X.Y |
8723 |
+ # so we need to fix the two tools |
8724 |
+ for i in "${clang_tools[@]:1}"; do |
8725 |
+ rm "${ED%/}/usr/bin/${i}" || die |
8726 |
+ dosym "clang-${CLANG_VERSION}" "/usr/bin/${i}-${CLANG_VERSION}" |
8727 |
+ dosym "${i}-${CLANG_VERSION}" "/usr/bin/${i}" |
8728 |
+ done |
8729 |
+ |
8730 |
+ # now prepend ${CHOST} and let the multilib-build.eclass symlink it |
8731 |
+ if ! multilib_is_native_abi; then |
8732 |
+ # non-native? let's replace it with a simple wrapper |
8733 |
+ for i in "${clang_tools[@]}"; do |
8734 |
+ rm "${ED%/}/usr/bin/${i}-${CLANG_VERSION}" || die |
8735 |
+ cat > "${T}"/wrapper.tmp <<-_EOF_ |
8736 |
+ #!${EPREFIX}/bin/sh |
8737 |
+ exec "${i}-${CLANG_VERSION}" $(get_abi_CFLAGS) "\${@}" |
8738 |
+ _EOF_ |
8739 |
+ newbin "${T}"/wrapper.tmp "${i}-${CLANG_VERSION}" |
8740 |
+ done |
8741 |
+ fi |
8742 |
+ fi |
8743 |
+} |
8744 |
+ |
8745 |
+multilib_src_install_all() { |
8746 |
+ insinto /usr/share/vim/vimfiles |
8747 |
+ doins -r utils/vim/*/ |
8748 |
+ # some users may find it useful |
8749 |
+ dodoc utils/vim/vimrc |
8750 |
+ |
8751 |
+ if use clang; then |
8752 |
+ pushd tools/clang >/dev/null || die |
8753 |
+ |
8754 |
+ if use static-analyzer ; then |
8755 |
+ pushd tools/scan-build >/dev/null || die |
8756 |
+ |
8757 |
+ dobin ccc-analyzer scan-build |
8758 |
+ dosym ccc-analyzer /usr/bin/c++-analyzer |
8759 |
+ doman scan-build.1 |
8760 |
+ |
8761 |
+ insinto /usr/share/llvm |
8762 |
+ doins scanview.css sorttable.js |
8763 |
+ |
8764 |
+ popd >/dev/null || die |
8765 |
+ fi |
8766 |
+ |
8767 |
+ python_inst() { |
8768 |
+ if use static-analyzer ; then |
8769 |
+ pushd tools/scan-view >/dev/null || die |
8770 |
+ |
8771 |
+ python_doscript scan-view |
8772 |
+ |
8773 |
+ touch __init__.py || die |
8774 |
+ python_moduleinto clang |
8775 |
+ python_domodule *.py Resources |
8776 |
+ |
8777 |
+ popd >/dev/null || die |
8778 |
+ fi |
8779 |
+ |
8780 |
+ if use python ; then |
8781 |
+ pushd bindings/python/clang >/dev/null || die |
8782 |
+ |
8783 |
+ python_moduleinto clang |
8784 |
+ python_domodule *.py |
8785 |
+ |
8786 |
+ popd >/dev/null || die |
8787 |
+ fi |
8788 |
+ |
8789 |
+ # AddressSanitizer symbolizer (currently separate) |
8790 |
+ # Removed for RHEL5. |
8791 |
+ if kernel_is -ge 2 6 32; then |
8792 |
+ python_doscript "${S}"/projects/compiler-rt/lib/asan/scripts/asan_symbolize.py |
8793 |
+ fi |
8794 |
+ } |
8795 |
+ python_foreach_impl python_inst |
8796 |
+ popd >/dev/null || die |
8797 |
+ fi |
8798 |
+} |
8799 |
+ |
8800 |
+pkg_postinst() { |
8801 |
+ if use clang; then |
8802 |
+ elog "To enable OpenMP support in clang, install sys-libs/libomp" |
8803 |
+ elog "and use the '-fopenmp=libomp' command line option" |
8804 |
+ fi |
8805 |
+} |
8806 |
|
8807 |
diff --git a/sys-devel/llvm/llvm-3.7.0.ebuild b/sys-devel/llvm/llvm-3.7.0.ebuild |
8808 |
new file mode 100644 |
8809 |
index 0000000..8da56ff |
8810 |
--- /dev/null |
8811 |
+++ b/sys-devel/llvm/llvm-3.7.0.ebuild |
8812 |
@@ -0,0 +1,492 @@ |
8813 |
+# Copyright 1999-2015 Gentoo Foundation |
8814 |
+# Distributed under the terms of the GNU General Public License v2 |
8815 |
+# $Id$ |
8816 |
+ |
8817 |
+EAPI=5 |
8818 |
+ |
8819 |
+: ${CMAKE_MAKEFILE_GENERATOR:=ninja} |
8820 |
+PYTHON_COMPAT=( python2_7 pypy ) |
8821 |
+ |
8822 |
+inherit check-reqs cmake-utils eutils flag-o-matic multilib \ |
8823 |
+ multilib-minimal python-r1 toolchain-funcs pax-utils |
8824 |
+ |
8825 |
+DESCRIPTION="Low Level Virtual Machine" |
8826 |
+HOMEPAGE="http://llvm.org/" |
8827 |
+SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.xz |
8828 |
+ clang? ( http://llvm.org/releases/${PV}/compiler-rt-${PV}.src.tar.xz |
8829 |
+ http://llvm.org/releases/${PV}/cfe-${PV}.src.tar.xz |
8830 |
+ http://llvm.org/releases/${PV}/clang-tools-extra-${PV}.src.tar.xz ) |
8831 |
+ lldb? ( http://llvm.org/releases/${PV}/lldb-${PV}.src.tar.xz ) |
8832 |
+ !doc? ( http://dev.gentoo.org/~voyageur/distfiles/${P}-manpages.tar.bz2 )" |
8833 |
+ |
8834 |
+LICENSE="UoI-NCSA" |
8835 |
+SLOT="0/${PV}" |
8836 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
8837 |
+IUSE="clang debug doc gold libedit +libffi lldb multitarget ncurses ocaml |
8838 |
+ python +static-analyzer test xml video_cards_radeon kernel_Darwin" |
8839 |
+ |
8840 |
+COMMON_DEPEND=" |
8841 |
+ sys-libs/zlib:0= |
8842 |
+ clang? ( |
8843 |
+ python? ( ${PYTHON_DEPS} ) |
8844 |
+ static-analyzer? ( |
8845 |
+ dev-lang/perl:* |
8846 |
+ ${PYTHON_DEPS} |
8847 |
+ ) |
8848 |
+ xml? ( dev-libs/libxml2:2= ) |
8849 |
+ ) |
8850 |
+ gold? ( >=sys-devel/binutils-2.22:*[cxx] ) |
8851 |
+ libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] ) |
8852 |
+ libffi? ( >=virtual/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] ) |
8853 |
+ ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] ) |
8854 |
+ ocaml? ( |
8855 |
+ dev-lang/ocaml:0= |
8856 |
+ dev-ml/findlib |
8857 |
+ dev-ml/ocaml-ctypes )" |
8858 |
+# configparser-3.2 breaks the build (3.3 or none at all are fine) |
8859 |
+DEPEND="${COMMON_DEPEND} |
8860 |
+ dev-lang/perl |
8861 |
+ >=sys-devel/make-3.81 |
8862 |
+ >=sys-devel/flex-2.5.4 |
8863 |
+ >=sys-devel/bison-1.875d |
8864 |
+ || ( >=sys-devel/gcc-3.0 >=sys-devel/llvm-3.5 |
8865 |
+ ( >=sys-freebsd/freebsd-lib-9.1-r10 sys-libs/libcxx ) |
8866 |
+ ) |
8867 |
+ || ( >=sys-devel/binutils-2.18 >=sys-devel/binutils-apple-5.1 ) |
8868 |
+ kernel_Darwin? ( sys-libs/libcxx ) |
8869 |
+ clang? ( xml? ( virtual/pkgconfig ) ) |
8870 |
+ doc? ( dev-python/sphinx ) |
8871 |
+ libffi? ( virtual/pkgconfig ) |
8872 |
+ lldb? ( dev-lang/swig ) |
8873 |
+ !!<dev-python/configparser-3.3.0.2 |
8874 |
+ ocaml? ( test? ( dev-ml/ounit ) ) |
8875 |
+ ${PYTHON_DEPS}" |
8876 |
+RDEPEND="${COMMON_DEPEND} |
8877 |
+ clang? ( !<=sys-devel/clang-${PV}-r99 ) |
8878 |
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r2 |
8879 |
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )" |
8880 |
+PDEPEND="clang? ( =sys-devel/clang-${PV}-r100 )" |
8881 |
+ |
8882 |
+# pypy gives me around 1700 unresolved tests due to open file limit |
8883 |
+# being exceeded. probably GC does not close them fast enough. |
8884 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE} |
8885 |
+ lldb? ( clang ) |
8886 |
+ test? ( || ( $(python_gen_useflags 'python*') ) )" |
8887 |
+ |
8888 |
+S=${WORKDIR}/${P/_}.src |
8889 |
+ |
8890 |
+pkg_pretend() { |
8891 |
+ # in megs |
8892 |
+ # !clang !debug !multitarget -O2 400 |
8893 |
+ # !clang !debug multitarget -O2 550 |
8894 |
+ # clang !debug !multitarget -O2 950 |
8895 |
+ # clang !debug multitarget -O2 1200 |
8896 |
+ # !clang debug multitarget -O2 5G |
8897 |
+ # clang !debug multitarget -O0 -g 12G |
8898 |
+ # clang debug multitarget -O2 16G |
8899 |
+ # clang debug multitarget -O0 -g 14G |
8900 |
+ |
8901 |
+ local build_size=550 |
8902 |
+ use clang && build_size=1200 |
8903 |
+ |
8904 |
+ if use debug; then |
8905 |
+ ewarn "USE=debug is known to increase the size of package considerably" |
8906 |
+ ewarn "and cause the tests to fail." |
8907 |
+ ewarn |
8908 |
+ |
8909 |
+ (( build_size *= 14 )) |
8910 |
+ elif is-flagq '-g?(gdb)?([1-9])'; then |
8911 |
+ ewarn "The C++ compiler -g option is known to increase the size of the package" |
8912 |
+ ewarn "considerably. If you run out of space, please consider removing it." |
8913 |
+ ewarn |
8914 |
+ |
8915 |
+ (( build_size *= 10 )) |
8916 |
+ fi |
8917 |
+ |
8918 |
+ # Multiply by number of ABIs :). |
8919 |
+ local abis=( $(multilib_get_enabled_abis) ) |
8920 |
+ (( build_size *= ${#abis[@]} )) |
8921 |
+ |
8922 |
+ local CHECKREQS_DISK_BUILD=${build_size}M |
8923 |
+ check-reqs_pkg_pretend |
8924 |
+ |
8925 |
+ if [[ ${MERGE_TYPE} != binary ]]; then |
8926 |
+ echo 'int main() {return 0;}' > "${T}"/test.cxx || die |
8927 |
+ ebegin "Trying to build a C++11 test program" |
8928 |
+ if ! $(tc-getCXX) -std=c++11 -o /dev/null "${T}"/test.cxx; then |
8929 |
+ eerror "LLVM-${PV} requires C++11-capable C++ compiler. Your current compiler" |
8930 |
+ eerror "does not seem to support -std=c++11 option. Please upgrade your compiler" |
8931 |
+ eerror "to gcc-4.7 or an equivalent version supporting C++11." |
8932 |
+ die "Currently active compiler does not support -std=c++11" |
8933 |
+ fi |
8934 |
+ eend ${?} |
8935 |
+ fi |
8936 |
+} |
8937 |
+ |
8938 |
+pkg_setup() { |
8939 |
+ pkg_pretend |
8940 |
+} |
8941 |
+ |
8942 |
+src_unpack() { |
8943 |
+ default |
8944 |
+ |
8945 |
+ if use clang; then |
8946 |
+ mv "${WORKDIR}"/cfe-${PV/_}.src "${S}"/tools/clang \ |
8947 |
+ || die "clang source directory move failed" |
8948 |
+ mv "${WORKDIR}"/compiler-rt-${PV/_}.src "${S}"/projects/compiler-rt \ |
8949 |
+ || die "compiler-rt source directory move failed" |
8950 |
+ mv "${WORKDIR}"/clang-tools-extra-${PV/_}.src "${S}"/tools/clang/tools/extra \ |
8951 |
+ || die "clang-tools-extra source directory move failed" |
8952 |
+ fi |
8953 |
+ |
8954 |
+ if use lldb; then |
8955 |
+ mv "${WORKDIR}"/lldb-${PV/_}.src "${S}"/tools/lldb \ |
8956 |
+ || die "lldb source directory move failed" |
8957 |
+ fi |
8958 |
+} |
8959 |
+ |
8960 |
+src_prepare() { |
8961 |
+ # Make ocaml warnings non-fatal, bug #537308 |
8962 |
+ sed -e "/RUN/s/-warn-error A//" -i test/Bindings/OCaml/*ml || die |
8963 |
+ # Fix libdir for ocaml bindings install, bug #559134 |
8964 |
+ epatch "${FILESDIR}"/cmake/${P}-ocaml-multilib.patch |
8965 |
+ |
8966 |
+ # Make it possible to override Sphinx HTML install dirs |
8967 |
+ # https://llvm.org/bugs/show_bug.cgi?id=23780 |
8968 |
+ epatch "${FILESDIR}"/cmake/0002-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch |
8969 |
+ |
8970 |
+ # Prevent race conditions with parallel Sphinx runs |
8971 |
+ # https://llvm.org/bugs/show_bug.cgi?id=23781 |
8972 |
+ epatch "${FILESDIR}"/cmake/0003-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch |
8973 |
+ |
8974 |
+ # Prevent installing libgtest |
8975 |
+ # https://llvm.org/bugs/show_bug.cgi?id=18341 |
8976 |
+ epatch "${FILESDIR}"/cmake/0004-cmake-Do-not-install-libgtest.patch |
8977 |
+ |
8978 |
+ if use clang; then |
8979 |
+ # Automatically select active system GCC's libraries, bugs #406163 and #417913 |
8980 |
+ epatch "${FILESDIR}"/clang-3.5-gentoo-runtime-gcc-detection-v3.patch |
8981 |
+ |
8982 |
+ epatch "${FILESDIR}"/clang-3.6-gentoo-install.patch |
8983 |
+ |
8984 |
+ sed -i -e "s^@EPREFIX@^${EPREFIX}^" \ |
8985 |
+ tools/clang/tools/scan-build/scan-build || die |
8986 |
+ |
8987 |
+ # Install clang runtime into /usr/lib/clang |
8988 |
+ # https://llvm.org/bugs/show_bug.cgi?id=23792 |
8989 |
+ epatch "${FILESDIR}"/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix.patch |
8990 |
+ epatch "${FILESDIR}"/cmake/compiler-rt-0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi.patch |
8991 |
+ |
8992 |
+ # Make it possible to override CLANG_LIBDIR_SUFFIX |
8993 |
+ # (that is used only to find LLVMgold.so) |
8994 |
+ # https://llvm.org/bugs/show_bug.cgi?id=23793 |
8995 |
+ epatch "${FILESDIR}"/cmake/clang-0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch |
8996 |
+ |
8997 |
+ # Fix WX sections, bug #421527 |
8998 |
+ find "${S}"/projects/compiler-rt/lib/builtins -type f -name \*.S -exec sed \ |
8999 |
+ -e '$a\\n#if defined(__linux__) && defined(__ELF__)\n.section .note.GNU-stack,"",%progbits\n#endif' \ |
9000 |
+ -i {} \; || die |
9001 |
+ |
9002 |
+ # Workaround bug #553416 until upstream fixes it |
9003 |
+ epatch "${FILESDIR}"/clang-3.7-strip_doc_refs.patch |
9004 |
+ fi |
9005 |
+ |
9006 |
+ if use lldb; then |
9007 |
+ # Do not install dummy readline.so module from |
9008 |
+ # https://llvm.org/bugs/show_bug.cgi?id=18841 |
9009 |
+ sed -e 's/add_subdirectory(readline)/#&/' \ |
9010 |
+ -i tools/lldb/scripts/Python/modules/CMakeLists.txt || die |
9011 |
+ fi |
9012 |
+ |
9013 |
+ # User patches |
9014 |
+ epatch_user |
9015 |
+ |
9016 |
+ python_setup |
9017 |
+ |
9018 |
+ # Native libdir is used to hold LLVMgold.so |
9019 |
+ NATIVE_LIBDIR=$(get_libdir) |
9020 |
+} |
9021 |
+ |
9022 |
+multilib_src_configure() { |
9023 |
+ local targets |
9024 |
+ if use multitarget; then |
9025 |
+ targets=all |
9026 |
+ else |
9027 |
+ targets='host;CppBackend' |
9028 |
+ use video_cards_radeon && targets+=';AMDGPU' |
9029 |
+ fi |
9030 |
+ |
9031 |
+ local ffi_cflags ffi_ldflags |
9032 |
+ if use libffi; then |
9033 |
+ ffi_cflags=$(pkg-config --cflags-only-I libffi) |
9034 |
+ ffi_ldflags=$(pkg-config --libs-only-L libffi) |
9035 |
+ fi |
9036 |
+ |
9037 |
+ local libdir=$(get_libdir) |
9038 |
+ local mycmakeargs=( |
9039 |
+ "${mycmakeargs[@]}" |
9040 |
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib} |
9041 |
+ |
9042 |
+ -DBUILD_SHARED_LIBS=ON |
9043 |
+ -DLLVM_ENABLE_TIMESTAMPS=OFF |
9044 |
+ -DLLVM_TARGETS_TO_BUILD="${targets}" |
9045 |
+ -DLLVM_BUILD_TESTS=$(usex test) |
9046 |
+ |
9047 |
+ -DLLVM_ENABLE_FFI=$(usex libffi) |
9048 |
+ -DLLVM_ENABLE_TERMINFO=$(usex ncurses) |
9049 |
+ -DLLVM_ENABLE_ASSERTIONS=$(usex debug) |
9050 |
+ -DLLVM_ENABLE_EH=ON |
9051 |
+ -DLLVM_ENABLE_RTTI=ON |
9052 |
+ |
9053 |
+ -DWITH_POLLY=OFF # TODO |
9054 |
+ |
9055 |
+ -DLLVM_HOST_TRIPLE="${CHOST}" |
9056 |
+ |
9057 |
+ -DFFI_INCLUDE_DIR="${ffi_cflags#-I}" |
9058 |
+ -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}" |
9059 |
+ |
9060 |
+ -DHAVE_HISTEDIT_H=$(usex libedit) |
9061 |
+ ) |
9062 |
+ |
9063 |
+ if use lldb; then |
9064 |
+ mycmakeargs+=( |
9065 |
+ -DLLDB_DISABLE_LIBEDIT=$(usex !libedit) |
9066 |
+ -DLLDB_DISABLE_CURSES=$(usex !ncurses) |
9067 |
+ -DLLDB_ENABLE_TERMINFO=$(usex ncurses) |
9068 |
+ ) |
9069 |
+ fi |
9070 |
+ |
9071 |
+ if ! multilib_is_native_abi || ! use ocaml; then |
9072 |
+ mycmakeargs+=( |
9073 |
+ -DOCAMLFIND=NO |
9074 |
+ ) |
9075 |
+ fi |
9076 |
+# Note: go bindings have no CMake rules at the moment |
9077 |
+# but let's kill the check in case they are introduced |
9078 |
+# if ! multilib_is_native_abi || ! use go; then |
9079 |
+ mycmakeargs+=( |
9080 |
+ -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND |
9081 |
+ ) |
9082 |
+# fi |
9083 |
+ |
9084 |
+ if multilib_is_native_abi; then |
9085 |
+ mycmakeargs+=( |
9086 |
+ -DLLVM_BUILD_DOCS=$(usex doc) |
9087 |
+ -DLLVM_ENABLE_SPHINX=$(usex doc) |
9088 |
+ -DLLVM_ENABLE_DOXYGEN=OFF |
9089 |
+ -DLLVM_INSTALL_HTML="${EPREFIX}/usr/share/doc/${PF}/html" |
9090 |
+ ) |
9091 |
+ |
9092 |
+ if use clang; then |
9093 |
+ mycmakeargs+=( |
9094 |
+ -DCLANG_INSTALL_HTML="${EPREFIX}/usr/share/doc/${PF}/clang" |
9095 |
+ ) |
9096 |
+ fi |
9097 |
+ |
9098 |
+ if use gold; then |
9099 |
+ mycmakeargs+=( |
9100 |
+ -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include |
9101 |
+ ) |
9102 |
+ fi |
9103 |
+ |
9104 |
+ if use lldb; then |
9105 |
+ mycmakeargs+=( |
9106 |
+ -DLLDB_DISABLE_PYTHON=$(usex !python) |
9107 |
+ ) |
9108 |
+ fi |
9109 |
+ |
9110 |
+ else |
9111 |
+ if use clang; then |
9112 |
+ mycmakeargs+=( |
9113 |
+ # disable compiler-rt on non-native ABI because: |
9114 |
+ # 1. it fails to configure because of -m32 |
9115 |
+ # 2. it is shared between ABIs so no point building |
9116 |
+ # it multiple times |
9117 |
+ -DLLVM_EXTERNAL_COMPILER_RT_BUILD=OFF |
9118 |
+ -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_BUILD=OFF |
9119 |
+ ) |
9120 |
+ fi |
9121 |
+ if use lldb; then |
9122 |
+ mycmakeargs+=( |
9123 |
+ # only run swig on native abi |
9124 |
+ -DLLDB_DISABLE_PYTHON=ON |
9125 |
+ ) |
9126 |
+ fi |
9127 |
+ fi |
9128 |
+ |
9129 |
+ if use clang; then |
9130 |
+ mycmakeargs+=( |
9131 |
+ -DCLANG_ENABLE_ARCMT=$(usex static-analyzer) |
9132 |
+ -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer) |
9133 |
+ -DCLANG_LIBDIR_SUFFIX="${NATIVE_LIBDIR#lib}" |
9134 |
+ ) |
9135 |
+ |
9136 |
+ # -- not needed when compiler-rt is built with host compiler -- |
9137 |
+ # cmake passes host C*FLAGS to compiler-rt build |
9138 |
+ # which is performed using clang, so we need to filter out |
9139 |
+ # some flags clang does not support |
9140 |
+ # (if you know some more flags that don't work, let us know) |
9141 |
+ #filter-flags -msahf -frecord-gcc-switches |
9142 |
+ fi |
9143 |
+ |
9144 |
+ cmake-utils_src_configure |
9145 |
+} |
9146 |
+ |
9147 |
+multilib_src_compile() { |
9148 |
+ cmake-utils_src_compile |
9149 |
+ # TODO: not sure why this target is not correctly called |
9150 |
+ multilib_is_native_abi && use doc && use ocaml && cmake-utils_src_make docs/ocaml_doc |
9151 |
+ |
9152 |
+ pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld |
9153 |
+ pax-mark m "${BUILD_DIR}"/bin/lli |
9154 |
+ pax-mark m "${BUILD_DIR}"/bin/lli-child-target |
9155 |
+ |
9156 |
+ if use test; then |
9157 |
+ pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/Orc/OrcJITTests |
9158 |
+ pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/MCJIT/MCJITTests |
9159 |
+ pax-mark m "${BUILD_DIR}"/unittests/Support/SupportTests |
9160 |
+ fi |
9161 |
+} |
9162 |
+ |
9163 |
+multilib_src_test() { |
9164 |
+ # respect TMPDIR! |
9165 |
+ local -x LIT_PRESERVES_TMP=1 |
9166 |
+ local test_targets=( check ) |
9167 |
+ # clang tests won't work on non-native ABI because we skip compiler-rt |
9168 |
+ multilib_is_native_abi && use clang && test_targets+=( check-clang ) |
9169 |
+ cmake-utils_src_make "${test_targets[@]}" |
9170 |
+} |
9171 |
+ |
9172 |
+src_install() { |
9173 |
+ local MULTILIB_CHOST_TOOLS=( |
9174 |
+ /usr/bin/llvm-config |
9175 |
+ ) |
9176 |
+ |
9177 |
+ local MULTILIB_WRAPPED_HEADERS=( |
9178 |
+ /usr/include/llvm/Config/config.h |
9179 |
+ /usr/include/llvm/Config/llvm-config.h |
9180 |
+ ) |
9181 |
+ |
9182 |
+ if use clang; then |
9183 |
+ # note: magic applied in multilib_src_install()! |
9184 |
+ CLANG_VERSION=${PV%.*} |
9185 |
+ |
9186 |
+ MULTILIB_CHOST_TOOLS+=( |
9187 |
+ /usr/bin/clang |
9188 |
+ /usr/bin/clang++ |
9189 |
+ /usr/bin/clang-cl |
9190 |
+ /usr/bin/clang-${CLANG_VERSION} |
9191 |
+ /usr/bin/clang++-${CLANG_VERSION} |
9192 |
+ /usr/bin/clang-cl-${CLANG_VERSION} |
9193 |
+ ) |
9194 |
+ |
9195 |
+ MULTILIB_WRAPPED_HEADERS+=( |
9196 |
+ /usr/include/clang/Config/config.h |
9197 |
+ ) |
9198 |
+ fi |
9199 |
+ |
9200 |
+ multilib-minimal_src_install |
9201 |
+} |
9202 |
+ |
9203 |
+multilib_src_install() { |
9204 |
+ cmake-utils_src_install |
9205 |
+ |
9206 |
+ if multilib_is_native_abi; then |
9207 |
+ # Install man pages. |
9208 |
+ use doc || doman "${WORKDIR}"/${P}-manpages/*.1 |
9209 |
+ |
9210 |
+ # Symlink the gold plugin. |
9211 |
+ if use gold; then |
9212 |
+ dodir "/usr/${CHOST}/binutils-bin/lib/bfd-plugins" |
9213 |
+ dosym "../../../../$(get_libdir)/LLVMgold.so" \ |
9214 |
+ "/usr/${CHOST}/binutils-bin/lib/bfd-plugins/LLVMgold.so" |
9215 |
+ fi |
9216 |
+ fi |
9217 |
+ |
9218 |
+ # apply CHOST and CLANG_VERSION to clang executables |
9219 |
+ # they're statically linked so we don't have to worry about the lib |
9220 |
+ if use clang; then |
9221 |
+ local clang_tools=( clang clang++ clang-cl ) |
9222 |
+ local i |
9223 |
+ |
9224 |
+ # cmake gives us: |
9225 |
+ # - clang-X.Y |
9226 |
+ # - clang -> clang-X.Y |
9227 |
+ # - clang++, clang-cl -> clang |
9228 |
+ # we want to have: |
9229 |
+ # - clang-X.Y |
9230 |
+ # - clang++-X.Y, clang-cl-X.Y -> clang-X.Y |
9231 |
+ # - clang, clang++, clang-cl -> clang*-X.Y |
9232 |
+ # so we need to fix the two tools |
9233 |
+ for i in "${clang_tools[@]:1}"; do |
9234 |
+ rm "${ED%/}/usr/bin/${i}" || die |
9235 |
+ dosym "clang-${CLANG_VERSION}" "/usr/bin/${i}-${CLANG_VERSION}" |
9236 |
+ dosym "${i}-${CLANG_VERSION}" "/usr/bin/${i}" |
9237 |
+ done |
9238 |
+ |
9239 |
+ # now prepend ${CHOST} and let the multilib-build.eclass symlink it |
9240 |
+ if ! multilib_is_native_abi; then |
9241 |
+ # non-native? let's replace it with a simple wrapper |
9242 |
+ for i in "${clang_tools[@]}"; do |
9243 |
+ rm "${ED%/}/usr/bin/${i}-${CLANG_VERSION}" || die |
9244 |
+ cat > "${T}"/wrapper.tmp <<-_EOF_ |
9245 |
+ #!${EPREFIX}/bin/sh |
9246 |
+ exec "${i}-${CLANG_VERSION}" $(get_abi_CFLAGS) "\${@}" |
9247 |
+ _EOF_ |
9248 |
+ newbin "${T}"/wrapper.tmp "${i}-${CLANG_VERSION}" |
9249 |
+ done |
9250 |
+ fi |
9251 |
+ fi |
9252 |
+} |
9253 |
+ |
9254 |
+multilib_src_install_all() { |
9255 |
+ insinto /usr/share/vim/vimfiles |
9256 |
+ doins -r utils/vim/*/ |
9257 |
+ # some users may find it useful |
9258 |
+ dodoc utils/vim/vimrc |
9259 |
+ |
9260 |
+ if use clang; then |
9261 |
+ pushd tools/clang >/dev/null || die |
9262 |
+ |
9263 |
+ if use static-analyzer ; then |
9264 |
+ pushd tools/scan-build >/dev/null || die |
9265 |
+ |
9266 |
+ dobin ccc-analyzer scan-build |
9267 |
+ dosym ccc-analyzer /usr/bin/c++-analyzer |
9268 |
+ doman scan-build.1 |
9269 |
+ |
9270 |
+ insinto /usr/share/llvm |
9271 |
+ doins scanview.css sorttable.js |
9272 |
+ |
9273 |
+ popd >/dev/null || die |
9274 |
+ fi |
9275 |
+ |
9276 |
+ python_inst() { |
9277 |
+ if use static-analyzer ; then |
9278 |
+ pushd tools/scan-view >/dev/null || die |
9279 |
+ |
9280 |
+ python_doscript scan-view |
9281 |
+ |
9282 |
+ touch __init__.py || die |
9283 |
+ python_moduleinto clang |
9284 |
+ python_domodule *.py Resources |
9285 |
+ |
9286 |
+ popd >/dev/null || die |
9287 |
+ fi |
9288 |
+ |
9289 |
+ if use python ; then |
9290 |
+ pushd bindings/python/clang >/dev/null || die |
9291 |
+ |
9292 |
+ python_moduleinto clang |
9293 |
+ python_domodule *.py |
9294 |
+ |
9295 |
+ popd >/dev/null || die |
9296 |
+ fi |
9297 |
+ |
9298 |
+ # AddressSanitizer symbolizer (currently separate) |
9299 |
+ python_doscript "${S}"/projects/compiler-rt/lib/asan/scripts/asan_symbolize.py |
9300 |
+ } |
9301 |
+ python_foreach_impl python_inst |
9302 |
+ popd >/dev/null || die |
9303 |
+ fi |
9304 |
+} |
9305 |
|
9306 |
diff --git a/sys-devel/llvm/llvm-9999.ebuild b/sys-devel/llvm/llvm-9999.ebuild |
9307 |
new file mode 100644 |
9308 |
index 0000000..1d0a6e6 |
9309 |
--- /dev/null |
9310 |
+++ b/sys-devel/llvm/llvm-9999.ebuild |
9311 |
@@ -0,0 +1,508 @@ |
9312 |
+# Copyright 1999-2015 Gentoo Foundation |
9313 |
+# Distributed under the terms of the GNU General Public License v2 |
9314 |
+# $Id$ |
9315 |
+ |
9316 |
+EAPI=5 |
9317 |
+ |
9318 |
+: ${CMAKE_MAKEFILE_GENERATOR:=ninja} |
9319 |
+PYTHON_COMPAT=( python2_7 pypy ) |
9320 |
+ |
9321 |
+inherit check-reqs cmake-utils eutils flag-o-matic git-r3 multilib \ |
9322 |
+ multilib-minimal python-r1 toolchain-funcs pax-utils |
9323 |
+ |
9324 |
+DESCRIPTION="Low Level Virtual Machine" |
9325 |
+HOMEPAGE="http://llvm.org/" |
9326 |
+SRC_URI="" |
9327 |
+EGIT_REPO_URI="http://llvm.org/git/llvm.git |
9328 |
+ https://github.com/llvm-mirror/llvm.git" |
9329 |
+ |
9330 |
+LICENSE="UoI-NCSA" |
9331 |
+SLOT="0/${PV}" |
9332 |
+KEYWORDS="" |
9333 |
+IUSE="clang debug +doc gold libedit +libffi lldb multitarget ncurses ocaml |
9334 |
+ python +static-analyzer test xml video_cards_radeon kernel_Darwin" |
9335 |
+ |
9336 |
+COMMON_DEPEND=" |
9337 |
+ sys-libs/zlib:0= |
9338 |
+ clang? ( |
9339 |
+ python? ( ${PYTHON_DEPS} ) |
9340 |
+ static-analyzer? ( |
9341 |
+ dev-lang/perl:* |
9342 |
+ ${PYTHON_DEPS} |
9343 |
+ ) |
9344 |
+ xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) |
9345 |
+ ) |
9346 |
+ gold? ( >=sys-devel/binutils-2.22:*[cxx] ) |
9347 |
+ libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] ) |
9348 |
+ libffi? ( >=virtual/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] ) |
9349 |
+ ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] ) |
9350 |
+ ocaml? ( |
9351 |
+ dev-lang/ocaml:0= |
9352 |
+ dev-ml/findlib |
9353 |
+ dev-ml/ocaml-ctypes )" |
9354 |
+# configparser-3.2 breaks the build (3.3 or none at all are fine) |
9355 |
+DEPEND="${COMMON_DEPEND} |
9356 |
+ dev-lang/perl |
9357 |
+ >=sys-devel/make-3.81 |
9358 |
+ >=sys-devel/flex-2.5.4 |
9359 |
+ >=sys-devel/bison-1.875d |
9360 |
+ || ( >=sys-devel/gcc-3.0 >=sys-devel/llvm-3.5 |
9361 |
+ ( >=sys-freebsd/freebsd-lib-9.1-r10 sys-libs/libcxx ) |
9362 |
+ ) |
9363 |
+ || ( >=sys-devel/binutils-2.18 >=sys-devel/binutils-apple-5.1 ) |
9364 |
+ kernel_Darwin? ( sys-libs/libcxx ) |
9365 |
+ clang? ( xml? ( virtual/pkgconfig ) ) |
9366 |
+ doc? ( dev-python/sphinx ) |
9367 |
+ libffi? ( virtual/pkgconfig ) |
9368 |
+ lldb? ( dev-lang/swig ) |
9369 |
+ !!<dev-python/configparser-3.3.0.2 |
9370 |
+ ocaml? ( test? ( dev-ml/ounit ) ) |
9371 |
+ ${PYTHON_DEPS}" |
9372 |
+RDEPEND="${COMMON_DEPEND} |
9373 |
+ clang? ( !<=sys-devel/clang-${PV}-r99 ) |
9374 |
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r2 |
9375 |
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )" |
9376 |
+PDEPEND="clang? ( =sys-devel/clang-${PV}-r100 )" |
9377 |
+ |
9378 |
+# pypy gives me around 1700 unresolved tests due to open file limit |
9379 |
+# being exceeded. probably GC does not close them fast enough. |
9380 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE} |
9381 |
+ lldb? ( clang ) |
9382 |
+ test? ( || ( $(python_gen_useflags 'python*') ) )" |
9383 |
+ |
9384 |
+pkg_pretend() { |
9385 |
+ # in megs |
9386 |
+ # !clang !debug !multitarget -O2 400 |
9387 |
+ # !clang !debug multitarget -O2 550 |
9388 |
+ # clang !debug !multitarget -O2 950 |
9389 |
+ # clang !debug multitarget -O2 1200 |
9390 |
+ # !clang debug multitarget -O2 5G |
9391 |
+ # clang !debug multitarget -O0 -g 12G |
9392 |
+ # clang debug multitarget -O2 16G |
9393 |
+ # clang debug multitarget -O0 -g 14G |
9394 |
+ |
9395 |
+ local build_size=550 |
9396 |
+ use clang && build_size=1200 |
9397 |
+ |
9398 |
+ if use debug; then |
9399 |
+ ewarn "USE=debug is known to increase the size of package considerably" |
9400 |
+ ewarn "and cause the tests to fail." |
9401 |
+ ewarn |
9402 |
+ |
9403 |
+ (( build_size *= 14 )) |
9404 |
+ elif is-flagq '-g?(gdb)?([1-9])'; then |
9405 |
+ ewarn "The C++ compiler -g option is known to increase the size of the package" |
9406 |
+ ewarn "considerably. If you run out of space, please consider removing it." |
9407 |
+ ewarn |
9408 |
+ |
9409 |
+ (( build_size *= 10 )) |
9410 |
+ fi |
9411 |
+ |
9412 |
+ # Multiply by number of ABIs :). |
9413 |
+ local abis=( $(multilib_get_enabled_abis) ) |
9414 |
+ (( build_size *= ${#abis[@]} )) |
9415 |
+ |
9416 |
+ local CHECKREQS_DISK_BUILD=${build_size}M |
9417 |
+ check-reqs_pkg_pretend |
9418 |
+ |
9419 |
+ if [[ ${MERGE_TYPE} != binary ]]; then |
9420 |
+ echo 'int main() {return 0;}' > "${T}"/test.cxx || die |
9421 |
+ ebegin "Trying to build a C++11 test program" |
9422 |
+ if ! $(tc-getCXX) -std=c++11 -o /dev/null "${T}"/test.cxx; then |
9423 |
+ eerror "LLVM-${PV} requires C++11-capable C++ compiler. Your current compiler" |
9424 |
+ eerror "does not seem to support -std=c++11 option. Please upgrade your compiler" |
9425 |
+ eerror "to gcc-4.7 or an equivalent version supporting C++11." |
9426 |
+ die "Currently active compiler does not support -std=c++11" |
9427 |
+ fi |
9428 |
+ eend ${?} |
9429 |
+ fi |
9430 |
+} |
9431 |
+ |
9432 |
+pkg_setup() { |
9433 |
+ pkg_pretend |
9434 |
+} |
9435 |
+ |
9436 |
+src_unpack() { |
9437 |
+ if use clang; then |
9438 |
+ git-r3_fetch "http://llvm.org/git/compiler-rt.git |
9439 |
+ https://github.com/llvm-mirror/compiler-rt.git" |
9440 |
+ git-r3_fetch "http://llvm.org/git/clang.git |
9441 |
+ https://github.com/llvm-mirror/clang.git" |
9442 |
+ git-r3_fetch "http://llvm.org/git/clang-tools-extra.git |
9443 |
+ https://github.com/llvm-mirror/clang-tools-extra.git" |
9444 |
+ fi |
9445 |
+ if use lldb; then |
9446 |
+ git-r3_fetch "http://llvm.org/git/lldb.git |
9447 |
+ https://github.com/llvm-mirror/lldb.git" |
9448 |
+ fi |
9449 |
+ git-r3_fetch |
9450 |
+ |
9451 |
+ if use clang; then |
9452 |
+ git-r3_checkout http://llvm.org/git/compiler-rt.git \ |
9453 |
+ "${S}"/projects/compiler-rt |
9454 |
+ git-r3_checkout http://llvm.org/git/clang.git \ |
9455 |
+ "${S}"/tools/clang |
9456 |
+ git-r3_checkout http://llvm.org/git/clang-tools-extra.git \ |
9457 |
+ "${S}"/tools/clang/tools/extra |
9458 |
+ fi |
9459 |
+ if use lldb; then |
9460 |
+ git-r3_checkout http://llvm.org/git/lldb.git \ |
9461 |
+ "${S}"/tools/lldb |
9462 |
+ fi |
9463 |
+ git-r3_checkout |
9464 |
+} |
9465 |
+ |
9466 |
+src_prepare() { |
9467 |
+ # Make ocaml warnings non-fatal, bug #537308 |
9468 |
+ sed -e "/RUN/s/-warn-error A//" -i test/Bindings/OCaml/*ml || die |
9469 |
+ # Fix libdir for ocaml bindings install, bug #559134 |
9470 |
+ epatch "${FILESDIR}"/cmake/${PN}-3.7.0-ocaml-multilib.patch |
9471 |
+ |
9472 |
+ # Make it possible to override Sphinx HTML install dirs |
9473 |
+ # https://llvm.org/bugs/show_bug.cgi?id=23780 |
9474 |
+ epatch "${FILESDIR}"/cmake/0002-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch |
9475 |
+ |
9476 |
+ # Prevent race conditions with parallel Sphinx runs |
9477 |
+ # https://llvm.org/bugs/show_bug.cgi?id=23781 |
9478 |
+ epatch "${FILESDIR}"/cmake/0003-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch |
9479 |
+ |
9480 |
+ # Prevent installing libgtest |
9481 |
+ # https://llvm.org/bugs/show_bug.cgi?id=18341 |
9482 |
+ epatch "${FILESDIR}"/cmake/0004-cmake-Do-not-install-libgtest.patch |
9483 |
+ |
9484 |
+ # Allow custom cmake build types (like 'Gentoo') |
9485 |
+ epatch "${FILESDIR}"/cmake/${PN}-3.8-allow_custom_cmake_build_types.patch |
9486 |
+ |
9487 |
+ if use clang; then |
9488 |
+ # Automatically select active system GCC's libraries, bugs #406163 and #417913 |
9489 |
+ epatch "${FILESDIR}"/clang-3.5-gentoo-runtime-gcc-detection-v3.patch |
9490 |
+ |
9491 |
+ epatch "${FILESDIR}"/clang-3.6-gentoo-install.patch |
9492 |
+ |
9493 |
+ sed -i -e "s^@EPREFIX@^${EPREFIX}^" \ |
9494 |
+ tools/clang/tools/scan-build/scan-build || die |
9495 |
+ |
9496 |
+ # Install clang runtime into /usr/lib/clang |
9497 |
+ # https://llvm.org/bugs/show_bug.cgi?id=23792 |
9498 |
+ epatch "${FILESDIR}"/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix-3.8.patch |
9499 |
+ epatch "${FILESDIR}"/cmake/compiler-rt-0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi.patch |
9500 |
+ |
9501 |
+ # Make it possible to override CLANG_LIBDIR_SUFFIX |
9502 |
+ # (that is used only to find LLVMgold.so) |
9503 |
+ # https://llvm.org/bugs/show_bug.cgi?id=23793 |
9504 |
+ epatch "${FILESDIR}"/cmake/clang-0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch |
9505 |
+ |
9506 |
+ # Fix WX sections, bug #421527 |
9507 |
+ find "${S}"/projects/compiler-rt/lib/builtins -type f -name \*.S -exec sed \ |
9508 |
+ -e '$a\\n#if defined(__linux__) && defined(__ELF__)\n.section .note.GNU-stack,"",%progbits\n#endif' \ |
9509 |
+ -i {} \; || die |
9510 |
+ fi |
9511 |
+ |
9512 |
+ if use lldb; then |
9513 |
+ # Do not install dummy readline.so module from |
9514 |
+ # https://llvm.org/bugs/show_bug.cgi?id=18841 |
9515 |
+ sed -e 's/add_subdirectory(readline)/#&/' \ |
9516 |
+ -i tools/lldb/scripts/Python/modules/CMakeLists.txt || die |
9517 |
+ fi |
9518 |
+ |
9519 |
+ # User patches |
9520 |
+ epatch_user |
9521 |
+ |
9522 |
+ python_setup |
9523 |
+ |
9524 |
+ # Native libdir is used to hold LLVMgold.so |
9525 |
+ NATIVE_LIBDIR=$(get_libdir) |
9526 |
+} |
9527 |
+ |
9528 |
+multilib_src_configure() { |
9529 |
+ local targets |
9530 |
+ if use multitarget; then |
9531 |
+ targets=all |
9532 |
+ else |
9533 |
+ targets='host;CppBackend' |
9534 |
+ use video_cards_radeon && targets+=';AMDGPU' |
9535 |
+ fi |
9536 |
+ |
9537 |
+ local ffi_cflags ffi_ldflags |
9538 |
+ if use libffi; then |
9539 |
+ ffi_cflags=$(pkg-config --cflags-only-I libffi) |
9540 |
+ ffi_ldflags=$(pkg-config --libs-only-L libffi) |
9541 |
+ fi |
9542 |
+ |
9543 |
+ local libdir=$(get_libdir) |
9544 |
+ local mycmakeargs=( |
9545 |
+ "${mycmakeargs[@]}" |
9546 |
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib} |
9547 |
+ |
9548 |
+ -DBUILD_SHARED_LIBS=ON |
9549 |
+ -DLLVM_ENABLE_TIMESTAMPS=OFF |
9550 |
+ -DLLVM_TARGETS_TO_BUILD="${targets}" |
9551 |
+ -DLLVM_BUILD_TESTS=$(usex test) |
9552 |
+ |
9553 |
+ -DLLVM_ENABLE_FFI=$(usex libffi) |
9554 |
+ -DLLVM_ENABLE_TERMINFO=$(usex ncurses) |
9555 |
+ -DLLVM_ENABLE_ASSERTIONS=$(usex debug) |
9556 |
+ -DLLVM_ENABLE_EH=ON |
9557 |
+ -DLLVM_ENABLE_RTTI=ON |
9558 |
+ |
9559 |
+ -DWITH_POLLY=OFF # TODO |
9560 |
+ |
9561 |
+ -DLLVM_HOST_TRIPLE="${CHOST}" |
9562 |
+ |
9563 |
+ -DFFI_INCLUDE_DIR="${ffi_cflags#-I}" |
9564 |
+ -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}" |
9565 |
+ |
9566 |
+ -DHAVE_HISTEDIT_H=$(usex libedit) |
9567 |
+ ) |
9568 |
+ |
9569 |
+ if use lldb; then |
9570 |
+ mycmakeargs+=( |
9571 |
+ -DLLDB_DISABLE_LIBEDIT=$(usex !libedit) |
9572 |
+ -DLLDB_DISABLE_CURSES=$(usex !ncurses) |
9573 |
+ -DLLDB_ENABLE_TERMINFO=$(usex ncurses) |
9574 |
+ ) |
9575 |
+ fi |
9576 |
+ |
9577 |
+ if ! multilib_is_native_abi || ! use ocaml; then |
9578 |
+ mycmakeargs+=( |
9579 |
+ -DOCAMLFIND=NO |
9580 |
+ ) |
9581 |
+ fi |
9582 |
+# Note: go bindings have no CMake rules at the moment |
9583 |
+# but let's kill the check in case they are introduced |
9584 |
+# if ! multilib_is_native_abi || ! use go; then |
9585 |
+ mycmakeargs+=( |
9586 |
+ -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND |
9587 |
+ ) |
9588 |
+# fi |
9589 |
+ |
9590 |
+ if multilib_is_native_abi; then |
9591 |
+ mycmakeargs+=( |
9592 |
+ -DLLVM_BUILD_DOCS=$(usex doc) |
9593 |
+ -DLLVM_ENABLE_SPHINX=$(usex doc) |
9594 |
+ -DLLVM_ENABLE_DOXYGEN=OFF |
9595 |
+ -DLLVM_INSTALL_HTML="${EPREFIX}/usr/share/doc/${PF}/html" |
9596 |
+ -DSPHINX_WARNINGS_AS_ERRORS=OFF |
9597 |
+ -DLLVM_INSTALL_UTILS=ON |
9598 |
+ ) |
9599 |
+ |
9600 |
+ if use clang; then |
9601 |
+ mycmakeargs+=( |
9602 |
+ -DCLANG_INSTALL_HTML="${EPREFIX}/usr/share/doc/${PF}/clang" |
9603 |
+ ) |
9604 |
+ fi |
9605 |
+ |
9606 |
+ if use gold; then |
9607 |
+ mycmakeargs+=( |
9608 |
+ -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include |
9609 |
+ ) |
9610 |
+ fi |
9611 |
+ |
9612 |
+ if use lldb; then |
9613 |
+ mycmakeargs+=( |
9614 |
+ -DLLDB_DISABLE_PYTHON=$(usex !python) |
9615 |
+ ) |
9616 |
+ fi |
9617 |
+ |
9618 |
+ else |
9619 |
+ if use clang; then |
9620 |
+ mycmakeargs+=( |
9621 |
+ # disable compiler-rt on non-native ABI because: |
9622 |
+ # 1. it fails to configure because of -m32 |
9623 |
+ # 2. it is shared between ABIs so no point building |
9624 |
+ # it multiple times |
9625 |
+ -DLLVM_EXTERNAL_COMPILER_RT_BUILD=OFF |
9626 |
+ -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_BUILD=OFF |
9627 |
+ ) |
9628 |
+ fi |
9629 |
+ if use lldb; then |
9630 |
+ mycmakeargs+=( |
9631 |
+ # only run swig on native abi |
9632 |
+ -DLLDB_DISABLE_PYTHON=ON |
9633 |
+ ) |
9634 |
+ fi |
9635 |
+ fi |
9636 |
+ |
9637 |
+ if use clang; then |
9638 |
+ mycmakeargs+=( |
9639 |
+ -DCLANG_ENABLE_ARCMT=$(usex static-analyzer) |
9640 |
+ -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer) |
9641 |
+ -DCLANG_LIBDIR_SUFFIX="${NATIVE_LIBDIR#lib}" |
9642 |
+ ) |
9643 |
+ |
9644 |
+ # -- not needed when compiler-rt is built with host compiler -- |
9645 |
+ # cmake passes host C*FLAGS to compiler-rt build |
9646 |
+ # which is performed using clang, so we need to filter out |
9647 |
+ # some flags clang does not support |
9648 |
+ # (if you know some more flags that don't work, let us know) |
9649 |
+ #filter-flags -msahf -frecord-gcc-switches |
9650 |
+ fi |
9651 |
+ |
9652 |
+ cmake-utils_src_configure |
9653 |
+} |
9654 |
+ |
9655 |
+multilib_src_compile() { |
9656 |
+ cmake-utils_src_compile |
9657 |
+ # TODO: not sure why this target is not correctly called |
9658 |
+ multilib_is_native_abi && use doc && use ocaml && cmake-utils_src_make docs/ocaml_doc |
9659 |
+ |
9660 |
+ pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld |
9661 |
+ pax-mark m "${BUILD_DIR}"/bin/lli |
9662 |
+ pax-mark m "${BUILD_DIR}"/bin/lli-child-target |
9663 |
+ |
9664 |
+ if use test; then |
9665 |
+ pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/Orc/OrcJITTests |
9666 |
+ pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/MCJIT/MCJITTests |
9667 |
+ pax-mark m "${BUILD_DIR}"/unittests/Support/SupportTests |
9668 |
+ fi |
9669 |
+} |
9670 |
+ |
9671 |
+multilib_src_test() { |
9672 |
+ # respect TMPDIR! |
9673 |
+ local -x LIT_PRESERVES_TMP=1 |
9674 |
+ local test_targets=( check ) |
9675 |
+ # clang tests won't work on non-native ABI because we skip compiler-rt |
9676 |
+ multilib_is_native_abi && use clang && test_targets+=( check-clang ) |
9677 |
+ cmake-utils_src_make "${test_targets[@]}" |
9678 |
+} |
9679 |
+ |
9680 |
+src_install() { |
9681 |
+ local MULTILIB_CHOST_TOOLS=( |
9682 |
+ /usr/bin/llvm-config |
9683 |
+ ) |
9684 |
+ |
9685 |
+ local MULTILIB_WRAPPED_HEADERS=( |
9686 |
+ /usr/include/llvm/Config/config.h |
9687 |
+ /usr/include/llvm/Config/llvm-config.h |
9688 |
+ ) |
9689 |
+ |
9690 |
+ if use clang; then |
9691 |
+ # note: magic applied in multilib_src_install()! |
9692 |
+ CLANG_VERSION=3.8 |
9693 |
+ |
9694 |
+ MULTILIB_CHOST_TOOLS+=( |
9695 |
+ /usr/bin/clang |
9696 |
+ /usr/bin/clang++ |
9697 |
+ /usr/bin/clang-cl |
9698 |
+ /usr/bin/clang-${CLANG_VERSION} |
9699 |
+ /usr/bin/clang++-${CLANG_VERSION} |
9700 |
+ /usr/bin/clang-cl-${CLANG_VERSION} |
9701 |
+ ) |
9702 |
+ |
9703 |
+ MULTILIB_WRAPPED_HEADERS+=( |
9704 |
+ /usr/include/clang/Config/config.h |
9705 |
+ ) |
9706 |
+ fi |
9707 |
+ |
9708 |
+ multilib-minimal_src_install |
9709 |
+} |
9710 |
+ |
9711 |
+multilib_src_install() { |
9712 |
+ cmake-utils_src_install |
9713 |
+ |
9714 |
+ if multilib_is_native_abi; then |
9715 |
+ # Install docs. |
9716 |
+ #use doc && dohtml -r "${S}"/docs/_build/html/ |
9717 |
+ |
9718 |
+ # Symlink the gold plugin. |
9719 |
+ if use gold; then |
9720 |
+ dodir "/usr/${CHOST}/binutils-bin/lib/bfd-plugins" |
9721 |
+ dosym "../../../../$(get_libdir)/LLVMgold.so" \ |
9722 |
+ "/usr/${CHOST}/binutils-bin/lib/bfd-plugins/LLVMgold.so" |
9723 |
+ fi |
9724 |
+ fi |
9725 |
+ |
9726 |
+ # apply CHOST and CLANG_VERSION to clang executables |
9727 |
+ # they're statically linked so we don't have to worry about the lib |
9728 |
+ if use clang; then |
9729 |
+ local clang_tools=( clang clang++ clang-cl ) |
9730 |
+ local i |
9731 |
+ |
9732 |
+ # cmake gives us: |
9733 |
+ # - clang-X.Y |
9734 |
+ # - clang -> clang-X.Y |
9735 |
+ # - clang++, clang-cl -> clang |
9736 |
+ # we want to have: |
9737 |
+ # - clang-X.Y |
9738 |
+ # - clang++-X.Y, clang-cl-X.Y -> clang-X.Y |
9739 |
+ # - clang, clang++, clang-cl -> clang*-X.Y |
9740 |
+ # so we need to fix the two tools |
9741 |
+ for i in "${clang_tools[@]:1}"; do |
9742 |
+ rm "${ED%/}/usr/bin/${i}" || die |
9743 |
+ dosym "clang-${CLANG_VERSION}" "/usr/bin/${i}-${CLANG_VERSION}" |
9744 |
+ dosym "${i}-${CLANG_VERSION}" "/usr/bin/${i}" |
9745 |
+ done |
9746 |
+ |
9747 |
+ # now prepend ${CHOST} and let the multilib-build.eclass symlink it |
9748 |
+ if ! multilib_is_native_abi; then |
9749 |
+ # non-native? let's replace it with a simple wrapper |
9750 |
+ for i in "${clang_tools[@]}"; do |
9751 |
+ rm "${ED%/}/usr/bin/${i}-${CLANG_VERSION}" || die |
9752 |
+ cat > "${T}"/wrapper.tmp <<-_EOF_ |
9753 |
+ #!${EPREFIX}/bin/sh |
9754 |
+ exec "${i}-${CLANG_VERSION}" $(get_abi_CFLAGS) "\${@}" |
9755 |
+ _EOF_ |
9756 |
+ newbin "${T}"/wrapper.tmp "${i}-${CLANG_VERSION}" |
9757 |
+ done |
9758 |
+ fi |
9759 |
+ fi |
9760 |
+} |
9761 |
+ |
9762 |
+multilib_src_install_all() { |
9763 |
+ insinto /usr/share/vim/vimfiles |
9764 |
+ doins -r utils/vim/*/ |
9765 |
+ # some users may find it useful |
9766 |
+ dodoc utils/vim/vimrc |
9767 |
+ |
9768 |
+ if use clang; then |
9769 |
+ pushd tools/clang >/dev/null || die |
9770 |
+ |
9771 |
+ if use static-analyzer ; then |
9772 |
+ pushd tools/scan-build >/dev/null || die |
9773 |
+ |
9774 |
+ dobin ccc-analyzer scan-build |
9775 |
+ dosym ccc-analyzer /usr/bin/c++-analyzer |
9776 |
+ doman scan-build.1 |
9777 |
+ |
9778 |
+ insinto /usr/share/llvm |
9779 |
+ doins scanview.css sorttable.js |
9780 |
+ |
9781 |
+ popd >/dev/null || die |
9782 |
+ fi |
9783 |
+ |
9784 |
+ python_inst() { |
9785 |
+ if use static-analyzer ; then |
9786 |
+ pushd tools/scan-view >/dev/null || die |
9787 |
+ |
9788 |
+ python_doscript scan-view |
9789 |
+ |
9790 |
+ touch __init__.py || die |
9791 |
+ python_moduleinto clang |
9792 |
+ python_domodule *.py Resources |
9793 |
+ |
9794 |
+ popd >/dev/null || die |
9795 |
+ fi |
9796 |
+ |
9797 |
+ if use python ; then |
9798 |
+ pushd bindings/python/clang >/dev/null || die |
9799 |
+ |
9800 |
+ python_moduleinto clang |
9801 |
+ python_domodule *.py |
9802 |
+ |
9803 |
+ popd >/dev/null || die |
9804 |
+ fi |
9805 |
+ |
9806 |
+ # AddressSanitizer symbolizer (currently separate) |
9807 |
+ python_doscript "${S}"/projects/compiler-rt/lib/asan/scripts/asan_symbolize.py |
9808 |
+ } |
9809 |
+ python_foreach_impl python_inst |
9810 |
+ popd >/dev/null || die |
9811 |
+ fi |
9812 |
+} |
9813 |
+ |
9814 |
+pkg_postinst() { |
9815 |
+ if use clang; then |
9816 |
+ elog "To enable OpenMP support in clang, install sys-libs/libomp" |
9817 |
+ elog "and use the '-fopenmp=libomp' command line option" |
9818 |
+ fi |
9819 |
+} |
9820 |
|
9821 |
diff --git a/sys-devel/llvm/metadata.xml b/sys-devel/llvm/metadata.xml |
9822 |
new file mode 100644 |
9823 |
index 0000000..53210f7 |
9824 |
--- /dev/null |
9825 |
+++ b/sys-devel/llvm/metadata.xml |
9826 |
@@ -0,0 +1,28 @@ |
9827 |
+<?xml version="1.0" encoding="UTF-8"?> |
9828 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
9829 |
+<pkgmetadata> |
9830 |
+ <maintainer> |
9831 |
+ <email>voyageur@g.o</email> |
9832 |
+ <name>Bernard Cafarelli</name> |
9833 |
+ </maintainer> |
9834 |
+ <maintainer> |
9835 |
+ <email>mgorny@g.o</email> |
9836 |
+ <name>Michał Górny</name> |
9837 |
+ </maintainer> |
9838 |
+ <longdescription>Low Level Virtual Machine (LLVM) is: |
9839 |
+ 1. A compilation strategy designed to enable effective program optimization across the entire lifetime of a program. LLVM supports effective optimization at compile time, link-time (particularly interprocedural), run-time and offline (i.e., after software is installed), while remaining transparent to developers and maintaining compatibility with existing build scripts. |
9840 |
+ 2. A virtual instruction set - LLVM is a low-level object code representation that uses simple RISC-like instructions, but provides rich, language-independent, type information and dataflow (SSA) information about operands. This combination enables sophisticated transformations on object code, while remaining light-weight enough to be attached to the executable. This combination is key to allowing link-time, run-time, and offline transformations. |
9841 |
+ 3. A compiler infrastructure - LLVM is also a collection of source code that implements the language and compilation strategy. The primary components of the LLVM infrastructure are a GCC-based C and C++ front-end, a link-time optimization framework with a growing set of global and interprocedural analyses and transformations, static back-ends for many popular (and some obscure) architectures, a back-end which emits portable C code, and a Just-In-Time compilers for several architectures. |
9842 |
+ 4. LLVM does not imply things that you would expect from a high-level virtual machine. It does not require garbage collection or run-time code generation (In fact, LLVM makes a great static compiler!). Note that optional LLVM components can be used to build high-level virtual machines and other systems that need these services.</longdescription> |
9843 |
+ <use> |
9844 |
+ <flag name='clang'>Build the clang C/C++ compiler</flag> |
9845 |
+ <flag name='cmake'>Enable cmake support (experimental)</flag> |
9846 |
+ <flag name='doc'>Build and install the HTML documentation and regenerate the man pages</flag> |
9847 |
+ <flag name='gold'>Build the gold linker plugin</flag> |
9848 |
+ <flag name='lldb'>Build the lldb debugger</flag> |
9849 |
+ <flag name='multitarget'>Build all host targets (default: host only)</flag> |
9850 |
+ <flag name='ncurses'>Support querying terminal properties using ncurses' terminfo</flag> |
9851 |
+ <flag name='static-analyzer'>Install the Clang static analyzer (requires USE=clang)</flag> |
9852 |
+ <flag name='udis86'>Enable support for <pkg>dev-libs/udis86</pkg> disassembler library</flag> |
9853 |
+ </use> |
9854 |
+</pkgmetadata> |