diff options
author | Bernard Cafarelli <voyageur@gentoo.org> | 2015-08-24 17:01:00 +0200 |
---|---|---|
committer | Bernard Cafarelli <voyageur@gentoo.org> | 2015-08-24 17:03:05 +0200 |
commit | 8d50a4336ee1622d2571e7dded7834c6c19989af (patch) | |
tree | 608dc809d86de2bd96c38452c72b011cc9593f7d /sys-devel/llvm | |
parent | media-video/baka-mplayer: mark stable on amd64 (diff) | |
download | gentoo-8d50a4336ee1622d2571e7dded7834c6c19989af.tar.gz gentoo-8d50a4336ee1622d2571e7dded7834c6c19989af.tar.bz2 gentoo-8d50a4336ee1622d2571e7dded7834c6c19989af.zip |
sys-devel/llvm: add rc version for testing
Package-Manager: portage-2.2.20.1
Diffstat (limited to 'sys-devel/llvm')
-rw-r--r-- | sys-devel/llvm/Manifest | 5 | ||||
-rw-r--r-- | sys-devel/llvm/files/clang-3.7-strip_doc_refs.patch | 42 | ||||
-rw-r--r-- | sys-devel/llvm/llvm-3.7.0_rc2.ebuild | 486 | ||||
-rw-r--r-- | sys-devel/llvm/metadata.xml | 2 |
4 files changed, 534 insertions, 1 deletions
diff --git a/sys-devel/llvm/Manifest b/sys-devel/llvm/Manifest index 3a4091767129..9a7eb59760da 100644 --- a/sys-devel/llvm/Manifest +++ b/sys-devel/llvm/Manifest @@ -6,6 +6,7 @@ DIST cfe-3.5.2.src.tar.xz 8268008 SHA256 4feb575f74fb3a74b6245400460230141bf610f DIST cfe-3.6.0.src.tar.xz 8640776 SHA256 be0e69378119fe26f0f2f74cffe82b7c26da840c9733fe522ed3c1b66b11082d SHA512 dc137bdf9c2c5adb25498c995f0b944016699267156a595cc1fe6127f6961d45162275023d194db42691d80fa8fc74f56abad9c145ef1ff492881f547ca76cfe WHIRLPOOL 0df122c9d32dba5a00a97bec4a54b7b7bd8241ef625357bcf9997e3670e7c4775becec971f572073f3ffad86c7ccf616a94c06926ef9b0528248e34958e9b43f DIST cfe-3.6.1.src.tar.xz 8616132 SHA256 74f92d0c93b86678b015e87655f59474b2f657769680efdeb3c0524ffbd2dad7 SHA512 a96944bccfd9341be7adafdcc40367d458e85e7e74b0d2f3a7ea18edf1454d04a232c2d0003d6449c52f81d1e235b434acc1bb63eb5f7d16f8f4a43b70826743 WHIRLPOOL 1b4b8bb33fc7dbaeb03f32ba3544580bf0424889705b9d5130127be4d514c6d2aae5e224d71e20595a31441fc4bdd7bbf647e99e57d2c1e17fff3cff9022faa1 DIST cfe-3.6.2.src.tar.xz 8617576 SHA256 ae9180466a23acb426d12444d866b266ff2289b266064d362462e44f8d4699f3 SHA512 ed837c48f38d8998efd675b56477c8681dcedfcf3f71bba65930f145501289bebb6fe6a6d9de336548f94c381d016b99f10c58e046b885449755d44ac782de03 WHIRLPOOL a17419cea329999c8662c0008dbd0391ed5f52045d0175488979e7620f6a9a21b08e451a5e21d3bf944597bb37934a8228fa89c09d773882359822d59bd447a8 +DIST cfe-3.7.0rc2.src.tar.xz 9141532 SHA256 a371a416af039eec9291b9acc167911ad9c8d9f3494111c8e53beb07b7f5dfaa SHA512 3592980a6d488228d269ae8b1147abd4b7a2f159829e25eef2cff0ccad28bec61e6fb531e74a2b55eb428a5c0dce0ba74c5a6276544b2676b6b6c3297b532d8e WHIRLPOOL 9ce3b7fa1ccaa9c61adabcede0125e21cd5bd2caf849458987c2fe1736d27c03c49a4c385ccba9a22d994d6ec6aa11dfaadfcb92310b91395010379645e8c0a0 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.1.src.tar.xz 215776 SHA256 e8d011250389cfc36eb51557ca25ae66ab08173e8d53536a0747356105d72906 SHA512 eefacd6857584c9a3186815a7d015a595f32cd926f6c221245d388b8cb9266c52e0980a8e94f01f49c452510fdd42e659b02f116619d3d0e35170566f0704712 WHIRLPOOL a3d14e21f201cc02649833edd67ba04f17c88486fbf399327dbb76d21e151b956a4f58cd7446b8563f72fa1cee06a8bd4abbc53234761a3a69fc1afc99ced87d @@ -13,6 +14,7 @@ DIST clang-tools-extra-3.5.2.src.tar.xz 215804 SHA256 f21a374d74b194d8c984546266 DIST clang-tools-extra-3.6.0.src.tar.xz 248688 SHA256 3aa949ba82913490a75697287d9ee8598c619fae0aa6bb8fddf0095ff51bc812 SHA512 52e0cd3cce3047bb98d52e5c03ac4a8c549fcdc628f57492727f3e7659b2d4bd29ad98ab4ebab387233911fbb098861ec020b28c051e6b2c17d73dd490beebf3 WHIRLPOOL 423f018a2943d16ac605d36bece61046423974c2ffbcc7e4a9aebc5efbb2444ecead70e46bc05f51f4fedbfef338d177b5b16969e8fb0df0bbc911200ce483ae DIST clang-tools-extra-3.6.1.src.tar.xz 248592 SHA256 f4ee70d870d550a9147ac6a548ce7daf7d9e6897348bf411f43c572966fb92b6 SHA512 3273f8c1fa1683de231d0c0b9371d4b7537381e939fe38996e70a8005a1e6185da459ace2f260fad41df4840b459448ed1498c2fd576dd560005117a54e2ccb9 WHIRLPOOL b35c2118efff758358ed9945384218327767a48ae18acdaf2233a5b97e1dc5a682023ddf78d989d1278119c277aecec596c37c5dab8ea2b16a1c9348eb40d9e6 DIST clang-tools-extra-3.6.2.src.tar.xz 248624 SHA256 6a0ec627d398f501ddf347060f7a2ccea4802b2494f1d4fd7bda3e0442d04feb SHA512 1b7710a7deee30cefb6a3b4edb026a96d8935a0c6f3056ccdb7a45564d10baf01a4f6722ae853ad9a3bad17e8de32a3c0ec99c5cf6144647a5e182809d403f7a WHIRLPOOL 3dc8888c302bac84f53b673784dec092a2c59ea2985d9983e87f057b9aa7b5d3e34cf13d2b0f1f60ea44f342b8167377204a510036872a087037cf02335c19cd +DIST clang-tools-extra-3.7.0rc2.src.tar.xz 276624 SHA256 3c51ded360181d180227857b72ea7b32c5febf777188911b23c44a1c24feb7d4 SHA512 8fff1bf61752ee1b72a126174823365f004fe5a08bd87a32de4f5895ec8e044c78a814e8fab306055478e35b1485dc19d0c3156e90a9946b9239e2be3dfe7956 WHIRLPOOL f148e686b8d6e95051a851af31d758ef47ae0b08d87487518c6898c4767e73b538d95574d143f2fc6504f0ecd1553c3bae76524d369e195fa8a26e634104ad71 DIST compiler-rt-3.3.src.tar.gz 1568034 SHA256 0e2f3180d6316e6c43f064fdd406c5c6515e682c5f31c57c28335b68c7525423 SHA512 3e86aa8ab9810b4fbac54a40fc93a717a55c642520858c0db215a5324c1e495b4d8fcec9620251cca8e4e5f9afa34bc14364d7f785880a0700469d0201827929 WHIRLPOOL fcfd06bc860dfd901a7576cd4309f863e9d4363e36ab4c67e9e08fe3c8a37d627ee95eb96b9ed53eb6047dec06e73181b3c3e1555b1b49f1e893e6382f21ddc1 DIST compiler-rt-3.4.src.tar.gz 1858593 SHA256 f37c89b1383ce462d47537a0245ac798600887a9be9f63073e16b79ed536ab5c SHA512 70efffaf12ff7c15befa87ce808489c6f6b6eb421d0ab5d8ecd525239efc8aab850c7ed34b31a993ff5e499657b72598619945cc4461fe3e5359e9a94aaac0c8 WHIRLPOOL ad558b5877a01e476d30d2757959ab04be0c385b2fe3442bcc578bf36c6f3214cd78b4adda24fcb1f3b2b84353db213b82e8d7d4c40e66c3f57aed3a49322dbc DIST compiler-rt-3.5.0.src.tar.xz 1088352 SHA256 a4b3e655832bf8d9a357ea2c771db347237460e131988cbb96cda40ff39a8136 SHA512 862cce2d6b398bd1a8399496a547e6ab976a31f676528beebfbea5fd7dc54aa72e1c25deefa12f6167096521eba74090565b0168806451da02ddac04e922fc48 WHIRLPOOL 248acf997d70d7904aa79bf83e0c02ba4e5f8c2812c03f44a8e1e31b845a654f250c09ec6a123f9245d0db8713e8cc5a4087b9ce785af4f5eb7e55d9dbd362a2 @@ -21,6 +23,8 @@ DIST compiler-rt-3.5.2.src.tar.xz 1093000 SHA256 542d7aadd21e7fe35bea0a7912bc965 DIST compiler-rt-3.6.0.src.tar.xz 1140616 SHA256 7f49fb79e5adcdce7dddaf973f1db130228dfb19e37a99a7f5365a6948b26b11 SHA512 2758bc2b78dcfb9b6509b83ebc4ebc86907ca3dc2a5f151f580771c674b934432cae055e342ed73096a08331b2f7b129ff65629b27932458b1877aeb554b6328 WHIRLPOOL 1836b59c2369457aac79dc113b9a76623da30195a460afd0e25997aa21855991cdee78d5aec12b45d05d7d14e42d5fc7678f1c169b5a7fd500681a34d02d4468 DIST compiler-rt-3.6.1.src.tar.xz 1128460 SHA256 fcbf610c77be6047f11ca10c4725610417beba832565115a9e2fcfe2897b649f SHA512 121c048fe60bccccd4a188a18613c94e1e1d9abd8fbae6405d23418f0c9b3562fff72fe77aea9bc0f8632ec9ad89503b9c67fcab5bf378001f90ad7492a1845a WHIRLPOOL fabbf5a63734f879d1698cd65846beb1cfa8559009b37bf5b5f4e239e62c9a9014d484233674cf357fb7aabb04ac8df840e832c764caf4b4a3b662ff0a51115e DIST compiler-rt-3.6.2.src.tar.xz 1128080 SHA256 0f2ff37d80a64575fecd8cf0d5c50f7ac1f837ddf700d1855412bb7547431d87 SHA512 7dafcc5bd4822475de649d8a84ae51af3c4ed4d0958f76b1b55ba79219638f3e78eb94a1986c6e9ba0e7f1ccf3ec834d546b5ca60e8b08083fea5880ecdf17a3 WHIRLPOOL dd77e7df43c9028a6873ed903da67560fdb04968013016a7f0ad2d2e9a81b3a3d890b95e4f49a6bdef349806d6507defcd80a0a9fb50c1c9f778e7eff42dbc5d +DIST compiler-rt-3.7.0rc2.src.tar.xz 1191940 SHA256 67574dee852919b3ab3259c7b4c06e9568d3afa55d918737a409171e8cd92639 SHA512 7f664af340d7d3699348199d2c5817fa1cb4264f2119e4d061dbf88f6f0ed2eea78c4d2dafa198dd9013f7ff2fb11342e0d5181d6ff9838e9c7a01872430e937 WHIRLPOOL 1db2de9ef18412b71ed8d9ea2ac5a14056426acbd26de8852a9dfa9d82175db8b98b5944b3389b08ff0eeb10cd49601f619a8906375001c4fdd3668e58c602a1 +DIST lldb-3.7.0rc2.src.tar.xz 10645800 SHA256 56a3e14de7568f1fa151f7d1af014dfc4f54e589c062ba04b2d9b7ae1f28e1ae SHA512 af55731213fa65e96daff5ed95d7b101609103575ffe854e75296ca7cc6001e7b2d3198a3301573b4f70cdfea6752e5db736ba6e17937adce316ef6206d4b2a4 WHIRLPOOL 16eac78fcd2c3f8988450885dd4a52cf41b6f0367878811ef72f784b67cec8fb14591ca205a9b443691e8e7d702a7667c4e7aded3aaa2ac3276d022c8dc2d615 DIST llvm-2.8-r1.tgz 9112527 SHA256 25addb742f1c6cc12877ed0ee924dda962d848368ee095be8e48342ae613d43b SHA512 8688d5cf415e8aef74cca6a14587af36234a6347e2238ac2c0d66805c42926b9399f36390e1a58a4081e902b0904adb818c1a360d5df572dfa893d6f79f5e35a WHIRLPOOL 0da9250e31242b55586c9138089e742aab5d414d5f3412ebf917ae8b9506f984c6134a932be93ec7e4c01c79f6c21d508cb0b2e0ec283419bd4ae4db745430ae DIST llvm-2.9.tgz 9574781 SHA256 661236cfa17428b48cfa9cbb9909f7569c64b8ecd219fd91dbc00e3b557b3779 SHA512 9cb0fa0bb8ac02661fd6f926001a15e0ad4a9660683421dc86b03f1cf5184142c5815f9f9283ee7cdf8d474e01177f83406122253342e0e95ddc878821660070 WHIRLPOOL f7b445b6b5d455f29ca68c342511b8b5e6eedec525af1cc60440c4de544df2332aa241bffca29eda5d2428a3f518e093a626bd45c7f8a9e0656d0f68aef5d9d1 DIST llvm-3.0.tar.gz 10350539 SHA256 519eb11d3499ce99c6ffdb8718651fc91425ed7690eac91c8d6853474f7c0477 SHA512 602bb5590b70cb9138bc19d8c630c62bbabdcb2132215c921fe4bce4e3f74dfc66440b9dcd458ff55a86047cc9cc0417c6563715c133e0db222e4b88f07c13bb WHIRLPOOL 6f4ece3ec747352cd78b08d25c5b1cda91140eb6957d509161e45395e47c074f8d2102bfcaeabcdef8c1f6672f2cf06d88e290667666122da029391b3528d440 @@ -40,3 +44,4 @@ DIST llvm-3.6.0.src.tar.xz 12750908 SHA256 b39a69e501b49e8f73ff75c9ad72313681ee5 DIST llvm-3.6.1-manpages.tar.bz2 38338 SHA256 b27c6198e09b11421841a7184d4e8a0f8878d4f1313405da28d643134a55688a SHA512 a47aeb0b4632329eaaa1d6c774446fea5822d7692d81533a9a5c5de1c6a3b37fdd6b7c1fc6433339649f4d3a53a753065e73afb30fd84f253ad31d5fb3d48662 WHIRLPOOL 022b214b6340365490915b5c873e515bf16be90d04cd32f09024a3607c23edc2c2e241d295102f045bd08a442c4e5aaf134ac89f7e59a027ec1633330a95989b DIST llvm-3.6.1.src.tar.xz 12798852 SHA256 2f00c615913aa0b56607ee1548936e60ad2aa89e6d56f23fb032a4463366fc7a SHA512 fa07d0fe6c527d86c0b91b1b62597f949d777e3609e4e8ca2ea5e07931e1ebc7a363273cc705cf4a13b45e7ab00716b76de26688d077c1b51341d9dd2972de3f WHIRLPOOL c6340956e9935c0e4a986f1a8da9458ca3b3a7bdff376d33c7a3c60bc5154fb5820bfaf43fb4118f28ab9b0f356f436672fd2f984bc629eeee01233b703030fb DIST llvm-3.6.2.src.tar.xz 12802380 SHA256 f60dc158bfda6822de167e87275848969f0558b3134892ff54fced87e4667b94 SHA512 42b44ce69cfb96e2dc12dc2246f0de8ff983a99741206e2c46ccf074b3248aaab9c0f22c6baad802de851d06f202f40db9dd62fe38aab4479b3f70026c936b36 WHIRLPOOL 1a15e16793fe4120f1c14a5334362c36db26745c493e7289281351b7c18c523d781ff9425dddfe1a2add9ea1e8aebb92f2313787da5f286259b55b0884b3039f +DIST llvm-3.7.0rc2.src.tar.xz 14624620 SHA256 36a79ba3198afb5c973d89ec2e4ef1d4587d97fa3b3f51fb1badcd7c0c868213 SHA512 c4cbde12650e6b6537b2d1d6cdae85e0f009cbd69c848579ca45946564a7667b212883a9cf49c82e28c9efe978dcc1ce1ac9c21b506c31149b7f69a4f996e0d0 WHIRLPOOL 81015661b5e1a1b1b8f2e264403b9c7d809782f8fa3ba6090343e6a9f6f85dba361b449bf2d72ff80d27bbea87ee63ca94f3c23b6478e10858e5b2f53384d52f diff --git a/sys-devel/llvm/files/clang-3.7-strip_doc_refs.patch b/sys-devel/llvm/files/clang-3.7-strip_doc_refs.patch new file mode 100644 index 000000000000..9576b923a28b --- /dev/null +++ b/sys-devel/llvm/files/clang-3.7-strip_doc_refs.patch @@ -0,0 +1,42 @@ +--- tools/clang/docs/AddressSanitizer.rst 2015-06-26 01:36:44.000000000 +0200 ++++ tools/clang/docs/AddressSanitizer.rst 2015-08-23 15:35:10.399174574 +0200 +@@ -198,7 +198,7 @@ + Some code should not be instrumented by AddressSanitizer. One may use the + function attribute ``__attribute__((no_sanitize("address")))`` + (which has deprecated synonyms +-:ref:`no_sanitize_address <langext-address_sanitizer>` and ++`no_sanitize_address` and + `no_address_safety_analysis`) to disable instrumentation of a particular + function. This attribute may not be supported by other compilers, so we suggest + to use it together with ``__has_feature(address_sanitizer)``. +--- tools/clang/docs/MemorySanitizer.rst 2015-02-26 16:59:30.000000000 +0100 ++++ tools/clang/docs/MemorySanitizer.rst 2015-08-23 15:35:28.002200413 +0200 +@@ -82,7 +82,7 @@ + + Some code should not be checked by MemorySanitizer. + One may use the function attribute +-:ref:`no_sanitize_memory <langext-memory_sanitizer>` ++`no_sanitize_memory` + to disable uninitialized checks in a particular function. + MemorySanitizer may still instrument such functions to avoid false positives. + This attribute may not be +--- tools/clang/docs/ThreadSanitizer.rst 2015-02-18 23:26:20.000000000 +0100 ++++ tools/clang/docs/ThreadSanitizer.rst 2015-08-23 15:34:53.918150364 +0200 +@@ -88,7 +88,7 @@ + + Some code should not be instrumented by ThreadSanitizer. + One may use the function attribute +-:ref:`no_sanitize_thread <langext-thread_sanitizer>` ++`no_sanitize_thread` + to disable instrumentation of plain (non-atomic) loads/stores in a particular function. + ThreadSanitizer still instruments such functions to avoid false positives and + provide meaningful stack traces. +@@ -102,7 +102,7 @@ + ThreadSanitizer supports ``src`` and ``fun`` entity types in + :doc:`SanitizerSpecialCaseList`, that can be used to suppress data race reports in + the specified source files or functions. Unlike functions marked with +-:ref:`no_sanitize_thread <langext-thread_sanitizer>` attribute, ++`no_sanitize_thread` attribute, + blacklisted functions are not instrumented at all. This can lead to false positives + due to missed synchronization via atomic operations and missed stack frames in reports. + diff --git a/sys-devel/llvm/llvm-3.7.0_rc2.ebuild b/sys-devel/llvm/llvm-3.7.0_rc2.ebuild new file mode 100644 index 000000000000..b2ed25696c76 --- /dev/null +++ b/sys-devel/llvm/llvm-3.7.0_rc2.ebuild @@ -0,0 +1,486 @@ +# 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/pre-releases/${PV/_rc*}/${PV/3.7.0_}/${P/_}.src.tar.xz + clang? ( http://llvm.org/pre-releases/${PV/_rc*}/${PV/3.7.0_}/compiler-rt-${PV/_}.src.tar.xz + http://llvm.org/pre-releases/${PV/_rc*}/${PV/3.7.0_}/cfe-${PV/_}.src.tar.xz + http://llvm.org/pre-releases/${PV/_rc*}/${PV/3.7.0_}/clang-tools-extra-${PV/_}.src.tar.xz ) + lldb? ( http://llvm.org/pre-releases/${PV/_rc*}/${PV/3.7.0_}/lldb-${PV/_}.src.tar.xz )" +# !doc? ( http://dev.gentoo.org/~voyageur/distfiles/${P/_rc*}-manpages.tar.bz2 )" + +LICENSE="UoI-NCSA" +SLOT="0/${PV}" +KEYWORDS="" +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= ) + ) + 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:5=[${MULTILIB_USEDEP}] ) + ocaml? ( + dev-lang/ocaml:0= + dev-ml/findlib + dev-ml/ocaml-ctypes )" +# 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 ) + 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 ) + 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 + + rm -f "${S}"/tools/clang "${S}"/projects/compiler-rt \ + || die "symlinks removal failed" + + 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 + + # 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 + + # 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 + + # Workaround bug #553416 until upstream fixes it + epatch "${FILESDIR}"/clang-3.7-strip_doc_refs.patch + 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 + 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 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" + ) + + 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 + + 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=${PN%.*} + + 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 docs. + #use doc && dohtml -r "${S}"/docs/_build/html/ + + # 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 +} diff --git a/sys-devel/llvm/metadata.xml b/sys-devel/llvm/metadata.xml index 7698800d0e39..53210f753014 100644 --- a/sys-devel/llvm/metadata.xml +++ b/sys-devel/llvm/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer> <email>voyageur@gentoo.org</email> |