summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2016-05-11 22:54:22 +0200
committerMichał Górny <mgorny@gentoo.org>2016-05-12 13:48:41 +0200
commit29a4f5d923215c38ff91a033f0e5a6832ce47c9d (patch)
tree9aa476911812b1a7568b50910965fed9fafd6418 /sys-devel
parentsys-devel/clang: Clean up old 3.7.0 version (diff)
downloadgentoo-29a4f5d923215c38ff91a033f0e5a6832ce47c9d.tar.gz
gentoo-29a4f5d923215c38ff91a033f0e5a6832ce47c9d.tar.bz2
gentoo-29a4f5d923215c38ff91a033f0e5a6832ce47c9d.zip
sys-devel/llvm: Clean up old 3.7 versions
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/llvm/Manifest5
-rw-r--r--sys-devel/llvm/llvm-3.7.0-r2.ebuild521
-rw-r--r--sys-devel/llvm/llvm-3.7.0-r3.ebuild525
-rw-r--r--sys-devel/llvm/llvm-3.7.0-r4.ebuild530
-rw-r--r--sys-devel/llvm/llvm-3.7.0-r5.ebuild540
-rw-r--r--sys-devel/llvm/llvm-3.7.1.ebuild550
6 files changed, 0 insertions, 2671 deletions
diff --git a/sys-devel/llvm/Manifest b/sys-devel/llvm/Manifest
index 23eb037647a..d1c47a03be0 100644
--- a/sys-devel/llvm/Manifest
+++ b/sys-devel/llvm/Manifest
@@ -3,14 +3,12 @@ DIST cfe-3.4.2.src.tar.gz 10612313 SHA256 5ba6f5772f8d00f445209356a7daf83c5bca2d
DIST cfe-3.5.0.src.tar.xz 8233432 SHA256 fc80992e004b06f6c7afb612de1cdaa9ac9d25811c55f94fcf7331d9b81cdb8b SHA512 b26a5e2cd81c150607c23b22fafc0d9c7f12b83b45e476b8e75bf5e99d42be7c98ffeac7349df664f01b00900864a01429860b298e48961861377a4b2daf3e49 WHIRLPOOL 5dd8b6fe97933b74f1668b1d753c16cd3bcd05ccf72aac1283aa449caf93f5ba88ae79e7668f7e79b554e1421549a87af21c86cf92657c1b4d77744165718ce7
DIST cfe-3.5.2.src.tar.xz 8268008 SHA256 4feb575f74fb3a74b6245400460230141bf610f235ef3a25008cfe6137828620 SHA512 2ad9a7daa8e62cdbf47b001aa6b937a06ae7e6396dcd1832797e2d98036522443ccfca9f1253e16d531a99d1edf237fcd2b457c55491ff68ca4534a2396ca52f WHIRLPOOL 51789ba2a3193d404b26d26b999fc47f1bc4b56b45048078cc51e4ff5c31d834d360ee0c2d16096c060f85acab6de9055dc375569348ae3307e4b280406f2d9e
DIST cfe-3.6.2.src.tar.xz 8617576 SHA256 ae9180466a23acb426d12444d866b266ff2289b266064d362462e44f8d4699f3 SHA512 ed837c48f38d8998efd675b56477c8681dcedfcf3f71bba65930f145501289bebb6fe6a6d9de336548f94c381d016b99f10c58e046b885449755d44ac782de03 WHIRLPOOL a17419cea329999c8662c0008dbd0391ed5f52045d0175488979e7620f6a9a21b08e451a5e21d3bf944597bb37934a8228fa89c09d773882359822d59bd447a8
-DIST cfe-3.7.0.src.tar.xz 9147204 SHA256 4ed740c5a91df1c90a4118c5154851d6a475f39a91346bdf268c1c29c13aa1cc SHA512 099d34cb019ea548c6ee85efd22b150beba0aa92061394fa3e423b1ebfe4a5c98c0586e5d56fc5c39e2b1606d36db59f442c056cc59473e32df76c8790c9d0ae WHIRLPOOL 1078d962edfb1b90044f19921f64a28c32259e34d983ddf9f9c198d13c8cd0679778a640d7a06c0bf1224d982602294c79a510034276216e3a6de21c739e6c39
DIST cfe-3.7.1.src.tar.xz 9110616 SHA256 56e2164c7c2a1772d5ed2a3e57485ff73ff06c97dff12edbeea1acc4412b0674 SHA512 8e3285a32ad0fd4721fa77c4fb9709f31bb4e4f7cb5245357aaf57b0767b6ef18a30d902b59d1437a6febffb6c2128214f9ce5aa913bb298743221a28c4f9de5 WHIRLPOOL ce300f5023bddda59ee055e4dccdca8bf459fae5d4e91c44262d2830c406b798d697d1bf3c6326ff41b969a8439f94a3c83570f1d0151a7f0223eb0d8f324f7b
DIST cfe-3.8.0.src.tar.xz 9627228 SHA256 04149236de03cf05232d68eb7cb9c50f03062e339b68f4f8a03b650a11536cf9 SHA512 fef431d63f95a394d53e3857fb6a6bde7a7b27f40ef5111b4353bcb63ac26febec8a9eb84780187c49699ab099834f13f996f085d02c365676b3fa5bbcc03dcd WHIRLPOOL 10fd94f75f645318ed3436454ccffd570a88cafe35e870563b5f4d89c37b9bdbe282d8793301ca53db6774cc223b2ff7ab0af99293413cac3deefcf5150fcca3
DIST clang-tools-extra-3.4.src.tar.gz 230729 SHA256 ba85187551ae97fe1c8ab569903beae5ff0900e21233e5eb5389f6ceab1028b4 SHA512 9656678acea490fd5674b2d47ad30ec69e5aedb450924e566a90418c94ce6483faa254e7dde0d5163cb0643153113d27b6b000fea7bba08f0ba55741b35873b1 WHIRLPOOL c41ec11d0b88678c56d77d285c4383a39cabab16aae8a4457666014e0927aa4b04cf77e73af0275e6bfc603a9531598eca98ab61d5d81288e2920682088d9eaf
DIST clang-tools-extra-3.5.0.src.tar.xz 216256 SHA256 2981beb378afb5aa5c50ed017720a42a33e77e902c7086ad2d412ef4fa931f69 SHA512 5ff2cc5d143b78fbe6645486f02e50f738a92aaf6b8e85cfc6f91e659684686b12e61fc8f00b814b4372c5ed2c2b1be5eca61ea696fbe074b815877b799534ee WHIRLPOOL 10b5afc550fa6a8c33739fbf9268e934732b2892842d398152676e66ab90aed3c6e1bae02bc1b8aa0a9a917b6b450f60950317a9eda3f9e377971cbe00164b11
DIST clang-tools-extra-3.5.2.src.tar.xz 215804 SHA256 f21a374d74b194d8c984546266491b518859b5f12ed9abd49337b8060d3fc004 SHA512 6a8e662d2704147296c13626fbc5885911c646c67404f12eacc67ee2995221445bf4f6122b271b9cb3a56b716f550a651024822f72358d400b9052bf50423669 WHIRLPOOL 088d2725a88a439a1a2c4048e0eaf540587078078bd1c9823a4804200265cab4d32606abf5e72be76da45ea4aa6e7a7201a2bdbddc78d5f9e0024b0d7b59e222
DIST clang-tools-extra-3.6.2.src.tar.xz 248624 SHA256 6a0ec627d398f501ddf347060f7a2ccea4802b2494f1d4fd7bda3e0442d04feb SHA512 1b7710a7deee30cefb6a3b4edb026a96d8935a0c6f3056ccdb7a45564d10baf01a4f6722ae853ad9a3bad17e8de32a3c0ec99c5cf6144647a5e182809d403f7a WHIRLPOOL 3dc8888c302bac84f53b673784dec092a2c59ea2985d9983e87f057b9aa7b5d3e34cf13d2b0f1f60ea44f342b8167377204a510036872a087037cf02335c19cd
-DIST clang-tools-extra-3.7.0.src.tar.xz 276628 SHA256 8ae8a0a3a96b7a700412d67df0af172cb2fc1326beec575fcc0f71d2e72709cd SHA512 c266eb327e2f50767b7d37c9d5713d6c70f590b59e4fe09d997f2eba0d54c9229ef6c8a2a903196380f67dffa7e35ebb47a9e5f2f097fd2a3c363481b72202eb WHIRLPOOL 681a5c14301990bb945e26375d0d31fa22b795101f342bcaaeb9d3e015c0f0f6b260b913388d086cb3054fc357845b34a6813e34614cdfa0de2c58fc6db7c64c
DIST clang-tools-extra-3.7.1.src.tar.xz 277476 SHA256 4a91edaccad1ce984c7c49a4a87db186b7f7b21267b2b03bcf4bd7820715bc6b SHA512 06e2db8af75f1e6ee82da6ee723b5256b9e3f6ba196428f18944ec02d07df26d04329ca8824a083c5f25274ce7e3469aa75e3a29ccfbdb6375524841d65e3ad7 WHIRLPOOL 2c1a459d6aff6bc24d5c8d38120ab665adbef61394050781a9707d50e83dae1b4997ed19459086e9bd7f6dd38a09c295d135e33515c947d64a7f1ab714ad8beb
DIST clang-tools-extra-3.8.0.src.tar.xz 334072 SHA256 afbda810106a6e64444bc164b921be928af46829117c95b996f2678ce4cb1ec4 SHA512 f0e593a76df5485f403079bd2fbb4e51c3d1c3fc4e63e2c2910894e8f2a7c14b47265435f3c52f035fb3fe2f595812d0f9869235296157a39c071a23e6a8b178 WHIRLPOOL 4928669a3c019eebe0a98ee72e25ef70ddf3c1d29e6a4aa18e408276b2a870069460c39e0e8fbe960d8d56127bb6951433d1fd89015d192951004e527b065ec9
DIST compiler-rt-3.3.src.tar.gz 1568034 SHA256 0e2f3180d6316e6c43f064fdd406c5c6515e682c5f31c57c28335b68c7525423 SHA512 3e86aa8ab9810b4fbac54a40fc93a717a55c642520858c0db215a5324c1e495b4d8fcec9620251cca8e4e5f9afa34bc14364d7f785880a0700469d0201827929 WHIRLPOOL fcfd06bc860dfd901a7576cd4309f863e9d4363e36ab4c67e9e08fe3c8a37d627ee95eb96b9ed53eb6047dec06e73181b3c3e1555b1b49f1e893e6382f21ddc1
@@ -18,10 +16,8 @@ DIST compiler-rt-3.4.src.tar.gz 1858593 SHA256 f37c89b1383ce462d47537a0245ac7986
DIST compiler-rt-3.5.0.src.tar.xz 1088352 SHA256 a4b3e655832bf8d9a357ea2c771db347237460e131988cbb96cda40ff39a8136 SHA512 862cce2d6b398bd1a8399496a547e6ab976a31f676528beebfbea5fd7dc54aa72e1c25deefa12f6167096521eba74090565b0168806451da02ddac04e922fc48 WHIRLPOOL 248acf997d70d7904aa79bf83e0c02ba4e5f8c2812c03f44a8e1e31b845a654f250c09ec6a123f9245d0db8713e8cc5a4087b9ce785af4f5eb7e55d9dbd362a2
DIST compiler-rt-3.5.2.src.tar.xz 1093000 SHA256 542d7aadd21e7fe35bea0a7912bc965f08a1a566746cebcca76f96dcfeb74dc3 SHA512 319a8a1dbe07eb4f1fcccfe79a1fa445f348fb854a441500e89fa0a128e45716b65d06347f19a63de32e9294cd2331e914ae0d5fe8224f0b2452c39b79ac96ff WHIRLPOOL 6e9286c56a60a515006c8232ca01622ae844185a5f31fb49bce632868862c5e560619f1c45da66878b5322a764f91a284cd296e9f13105d6f74e055a17321d93
DIST compiler-rt-3.6.2.src.tar.xz 1128080 SHA256 0f2ff37d80a64575fecd8cf0d5c50f7ac1f837ddf700d1855412bb7547431d87 SHA512 7dafcc5bd4822475de649d8a84ae51af3c4ed4d0958f76b1b55ba79219638f3e78eb94a1986c6e9ba0e7f1ccf3ec834d546b5ca60e8b08083fea5880ecdf17a3 WHIRLPOOL dd77e7df43c9028a6873ed903da67560fdb04968013016a7f0ad2d2e9a81b3a3d890b95e4f49a6bdef349806d6507defcd80a0a9fb50c1c9f778e7eff42dbc5d
-DIST compiler-rt-3.7.0.src.tar.xz 1192832 SHA256 227fa998520bc94974a428dc8e7654d9bdf277e5bc70d4064ebc05691bd62b0b SHA512 2ba6abb3d6ec7f1469cfe1d48fde2069e9a767d19144f80f05516ac63f353ace90a9df3e9d1c1f708f3c397aba0ec61b12e4f105b25a2e1cd26b25b0dd252bc9 WHIRLPOOL 8bb535b667a7fdc1710d32e0912daee3798049f78cf70a03abc409157f02602b77f290b66185a35c464e512e55d57aab0125be6ae4843f6233f4017228afb579
DIST compiler-rt-3.7.1.src.tar.xz 1181772 SHA256 9d4769e4a927d3824bcb7a9c82b01e307c68588e6de4e7f04ab82d82c5af8181 SHA512 bf434519ea0838264c30de1e1e8681320aa868df0ecc825a45c659077b963a4120c18216946558cbf8aea24a8ac8ec39af2066dab906bc7cabc0894d51d61325 WHIRLPOOL 0bea047e48622884a6fc6bb3826046e9de5b3192006cc41c0ccd9d6c611674869c3c15988b531a0f7d9fea2cf951b90ecef385b85db765c6f99a48692fdcf223
DIST compiler-rt-3.8.0.src.tar.xz 1270128 SHA256 c8d3387e55f229543dac1941769120f24dc50183150bf19d1b070d53d29d56b0 SHA512 21ba548b6b35a79aa291adba7f83db14c33855fa3cf376f2ad75bd22bb454501b74f0ea4f71bc03a864135862c800b101d3cd790e54e687c2a3459c64218b9c3 WHIRLPOOL 63ceb498fbc4083afda4f4aa12e44b8a6d2b58408edacd7d578d3cd6a63f0c1074e453b950fae4fee51690b3f79700e7752b6ceb3e6980c88541314993ce71a5
-DIST lldb-3.7.0.src.tar.xz 10649660 SHA256 f4d7505bc111044eaa4033af012221e492938405b62522b8e3e354c20c4b71e9 SHA512 52157782ef13e2c8b7b35ff3ccc05887195fe46ddb6bafcf0707a3c46c1e034734b55342b8dbfc46cae7a8c3cb1012345284e4bedb2344c5016b8d19a12e90df WHIRLPOOL 8c0803a51820ec67944e27061c858e95a92aefa38a1540241fead2b63c5b065c1268cf958b14d8841f62fc8aea5da1e20204704426598bfc2c4e61bcda135c43
DIST lldb-3.7.1.src.tar.xz 10650524 SHA256 9a0bc315ef55f44c98cdf92d064df0847f453ed156dd0ef6a87e04f5fd6a0e01 SHA512 d2d3e1052026edd6ef9113ff5362acb4a32cef598098b4031c35e389301130ef2e1bda594f30de4d65c9fdc0beaecdd35afcf36676eb540baad34015aca294d1 WHIRLPOOL bba9c700788f0cf86ac1de51383a223e1c92f724719cdd327d83189cb77714c1e10fb78569aeed3b3c639062a3410bb114f646a271fd0d9e8c9a8e45d090330a
DIST lldb-3.8.0.src.tar.xz 10929768 SHA256 e3f68f44147df0433e7989bf6ed1c58ff28d7c68b9c47553cb9915f744785a35 SHA512 a491209ae12b0c7d938ebd94362396a50922326ed24ed11f71b1f19b61274a34a92d2bd46857b44081e7fa3e6d0a641d148bd4022f8edf71f80ff2aa7a55ebef WHIRLPOOL c498c22acab867419143745ce0212c70bdfc141dbae19ab53221908eba7961aae6a029cbad01b8409e6fbc187550141ed87f32366dd847ac57754891fbbc4049
DIST llvm-3.3-manpages.tar.bz2 27098 SHA256 46bb22d63d5fe7dd04e1a7bb7e16c03d93f2ed51d31540cfb9d97ed70059aa77 SHA512 6f24b66b13025d0606908f91ad9b4fc6de1b4aac2d97d261f6b989065476cf153d2f84792f8dd4972b95fb1a45a3931c328df3bcf8ce5ab21170a7a912a39783 WHIRLPOOL 31b9c3635b698f404b75b87c7891b4b6be9cbeb6062bcb6fba5476b0b3069a486ba60c27ab2b12b8a2da9404f666617162041860f023951050a9fc4c7d27748a
@@ -34,7 +30,6 @@ DIST llvm-3.5.2.src.tar.xz 11876128 SHA256 44196156d5749eb4b4224fe471a29cc3984df
DIST llvm-3.6.1-manpages.tar.bz2 38338 SHA256 b27c6198e09b11421841a7184d4e8a0f8878d4f1313405da28d643134a55688a SHA512 a47aeb0b4632329eaaa1d6c774446fea5822d7692d81533a9a5c5de1c6a3b37fdd6b7c1fc6433339649f4d3a53a753065e73afb30fd84f253ad31d5fb3d48662 WHIRLPOOL 022b214b6340365490915b5c873e515bf16be90d04cd32f09024a3607c23edc2c2e241d295102f045bd08a442c4e5aaf134ac89f7e59a027ec1633330a95989b
DIST llvm-3.6.2.src.tar.xz 12802380 SHA256 f60dc158bfda6822de167e87275848969f0558b3134892ff54fced87e4667b94 SHA512 42b44ce69cfb96e2dc12dc2246f0de8ff983a99741206e2c46ccf074b3248aaab9c0f22c6baad802de851d06f202f40db9dd62fe38aab4479b3f70026c936b36 WHIRLPOOL 1a15e16793fe4120f1c14a5334362c36db26745c493e7289281351b7c18c523d781ff9425dddfe1a2add9ea1e8aebb92f2313787da5f286259b55b0884b3039f
DIST llvm-3.7.0-manpages.tar.bz2 38095 SHA256 8597fa532464c6336aefbbef0b1ce452aaa98d474fa58108c6a6f57a9ccd6785 SHA512 ea70ac15dbaef3740b31f66aa798338f7f9b82484586582aa62e0364f9d74bf175be2f4f29721df253b8157c1cbc146ab9045c0656c42a6375434e994786b643 WHIRLPOOL 743b339b0df7c52d270a5197e9e765dfd92d4b5acee94cf9d9d7713e1a75aa9d987b3f5adab0952e7267febf88b318d0f31cb45847e2b0b42c7c7373b2358358
-DIST llvm-3.7.0.src.tar.xz 14636252 SHA256 ab45895f9dcdad1e140a3a79fd709f64b05ad7364e308c0e582c5b02e9cc3153 SHA512 fe3bfefd3d49423831ad12b89f944ac9f469aaaaafdea1dd94fc7fb6d5cc9fbe66b6463796aeaabfc145ae474ec3ad68da41c4a011e8aa4bc650f1835af75388 WHIRLPOOL 4787fc417042cbb4470887358225c367c6617ccd6cb90f1e4f226ec1565b302e4d70458fc13ceedca5b3ac270523637398bb7503c8c423c81fd9682a41c0289f
DIST llvm-3.7.1.src.tar.xz 14592544 SHA256 be7794ed0cec42d6c682ca8e3517535b54555a3defabec83554dbc74db545ad5 SHA512 ac521debc02f6deba96ef975d6a546b0c5c77299c1dbf5e1b87a7974ff5e7fd715bd7e384b92d9adf572ce47130bdbf6d3c648eb0d7f72f16f976292e4909e90 WHIRLPOOL 788ce0907b906ebee595c766713bec5067563c8aba7460211f5830e116df7c830de84704834c0df2f2f2c90354d75521e4a4aff57e769a2d8ab590778c1e4a70
DIST llvm-3.8.0-manpages.tar.bz2 37889 SHA256 4dda7f69f9412e0fb50d32631df34d6ea7f93c945c9a59cb050a99f1d2d0508b SHA512 a93ed7a25b75c237a0967ba7a501c71af3e7e9292ebabf69733bc637e9a4534dcaee539c6b1f6b2df7a87103c2371b1cf130fac05b88047100988c814e89ab0f WHIRLPOOL 9790a576fd4db798c2339bb4ea1dc973f1057177364770a104be7916998a1ad824e6b4eee296066ddd32eb5e6c57ffd5716457cecbd8ca9fe1b317d0d5ed2676
DIST llvm-3.8.0.src.tar.xz 16580932 SHA256 555b028e9ee0f6445ff8f949ea10e9cd8be0d084840e21fbbe1d31d51fc06e46 SHA512 2c76e79d803768ed20af6ca1801cf2518071bf9835c54580ea3eb6219a66cdcf8b4c575f192c15082cc18d2468b7611dacb57950b605813a2317125c2d33c138 WHIRLPOOL f7219f3324080f22158b08eb23b5b545d303090d0bb8cde6ee971da829dd52837832a127792b153006568e0c7c0163c1095d1e258600f4359df347148e965b94
diff --git a/sys-devel/llvm/llvm-3.7.0-r2.ebuild b/sys-devel/llvm/llvm-3.7.0-r2.ebuild
deleted file mode 100644
index bc2726d7f97..00000000000
--- a/sys-devel/llvm/llvm-3.7.0-r2.ebuild
+++ /dev/null
@@ -1,521 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
-PYTHON_COMPAT=( python2_7 pypy )
-
-inherit check-reqs cmake-utils eutils flag-o-matic multilib \
- multilib-minimal python-r1 toolchain-funcs pax-utils
-
-DESCRIPTION="Low Level Virtual Machine"
-HOMEPAGE="http://llvm.org/"
-SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.xz
- clang? ( http://llvm.org/releases/${PV}/compiler-rt-${PV}.src.tar.xz
- http://llvm.org/releases/${PV}/cfe-${PV}.src.tar.xz
- http://llvm.org/releases/${PV}/clang-tools-extra-${PV}.src.tar.xz )
- lldb? ( http://llvm.org/releases/${PV}/lldb-${PV}.src.tar.xz )
- !doc? ( http://dev.gentoo.org/~voyageur/distfiles/${P}-manpages.tar.bz2 )"
-
-LICENSE="UoI-NCSA"
-SLOT="0/${PV}"
-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"
-IUSE="clang debug doc gold libedit +libffi lldb multitarget ncurses ocaml
- python +static-analyzer test xml video_cards_radeon kernel_Darwin"
-
-COMMON_DEPEND="
- sys-libs/zlib:0=
- clang? (
- python? ( ${PYTHON_DEPS} )
- static-analyzer? (
- dev-lang/perl:*
- ${PYTHON_DEPS}
- )
- xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
- )
- gold? ( >=sys-devel/binutils-2.22:*[cxx] )
- libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] )
- libffi? ( >=virtual/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] )
- ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] )
- ocaml? (
- >=dev-lang/ocaml-4.00.0:0=
- dev-ml/findlib
- dev-ml/ocaml-ctypes
- !!<=sys-devel/llvm-3.7.0-r1[ocaml] )"
-# configparser-3.2 breaks the build (3.3 or none at all are fine)
-DEPEND="${COMMON_DEPEND}
- dev-lang/perl
- >=sys-devel/make-3.81
- >=sys-devel/flex-2.5.4
- >=sys-devel/bison-1.875d
- || ( >=sys-devel/gcc-3.0 >=sys-devel/llvm-3.5
- ( >=sys-freebsd/freebsd-lib-9.1-r10 sys-libs/libcxx )
- )
- || ( >=sys-devel/binutils-2.18 >=sys-devel/binutils-apple-5.1 )
- kernel_Darwin? ( sys-libs/libcxx )
- clang? ( xml? ( virtual/pkgconfig ) )
- doc? ( dev-python/sphinx )
- gold? ( sys-libs/binutils-libs )
- libffi? ( virtual/pkgconfig )
- lldb? ( dev-lang/swig )
- !!<dev-python/configparser-3.3.0.2
- ocaml? ( test? ( dev-ml/ounit ) )
- ${PYTHON_DEPS}"
-RDEPEND="${COMMON_DEPEND}
- clang? ( !<=sys-devel/clang-${PV}-r99 )
- abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r2
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
-PDEPEND="clang? ( =sys-devel/clang-${PV}-r100 )"
-
-# pypy gives me around 1700 unresolved tests due to open file limit
-# being exceeded. probably GC does not close them fast enough.
-REQUIRED_USE="${PYTHON_REQUIRED_USE}
- lldb? ( clang xml )
- test? ( || ( $(python_gen_useflags 'python*') ) )"
-
-S=${WORKDIR}/${P/_}.src
-
-pkg_pretend() {
- # in megs
- # !clang !debug !multitarget -O2 400
- # !clang !debug multitarget -O2 550
- # clang !debug !multitarget -O2 950
- # clang !debug multitarget -O2 1200
- # !clang debug multitarget -O2 5G
- # clang !debug multitarget -O0 -g 12G
- # clang debug multitarget -O2 16G
- # clang debug multitarget -O0 -g 14G
-
- local build_size=550
- use clang && build_size=1200
-
- if use debug; then
- ewarn "USE=debug is known to increase the size of package considerably"
- ewarn "and cause the tests to fail."
- ewarn
-
- (( build_size *= 14 ))
- elif is-flagq '-g?(gdb)?([1-9])'; then
- ewarn "The C++ compiler -g option is known to increase the size of the package"
- ewarn "considerably. If you run out of space, please consider removing it."
- ewarn
-
- (( build_size *= 10 ))
- fi
-
- # Multiply by number of ABIs :).
- local abis=( $(multilib_get_enabled_abis) )
- (( build_size *= ${#abis[@]} ))
-
- local CHECKREQS_DISK_BUILD=${build_size}M
- check-reqs_pkg_pretend
-
- if [[ ${MERGE_TYPE} != binary ]]; then
- echo 'int main() {return 0;}' > "${T}"/test.cxx || die
- ebegin "Trying to build a C++11 test program"
- if ! $(tc-getCXX) -std=c++11 -o /dev/null "${T}"/test.cxx; then
- eerror "LLVM-${PV} requires C++11-capable C++ compiler. Your current compiler"
- eerror "does not seem to support -std=c++11 option. Please upgrade your compiler"
- eerror "to gcc-4.7 or an equivalent version supporting C++11."
- die "Currently active compiler does not support -std=c++11"
- fi
- eend ${?}
- fi
-}
-
-pkg_setup() {
- pkg_pretend
-}
-
-src_unpack() {
- default
-
- if use clang; then
- mv "${WORKDIR}"/cfe-${PV/_}.src "${S}"/tools/clang \
- || die "clang source directory move failed"
- mv "${WORKDIR}"/compiler-rt-${PV/_}.src "${S}"/projects/compiler-rt \
- || die "compiler-rt source directory move failed"
- mv "${WORKDIR}"/clang-tools-extra-${PV/_}.src "${S}"/tools/clang/tools/extra \
- || die "clang-tools-extra source directory move failed"
- fi
-
- if use lldb; then
- mv "${WORKDIR}"/lldb-${PV/_}.src "${S}"/tools/lldb \
- || die "lldb source directory move failed"
- fi
-}
-
-src_prepare() {
- # Make ocaml warnings non-fatal, bug #537308
- sed -e "/RUN/s/-warn-error A//" -i test/Bindings/OCaml/*ml || die
- # Fix libdir for ocaml bindings install, bug #559134
- epatch "${FILESDIR}"/cmake/${P}-ocaml-multilib.patch
- # Do not build/install ocaml docs with USE=-doc, bug #562008
- epatch "${FILESDIR}"/cmake/${P}-ocaml-build_doc.patch
-
- # Make it possible to override Sphinx HTML install dirs
- # https://llvm.org/bugs/show_bug.cgi?id=23780
- epatch "${FILESDIR}"/cmake/0002-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch
-
- # Prevent race conditions with parallel Sphinx runs
- # https://llvm.org/bugs/show_bug.cgi?id=23781
- epatch "${FILESDIR}"/cmake/0003-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch
-
- # Prevent installing libgtest
- # https://llvm.org/bugs/show_bug.cgi?id=18341
- epatch "${FILESDIR}"/cmake/0004-cmake-Do-not-install-libgtest.patch
-
- if use clang; then
- # Automatically select active system GCC's libraries, bugs #406163 and #417913
- epatch "${FILESDIR}"/clang-3.5-gentoo-runtime-gcc-detection-v3.patch
-
- epatch "${FILESDIR}"/clang-3.6-gentoo-install.patch
-
- sed -i -e "s^@EPREFIX@^${EPREFIX}^" \
- tools/clang/tools/scan-build/scan-build || die
-
- # Install clang runtime into /usr/lib/clang
- # https://llvm.org/bugs/show_bug.cgi?id=23792
- epatch "${FILESDIR}"/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix.patch
- epatch "${FILESDIR}"/cmake/compiler-rt-0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi.patch
-
- # Do not force -march flags on arm platforms
- # https://bugs.gentoo.org/show_bug.cgi?id=562706
- epatch "${FILESDIR}"/cmake/${P}-compiler_rt_arm_march_flags.patch
-
- # Make it possible to override CLANG_LIBDIR_SUFFIX
- # (that is used only to find LLVMgold.so)
- # https://llvm.org/bugs/show_bug.cgi?id=23793
- epatch "${FILESDIR}"/cmake/clang-0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch
-
- # Fix WX sections, bug #421527
- find "${S}"/projects/compiler-rt/lib/builtins -type f -name \*.S -exec sed \
- -e '$a\\n#if defined(__linux__) && defined(__ELF__)\n.section .note.GNU-stack,"",%progbits\n#endif' \
- -i {} \; || die
- fi
-
- if use lldb; then
- # Do not install dummy readline.so module from
- # https://llvm.org/bugs/show_bug.cgi?id=18841
- sed -e 's/add_subdirectory(readline)/#&/' \
- -i tools/lldb/scripts/Python/modules/CMakeLists.txt || die
-
- # Fix Python paths, bugs #562436 and #562438
- epatch "${FILESDIR}"/${PN}-3.7-lldb_python.patch
- sed -e "s/GENTOO_LIBDIR/$(get_libdir)/" \
- -i tools/lldb/scripts/Python/finishSwigPythonLLDB.py || die
-
- # Fix build with ncurses[tinfo], #560474
- # http://llvm.org/viewvc/llvm-project?view=revision&revision=247842
- epatch "${FILESDIR}"/cmake/${P}-lldb_tinfo.patch
- fi
-
- # User patches
- epatch_user
-
- python_setup
-
- # Native libdir is used to hold LLVMgold.so
- NATIVE_LIBDIR=$(get_libdir)
-}
-
-multilib_src_configure() {
- local targets
- if use multitarget; then
- targets=all
- else
- targets='host;CppBackend'
- use video_cards_radeon && targets+=';AMDGPU'
- fi
-
- local ffi_cflags ffi_ldflags
- if use libffi; then
- ffi_cflags=$(pkg-config --cflags-only-I libffi)
- ffi_ldflags=$(pkg-config --libs-only-L libffi)
- fi
-
- local libdir=$(get_libdir)
- local mycmakeargs=(
- "${mycmakeargs[@]}"
- -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
-
- -DBUILD_SHARED_LIBS=ON
- -DLLVM_ENABLE_TIMESTAMPS=OFF
- -DLLVM_TARGETS_TO_BUILD="${targets}"
- -DLLVM_BUILD_TESTS=$(usex test)
-
- -DLLVM_ENABLE_FFI=$(usex libffi)
- -DLLVM_ENABLE_TERMINFO=$(usex ncurses)
- -DLLVM_ENABLE_ASSERTIONS=$(usex debug)
- -DLLVM_ENABLE_EH=ON
- -DLLVM_ENABLE_RTTI=ON
-
- -DWITH_POLLY=OFF # TODO
-
- -DLLVM_HOST_TRIPLE="${CHOST}"
-
- -DFFI_INCLUDE_DIR="${ffi_cflags#-I}"
- -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}"
-
- -DHAVE_HISTEDIT_H=$(usex libedit)
- )
-
- if use clang; then
- mycmakeargs+=(
- -DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=$(usex !xml)
- )
- fi
-
- if use lldb; then
- mycmakeargs+=(
- -DLLDB_DISABLE_LIBEDIT=$(usex !libedit)
- -DLLDB_DISABLE_CURSES=$(usex !ncurses)
- -DLLDB_ENABLE_TERMINFO=$(usex ncurses)
- )
- fi
-
- if ! multilib_is_native_abi || ! use ocaml; then
- mycmakeargs+=(
- -DOCAMLFIND=NO
- )
- fi
-# Note: go bindings have no CMake rules at the moment
-# but let's kill the check in case they are introduced
-# if ! multilib_is_native_abi || ! use go; then
- mycmakeargs+=(
- -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND
- )
-# fi
-
- if multilib_is_native_abi; then
- mycmakeargs+=(
- -DLLVM_BUILD_DOCS=$(usex doc)
- -DLLVM_ENABLE_SPHINX=$(usex doc)
- -DLLVM_ENABLE_DOXYGEN=OFF
- -DLLVM_INSTALL_HTML="${EPREFIX}/usr/share/doc/${PF}/html"
- -DSPHINX_WARNINGS_AS_ERRORS=OFF
- -DLLVM_INSTALL_UTILS=ON
- )
-
- if use clang; then
- mycmakeargs+=(
- -DCLANG_INSTALL_HTML="${EPREFIX}/usr/share/doc/${PF}/clang"
- )
- fi
-
- if use gold; then
- mycmakeargs+=(
- -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include
- )
- fi
-
- if use lldb; then
- mycmakeargs+=(
- -DLLDB_DISABLE_PYTHON=$(usex !python)
- )
- fi
-
- else
- if use clang; then
- mycmakeargs+=(
- # disable compiler-rt on non-native ABI because:
- # 1. it fails to configure because of -m32
- # 2. it is shared between ABIs so no point building
- # it multiple times
- -DLLVM_EXTERNAL_COMPILER_RT_BUILD=OFF
- -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_BUILD=OFF
- )
- fi
- if use lldb; then
- mycmakeargs+=(
- # only run swig on native abi
- -DLLDB_DISABLE_PYTHON=ON
- )
- fi
- fi
-
- if use clang; then
- mycmakeargs+=(
- -DCLANG_ENABLE_ARCMT=$(usex static-analyzer)
- -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer)
- -DCLANG_LIBDIR_SUFFIX="${NATIVE_LIBDIR#lib}"
- )
-
- # -- not needed when compiler-rt is built with host compiler --
- # cmake passes host C*FLAGS to compiler-rt build
- # which is performed using clang, so we need to filter out
- # some flags clang does not support
- # (if you know some more flags that don't work, let us know)
- #filter-flags -msahf -frecord-gcc-switches
- fi
-
- cmake-utils_src_configure
-}
-
-multilib_src_compile() {
- cmake-utils_src_compile
- # TODO: not sure why this target is not correctly called
- multilib_is_native_abi && use doc && use ocaml && cmake-utils_src_make docs/ocaml_doc
-
- pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld
- pax-mark m "${BUILD_DIR}"/bin/lli
- pax-mark m "${BUILD_DIR}"/bin/lli-child-target
-
- if use test; then
- pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/Orc/OrcJITTests
- pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/MCJIT/MCJITTests
- pax-mark m "${BUILD_DIR}"/unittests/Support/SupportTests
- fi
-}
-
-multilib_src_test() {
- # respect TMPDIR!
- local -x LIT_PRESERVES_TMP=1
- local test_targets=( check )
- # clang tests won't work on non-native ABI because we skip compiler-rt
- multilib_is_native_abi && use clang && test_targets+=( check-clang )
- cmake-utils_src_make "${test_targets[@]}"
-}
-
-src_install() {
- local MULTILIB_CHOST_TOOLS=(
- /usr/bin/llvm-config
- )
-
- local MULTILIB_WRAPPED_HEADERS=(
- /usr/include/llvm/Config/config.h
- /usr/include/llvm/Config/llvm-config.h
- )
-
- if use clang; then
- # note: magic applied in multilib_src_install()!
- CLANG_VERSION=${PV%.*}
-
- MULTILIB_CHOST_TOOLS+=(
- /usr/bin/clang
- /usr/bin/clang++
- /usr/bin/clang-cl
- /usr/bin/clang-${CLANG_VERSION}
- /usr/bin/clang++-${CLANG_VERSION}
- /usr/bin/clang-cl-${CLANG_VERSION}
- )
-
- MULTILIB_WRAPPED_HEADERS+=(
- /usr/include/clang/Config/config.h
- )
- fi
-
- multilib-minimal_src_install
-}
-
-multilib_src_install() {
- cmake-utils_src_install
-
- if multilib_is_native_abi; then
- # Install man pages.
- use doc || doman "${WORKDIR}"/${P}-manpages/*.1
-
- # Symlink the gold plugin.
- if use gold; then
- dodir "/usr/${CHOST}/binutils-bin/lib/bfd-plugins"
- dosym "../../../../$(get_libdir)/LLVMgold.so" \
- "/usr/${CHOST}/binutils-bin/lib/bfd-plugins/LLVMgold.so"
- fi
- fi
-
- # apply CHOST and CLANG_VERSION to clang executables
- # they're statically linked so we don't have to worry about the lib
- if use clang; then
- local clang_tools=( clang clang++ clang-cl )
- local i
-
- # cmake gives us:
- # - clang-X.Y
- # - clang -> clang-X.Y
- # - clang++, clang-cl -> clang
- # we want to have:
- # - clang-X.Y
- # - clang++-X.Y, clang-cl-X.Y -> clang-X.Y
- # - clang, clang++, clang-cl -> clang*-X.Y
- # so we need to fix the two tools
- for i in "${clang_tools[@]:1}"; do
- rm "${ED%/}/usr/bin/${i}" || die
- dosym "clang-${CLANG_VERSION}" "/usr/bin/${i}-${CLANG_VERSION}"
- dosym "${i}-${CLANG_VERSION}" "/usr/bin/${i}"
- done
-
- # now prepend ${CHOST} and let the multilib-build.eclass symlink it
- if ! multilib_is_native_abi; then
- # non-native? let's replace it with a simple wrapper
- for i in "${clang_tools[@]}"; do
- rm "${ED%/}/usr/bin/${i}-${CLANG_VERSION}" || die
- cat > "${T}"/wrapper.tmp <<-_EOF_
- #!${EPREFIX}/bin/sh
- exec "${i}-${CLANG_VERSION}" $(get_abi_CFLAGS) "\${@}"
- _EOF_
- newbin "${T}"/wrapper.tmp "${i}-${CLANG_VERSION}"
- done
- fi
- fi
-}
-
-multilib_src_install_all() {
- insinto /usr/share/vim/vimfiles
- doins -r utils/vim/*/
- # some users may find it useful
- dodoc utils/vim/vimrc
-
- if use clang; then
- pushd tools/clang >/dev/null || die
-
- if use static-analyzer ; then
- pushd tools/scan-build >/dev/null || die
-
- dobin ccc-analyzer scan-build
- dosym ccc-analyzer /usr/bin/c++-analyzer
- doman scan-build.1
-
- insinto /usr/share/llvm
- doins scanview.css sorttable.js
-
- popd >/dev/null || die
- fi
-
- python_inst() {
- if use static-analyzer ; then
- pushd tools/scan-view >/dev/null || die
-
- python_doscript scan-view
-
- touch __init__.py || die
- python_moduleinto clang
- python_domodule *.py Resources
-
- popd >/dev/null || die
- fi
-
- if use python ; then
- pushd bindings/python/clang >/dev/null || die
-
- python_moduleinto clang
- python_domodule *.py
-
- popd >/dev/null || die
- fi
-
- # AddressSanitizer symbolizer (currently separate)
- python_doscript "${S}"/projects/compiler-rt/lib/asan/scripts/asan_symbolize.py
- }
- python_foreach_impl python_inst
- popd >/dev/null || die
- fi
-}
-
-pkg_postinst() {
- if use clang; then
- elog "To enable OpenMP support in clang, install sys-libs/libomp"
- elog "and use the '-fopenmp=libomp' command line option"
- fi
-}
diff --git a/sys-devel/llvm/llvm-3.7.0-r3.ebuild b/sys-devel/llvm/llvm-3.7.0-r3.ebuild
deleted file mode 100644
index ab428f05c9d..00000000000
--- a/sys-devel/llvm/llvm-3.7.0-r3.ebuild
+++ /dev/null
@@ -1,525 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
-PYTHON_COMPAT=( python2_7 pypy )
-
-inherit check-reqs cmake-utils eutils flag-o-matic multilib \
- multilib-minimal python-r1 toolchain-funcs pax-utils
-
-DESCRIPTION="Low Level Virtual Machine"
-HOMEPAGE="http://llvm.org/"
-SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.xz
- clang? ( http://llvm.org/releases/${PV}/compiler-rt-${PV}.src.tar.xz
- http://llvm.org/releases/${PV}/cfe-${PV}.src.tar.xz
- http://llvm.org/releases/${PV}/clang-tools-extra-${PV}.src.tar.xz )
- lldb? ( http://llvm.org/releases/${PV}/lldb-${PV}.src.tar.xz )
- !doc? ( http://dev.gentoo.org/~voyageur/distfiles/${P}-manpages.tar.bz2 )"
-
-LICENSE="UoI-NCSA"
-SLOT="0/${PV}"
-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"
-IUSE="clang debug doc gold libedit +libffi lldb multitarget ncurses ocaml
- python +static-analyzer test xml video_cards_radeon kernel_Darwin"
-
-COMMON_DEPEND="
- sys-libs/zlib:0=
- clang? (
- python? ( ${PYTHON_DEPS} )
- static-analyzer? (
- dev-lang/perl:*
- ${PYTHON_DEPS}
- )
- xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
- )
- gold? ( >=sys-devel/binutils-2.22:*[cxx] )
- libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] )
- libffi? ( >=virtual/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] )
- ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] )
- ocaml? (
- >=dev-lang/ocaml-4.00.0:0=
- dev-ml/findlib
- dev-ml/ocaml-ctypes
- !!<=sys-devel/llvm-3.7.0-r1[ocaml] )"
-# configparser-3.2 breaks the build (3.3 or none at all are fine)
-DEPEND="${COMMON_DEPEND}
- dev-lang/perl
- >=sys-devel/make-3.81
- >=sys-devel/flex-2.5.4
- >=sys-devel/bison-1.875d
- || ( >=sys-devel/gcc-3.0 >=sys-devel/llvm-3.5
- ( >=sys-freebsd/freebsd-lib-9.1-r10 sys-libs/libcxx )
- )
- || ( >=sys-devel/binutils-2.18 >=sys-devel/binutils-apple-5.1 )
- kernel_Darwin? ( sys-libs/libcxx )
- clang? ( xml? ( virtual/pkgconfig ) )
- doc? ( dev-python/sphinx )
- gold? ( sys-libs/binutils-libs )
- libffi? ( virtual/pkgconfig )
- lldb? ( dev-lang/swig )
- !!<dev-python/configparser-3.3.0.2
- ocaml? ( test? ( dev-ml/ounit ) )
- ${PYTHON_DEPS}"
-RDEPEND="${COMMON_DEPEND}
- clang? ( !<=sys-devel/clang-${PV}-r99 )
- abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r2
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
-PDEPEND="clang? ( =sys-devel/clang-${PV}-r100 )"
-
-# pypy gives me around 1700 unresolved tests due to open file limit
-# being exceeded. probably GC does not close them fast enough.
-REQUIRED_USE="${PYTHON_REQUIRED_USE}
- lldb? ( clang xml )
- test? ( || ( $(python_gen_useflags 'python*') ) )"
-
-S=${WORKDIR}/${P/_}.src
-
-pkg_pretend() {
- # in megs
- # !clang !debug !multitarget -O2 400
- # !clang !debug multitarget -O2 550
- # clang !debug !multitarget -O2 950
- # clang !debug multitarget -O2 1200
- # !clang debug multitarget -O2 5G
- # clang !debug multitarget -O0 -g 12G
- # clang debug multitarget -O2 16G
- # clang debug multitarget -O0 -g 14G
-
- local build_size=550
- use clang && build_size=1200
-
- if use debug; then
- ewarn "USE=debug is known to increase the size of package considerably"
- ewarn "and cause the tests to fail."
- ewarn
-
- (( build_size *= 14 ))
- elif is-flagq '-g?(gdb)?([1-9])'; then
- ewarn "The C++ compiler -g option is known to increase the size of the package"
- ewarn "considerably. If you run out of space, please consider removing it."
- ewarn
-
- (( build_size *= 10 ))
- fi
-
- # Multiply by number of ABIs :).
- local abis=( $(multilib_get_enabled_abis) )
- (( build_size *= ${#abis[@]} ))
-
- local CHECKREQS_DISK_BUILD=${build_size}M
- check-reqs_pkg_pretend
-
- if [[ ${MERGE_TYPE} != binary ]]; then
- echo 'int main() {return 0;}' > "${T}"/test.cxx || die
- ebegin "Trying to build a C++11 test program"
- if ! $(tc-getCXX) -std=c++11 -o /dev/null "${T}"/test.cxx; then
- eerror "LLVM-${PV} requires C++11-capable C++ compiler. Your current compiler"
- eerror "does not seem to support -std=c++11 option. Please upgrade your compiler"
- eerror "to gcc-4.7 or an equivalent version supporting C++11."
- die "Currently active compiler does not support -std=c++11"
- fi
- eend ${?}
- fi
-}
-
-pkg_setup() {
- pkg_pretend
-}
-
-src_unpack() {
- default
-
- if use clang; then
- mv "${WORKDIR}"/cfe-${PV/_}.src "${S}"/tools/clang \
- || die "clang source directory move failed"
- mv "${WORKDIR}"/compiler-rt-${PV/_}.src "${S}"/projects/compiler-rt \
- || die "compiler-rt source directory move failed"
- mv "${WORKDIR}"/clang-tools-extra-${PV/_}.src "${S}"/tools/clang/tools/extra \
- || die "clang-tools-extra source directory move failed"
- fi
-
- if use lldb; then
- mv "${WORKDIR}"/lldb-${PV/_}.src "${S}"/tools/lldb \
- || die "lldb source directory move failed"
- fi
-}
-
-src_prepare() {
- # Make ocaml warnings non-fatal, bug #537308
- sed -e "/RUN/s/-warn-error A//" -i test/Bindings/OCaml/*ml || die
- # Fix libdir for ocaml bindings install, bug #559134
- epatch "${FILESDIR}"/cmake/${P}-ocaml-multilib.patch
- # Do not build/install ocaml docs with USE=-doc, bug #562008
- epatch "${FILESDIR}"/cmake/${P}-ocaml-build_doc.patch
-
- # Make it possible to override Sphinx HTML install dirs
- # https://llvm.org/bugs/show_bug.cgi?id=23780
- epatch "${FILESDIR}"/cmake/0002-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch
-
- # Prevent race conditions with parallel Sphinx runs
- # https://llvm.org/bugs/show_bug.cgi?id=23781
- epatch "${FILESDIR}"/cmake/0003-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch
-
- # Prevent installing libgtest
- # https://llvm.org/bugs/show_bug.cgi?id=18341
- epatch "${FILESDIR}"/cmake/0004-cmake-Do-not-install-libgtest.patch
-
- # Fix llvm-config for shared linking and sane flags
- # https://bugs.gentoo.org/show_bug.cgi?id=565358
- epatch "${FILESDIR}"/llvm-3.7-llvm-config.patch
-
- if use clang; then
- # Automatically select active system GCC's libraries, bugs #406163 and #417913
- epatch "${FILESDIR}"/clang-3.5-gentoo-runtime-gcc-detection-v3.patch
-
- epatch "${FILESDIR}"/clang-3.6-gentoo-install.patch
-
- sed -i -e "s^@EPREFIX@^${EPREFIX}^" \
- tools/clang/tools/scan-build/scan-build || die
-
- # Install clang runtime into /usr/lib/clang
- # https://llvm.org/bugs/show_bug.cgi?id=23792
- epatch "${FILESDIR}"/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix.patch
- epatch "${FILESDIR}"/cmake/compiler-rt-0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi.patch
-
- # Do not force -march flags on arm platforms
- # https://bugs.gentoo.org/show_bug.cgi?id=562706
- epatch "${FILESDIR}"/cmake/${P}-compiler_rt_arm_march_flags.patch
-
- # Make it possible to override CLANG_LIBDIR_SUFFIX
- # (that is used only to find LLVMgold.so)
- # https://llvm.org/bugs/show_bug.cgi?id=23793
- epatch "${FILESDIR}"/cmake/clang-0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch
-
- # Fix WX sections, bug #421527
- find "${S}"/projects/compiler-rt/lib/builtins -type f -name \*.S -exec sed \
- -e '$a\\n#if defined(__linux__) && defined(__ELF__)\n.section .note.GNU-stack,"",%progbits\n#endif' \
- -i {} \; || die
- fi
-
- if use lldb; then
- # Do not install dummy readline.so module from
- # https://llvm.org/bugs/show_bug.cgi?id=18841
- sed -e 's/add_subdirectory(readline)/#&/' \
- -i tools/lldb/scripts/Python/modules/CMakeLists.txt || die
-
- # Fix Python paths, bugs #562436 and #562438
- epatch "${FILESDIR}"/${PN}-3.7-lldb_python.patch
- sed -e "s/GENTOO_LIBDIR/$(get_libdir)/" \
- -i tools/lldb/scripts/Python/finishSwigPythonLLDB.py || die
-
- # Fix build with ncurses[tinfo], #560474
- # http://llvm.org/viewvc/llvm-project?view=revision&revision=247842
- epatch "${FILESDIR}"/cmake/${P}-lldb_tinfo.patch
- fi
-
- # User patches
- epatch_user
-
- python_setup 'python*'
-
- # Native libdir is used to hold LLVMgold.so
- NATIVE_LIBDIR=$(get_libdir)
-}
-
-multilib_src_configure() {
- local targets
- if use multitarget; then
- targets=all
- else
- targets='host;CppBackend'
- use video_cards_radeon && targets+=';AMDGPU'
- fi
-
- local ffi_cflags ffi_ldflags
- if use libffi; then
- ffi_cflags=$(pkg-config --cflags-only-I libffi)
- ffi_ldflags=$(pkg-config --libs-only-L libffi)
- fi
-
- local libdir=$(get_libdir)
- local mycmakeargs=(
- "${mycmakeargs[@]}"
- -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
-
- -DBUILD_SHARED_LIBS=ON
- -DLLVM_ENABLE_TIMESTAMPS=OFF
- -DLLVM_TARGETS_TO_BUILD="${targets}"
- -DLLVM_BUILD_TESTS=$(usex test)
-
- -DLLVM_ENABLE_FFI=$(usex libffi)
- -DLLVM_ENABLE_TERMINFO=$(usex ncurses)
- -DLLVM_ENABLE_ASSERTIONS=$(usex debug)
- -DLLVM_ENABLE_EH=ON
- -DLLVM_ENABLE_RTTI=ON
-
- -DWITH_POLLY=OFF # TODO
-
- -DLLVM_HOST_TRIPLE="${CHOST}"
-
- -DFFI_INCLUDE_DIR="${ffi_cflags#-I}"
- -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}"
-
- -DHAVE_HISTEDIT_H=$(usex libedit)
- )
-
- if use clang; then
- mycmakeargs+=(
- -DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=$(usex !xml)
- )
- fi
-
- if use lldb; then
- mycmakeargs+=(
- -DLLDB_DISABLE_LIBEDIT=$(usex !libedit)
- -DLLDB_DISABLE_CURSES=$(usex !ncurses)
- -DLLDB_ENABLE_TERMINFO=$(usex ncurses)
- )
- fi
-
- if ! multilib_is_native_abi || ! use ocaml; then
- mycmakeargs+=(
- -DOCAMLFIND=NO
- )
- fi
-# Note: go bindings have no CMake rules at the moment
-# but let's kill the check in case they are introduced
-# if ! multilib_is_native_abi || ! use go; then
- mycmakeargs+=(
- -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND
- )
-# fi
-
- if multilib_is_native_abi; then
- mycmakeargs+=(
- -DLLVM_BUILD_DOCS=$(usex doc)
- -DLLVM_ENABLE_SPHINX=$(usex doc)
- -DLLVM_ENABLE_DOXYGEN=OFF
- -DLLVM_INSTALL_HTML="${EPREFIX}/usr/share/doc/${PF}/html"
- -DSPHINX_WARNINGS_AS_ERRORS=OFF
- -DLLVM_INSTALL_UTILS=ON
- )
-
- if use clang; then
- mycmakeargs+=(
- -DCLANG_INSTALL_HTML="${EPREFIX}/usr/share/doc/${PF}/clang"
- )
- fi
-
- if use gold; then
- mycmakeargs+=(
- -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include
- )
- fi
-
- if use lldb; then
- mycmakeargs+=(
- -DLLDB_DISABLE_PYTHON=$(usex !python)
- )
- fi
-
- else
- if use clang; then
- mycmakeargs+=(
- # disable compiler-rt on non-native ABI because:
- # 1. it fails to configure because of -m32
- # 2. it is shared between ABIs so no point building
- # it multiple times
- -DLLVM_EXTERNAL_COMPILER_RT_BUILD=OFF
- -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_BUILD=OFF
- )
- fi
- if use lldb; then
- mycmakeargs+=(
- # only run swig on native abi
- -DLLDB_DISABLE_PYTHON=ON
- )
- fi
- fi
-
- if use clang; then
- mycmakeargs+=(
- -DCLANG_ENABLE_ARCMT=$(usex static-analyzer)
- -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer)
- -DCLANG_LIBDIR_SUFFIX="${NATIVE_LIBDIR#lib}"
- )
-
- # -- not needed when compiler-rt is built with host compiler --
- # cmake passes host C*FLAGS to compiler-rt build
- # which is performed using clang, so we need to filter out
- # some flags clang does not support
- # (if you know some more flags that don't work, let us know)
- #filter-flags -msahf -frecord-gcc-switches
- fi
-
- cmake-utils_src_configure
-}
-
-multilib_src_compile() {
- cmake-utils_src_compile
- # TODO: not sure why this target is not correctly called
- multilib_is_native_abi && use doc && use ocaml && cmake-utils_src_make docs/ocaml_doc
-
- pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld
- pax-mark m "${BUILD_DIR}"/bin/lli
- pax-mark m "${BUILD_DIR}"/bin/lli-child-target
-
- if use test; then
- pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/Orc/OrcJITTests
- pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/MCJIT/MCJITTests
- pax-mark m "${BUILD_DIR}"/unittests/Support/SupportTests
- fi
-}
-
-multilib_src_test() {
- # respect TMPDIR!
- local -x LIT_PRESERVES_TMP=1
- local test_targets=( check )
- # clang tests won't work on non-native ABI because we skip compiler-rt
- multilib_is_native_abi && use clang && test_targets+=( check-clang )
- cmake-utils_src_make "${test_targets[@]}"
-}
-
-src_install() {
- local MULTILIB_CHOST_TOOLS=(
- /usr/bin/llvm-config
- )
-
- local MULTILIB_WRAPPED_HEADERS=(
- /usr/include/llvm/Config/config.h
- /usr/include/llvm/Config/llvm-config.h
- )
-
- if use clang; then
- # note: magic applied in multilib_src_install()!
- CLANG_VERSION=${PV%.*}
-
- MULTILIB_CHOST_TOOLS+=(
- /usr/bin/clang
- /usr/bin/clang++
- /usr/bin/clang-cl
- /usr/bin/clang-${CLANG_VERSION}
- /usr/bin/clang++-${CLANG_VERSION}
- /usr/bin/clang-cl-${CLANG_VERSION}
- )
-
- MULTILIB_WRAPPED_HEADERS+=(
- /usr/include/clang/Config/config.h
- )
- fi
-
- multilib-minimal_src_install
-}
-
-multilib_src_install() {
- cmake-utils_src_install
-
- if multilib_is_native_abi; then
- # Install man pages.
- use doc || doman "${WORKDIR}"/${P}-manpages/*.1
-
- # Symlink the gold plugin.
- if use gold; then
- dodir "/usr/${CHOST}/binutils-bin/lib/bfd-plugins"
- dosym "../../../../$(get_libdir)/LLVMgold.so" \
- "/usr/${CHOST}/binutils-bin/lib/bfd-plugins/LLVMgold.so"
- fi
- fi
-
- # apply CHOST and CLANG_VERSION to clang executables
- # they're statically linked so we don't have to worry about the lib
- if use clang; then
- local clang_tools=( clang clang++ clang-cl )
- local i
-
- # cmake gives us:
- # - clang-X.Y
- # - clang -> clang-X.Y
- # - clang++, clang-cl -> clang
- # we want to have:
- # - clang-X.Y
- # - clang++-X.Y, clang-cl-X.Y -> clang-X.Y
- # - clang, clang++, clang-cl -> clang*-X.Y
- # so we need to fix the two tools
- for i in "${clang_tools[@]:1}"; do
- rm "${ED%/}/usr/bin/${i}" || die
- dosym "clang-${CLANG_VERSION}" "/usr/bin/${i}-${CLANG_VERSION}"
- dosym "${i}-${CLANG_VERSION}" "/usr/bin/${i}"
- done
-
- # now prepend ${CHOST} and let the multilib-build.eclass symlink it
- if ! multilib_is_native_abi; then
- # non-native? let's replace it with a simple wrapper
- for i in "${clang_tools[@]}"; do
- rm "${ED%/}/usr/bin/${i}-${CLANG_VERSION}" || die
- cat > "${T}"/wrapper.tmp <<-_EOF_
- #!${EPREFIX}/bin/sh
- exec "${i}-${CLANG_VERSION}" $(get_abi_CFLAGS) "\${@}"
- _EOF_
- newbin "${T}"/wrapper.tmp "${i}-${CLANG_VERSION}"
- done
- fi
- fi
-}
-
-multilib_src_install_all() {
- insinto /usr/share/vim/vimfiles
- doins -r utils/vim/*/
- # some users may find it useful
- dodoc utils/vim/vimrc
-
- if use clang; then
- pushd tools/clang >/dev/null || die
-
- if use static-analyzer ; then
- pushd tools/scan-build >/dev/null || die
-
- dobin ccc-analyzer scan-build
- dosym ccc-analyzer /usr/bin/c++-analyzer
- doman scan-build.1
-
- insinto /usr/share/llvm
- doins scanview.css sorttable.js
-
- popd >/dev/null || die
- fi
-
- python_inst() {
- if use static-analyzer ; then
- pushd tools/scan-view >/dev/null || die
-
- python_doscript scan-view
-
- touch __init__.py || die
- python_moduleinto clang
- python_domodule *.py Resources
-
- popd >/dev/null || die
- fi
-
- if use python ; then
- pushd bindings/python/clang >/dev/null || die
-
- python_moduleinto clang
- python_domodule *.py
-
- popd >/dev/null || die
- fi
-
- # AddressSanitizer symbolizer (currently separate)
- python_doscript "${S}"/projects/compiler-rt/lib/asan/scripts/asan_symbolize.py
- }
- python_foreach_impl python_inst
- popd >/dev/null || die
- fi
-}
-
-pkg_postinst() {
- if use clang; then
- elog "To enable OpenMP support in clang, install sys-libs/libomp"
- elog "and use the '-fopenmp=libomp' command line option"
- fi
-}
diff --git a/sys-devel/llvm/llvm-3.7.0-r4.ebuild b/sys-devel/llvm/llvm-3.7.0-r4.ebuild
deleted file mode 100644
index 8f74d075ecf..00000000000
--- a/sys-devel/llvm/llvm-3.7.0-r4.ebuild
+++ /dev/null
@@ -1,530 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
-PYTHON_COMPAT=( python2_7 )
-
-inherit check-reqs cmake-utils eutils flag-o-matic multilib \
- multilib-minimal python-single-r1 toolchain-funcs pax-utils
-
-DESCRIPTION="Low Level Virtual Machine"
-HOMEPAGE="http://llvm.org/"
-SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.xz
- clang? ( http://llvm.org/releases/${PV}/compiler-rt-${PV}.src.tar.xz
- http://llvm.org/releases/${PV}/cfe-${PV}.src.tar.xz
- http://llvm.org/releases/${PV}/clang-tools-extra-${PV}.src.tar.xz )
- lldb? ( http://llvm.org/releases/${PV}/lldb-${PV}.src.tar.xz )
- !doc? ( http://dev.gentoo.org/~voyageur/distfiles/${P}-manpages.tar.bz2 )"
-
-LICENSE="UoI-NCSA"
-SLOT="0/${PV}"
-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"
-IUSE="clang debug doc gold libedit +libffi lldb multitarget ncurses ocaml
- python +static-analyzer test xml video_cards_radeon kernel_Darwin"
-
-COMMON_DEPEND="
- sys-libs/zlib:0=
- clang? (
- python? ( ${PYTHON_DEPS} )
- static-analyzer? (
- dev-lang/perl:*
- ${PYTHON_DEPS}
- )
- xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
- )
- gold? ( >=sys-devel/binutils-2.22:*[cxx] )
- libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] )
- libffi? ( >=virtual/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] )
- ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] )
- ocaml? (
- >=dev-lang/ocaml-4.00.0:0=
- dev-ml/findlib
- dev-ml/ocaml-ctypes
- !!<=sys-devel/llvm-3.7.0-r1[ocaml] )"
-# configparser-3.2 breaks the build (3.3 or none at all are fine)
-DEPEND="${COMMON_DEPEND}
- dev-lang/perl
- >=sys-devel/make-3.81
- >=sys-devel/flex-2.5.4
- >=sys-devel/bison-1.875d
- || ( >=sys-devel/gcc-3.0 >=sys-devel/llvm-3.5
- ( >=sys-freebsd/freebsd-lib-9.1-r10 sys-libs/libcxx )
- )
- || ( >=sys-devel/binutils-2.18 >=sys-devel/binutils-apple-5.1 )
- kernel_Darwin? ( sys-libs/libcxx )
- clang? ( xml? ( virtual/pkgconfig ) )
- doc? ( dev-python/sphinx )
- gold? ( sys-libs/binutils-libs )
- libffi? ( virtual/pkgconfig )
- lldb? ( dev-lang/swig )
- !!<dev-python/configparser-3.3.0.2
- ocaml? ( test? ( dev-ml/ounit ) )
- ${PYTHON_DEPS}"
-RDEPEND="${COMMON_DEPEND}
- clang? ( !<=sys-devel/clang-${PV}-r99 )
- abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r2
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
-PDEPEND="clang? ( =sys-devel/clang-${PV}-r100 )"
-
-# pypy gives me around 1700 unresolved tests due to open file limit
-# being exceeded. probably GC does not close them fast enough.
-REQUIRED_USE="${PYTHON_REQUIRED_USE}
- lldb? ( clang xml )"
-
-S=${WORKDIR}/${P/_}.src
-
-pkg_pretend() {
- # in megs
- # !clang !debug !multitarget -O2 400
- # !clang !debug multitarget -O2 550
- # clang !debug !multitarget -O2 950
- # clang !debug multitarget -O2 1200
- # !clang debug multitarget -O2 5G
- # clang !debug multitarget -O0 -g 12G
- # clang debug multitarget -O2 16G
- # clang debug multitarget -O0 -g 14G
-
- local build_size=550
- use clang && build_size=1200
-
- if use debug; then
- ewarn "USE=debug is known to increase the size of package considerably"
- ewarn "and cause the tests to fail."
- ewarn
-
- (( build_size *= 14 ))
- elif is-flagq '-g?(gdb)?([1-9])'; then
- ewarn "The C++ compiler -g option is known to increase the size of the package"
- ewarn "considerably. If you run out of space, please consider removing it."
- ewarn
-
- (( build_size *= 10 ))
- fi
-
- # Multiply by number of ABIs :).
- local abis=( $(multilib_get_enabled_abis) )
- (( build_size *= ${#abis[@]} ))
-
- local CHECKREQS_DISK_BUILD=${build_size}M
- check-reqs_pkg_pretend
-
- if [[ ${MERGE_TYPE} != binary ]]; then
- echo 'int main() {return 0;}' > "${T}"/test.cxx || die
- ebegin "Trying to build a C++11 test program"
- if ! $(tc-getCXX) -std=c++11 -o /dev/null "${T}"/test.cxx; then
- eerror "LLVM-${PV} requires C++11-capable C++ compiler. Your current compiler"
- eerror "does not seem to support -std=c++11 option. Please upgrade your compiler"
- eerror "to gcc-4.7 or an equivalent version supporting C++11."
- die "Currently active compiler does not support -std=c++11"
- fi
- eend ${?}
- fi
-}
-
-pkg_setup() {
- pkg_pretend
-}
-
-src_unpack() {
- default
-
- if use clang; then
- mv "${WORKDIR}"/cfe-${PV/_}.src "${S}"/tools/clang \
- || die "clang source directory move failed"
- mv "${WORKDIR}"/compiler-rt-${PV/_}.src "${S}"/projects/compiler-rt \
- || die "compiler-rt source directory move failed"
- mv "${WORKDIR}"/clang-tools-extra-${PV/_}.src "${S}"/tools/clang/tools/extra \
- || die "clang-tools-extra source directory move failed"
- fi
-
- if use lldb; then
- mv "${WORKDIR}"/lldb-${PV/_}.src "${S}"/tools/lldb \
- || die "lldb source directory move failed"
- fi
-}
-
-src_prepare() {
- # Make ocaml warnings non-fatal, bug #537308
- sed -e "/RUN/s/-warn-error A//" -i test/Bindings/OCaml/*ml || die
- # Fix libdir for ocaml bindings install, bug #559134
- epatch "${FILESDIR}"/cmake/${P}-ocaml-multilib.patch
- # Do not build/install ocaml docs with USE=-doc, bug #562008
- epatch "${FILESDIR}"/cmake/${P}-ocaml-build_doc.patch
-
- # Make it possible to override Sphinx HTML install dirs
- # https://llvm.org/bugs/show_bug.cgi?id=23780
- epatch "${FILESDIR}"/cmake/0002-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch
-
- # Prevent race conditions with parallel Sphinx runs
- # https://llvm.org/bugs/show_bug.cgi?id=23781
- epatch "${FILESDIR}"/cmake/0003-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch
-
- # Prevent installing libgtest
- # https://llvm.org/bugs/show_bug.cgi?id=18341
- epatch "${FILESDIR}"/cmake/0004-cmake-Do-not-install-libgtest.patch
-
- # Fix llvm-config for shared linking and sane flags
- # https://bugs.gentoo.org/show_bug.cgi?id=565358
- epatch "${FILESDIR}"/llvm-3.7-llvm-config.patch
-
- if use clang; then
- # Automatically select active system GCC's libraries, bugs #406163 and #417913
- epatch "${FILESDIR}"/clang-3.5-gentoo-runtime-gcc-detection-v3.patch
-
- epatch "${FILESDIR}"/clang-3.6-gentoo-install.patch
-
- sed -i -e "s^@EPREFIX@^${EPREFIX}^" \
- tools/clang/tools/scan-build/scan-build || die
-
- # Install clang runtime into /usr/lib/clang
- # https://llvm.org/bugs/show_bug.cgi?id=23792
- epatch "${FILESDIR}"/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix.patch
- epatch "${FILESDIR}"/cmake/compiler-rt-0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi.patch
-
- # Do not force -march flags on arm platforms
- # https://bugs.gentoo.org/show_bug.cgi?id=562706
- epatch "${FILESDIR}"/cmake/${P}-compiler_rt_arm_march_flags.patch
-
- # Make it possible to override CLANG_LIBDIR_SUFFIX
- # (that is used only to find LLVMgold.so)
- # https://llvm.org/bugs/show_bug.cgi?id=23793
- epatch "${FILESDIR}"/cmake/clang-0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch
-
- # Fix WX sections, bug #421527
- find "${S}"/projects/compiler-rt/lib/builtins -type f -name \*.S -exec sed \
- -e '$a\\n#if defined(__linux__) && defined(__ELF__)\n.section .note.GNU-stack,"",%progbits\n#endif' \
- -i {} \; || die
- fi
-
- if use lldb; then
- # Do not install dummy readline.so module from
- # https://llvm.org/bugs/show_bug.cgi?id=18841
- sed -e 's/add_subdirectory(readline)/#&/' \
- -i tools/lldb/scripts/Python/modules/CMakeLists.txt || die
-
- # Fix Python paths, bugs #562436 and #562438
- epatch "${FILESDIR}"/${PN}-3.7-lldb_python.patch
- sed -e "s/GENTOO_LIBDIR/$(get_libdir)/" \
- -i tools/lldb/scripts/Python/finishSwigPythonLLDB.py || die
-
- # Fix build with ncurses[tinfo], #560474
- # http://llvm.org/viewvc/llvm-project?view=revision&revision=247842
- epatch "${FILESDIR}"/cmake/${P}-lldb_tinfo.patch
- fi
-
- # User patches
- epatch_user
-
- python_setup
-
- # Native libdir is used to hold LLVMgold.so
- NATIVE_LIBDIR=$(get_libdir)
-}
-
-multilib_src_configure() {
- local targets
- if use multitarget; then
- targets=all
- else
- targets='host;BPF;CppBackend'
- use video_cards_radeon && targets+=';AMDGPU'
- fi
-
- local ffi_cflags ffi_ldflags
- if use libffi; then
- ffi_cflags=$(pkg-config --cflags-only-I libffi)
- ffi_ldflags=$(pkg-config --libs-only-L libffi)
- fi
-
- local libdir=$(get_libdir)
- local mycmakeargs=(
- "${mycmakeargs[@]}"
- -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
-
- -DBUILD_SHARED_LIBS=ON
- -DLLVM_ENABLE_TIMESTAMPS=OFF
- -DLLVM_TARGETS_TO_BUILD="${targets}"
- -DLLVM_BUILD_TESTS=$(usex test)
-
- -DLLVM_ENABLE_FFI=$(usex libffi)
- -DLLVM_ENABLE_TERMINFO=$(usex ncurses)
- -DLLVM_ENABLE_ASSERTIONS=$(usex debug)
- -DLLVM_ENABLE_EH=ON
- -DLLVM_ENABLE_RTTI=ON
-
- -DWITH_POLLY=OFF # TODO
-
- -DLLVM_HOST_TRIPLE="${CHOST}"
-
- -DFFI_INCLUDE_DIR="${ffi_cflags#-I}"
- -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}"
-
- -DHAVE_HISTEDIT_H=$(usex libedit)
- )
-
- if use clang; then
- mycmakeargs+=(
- -DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=$(usex !xml)
- # libgomp support fails to find headers without explicit -I
- # furthermore, it provides only syntax checking
- -DCLANG_DEFAULT_OPENMP_RUNTIME=libomp
- )
- fi
-
- if use lldb; then
- mycmakeargs+=(
- -DLLDB_DISABLE_LIBEDIT=$(usex !libedit)
- -DLLDB_DISABLE_CURSES=$(usex !ncurses)
- -DLLDB_ENABLE_TERMINFO=$(usex ncurses)
- )
- fi
-
- if ! multilib_is_native_abi || ! use ocaml; then
- mycmakeargs+=(
- -DOCAMLFIND=NO
- )
- fi
-# Note: go bindings have no CMake rules at the moment
-# but let's kill the check in case they are introduced
-# if ! multilib_is_native_abi || ! use go; then
- mycmakeargs+=(
- -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND
- )
-# fi
-
- if multilib_is_native_abi; then
- mycmakeargs+=(
- -DLLVM_BUILD_DOCS=$(usex doc)
- -DLLVM_ENABLE_SPHINX=$(usex doc)
- -DLLVM_ENABLE_DOXYGEN=OFF
- -DLLVM_INSTALL_HTML="${EPREFIX}/usr/share/doc/${PF}/html"
- -DSPHINX_WARNINGS_AS_ERRORS=OFF
- -DLLVM_INSTALL_UTILS=ON
- )
-
- if use clang; then
- mycmakeargs+=(
- -DCLANG_INSTALL_HTML="${EPREFIX}/usr/share/doc/${PF}/clang"
- )
- fi
-
- if use gold; then
- mycmakeargs+=(
- -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include
- )
- fi
-
- if use lldb; then
- mycmakeargs+=(
- -DLLDB_DISABLE_PYTHON=$(usex !python)
- )
- fi
-
- else
- if use clang; then
- mycmakeargs+=(
- # disable compiler-rt on non-native ABI because:
- # 1. it fails to configure because of -m32
- # 2. it is shared between ABIs so no point building
- # it multiple times
- -DLLVM_EXTERNAL_COMPILER_RT_BUILD=OFF
- -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_BUILD=OFF
- )
- fi
- if use lldb; then
- mycmakeargs+=(
- # only run swig on native abi
- -DLLDB_DISABLE_PYTHON=ON
- )
- fi
- fi
-
- if use clang; then
- mycmakeargs+=(
- -DCLANG_ENABLE_ARCMT=$(usex static-analyzer)
- -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer)
- -DCLANG_LIBDIR_SUFFIX="${NATIVE_LIBDIR#lib}"
- )
-
- # -- not needed when compiler-rt is built with host compiler --
- # cmake passes host C*FLAGS to compiler-rt build
- # which is performed using clang, so we need to filter out
- # some flags clang does not support
- # (if you know some more flags that don't work, let us know)
- #filter-flags -msahf -frecord-gcc-switches
- fi
-
- cmake-utils_src_configure
-}
-
-multilib_src_compile() {
- cmake-utils_src_compile
- # TODO: not sure why this target is not correctly called
- multilib_is_native_abi && use doc && use ocaml && cmake-utils_src_make docs/ocaml_doc
-
- pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld
- pax-mark m "${BUILD_DIR}"/bin/lli
- pax-mark m "${BUILD_DIR}"/bin/lli-child-target
-
- if use test; then
- pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/Orc/OrcJITTests
- pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/MCJIT/MCJITTests
- pax-mark m "${BUILD_DIR}"/unittests/Support/SupportTests
- fi
-}
-
-multilib_src_test() {
- # respect TMPDIR!
- local -x LIT_PRESERVES_TMP=1
- local test_targets=( check )
- # clang tests won't work on non-native ABI because we skip compiler-rt
- multilib_is_native_abi && use clang && test_targets+=( check-clang )
- cmake-utils_src_make "${test_targets[@]}"
-}
-
-src_install() {
- local MULTILIB_CHOST_TOOLS=(
- /usr/bin/llvm-config
- )
-
- local MULTILIB_WRAPPED_HEADERS=(
- /usr/include/llvm/Config/config.h
- /usr/include/llvm/Config/llvm-config.h
- )
-
- if use clang; then
- # note: magic applied in multilib_src_install()!
- CLANG_VERSION=${PV%.*}
-
- MULTILIB_CHOST_TOOLS+=(
- /usr/bin/clang
- /usr/bin/clang++
- /usr/bin/clang-cl
- /usr/bin/clang-${CLANG_VERSION}
- /usr/bin/clang++-${CLANG_VERSION}
- /usr/bin/clang-cl-${CLANG_VERSION}
- )
-
- MULTILIB_WRAPPED_HEADERS+=(
- /usr/include/clang/Config/config.h
- )
- fi
-
- multilib-minimal_src_install
-}
-
-multilib_src_install() {
- cmake-utils_src_install
-
- if multilib_is_native_abi; then
- # Install man pages.
- use doc || doman "${WORKDIR}"/${P}-manpages/*.1
-
- # Symlink the gold plugin.
- if use gold; then
- dodir "/usr/${CHOST}/binutils-bin/lib/bfd-plugins"
- dosym "../../../../$(get_libdir)/LLVMgold.so" \
- "/usr/${CHOST}/binutils-bin/lib/bfd-plugins/LLVMgold.so"
- fi
- fi
-
- # apply CHOST and CLANG_VERSION to clang executables
- # they're statically linked so we don't have to worry about the lib
- if use clang; then
- local clang_tools=( clang clang++ clang-cl )
- local i
-
- # cmake gives us:
- # - clang-X.Y
- # - clang -> clang-X.Y
- # - clang++, clang-cl -> clang
- # we want to have:
- # - clang-X.Y
- # - clang++-X.Y, clang-cl-X.Y -> clang-X.Y
- # - clang, clang++, clang-cl -> clang*-X.Y
- # so we need to fix the two tools
- for i in "${clang_tools[@]:1}"; do
- rm "${ED%/}/usr/bin/${i}" || die
- dosym "clang-${CLANG_VERSION}" "/usr/bin/${i}-${CLANG_VERSION}"
- dosym "${i}-${CLANG_VERSION}" "/usr/bin/${i}"
- done
-
- # now prepend ${CHOST} and let the multilib-build.eclass symlink it
- if ! multilib_is_native_abi; then
- # non-native? let's replace it with a simple wrapper
- for i in "${clang_tools[@]}"; do
- rm "${ED%/}/usr/bin/${i}-${CLANG_VERSION}" || die
- cat > "${T}"/wrapper.tmp <<-_EOF_
- #!${EPREFIX}/bin/sh
- exec "${i}-${CLANG_VERSION}" $(get_abi_CFLAGS) "\${@}"
- _EOF_
- newbin "${T}"/wrapper.tmp "${i}-${CLANG_VERSION}"
- done
- fi
- fi
-}
-
-multilib_src_install_all() {
- insinto /usr/share/vim/vimfiles
- doins -r utils/vim/*/.
- # some users may find it useful
- dodoc utils/vim/vimrc
-
- if use clang; then
- pushd tools/clang >/dev/null || die
-
- if use static-analyzer ; then
- pushd tools/scan-build >/dev/null || die
-
- dobin ccc-analyzer scan-build
- dosym ccc-analyzer /usr/bin/c++-analyzer
- doman scan-build.1
-
- insinto /usr/share/llvm
- doins scanview.css sorttable.js
-
- popd >/dev/null || die
- fi
-
- if use static-analyzer ; then
- pushd tools/scan-view >/dev/null || die
-
- python_doscript scan-view
-
- touch __init__.py || die
- python_moduleinto clang
- python_domodule *.py Resources
-
- popd >/dev/null || die
- fi
-
- if use python ; then
- pushd bindings/python/clang >/dev/null || die
-
- python_moduleinto clang
- python_domodule *.py
-
- popd >/dev/null || die
- fi
-
- # AddressSanitizer symbolizer (currently separate)
- dobin "${S}"/projects/compiler-rt/lib/asan/scripts/asan_symbolize.py
-
- popd >/dev/null || die
-
- python_fix_shebang "${ED}"
- if use lldb && use python; then
- python_optimize
- fi
- fi
-}
-
-pkg_postinst() {
- if use clang; then
- elog "To enable OpenMP support in clang, install sys-libs/libomp"
- elog "and use the '-fopenmp=libomp' command line option"
- fi
-}
diff --git a/sys-devel/llvm/llvm-3.7.0-r5.ebuild b/sys-devel/llvm/llvm-3.7.0-r5.ebuild
deleted file mode 100644
index cc861921a4d..00000000000
--- a/sys-devel/llvm/llvm-3.7.0-r5.ebuild
+++ /dev/null
@@ -1,540 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
-PYTHON_COMPAT=( python2_7 )
-
-inherit check-reqs cmake-utils eutils flag-o-matic multilib \
- multilib-minimal python-single-r1 toolchain-funcs pax-utils
-
-DESCRIPTION="Low Level Virtual Machine"
-HOMEPAGE="http://llvm.org/"
-SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.xz
- clang? ( http://llvm.org/releases/${PV}/compiler-rt-${PV}.src.tar.xz
- http://llvm.org/releases/${PV}/cfe-${PV}.src.tar.xz
- http://llvm.org/releases/${PV}/clang-tools-extra-${PV}.src.tar.xz )
- lldb? ( http://llvm.org/releases/${PV}/lldb-${PV}.src.tar.xz )
- !doc? ( http://dev.gentoo.org/~voyageur/distfiles/${P}-manpages.tar.bz2 )"
-
-LICENSE="UoI-NCSA"
-SLOT="0/${PV}"
-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"
-IUSE="clang debug doc gold libedit +libffi lldb multitarget ncurses ocaml
- python +static-analyzer test xml video_cards_radeon kernel_Darwin"
-
-COMMON_DEPEND="
- sys-libs/zlib:0=
- clang? (
- python? ( ${PYTHON_DEPS} )
- static-analyzer? (
- dev-lang/perl:*
- ${PYTHON_DEPS}
- )
- xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
- )
- gold? ( >=sys-devel/binutils-2.22:*[cxx] )
- libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] )
- libffi? ( >=virtual/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] )
- ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] )
- ocaml? (
- >=dev-lang/ocaml-4.00.0:0=
- dev-ml/findlib
- dev-ml/ocaml-ctypes
- !!<=sys-devel/llvm-3.7.0-r1[ocaml] )"
-# configparser-3.2 breaks the build (3.3 or none at all are fine)
-DEPEND="${COMMON_DEPEND}
- dev-lang/perl
- >=sys-devel/make-3.81
- >=sys-devel/flex-2.5.4
- >=sys-devel/bison-1.875d
- || ( >=sys-devel/gcc-3.0 >=sys-devel/llvm-3.5
- ( >=sys-freebsd/freebsd-lib-9.1-r10 sys-libs/libcxx )
- )
- || ( >=sys-devel/binutils-2.18 >=sys-devel/binutils-apple-5.1 )
- kernel_Darwin? ( sys-libs/libcxx )
- clang? ( xml? ( virtual/pkgconfig ) )
- doc? ( dev-python/sphinx )
- gold? ( sys-libs/binutils-libs )
- libffi? ( virtual/pkgconfig )
- lldb? ( dev-lang/swig )
- !!<dev-python/configparser-3.3.0.2
- ocaml? ( test? ( dev-ml/ounit ) )
- ${PYTHON_DEPS}"
-RDEPEND="${COMMON_DEPEND}
- clang? ( !<=sys-devel/clang-${PV}-r99 )
- abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r2
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
-PDEPEND="clang? ( =sys-devel/clang-${PV}-r100 )"
-
-# pypy gives me around 1700 unresolved tests due to open file limit
-# being exceeded. probably GC does not close them fast enough.
-REQUIRED_USE="${PYTHON_REQUIRED_USE}
- lldb? ( clang xml )"
-
-S=${WORKDIR}/${P/_}.src
-
-pkg_pretend() {
- # in megs
- # !clang !debug !multitarget -O2 400
- # !clang !debug multitarget -O2 550
- # clang !debug !multitarget -O2 950
- # clang !debug multitarget -O2 1200
- # !clang debug multitarget -O2 5G
- # clang !debug multitarget -O0 -g 12G
- # clang debug multitarget -O2 16G
- # clang debug multitarget -O0 -g 14G
-
- local build_size=550
- use clang && build_size=1200
-
- if use debug; then
- ewarn "USE=debug is known to increase the size of package considerably"
- ewarn "and cause the tests to fail."
- ewarn
-
- (( build_size *= 14 ))
- elif is-flagq '-g?(gdb)?([1-9])'; then
- ewarn "The C++ compiler -g option is known to increase the size of the package"
- ewarn "considerably. If you run out of space, please consider removing it."
- ewarn
-
- (( build_size *= 10 ))
- fi
-
- # Multiply by number of ABIs :).
- local abis=( $(multilib_get_enabled_abis) )
- (( build_size *= ${#abis[@]} ))
-
- local CHECKREQS_DISK_BUILD=${build_size}M
- check-reqs_pkg_pretend
-
- if [[ ${MERGE_TYPE} != binary ]]; then
- echo 'int main() {return 0;}' > "${T}"/test.cxx || die
- ebegin "Trying to build a C++11 test program"
- if ! $(tc-getCXX) -std=c++11 -o /dev/null "${T}"/test.cxx; then
- eerror "LLVM-${PV} requires C++11-capable C++ compiler. Your current compiler"
- eerror "does not seem to support -std=c++11 option. Please upgrade your compiler"
- eerror "to gcc-4.7 or an equivalent version supporting C++11."
- die "Currently active compiler does not support -std=c++11"
- fi
- eend ${?}
- fi
-}
-
-pkg_setup() {
- pkg_pretend
-}
-
-src_unpack() {
- default
-
- if use clang; then
- mv "${WORKDIR}"/cfe-${PV/_}.src "${S}"/tools/clang \
- || die "clang source directory move failed"
- mv "${WORKDIR}"/compiler-rt-${PV/_}.src "${S}"/projects/compiler-rt \
- || die "compiler-rt source directory move failed"
- mv "${WORKDIR}"/clang-tools-extra-${PV/_}.src "${S}"/tools/clang/tools/extra \
- || die "clang-tools-extra source directory move failed"
- fi
-
- if use lldb; then
- mv "${WORKDIR}"/lldb-${PV/_}.src "${S}"/tools/lldb \
- || die "lldb source directory move failed"
- fi
-}
-
-src_prepare() {
- # Make ocaml warnings non-fatal, bug #537308
- sed -e "/RUN/s/-warn-error A//" -i test/Bindings/OCaml/*ml || die
- # Fix libdir for ocaml bindings install, bug #559134
- epatch "${FILESDIR}"/cmake/${P}-ocaml-multilib.patch
- # Do not build/install ocaml docs with USE=-doc, bug #562008
- epatch "${FILESDIR}"/cmake/${P}-ocaml-build_doc.patch
-
- # Make it possible to override Sphinx HTML install dirs
- # https://llvm.org/bugs/show_bug.cgi?id=23780
- epatch "${FILESDIR}"/cmake/0002-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch
-
- # Prevent race conditions with parallel Sphinx runs
- # https://llvm.org/bugs/show_bug.cgi?id=23781
- epatch "${FILESDIR}"/cmake/0003-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch
-
- # Prevent installing libgtest
- # https://llvm.org/bugs/show_bug.cgi?id=18341
- epatch "${FILESDIR}"/cmake/0004-cmake-Do-not-install-libgtest.patch
-
- # Fix llvm-config for shared linking and sane flags
- # https://bugs.gentoo.org/show_bug.cgi?id=565358
- epatch "${FILESDIR}"/llvm-3.7-llvm-config.patch
-
- # Fix msan with newer kernels, #569894
- epatch "${FILESDIR}"/llvm-3.7-msan-fix.patch
-
- if use clang; then
- # Automatically select active system GCC's libraries, bugs #406163 and #417913
- epatch "${FILESDIR}"/clang-3.5-gentoo-runtime-gcc-detection-v3.patch
-
- epatch "${FILESDIR}"/clang-3.6-gentoo-install.patch
-
- sed -i -e "s^@EPREFIX@^${EPREFIX}^" \
- tools/clang/tools/scan-build/scan-build || die
-
- # Install clang runtime into /usr/lib/clang
- # https://llvm.org/bugs/show_bug.cgi?id=23792
- epatch "${FILESDIR}"/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix.patch
- epatch "${FILESDIR}"/cmake/compiler-rt-0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi.patch
-
- # Do not force -march flags on arm platforms
- # https://bugs.gentoo.org/show_bug.cgi?id=562706
- epatch "${FILESDIR}"/cmake/${P}-compiler_rt_arm_march_flags.patch
-
- # Make it possible to override CLANG_LIBDIR_SUFFIX
- # (that is used only to find LLVMgold.so)
- # https://llvm.org/bugs/show_bug.cgi?id=23793
- epatch "${FILESDIR}"/cmake/clang-0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch
-
- pushd projects/compiler-rt >/dev/null || die
-
- # Fix msan with newer kernels, compiler-rt part, #569894
- epatch "${FILESDIR}"/compiler-rt-3.7-msan-fix.patch
-
- # Fix WX sections, bug #421527
- find lib/builtins -type f -name '*.S' -exec sed \
- -e '$a\\n#if defined(__linux__) && defined(__ELF__)\n.section .note.GNU-stack,"",%progbits\n#endif' \
- -i {} + || die
-
- popd >/dev/null || die
- fi
-
- if use lldb; then
- # Do not install dummy readline.so module from
- # https://llvm.org/bugs/show_bug.cgi?id=18841
- sed -e 's/add_subdirectory(readline)/#&/' \
- -i tools/lldb/scripts/Python/modules/CMakeLists.txt || die
-
- # Fix Python paths, bugs #562436 and #562438
- epatch "${FILESDIR}"/${PN}-3.7-lldb_python.patch
- sed -e "s/GENTOO_LIBDIR/$(get_libdir)/" \
- -i tools/lldb/scripts/Python/finishSwigPythonLLDB.py || die
-
- # Fix build with ncurses[tinfo], #560474
- # http://llvm.org/viewvc/llvm-project?view=revision&revision=247842
- epatch "${FILESDIR}"/cmake/${P}-lldb_tinfo.patch
- fi
-
- # User patches
- epatch_user
-
- python_setup
-
- # Native libdir is used to hold LLVMgold.so
- NATIVE_LIBDIR=$(get_libdir)
-}
-
-multilib_src_configure() {
- local targets
- if use multitarget; then
- targets=all
- else
- targets='host;BPF;CppBackend'
- use video_cards_radeon && targets+=';AMDGPU'
- fi
-
- local ffi_cflags ffi_ldflags
- if use libffi; then
- ffi_cflags=$(pkg-config --cflags-only-I libffi)
- ffi_ldflags=$(pkg-config --libs-only-L libffi)
- fi
-
- local libdir=$(get_libdir)
- local mycmakeargs=(
- "${mycmakeargs[@]}"
- -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
-
- -DBUILD_SHARED_LIBS=ON
- -DLLVM_ENABLE_TIMESTAMPS=OFF
- -DLLVM_TARGETS_TO_BUILD="${targets}"
- -DLLVM_BUILD_TESTS=$(usex test)
-
- -DLLVM_ENABLE_FFI=$(usex libffi)
- -DLLVM_ENABLE_TERMINFO=$(usex ncurses)
- -DLLVM_ENABLE_ASSERTIONS=$(usex debug)
- -DLLVM_ENABLE_EH=ON
- -DLLVM_ENABLE_RTTI=ON
-
- -DWITH_POLLY=OFF # TODO
-
- -DLLVM_HOST_TRIPLE="${CHOST}"
-
- -DFFI_INCLUDE_DIR="${ffi_cflags#-I}"
- -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}"
-
- -DHAVE_HISTEDIT_H=$(usex libedit)
- )
-
- if use clang; then
- mycmakeargs+=(
- -DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=$(usex !xml)
- # libgomp support fails to find headers without explicit -I
- # furthermore, it provides only syntax checking
- -DCLANG_DEFAULT_OPENMP_RUNTIME=libomp
- )
- fi
-
- if use lldb; then
- mycmakeargs+=(
- -DLLDB_DISABLE_LIBEDIT=$(usex !libedit)
- -DLLDB_DISABLE_CURSES=$(usex !ncurses)
- -DLLDB_ENABLE_TERMINFO=$(usex ncurses)
- )
- fi
-
- if ! multilib_is_native_abi || ! use ocaml; then
- mycmakeargs+=(
- -DOCAMLFIND=NO
- )
- fi
-# Note: go bindings have no CMake rules at the moment
-# but let's kill the check in case they are introduced
-# if ! multilib_is_native_abi || ! use go; then
- mycmakeargs+=(
- -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND
- )
-# fi
-
- if multilib_is_native_abi; then
- mycmakeargs+=(
- -DLLVM_BUILD_DOCS=$(usex doc)
- -DLLVM_ENABLE_SPHINX=$(usex doc)
- -DLLVM_ENABLE_DOXYGEN=OFF
- -DLLVM_INSTALL_HTML="${EPREFIX}/usr/share/doc/${PF}/html"
- -DSPHINX_WARNINGS_AS_ERRORS=OFF
- -DLLVM_INSTALL_UTILS=ON
- )
-
- if use clang; then
- mycmakeargs+=(
- -DCLANG_INSTALL_HTML="${EPREFIX}/usr/share/doc/${PF}/clang"
- )
- fi
-
- if use gold; then
- mycmakeargs+=(
- -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include
- )
- fi
-
- if use lldb; then
- mycmakeargs+=(
- -DLLDB_DISABLE_PYTHON=$(usex !python)
- )
- fi
-
- else
- if use clang; then
- mycmakeargs+=(
- # disable compiler-rt on non-native ABI because:
- # 1. it fails to configure because of -m32
- # 2. it is shared between ABIs so no point building
- # it multiple times
- -DLLVM_EXTERNAL_COMPILER_RT_BUILD=OFF
- -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_BUILD=OFF
- )
- fi
- if use lldb; then
- mycmakeargs+=(
- # only run swig on native abi
- -DLLDB_DISABLE_PYTHON=ON
- )
- fi
- fi
-
- if use clang; then
- mycmakeargs+=(
- -DCLANG_ENABLE_ARCMT=$(usex static-analyzer)
- -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer)
- -DCLANG_LIBDIR_SUFFIX="${NATIVE_LIBDIR#lib}"
- )
-
- # -- not needed when compiler-rt is built with host compiler --
- # cmake passes host C*FLAGS to compiler-rt build
- # which is performed using clang, so we need to filter out
- # some flags clang does not support
- # (if you know some more flags that don't work, let us know)
- #filter-flags -msahf -frecord-gcc-switches
- fi
-
- cmake-utils_src_configure
-}
-
-multilib_src_compile() {
- cmake-utils_src_compile
- # TODO: not sure why this target is not correctly called
- multilib_is_native_abi && use doc && use ocaml && cmake-utils_src_make docs/ocaml_doc
-
- pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld
- pax-mark m "${BUILD_DIR}"/bin/lli
- pax-mark m "${BUILD_DIR}"/bin/lli-child-target
-
- if use test; then
- pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/Orc/OrcJITTests
- pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/MCJIT/MCJITTests
- pax-mark m "${BUILD_DIR}"/unittests/Support/SupportTests
- fi
-}
-
-multilib_src_test() {
- # respect TMPDIR!
- local -x LIT_PRESERVES_TMP=1
- local test_targets=( check )
- # clang tests won't work on non-native ABI because we skip compiler-rt
- multilib_is_native_abi && use clang && test_targets+=( check-clang )
- cmake-utils_src_make "${test_targets[@]}"
-}
-
-src_install() {
- local MULTILIB_CHOST_TOOLS=(
- /usr/bin/llvm-config
- )
-
- local MULTILIB_WRAPPED_HEADERS=(
- /usr/include/llvm/Config/config.h
- /usr/include/llvm/Config/llvm-config.h
- )
-
- if use clang; then
- # note: magic applied in multilib_src_install()!
- CLANG_VERSION=${PV%.*}
-
- MULTILIB_CHOST_TOOLS+=(
- /usr/bin/clang
- /usr/bin/clang++
- /usr/bin/clang-cl
- /usr/bin/clang-${CLANG_VERSION}
- /usr/bin/clang++-${CLANG_VERSION}
- /usr/bin/clang-cl-${CLANG_VERSION}
- )
-
- MULTILIB_WRAPPED_HEADERS+=(
- /usr/include/clang/Config/config.h
- )
- fi
-
- multilib-minimal_src_install
-}
-
-multilib_src_install() {
- cmake-utils_src_install
-
- if multilib_is_native_abi; then
- # Install man pages.
- use doc || doman "${WORKDIR}"/${P}-manpages/*.1
-
- # Symlink the gold plugin.
- if use gold; then
- dodir "/usr/${CHOST}/binutils-bin/lib/bfd-plugins"
- dosym "../../../../$(get_libdir)/LLVMgold.so" \
- "/usr/${CHOST}/binutils-bin/lib/bfd-plugins/LLVMgold.so"
- fi
- fi
-
- # apply CHOST and CLANG_VERSION to clang executables
- # they're statically linked so we don't have to worry about the lib
- if use clang; then
- local clang_tools=( clang clang++ clang-cl )
- local i
-
- # cmake gives us:
- # - clang-X.Y
- # - clang -> clang-X.Y
- # - clang++, clang-cl -> clang
- # we want to have:
- # - clang-X.Y
- # - clang++-X.Y, clang-cl-X.Y -> clang-X.Y
- # - clang, clang++, clang-cl -> clang*-X.Y
- # so we need to fix the two tools
- for i in "${clang_tools[@]:1}"; do
- rm "${ED%/}/usr/bin/${i}" || die
- dosym "clang-${CLANG_VERSION}" "/usr/bin/${i}-${CLANG_VERSION}"
- dosym "${i}-${CLANG_VERSION}" "/usr/bin/${i}"
- done
-
- # now prepend ${CHOST} and let the multilib-build.eclass symlink it
- if ! multilib_is_native_abi; then
- # non-native? let's replace it with a simple wrapper
- for i in "${clang_tools[@]}"; do
- rm "${ED%/}/usr/bin/${i}-${CLANG_VERSION}" || die
- cat > "${T}"/wrapper.tmp <<-_EOF_
- #!${EPREFIX}/bin/sh
- exec "${i}-${CLANG_VERSION}" $(get_abi_CFLAGS) "\${@}"
- _EOF_
- newbin "${T}"/wrapper.tmp "${i}-${CLANG_VERSION}"
- done
- fi
- fi
-}
-
-multilib_src_install_all() {
- insinto /usr/share/vim/vimfiles
- doins -r utils/vim/*/.
- # some users may find it useful
- dodoc utils/vim/vimrc
-
- if use clang; then
- pushd tools/clang >/dev/null || die
-
- if use static-analyzer ; then
- pushd tools/scan-build >/dev/null || die
-
- dobin ccc-analyzer scan-build
- dosym ccc-analyzer /usr/bin/c++-analyzer
- doman scan-build.1
-
- insinto /usr/share/llvm
- doins scanview.css sorttable.js
-
- popd >/dev/null || die
- fi
-
- if use static-analyzer ; then
- pushd tools/scan-view >/dev/null || die
-
- python_doscript scan-view
-
- touch __init__.py || die
- python_moduleinto clang
- python_domodule *.py Resources
-
- popd >/dev/null || die
- fi
-
- if use python ; then
- pushd bindings/python/clang >/dev/null || die
-
- python_moduleinto clang
- python_domodule *.py
-
- popd >/dev/null || die
- fi
-
- # AddressSanitizer symbolizer (currently separate)
- dobin "${S}"/projects/compiler-rt/lib/asan/scripts/asan_symbolize.py
-
- popd >/dev/null || die
-
- python_fix_shebang "${ED}"
- if use lldb && use python; then
- python_optimize
- fi
- fi
-}
-
-pkg_postinst() {
- if use clang; then
- elog "To enable OpenMP support in clang, install sys-libs/libomp"
- elog "and use the '-fopenmp=libomp' command line option"
- fi
-}
diff --git a/sys-devel/llvm/llvm-3.7.1.ebuild b/sys-devel/llvm/llvm-3.7.1.ebuild
deleted file mode 100644
index 9a53dea448d..00000000000
--- a/sys-devel/llvm/llvm-3.7.1.ebuild
+++ /dev/null
@@ -1,550 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
-PYTHON_COMPAT=( python2_7 )
-
-inherit check-reqs cmake-utils eutils flag-o-matic multilib \
- multilib-minimal python-single-r1 toolchain-funcs pax-utils prefix
-
-DESCRIPTION="Low Level Virtual Machine"
-HOMEPAGE="http://llvm.org/"
-SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.xz
- clang? ( http://llvm.org/releases/${PV}/compiler-rt-${PV}.src.tar.xz
- http://llvm.org/releases/${PV}/cfe-${PV}.src.tar.xz
- http://llvm.org/releases/${PV}/clang-tools-extra-${PV}.src.tar.xz )
- lldb? ( http://llvm.org/releases/${PV}/lldb-${PV}.src.tar.xz )
- !doc? ( http://dev.gentoo.org/~voyageur/distfiles/${PN}-3.7.0-manpages.tar.bz2 )"
-
-LICENSE="UoI-NCSA"
-SLOT="0/${PV}"
-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"
-IUSE="clang debug doc gold libedit +libffi lldb multitarget ncurses ocaml
- python +static-analyzer test xml video_cards_radeon
- kernel_Darwin kernel_FreeBSD"
-
-COMMON_DEPEND="
- sys-libs/zlib:0=
- clang? (
- python? ( ${PYTHON_DEPS} )
- static-analyzer? (
- dev-lang/perl:*
- ${PYTHON_DEPS}
- )
- xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
- )
- gold? ( >=sys-devel/binutils-2.22:*[cxx] )
- libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] )
- libffi? ( >=virtual/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] )
- ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] )
- ocaml? (
- >=dev-lang/ocaml-4.00.0:0=
- dev-ml/findlib
- dev-ml/ocaml-ctypes
- !!<=sys-devel/llvm-3.7.0-r1[ocaml] )"
-# configparser-3.2 breaks the build (3.3 or none at all are fine)
-DEPEND="${COMMON_DEPEND}
- dev-lang/perl
- >=sys-devel/make-3.81
- >=sys-devel/flex-2.5.4
- >=sys-devel/bison-1.875d
- || ( >=sys-devel/gcc-3.0 >=sys-devel/llvm-3.5
- ( >=sys-freebsd/freebsd-lib-9.1-r10 sys-libs/libcxx )
- )
- || ( >=sys-devel/binutils-2.18 >=sys-devel/binutils-apple-5.1 )
- kernel_Darwin? ( <sys-libs/libcxx-${PV%_rc*}.9999 )
- clang? ( xml? ( virtual/pkgconfig ) )
- doc? ( dev-python/sphinx )
- gold? ( sys-libs/binutils-libs )
- libffi? ( virtual/pkgconfig )
- lldb? ( dev-lang/swig )
- !!<dev-python/configparser-3.3.0.2
- ocaml? ( test? ( dev-ml/ounit ) )
- ${PYTHON_DEPS}"
-RDEPEND="${COMMON_DEPEND}
- clang? ( !<=sys-devel/clang-${PV}-r99 )
- abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r2
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
-PDEPEND="clang? ( =sys-devel/clang-${PV}-r100 )"
-
-# pypy gives me around 1700 unresolved tests due to open file limit
-# being exceeded. probably GC does not close them fast enough.
-REQUIRED_USE="${PYTHON_REQUIRED_USE}
- lldb? ( clang xml )"
-
-S=${WORKDIR}/${P/_}.src
-
-pkg_pretend() {
- # in megs
- # !clang !debug !multitarget -O2 400
- # !clang !debug multitarget -O2 550
- # clang !debug !multitarget -O2 950
- # clang !debug multitarget -O2 1200
- # !clang debug multitarget -O2 5G
- # clang !debug multitarget -O0 -g 12G
- # clang debug multitarget -O2 16G
- # clang debug multitarget -O0 -g 14G
-
- local build_size=550
- use clang && build_size=1200
-
- if use debug; then
- ewarn "USE=debug is known to increase the size of package considerably"
- ewarn "and cause the tests to fail."
- ewarn
-
- (( build_size *= 14 ))
- elif is-flagq '-g?(gdb)?([1-9])'; then
- ewarn "The C++ compiler -g option is known to increase the size of the package"
- ewarn "considerably. If you run out of space, please consider removing it."
- ewarn
-
- (( build_size *= 10 ))
- fi
-
- # Multiply by number of ABIs :).
- local abis=( $(multilib_get_enabled_abis) )
- (( build_size *= ${#abis[@]} ))
-
- local CHECKREQS_DISK_BUILD=${build_size}M
- check-reqs_pkg_pretend
-
- if [[ ${MERGE_TYPE} != binary ]]; then
- echo 'int main() {return 0;}' > "${T}"/test.cxx || die
- ebegin "Trying to build a C++11 test program"
- if ! $(tc-getCXX) -std=c++11 -o /dev/null "${T}"/test.cxx; then
- eerror "LLVM-${PV} requires C++11-capable C++ compiler. Your current compiler"
- eerror "does not seem to support -std=c++11 option. Please upgrade your compiler"
- eerror "to gcc-4.7 or an equivalent version supporting C++11."
- die "Currently active compiler does not support -std=c++11"
- fi
- eend ${?}
- fi
-}
-
-pkg_setup() {
- pkg_pretend
-}
-
-src_unpack() {
- default
-
- if use clang; then
- mv "${WORKDIR}"/cfe-${PV/_}.src "${S}"/tools/clang \
- || die "clang source directory move failed"
- mv "${WORKDIR}"/compiler-rt-${PV/_}.src "${S}"/projects/compiler-rt \
- || die "compiler-rt source directory move failed"
- mv "${WORKDIR}"/clang-tools-extra-${PV/_}.src "${S}"/tools/clang/tools/extra \
- || die "clang-tools-extra source directory move failed"
- fi
-
- if use lldb; then
- mv "${WORKDIR}"/lldb-${PV/_}.src "${S}"/tools/lldb \
- || die "lldb source directory move failed"
- fi
-}
-
-src_prepare() {
- # Make ocaml warnings non-fatal, bug #537308
- sed -e "/RUN/s/-warn-error A//" -i test/Bindings/OCaml/*ml || die
- # Fix libdir for ocaml bindings install, bug #559134
- epatch "${FILESDIR}"/cmake/${PN}-3.7.0-ocaml-multilib.patch
- # Do not build/install ocaml docs with USE=-doc, bug #562008
- epatch "${FILESDIR}"/cmake/${PN}-3.7.0-ocaml-build_doc.patch
-
- # Make it possible to override Sphinx HTML install dirs
- # https://llvm.org/bugs/show_bug.cgi?id=23780
- epatch "${FILESDIR}"/cmake/0002-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch
-
- # Prevent race conditions with parallel Sphinx runs
- # https://llvm.org/bugs/show_bug.cgi?id=23781
- epatch "${FILESDIR}"/cmake/0003-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch
-
- # Prevent installing libgtest
- # https://llvm.org/bugs/show_bug.cgi?id=18341
- epatch "${FILESDIR}"/cmake/0004-cmake-Do-not-install-libgtest.patch
-
- # Fix llvm-config for shared linking and sane flags
- # https://bugs.gentoo.org/show_bug.cgi?id=565358
- epatch "${FILESDIR}"/llvm-3.7-llvm-config.patch
-
- # Fix msan with newer kernels, #569894
- epatch "${FILESDIR}"/llvm-3.7-msan-fix.patch
-
- # disable use of SDK on OSX, bug #568758
- sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die
-
- if use clang; then
- # Automatically select active system GCC's libraries, bugs #406163 and #417913
- epatch "${FILESDIR}"/clang-3.5-gentoo-runtime-gcc-detection-v3.patch
-
- epatch "${FILESDIR}"/clang-3.6-gentoo-install.patch
-
- epatch "${FILESDIR}"/clang-3.4-darwin_prefix-include-paths.patch
- eprefixify tools/clang/lib/Frontend/InitHeaderSearch.cpp
-
- sed -i -e "s^@EPREFIX@^${EPREFIX}^" \
- tools/clang/tools/scan-build/scan-build || die
-
- # Install clang runtime into /usr/lib/clang
- # https://llvm.org/bugs/show_bug.cgi?id=23792
- epatch "${FILESDIR}"/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix.patch
- epatch "${FILESDIR}"/cmake/compiler-rt-0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi.patch
-
- # Do not force -march flags on arm platforms
- # https://bugs.gentoo.org/show_bug.cgi?id=562706
- epatch "${FILESDIR}"/cmake/${PN}-3.7.0-compiler_rt_arm_march_flags.patch
-
- # Make it possible to override CLANG_LIBDIR_SUFFIX
- # (that is used only to find LLVMgold.so)
- # https://llvm.org/bugs/show_bug.cgi?id=23793
- epatch "${FILESDIR}"/cmake/clang-0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch
-
- pushd projects/compiler-rt >/dev/null || die
-
- # Fix msan with newer kernels, compiler-rt part, #569894
- epatch "${FILESDIR}"/compiler-rt-3.7-msan-fix.patch
-
- # Fix WX sections, bug #421527
- find lib/builtins -type f -name '*.S' -exec sed \
- -e '$a\\n#if defined(__linux__) && defined(__ELF__)\n.section .note.GNU-stack,"",%progbits\n#endif' \
- -i {} + || die
-
- popd >/dev/null || die
- fi
-
- if use lldb; then
- # Do not install dummy readline.so module from
- # https://llvm.org/bugs/show_bug.cgi?id=18841
- sed -e 's/add_subdirectory(readline)/#&/' \
- -i tools/lldb/scripts/Python/modules/CMakeLists.txt || die
-
- # Fix Python paths, bugs #562436 and #562438
- epatch "${FILESDIR}"/${PN}-3.7-lldb_python.patch
- sed -e "s/GENTOO_LIBDIR/$(get_libdir)/" \
- -i tools/lldb/scripts/Python/finishSwigPythonLLDB.py || die
-
- # Fix build with ncurses[tinfo], #560474
- # http://llvm.org/viewvc/llvm-project?view=revision&revision=247842
- epatch "${FILESDIR}"/cmake/${PN}-3.7.0-lldb_tinfo.patch
- fi
-
- # User patches
- epatch_user
-
- python_setup
-
- # Native libdir is used to hold LLVMgold.so
- NATIVE_LIBDIR=$(get_libdir)
-}
-
-multilib_src_configure() {
- local targets
- if use multitarget; then
- targets=all
- else
- targets='host;BPF;CppBackend'
- use video_cards_radeon && targets+=';AMDGPU'
- fi
-
- local ffi_cflags ffi_ldflags
- if use libffi; then
- ffi_cflags=$(pkg-config --cflags-only-I libffi)
- ffi_ldflags=$(pkg-config --libs-only-L libffi)
- fi
-
- local libdir=$(get_libdir)
- local mycmakeargs=(
- -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
-
- -DBUILD_SHARED_LIBS=ON
- -DLLVM_ENABLE_TIMESTAMPS=OFF
- -DLLVM_TARGETS_TO_BUILD="${targets}"
- -DLLVM_BUILD_TESTS=$(usex test)
-
- -DLLVM_ENABLE_FFI=$(usex libffi)
- -DLLVM_ENABLE_TERMINFO=$(usex ncurses)
- -DLLVM_ENABLE_ASSERTIONS=$(usex debug)
- -DLLVM_ENABLE_EH=ON
- -DLLVM_ENABLE_RTTI=ON
-
- -DWITH_POLLY=OFF # TODO
-
- -DLLVM_HOST_TRIPLE="${CHOST}"
-
- -DFFI_INCLUDE_DIR="${ffi_cflags#-I}"
- -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}"
-
- -DHAVE_HISTEDIT_H=$(usex libedit)
- )
-
- if use clang; then
- mycmakeargs+=(
- -DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=$(usex !xml)
- # libgomp support fails to find headers without explicit -I
- # furthermore, it provides only syntax checking
- -DCLANG_DEFAULT_OPENMP_RUNTIME=libomp
- )
- fi
-
- if use lldb; then
- mycmakeargs+=(
- -DLLDB_DISABLE_LIBEDIT=$(usex !libedit)
- -DLLDB_DISABLE_CURSES=$(usex !ncurses)
- -DLLDB_ENABLE_TERMINFO=$(usex ncurses)
- )
- fi
-
- if ! multilib_is_native_abi || ! use ocaml; then
- mycmakeargs+=(
- -DOCAMLFIND=NO
- )
- fi
-# Note: go bindings have no CMake rules at the moment
-# but let's kill the check in case they are introduced
-# if ! multilib_is_native_abi || ! use go; then
- mycmakeargs+=(
- -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND
- )
-# fi
-
- if multilib_is_native_abi; then
- mycmakeargs+=(
- -DLLVM_BUILD_DOCS=$(usex doc)
- -DLLVM_ENABLE_SPHINX=$(usex doc)
- -DLLVM_ENABLE_DOXYGEN=OFF
- -DLLVM_INSTALL_HTML="${EPREFIX}/usr/share/doc/${PF}/html"
- -DSPHINX_WARNINGS_AS_ERRORS=OFF
- -DLLVM_INSTALL_UTILS=ON
- )
-
- if use clang; then
- mycmakeargs+=(
- -DCLANG_INSTALL_HTML="${EPREFIX}/usr/share/doc/${PF}/clang"
- )
- fi
-
- if use gold; then
- mycmakeargs+=(
- -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include
- )
- fi
-
- if use lldb; then
- mycmakeargs+=(
- -DLLDB_DISABLE_PYTHON=$(usex !python)
- )
- fi
-
- else
- if use clang; then
- mycmakeargs+=(
- # disable compiler-rt on non-native ABI because:
- # 1. it fails to configure because of -m32
- # 2. it is shared between ABIs so no point building
- # it multiple times
- -DLLVM_EXTERNAL_COMPILER_RT_BUILD=OFF
- -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_BUILD=OFF
- )
- fi
- if use lldb; then
- mycmakeargs+=(
- # only run swig on native abi
- -DLLDB_DISABLE_PYTHON=ON
- )
- fi
- fi
-
- if use clang; then
- mycmakeargs+=(
- -DCLANG_ENABLE_ARCMT=$(usex static-analyzer)
- -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer)
- -DCLANG_LIBDIR_SUFFIX="${NATIVE_LIBDIR#lib}"
- )
-
- # -- not needed when compiler-rt is built with host compiler --
- # cmake passes host C*FLAGS to compiler-rt build
- # which is performed using clang, so we need to filter out
- # some flags clang does not support
- # (if you know some more flags that don't work, let us know)
- #filter-flags -msahf -frecord-gcc-switches
- fi
-
- cmake-utils_src_configure
-}
-
-multilib_src_compile() {
- cmake-utils_src_compile
- # TODO: not sure why this target is not correctly called
- multilib_is_native_abi && use doc && use ocaml && cmake-utils_src_make docs/ocaml_doc
-
- pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld
- pax-mark m "${BUILD_DIR}"/bin/lli
- pax-mark m "${BUILD_DIR}"/bin/lli-child-target
-
- if use test; then
- pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/Orc/OrcJITTests
- pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/MCJIT/MCJITTests
- pax-mark m "${BUILD_DIR}"/unittests/Support/SupportTests
- fi
-}
-
-multilib_src_test() {
- # respect TMPDIR!
- local -x LIT_PRESERVES_TMP=1
- local test_targets=( check )
- # clang tests won't work on non-native ABI because we skip compiler-rt
- multilib_is_native_abi && use clang && test_targets+=( check-clang )
- cmake-utils_src_make "${test_targets[@]}"
-}
-
-src_install() {
- local MULTILIB_CHOST_TOOLS=(
- /usr/bin/llvm-config
- )
-
- local MULTILIB_WRAPPED_HEADERS=(
- /usr/include/llvm/Config/config.h
- /usr/include/llvm/Config/llvm-config.h
- )
-
- if use clang; then
- # note: magic applied in multilib_src_install()!
- CLANG_VERSION=${PV%.*}
-
- MULTILIB_CHOST_TOOLS+=(
- /usr/bin/clang
- /usr/bin/clang++
- /usr/bin/clang-cl
- /usr/bin/clang-${CLANG_VERSION}
- /usr/bin/clang++-${CLANG_VERSION}
- /usr/bin/clang-cl-${CLANG_VERSION}
- )
-
- MULTILIB_WRAPPED_HEADERS+=(
- /usr/include/clang/Config/config.h
- )
- fi
-
- multilib-minimal_src_install
-
- # Remove unnecessary headers on FreeBSD, bug #417171
- if use kernel_FreeBSD && use clang; then
- rm "${ED}"usr/lib/clang/${PV}/include/{std,float,iso,limits,tgmath,varargs}*.h || die
- fi
-}
-
-multilib_src_install() {
- cmake-utils_src_install
-
- if multilib_is_native_abi; then
- # Install man pages.
- use doc || doman "${WORKDIR}"/${PN}-3.7.0-manpages/*.1
-
- # Symlink the gold plugin.
- if use gold; then
- dodir "/usr/${CHOST}/binutils-bin/lib/bfd-plugins"
- dosym "../../../../$(get_libdir)/LLVMgold.so" \
- "/usr/${CHOST}/binutils-bin/lib/bfd-plugins/LLVMgold.so"
- fi
- fi
-
- # apply CHOST and CLANG_VERSION to clang executables
- # they're statically linked so we don't have to worry about the lib
- if use clang; then
- local clang_tools=( clang clang++ clang-cl )
- local i
-
- # cmake gives us:
- # - clang-X.Y
- # - clang -> clang-X.Y
- # - clang++, clang-cl -> clang
- # we want to have:
- # - clang-X.Y
- # - clang++-X.Y, clang-cl-X.Y -> clang-X.Y
- # - clang, clang++, clang-cl -> clang*-X.Y
- # so we need to fix the two tools
- for i in "${clang_tools[@]:1}"; do
- rm "${ED%/}/usr/bin/${i}" || die
- dosym "clang-${CLANG_VERSION}" "/usr/bin/${i}-${CLANG_VERSION}"
- dosym "${i}-${CLANG_VERSION}" "/usr/bin/${i}"
- done
-
- # now prepend ${CHOST} and let the multilib-build.eclass symlink it
- if ! multilib_is_native_abi; then
- # non-native? let's replace it with a simple wrapper
- for i in "${clang_tools[@]}"; do
- rm "${ED%/}/usr/bin/${i}-${CLANG_VERSION}" || die
- cat > "${T}"/wrapper.tmp <<-_EOF_
- #!${EPREFIX}/bin/sh
- exec "${i}-${CLANG_VERSION}" $(get_abi_CFLAGS) "\${@}"
- _EOF_
- newbin "${T}"/wrapper.tmp "${i}-${CLANG_VERSION}"
- done
- fi
- fi
-}
-
-multilib_src_install_all() {
- insinto /usr/share/vim/vimfiles
- doins -r utils/vim/*/.
- # some users may find it useful
- dodoc utils/vim/vimrc
-
- if use clang; then
- pushd tools/clang >/dev/null || die
-
- if use static-analyzer ; then
- pushd tools/scan-build >/dev/null || die
-
- dobin ccc-analyzer scan-build
- dosym ccc-analyzer /usr/bin/c++-analyzer
- doman scan-build.1
-
- insinto /usr/share/llvm
- doins scanview.css sorttable.js
-
- popd >/dev/null || die
- fi
-
- if use static-analyzer ; then
- pushd tools/scan-view >/dev/null || die
-
- python_doscript scan-view
-
- touch __init__.py || die
- python_moduleinto clang
- python_domodule *.py Resources
-
- popd >/dev/null || die
- fi
-
- if use python ; then
- pushd bindings/python/clang >/dev/null || die
-
- python_moduleinto clang
- python_domodule *.py
-
- popd >/dev/null || die
- fi
-
- # AddressSanitizer symbolizer (currently separate)
- dobin "${S}"/projects/compiler-rt/lib/asan/scripts/asan_symbolize.py
-
- popd >/dev/null || die
-
- python_fix_shebang "${ED}"
- if use lldb && use python; then
- python_optimize
- fi
- fi
-}
-
-pkg_postinst() {
- if use clang && ! has_version sys-libs/libomp; then
- elog "To enable OpenMP support in clang, install sys-libs/libomp."
- fi
-}