summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2015-06-09 16:54:56 +0000
committerMichał Górny <mgorny@gentoo.org>2015-06-09 16:54:56 +0000
commit8895e31518a7c4678a0e4669b682c41064e3aa6c (patch)
tree5310aae71ed1b2a883cc36d694dbd0e0a536e9ae /sys-devel/llvm
parentVersion bump (thanks Andreas Sturmlechner, bug 520288). (diff)
downloadhistorical-8895e31518a7c4678a0e4669b682c41064e3aa6c.tar.gz
historical-8895e31518a7c4678a0e4669b682c41064e3aa6c.tar.bz2
historical-8895e31518a7c4678a0e4669b682c41064e3aa6c.zip
Switch the live ebuild to CMake, and few more improvements. Covered by bug #456322.
Package-Manager: portage-2.2.20/cvs/Linux x86_64 Manifest-Sign-Key: 0xEFB4464E!
Diffstat (limited to 'sys-devel/llvm')
-rw-r--r--sys-devel/llvm/ChangeLog13
-rw-r--r--sys-devel/llvm/Manifest42
-rw-r--r--sys-devel/llvm/files/cmake/0002-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch36
-rw-r--r--sys-devel/llvm/files/cmake/0003-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch32
-rw-r--r--sys-devel/llvm/files/cmake/0004-cmake-Do-not-install-libgtest.patch28
-rw-r--r--sys-devel/llvm/files/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix.patch52
-rw-r--r--sys-devel/llvm/files/cmake/clang-0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch28
-rw-r--r--sys-devel/llvm/files/cmake/compiler-rt-0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi.patch25
-rw-r--r--sys-devel/llvm/llvm-9999.ebuild394
9 files changed, 397 insertions, 253 deletions
diff --git a/sys-devel/llvm/ChangeLog b/sys-devel/llvm/ChangeLog
index 42bb71cfef85..c7895b8cc3b8 100644
--- a/sys-devel/llvm/ChangeLog
+++ b/sys-devel/llvm/ChangeLog
@@ -1,6 +1,17 @@
# ChangeLog for sys-devel/llvm
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/ChangeLog,v 1.244 2015/06/05 14:48:25 voyageur Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/ChangeLog,v 1.245 2015/06/09 16:54:50 mgorny Exp $
+
+ 09 Jun 2015; Michał Górny <mgorny@gentoo.org>
+ +files/cmake/0002-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch,
+ +files/cmake/0003-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch,
+ +files/cmake/0004-cmake-Do-not-install-libgtest.patch, +files/cmake/clang-0001
+ -Install-clang-runtime-into-usr-lib-without-suffix.patch,
+ +files/cmake/clang-0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch, +fil
+ es/cmake/compiler-rt-0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi
+ .patch, llvm-9999.ebuild:
+ Switch the live ebuild to CMake, and few more improvements. Covered by bug
+ #456322.
05 Jun 2015; Bernard Cafarelli <voyageur@gentoo.org> llvm-3.6.1.ebuild,
llvm-9999.ebuild:
diff --git a/sys-devel/llvm/Manifest b/sys-devel/llvm/Manifest
index 1174c2059fa8..000d4507460d 100644
--- a/sys-devel/llvm/Manifest
+++ b/sys-devel/llvm/Manifest
@@ -12,6 +12,12 @@ AUX clang-3.4-gentoo-install.patch 3228 SHA256 051799f114102aa46717dc4a7224c878f
AUX clang-3.5-gentoo-install.patch 2166 SHA256 e359a219f2d0d2b88094bbb5ab91fd50d9662686f77e85b7ccfb8d1c4a6fd39d SHA512 07e5b3d4131a7d58577bcb99a82c585258c98a38e71b7e8dda058b467a558471e1ddeec5c9f5492f5d17e280cd4b09e49338e0926dd2534583bc8a2772bce26d WHIRLPOOL 5582b2015b4d3e845a45bfda08c156683df11685170f253f79ccf016f2e771b016d213417d83068f01a41bd8e0148474711cd6f9b7187e758322e9ebb9c390dd
AUX clang-3.5-gentoo-runtime-gcc-detection-v3.patch 1694 SHA256 24691db819d08f87f0144a67900ae6797c0df4d180b55acc5c377d890ac2e72e SHA512 a34f694560ef0c7366ad0dc243a479afc74b6122d624b8681538da69c70d0d1869245a89c61d49add890c5f76134281470f5e75a59e6fc9ac963230fc56fe8e6 WHIRLPOOL 4f4af09e08c7d5af89558e77d0a2a4542f77ae505e9020ca6e48e20ef71c4db6016ed0211b2a303b756994f62949c91c216cc2f81b16ff65c71414d354977c8f
AUX clang-3.6-gentoo-install.patch 1660 SHA256 74cce23945897ce2cfd3931b08695d534973e32a0d104ff942b2f5c500ec4ad7 SHA512 77e2a2dd82fd13292edced8c9bba911579f2b4984a64223e8c80f41b5605220f1433beb6f40e0746163d894d4405296e1f40584eb069f960866df97e6057b569 WHIRLPOOL 4784e8da4e04406a1261c9a539280c90936141b6061e567c70f9e4b566d45e0275b2513d66c03a5473fee6f434e0cf0242e7ac21eafe59a8c26c7c6bf7040876
+AUX cmake/0002-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch 1404 SHA256 c9692562264ee6a25c3a2f25c990fab763aee36014de3ef95aa1d35a89aa0c0b SHA512 41dfe489adc0a45e4ffd5961c973fe94934d542b1474bb2dba4320b75ed6ff22ce0ac4b590ff20e626ea7c14617c9703ce1fd4d8d6bf1bd3b26ab0adeea373f0 WHIRLPOOL a9d84dc513118cab6310ea46c7b2e67654c81cd3c783d5db8e9ea3657fc1658e80fe4663399d4e35f99294ea9a98fb422e9077a6c8b73a3a98bbc8b282d1e9ad
+AUX cmake/0003-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch 954 SHA256 6518c1a1fdce0371aa1a9dab790c0999440e7971ab2613f6d348250ace9310d2 SHA512 e4721c13add5f65126a3d84b9b66ce7086f435c9d2a729edca7bfc3c6f185afb2b5422c7f5045c1a3a4f82c5e3d5616b647bfad9975bb73ecf228235f1d9f588 WHIRLPOOL f35f09b2d29de42dba9c28825af5feec562860f25206589b0a9dcd1daea27c317da1385bdaa5c562b2f4c0613071c3bc1fbfcddece97cd13debaddd14324d552
+AUX cmake/0004-cmake-Do-not-install-libgtest.patch 835 SHA256 ed1531681603507fc674babd1f117063dcceb856151c20fd967d667d0dd83f2d SHA512 156f3b56e1bfe17804d3543a109567dcc10bac7a77f440d97bb900cc61f1e7bfe195ea3cf97bffbae7b132ebe31ad9d1acf5aca462a4aa01575909971ffdcf06 WHIRLPOOL d8bdc2032cec631c89d77a8fd231a0c22eeb5f9c99b8fda1068fb0e9fc10c81dc2d1bc71e8254ebea6392cfe3700427879841f7a6fcca3cd4c72ec1f1cdd56b0
+AUX cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix.patch 2251 SHA256 eb5c750e910b8088ec7e7fe2fa1cf367f4db738dbe681fa41c35e989db312c3b SHA512 6fc2a0a8d0b015c852f2ee2ca8038da0e64d7388f8909f52e871bcf0a25e8b5ac2a0a163411e83c24a71445a8e84d9ac9cc6acea543fd407ac8a46eb4ca13c0f WHIRLPOOL e193fe49bfe4657caa08deda88d8d5ec9270a9cbdeb9a08279efe9571a19ff2dbcd6e5eedb8ddc473a763ae60eebf7a38bc3366959569b78a9e15c46f2f4d360
+AUX cmake/clang-0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch 1031 SHA256 a0da8be64c575ec5a353ee33c530569c754df65cf6df04e5abbc29bcda1fccca SHA512 1948de3e7fb38517e00909f285541bcf3d75cb9c51ce7a2dfb7485346dd3409200bf82081a3a83d7e6843fb4cdbac12395ac6b9049f45201c94fc0ffa09d1ad9 WHIRLPOOL 8282dace8d2ba9d111b57b68e0116e92cafe2c070cc82d52518c6a6b4be3dcd37882bb505fcb3b01817eb577261c4f7f1b152bb12def6be52ea9c1625a15c29a
+AUX cmake/compiler-rt-0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi.patch 1106 SHA256 010816607be72e178c21f7b5b8fbe2e70697feb70c4d78e03b498672bff1cc5c SHA512 0081071254eebfa2f550b98290b661664c31ce5e28222d491d9f3522c4822878b50ba6f08c24e1a3f97cc9b1d437e76d50fb94939e37432d048e22825068936a WHIRLPOOL 38f09fcc2db0453974b76c12ca287718d778153496e6fe9237b92026bd6dcddf96dde69c5e406781c9da90fcb0de39327e1c4cb8ab847935e2626697e3acc9f7
AUX llvm-2.6-commandguide-nops.patch 975 SHA256 0e36fb43e020fa380230a8c6f2a79b9a19e12e857e833ef856e2b41aaa283649 SHA512 6842285e499b86581ca12fd94f5335e0dcd7afcaf0cdc5042ee8d84d0da6aba6659652eb639027bcad7caf77b0c994ac7e181a15bc609c4b3882e0f391c8cd33 WHIRLPOOL bf1212a8fd06214dba0916a73266842558bed740220d68e3447701ffeba1b3020ca4b4ab5c6d57772a60a6e09f153232f680b1e0b11cbd5d430bd9ef693d2926
AUX llvm-2.7-nodoctargz.patch 1878 SHA256 983657329ebede731b397ba0256d729b3958f39faea64c9f7d065ab8d2a3e7fd SHA512 3f9dd34437c6dba8246cdf5c8563889f805f3c8e579190c4f0fb06f72bf5aa112ecbfa18467a35eceaadcd470544f434f319f048cb58d6631170788b10fcc75b WHIRLPOOL 63182867bf8f0bd6ca1b7d97229fd13952526d59587192727348026e8a759f1c6b79db044760465e2424851fdbdf79e4122c5bb0285b505d20f151334063e8d1
AUX llvm-2.8-alignof.patch 2522 SHA256 a9f7add4f4002bf9af438c0c4d1ca86875d6214a5044334325a60cdcbc8a3cdc SHA512 188bdf29b60ce0f83010ef33cd28c4cb710d238fe678be731ce1d099c7df5577f51162c95e06d996e9c90535ace41fecd3eff6570214a313fe165c0945c42832 WHIRLPOOL 65dd1cf8eb106af0516a5f302a08c51bfa884e35dd5efffbbcf97e1212a6b9356c6caea4472dce8e54a5a30dc5c6ba73be29e64b1b060e63a9ce7d816066ccea
@@ -93,25 +99,25 @@ EBUILD llvm-3.5.1.ebuild 15323 SHA256 3b673170e10b2cbad34d877eeaa870f7d26d777b85
EBUILD llvm-3.5.2.ebuild 15351 SHA256 d06513e37ce4a492610840c9788aaeaf86fc184ca7ba6d7f9d897a5a1fc3aa03 SHA512 874c560af1c62c54401bcae868973b47576115951e353c1f324b88465ec8b19e1f549c8e8927bae6f3fd65a458f76d5903afd385de059724998a881e18b06d84 WHIRLPOOL a2fe4a0bef21d1be6e9a0e77e364c60af28ec5cff6f5429b40d1b821e462ca36a8a099cc7230e195253b77bc1871bd523f4f3e70cffa17ea3c318766fbf7879a
EBUILD llvm-3.6.0.ebuild 15310 SHA256 213f00e1aeb57bed52823f43025c63a820a0aa92421de7ec2d539d61bb212577 SHA512 13be6ca07c5c90dd28656261b4585aa3810ab86024949d5865892bbd58508d9f77eab390aa5a5288c84aa3e2ce8d0ed5aeb9b2b84f28a77fb22b1dc5abf24d44 WHIRLPOOL 0b3f9778f8d3ca8417e7943ad49c236446de927ddcb80bd5b5fb62fc6accd63663666db716104dd6eb27552f288999a7191842b6fc0c4ccb9d810152b78f4659
EBUILD llvm-3.6.1.ebuild 15458 SHA256 2171ecd5da2735212e4539a43211db11d5f0126cf47b4bfb38dc9d4cb4370391 SHA512 631e497f91049fab1cd9f5d835e73ef744d76f84be4485ae8950d63a0c6d5a04df9f9e518b1c566e9d3bfd9a45e1d791ac64a1d35f6d72e0c4dc2b34b496fd56 WHIRLPOOL 81b5d30b99e3b59ad0ee386e700311f72a06490227890f1816c4af733566bd7c0bbbdb671b6cd73d614ca36e5c3b3c5fc314b89d695654be6f05fe3113172660
-EBUILD llvm-9999.ebuild 14613 SHA256 6a63d35641eb4e50ffe2debcb06a43febd97d4b873519cae897e11299af1fd98 SHA512 aa5505658d535f9fff29e92def38cc3577e3fcbe84093044b9ae5e31f4a3be219f59d24cdeae9b0dbd9afb6fcdcc2b83c88560e90ab878d631b2918f1b6c54f8 WHIRLPOOL 7aed8324f117be725a9478e45b4b1b4cc07a927155bdfc660a5c20b3679bae066eda7870a93d6873dced093e3bbbc1035e5044740f29139ecdeb819247b73430
-MISC ChangeLog 41120 SHA256 b58ad218b9c22b037241630f1ff028d5fcae13501575eec3536de113f7dd5b2e SHA512 263d9885a4f72f33cf095452199775f4024f84c3affa0c0ac424c4f7e9c3690a7d4d3bdf3f62859472be3cab081e52b3eb395c6c3d1e18fe20c425275da40165 WHIRLPOOL 6f0cb0001a0c140985d4552e5c10302dbb1fd58838d76dcd838b7dddee57dfeb7016dd1dc67d279178965ded5129def4334affb5c8f6f8ebf2af9b3fe1b6da97
+EBUILD llvm-9999.ebuild 12510 SHA256 64a5ab042a3b56421629ba757c47a8b7714ce14d237ff15c88df30b571efa21d SHA512 7dffbc5b70d0c657bc27535b23fd445a1609c2379aa51a58f2d0fa932542be614cf0ad5b0452b644ab03a88a011d3e35bd44e5e808db341c3d8c802f67d450ca WHIRLPOOL ec79f4817b79a84fbde79e09c4b0c8a9c706a34e73b68f4b69b47d5d03e7779f8d0c9b2e7397822624906699ac23911183f1d7b05f1d265e5285ecb69f4e009f
+MISC ChangeLog 41748 SHA256 e5c1eff93ce850a908a7c3b4c479997ff436893f82ecac53014a221d88f07aa4 SHA512 3d38628f6fb7d28bd4e3ee406f821dfd16160db84c5eb5ae15cfa47b867071a0dbe5538488ef6172a2043b80c2eae1133bae054bcfa6eb586acdb8bd5ab93802 WHIRLPOOL 019508b6b05cab9d9a607a4cd7ec061b61d942462c10147ef60b761296ec438aa601f786951feae4c40993be48bf83eaeabc52fd9d213afa5a2c0220f8ffcc48
MISC metadata.xml 2787 SHA256 22dc7b91c98fb4258271cc9cd4bd99f214b30f258bbdfea83dc37ac74df8d498 SHA512 4fca0d2551a889e7800c688077adf405697d05730bf66621ac53fdefeeeaddb7a8d868973edc9a6fe48e9a07734f1d43fd88229bae693fe181a7dbb95eeb9481 WHIRLPOOL 6284033d40bef02510f924ec1e6a9d3e1072bf26945fdedde0ddaf1d6d35c3d30971cdefa583a8e4d9db3da67bee04145ace15ded4cee63f534588b66633c76b
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.1
+Version: GnuPG v2
-iQJ8BAEBCABmBQJVcba6XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
-ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXREMzFDRDFGNEQwRTAyNjc2QzRDNjRFQzAw
-MEY3QUIzMzFCMEYwOTdGAAoJEAD3qzMbDwl/XzEP/Rc6KOdN4g66I6eRdBrvBph5
-PyQTnwz83KMTUtr7Ou6HLYDUuPGybPXPDiygmqYY1LhF11oq8AVjJOv8bsHeESaV
-yulWy44NBvHFCugwaN6gJIO1tgInPT0/1uCtvOszKDqWDX980lKG6g39583sWa6u
-5Kepkk4uUpUlmPaon7XXbvdKaFdHEd6N93fD+9rZeihmJ24mvEQ0J9LFXfuo8cG6
-M/SuO0FuEVmAtpcpzpjvB4b4A7wTVd0VzpS919nUaBcDYO//Uwi1v3MZVWBDUUhm
-6MyPPGvFn+A42nlNDghMgFeRLccCNn5cMWN+PxR8tSjhr6aUPLtEIQFsPncDIq3p
-HUDsql3BOh8orKXsdyiBDXEyLZsgAPXDNg5iGirIt48qZztrrHN9jrAIU9lhzlzY
-aJ+BzGMigRgKADFc3/1jvpMz2phxc+jNneRMD12m2siY2W5mQ7h5WvntxgAlTyCv
-zAn+h9TyUJMB+gaw5KsPD+KFityyaJijLiiaQlAKpHpS2yY4/8gG4oaDZIaLUC+q
-j8V9dEWTEGta/qpYqht2t1n1hWBkOtLu+E9SX8IBkQg5tJ/4xBRXNc6Z2MR//gL5
-T8awBzOpls8/B4u2BjUL8obEHLY+T09H85Pecfwo9YJ9d0JjRtCfety3fbX1H5kg
-GlkaYY8Pf+FANc12btKw
-=TA41
+iQJ8BAEBCABmBQJVdxpdXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
+ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2REJCMDdDQzRGMERBRDA2RUEwQUZFNDFC
+MDdBMUFFQUVGQjQ0NjRFAAoJELB6GurvtEZOXHwQAIev0ro//fIqqETdpLkokyC1
+HdF/u/Ac/Hyg02bLCSiM3dyDlaevHSx8oZsZqvjDiDUtlcTNvBipNk5S8kfoOixa
+sI9WWqFzKHxCpQPdM+elK8fBPK/xMEVhPxAevJ6i7MJo/JyNNJorlIyJ1DzH+9wR
+EYfUuBNeMGr9qY8angNxagnW+t5rsi614qhogSxU4NBbpR4Qgw3i+1anyYBzeJRW
+Z32jBIj0rItJrFS8vYJSBRAqUkgt7yDYQi/ThTGxONBpg28rTw0Sy2FWJGZNpkGB
+WhngK0Mzvq5FtAgaup8pXqUbf65RjeJtDaTuN2F8doHNN3IS3VhsBLwSIhIB2a5Z
+v572LPSq4fonHZF6+VO/KjCCFnetmhCPyy7qpgFPL5NaWD67FOu9CNyxYbn/ITGN
+Y9md8tvOB4cQYF9Ggz8cF7EnvlUgTDg1nhui1JPYW8N1PThU1q9TcWpxkOT/5gyU
+yarMDTHmunsxgJJ7Epq+ezQMM2bMSDFEKbQHDsziAJ+9dtApplAbI0e+2AdhyWfz
+5BwVSrByTqkWWfzlXaj5eMpa7TtXxd71enOQyjvu0u4t7GJMPYj48oY2AU/zuPdC
+H3Rvfug9+VLDGMFkIum62F/yutS0bXEDXWF0ZHbEFWBFhE8OkQEGzftIqse5MjER
+v8FGUZTOVbJIqrEIkgMJ
+=K3NR
-----END PGP SIGNATURE-----
diff --git a/sys-devel/llvm/files/cmake/0002-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch b/sys-devel/llvm/files/cmake/0002-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch
new file mode 100644
index 000000000000..3e57f0dcaa68
--- /dev/null
+++ b/sys-devel/llvm/files/cmake/0002-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch
@@ -0,0 +1,36 @@
+From 2ec240a76253839cd1c5dc2e964f55698ae468fc Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Mon, 8 Jun 2015 06:43:00 +0200
+Subject: [PATCH 2/4] cmake: Support overriding Sphinx HTML doc install
+ directory
+
+Provide ${PROJECT}_INSTALL_HTML variables (e.g. LLVM_INSTALL_HTML) to
+override Sphinx HTML doc install directory.
+
+Fixes: https://llvm.org/bugs/show_bug.cgi?id=23780
+---
+ cmake/modules/AddSphinxTarget.cmake | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/cmake/modules/AddSphinxTarget.cmake b/cmake/modules/AddSphinxTarget.cmake
+index 045dc23..9c9c444 100644
+--- a/cmake/modules/AddSphinxTarget.cmake
++++ b/cmake/modules/AddSphinxTarget.cmake
+@@ -53,8 +53,12 @@ function (add_sphinx_target builder project)
+ DESTINATION share/man/man1)
+
+ elseif (builder STREQUAL html)
+- install(DIRECTORY "${SPHINX_BUILD_DIR}"
+- DESTINATION "share/doc/${project}")
++ string(TOUPPER "${project}" project_upper)
++ set(${project_upper}_INSTALL_HTML "share/doc/${project}/html"
++ CACHE STRING "HTML documentation install directory for ${project}")
++
++ install(DIRECTORY "${SPHINX_BUILD_DIR}/"
++ DESTINATION "${${project_upper}_INSTALL_HTML}")
+ else()
+ message(WARNING Installation of ${builder} not supported)
+ endif()
+--
+2.4.3
+
diff --git a/sys-devel/llvm/files/cmake/0003-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch b/sys-devel/llvm/files/cmake/0003-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch
new file mode 100644
index 000000000000..b1c74c69443f
--- /dev/null
+++ b/sys-devel/llvm/files/cmake/0003-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch
@@ -0,0 +1,32 @@
+From 4f7092ba05cccfeea7d26177d93f3d7a57d9bce2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Mon, 8 Jun 2015 14:29:03 +0200
+Subject: [PATCH 3/4] cmake: Add an ordering dep between HTML & man Sphinx
+ targets
+
+Add a dependency between HTML & manpage Sphinx targets to prevent two
+instances of Sphinx from running in parallel, and therefore solves race
+conditions reusing the same doctree directory.
+
+Fixes: https://llvm.org/bugs/show_bug.cgi?id=23781
+---
+ docs/CMakeLists.txt | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
+index da27627..63309a6 100644
+--- a/docs/CMakeLists.txt
++++ b/docs/CMakeLists.txt
+@@ -100,6 +100,9 @@ if (LLVM_ENABLE_SPHINX)
+
+ if (${SPHINX_OUTPUT_MAN})
+ add_sphinx_target(man llvm)
++ if (${SPHINX_OUTPUT_HTML})
++ add_dependencies(docs-llvm-html docs-llvm-man)
++ endif()
+ endif()
+
+ endif()
+--
+2.4.3
+
diff --git a/sys-devel/llvm/files/cmake/0004-cmake-Do-not-install-libgtest.patch b/sys-devel/llvm/files/cmake/0004-cmake-Do-not-install-libgtest.patch
new file mode 100644
index 000000000000..92ca2e47e81b
--- /dev/null
+++ b/sys-devel/llvm/files/cmake/0004-cmake-Do-not-install-libgtest.patch
@@ -0,0 +1,28 @@
+From d9f80393cfd4e586242ac3efd4e6ba6b49ce39ae Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Tue, 9 Jun 2015 11:58:52 +0200
+Subject: [PATCH 4/4] cmake: Do not install libgtest
+
+libgtest is an internal test dependency, and should not be installed to
+the live system as a part of LLVM.
+---
+ utils/unittest/CMakeLists.txt | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/utils/unittest/CMakeLists.txt b/utils/unittest/CMakeLists.txt
+index b34e22a..3fe5884 100644
+--- a/utils/unittest/CMakeLists.txt
++++ b/utils/unittest/CMakeLists.txt
+@@ -41,6 +41,9 @@ if (PTHREAD_LIBRARY_PATH)
+ list(APPEND LIBS pthread)
+ endif()
+
++# Delay building until the tests pull it in, and avoid installing it
++set(EXCLUDE_FROM_ALL ON)
++
+ add_llvm_library(gtest
+ googletest/src/gtest-all.cc
+
+--
+2.4.3
+
diff --git a/sys-devel/llvm/files/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix.patch b/sys-devel/llvm/files/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix.patch
new file mode 100644
index 000000000000..904a72a358a9
--- /dev/null
+++ b/sys-devel/llvm/files/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix.patch
@@ -0,0 +1,52 @@
+From b28503def986bcbc388a04be0d51cbe80bc59506 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Tue, 9 Jun 2015 12:11:50 +0200
+Subject: [PATCH] Install clang runtime into /usr/lib (without suffix)
+
+---
+ lib/Driver/Driver.cpp | 3 +--
+ lib/Frontend/CompilerInvocation.cpp | 3 +--
+ lib/Headers/CMakeLists.txt | 2 +-
+ 3 files changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
+index a04a1f8..418d46a 100644
+--- a/tools/clang/lib/Driver/Driver.cpp
++++ b/tools/clang//lib/Driver/Driver.cpp
+@@ -66,8 +66,7 @@ Driver::Driver(StringRef ClangExecutable, StringRef DefaultTargetTriple,
+ if (ClangResourceDir != "") {
+ llvm::sys::path::append(P, ClangResourceDir);
+ } else {
+- StringRef ClangLibdirSuffix(CLANG_LIBDIR_SUFFIX);
+- llvm::sys::path::append(P, "..", Twine("lib") + ClangLibdirSuffix, "clang",
++ llvm::sys::path::append(P, "..", "lib", "clang",
+ CLANG_VERSION_STRING);
+ }
+ ResourceDir = P.str();
+diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp
+index 9485767..0b9ecbd 100644
+--- a/tools/clang/lib/Frontend/CompilerInvocation.cpp
++++ b/tools/clang/lib/Frontend/CompilerInvocation.cpp
+@@ -1053,8 +1053,7 @@ std::string CompilerInvocation::GetResourcesPath(const char *Argv0,
+ if (ClangResourceDir != "") {
+ llvm::sys::path::append(P, ClangResourceDir);
+ } else {
+- StringRef ClangLibdirSuffix(CLANG_LIBDIR_SUFFIX);
+- llvm::sys::path::append(P, "..", Twine("lib") + ClangLibdirSuffix, "clang",
++ llvm::sys::path::append(P, "..", "lib", "clang",
+ CLANG_VERSION_STRING);
+ }
+
+diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt
+index 29a738e..3769d23 100644
+--- a/tools/clang/lib/Headers/CMakeLists.txt
++++ b/tools/clang/lib/Headers/CMakeLists.txt
+@@ -93,4 +93,4 @@ set_target_properties(clang-headers PROPERTIES FOLDER "Misc")
+ install(
+ FILES ${files} ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h
+ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+- DESTINATION lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
++ DESTINATION lib/clang/${CLANG_VERSION}/include)
+--
+2.4.3
+
diff --git a/sys-devel/llvm/files/cmake/clang-0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch b/sys-devel/llvm/files/cmake/clang-0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch
new file mode 100644
index 000000000000..0b93deba0b58
--- /dev/null
+++ b/sys-devel/llvm/files/cmake/clang-0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch
@@ -0,0 +1,28 @@
+From d07632abe23d55eec2aae303a142a97765a77d32 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Tue, 9 Jun 2015 12:20:06 +0200
+Subject: [PATCH 2/2] cmake: Make CLANG_LIBDIR_SUFFIX overridable
+
+Make CLANG_LIBDIR_SUFFIX a cache variable so that it can be explicitly
+overriden. It is used purely to find the LLVMgold.so plugin, so we want
+to set it to native suffix.
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 357286b..647f976 100644
+--- a/tools/clang/CMakeLists.txt
++++ b/tools/clang/CMakeLists.txt
+@@ -203,7 +203,7 @@ set(CLANG_VENDOR_UTI "org.llvm.clang" CACHE STRING
+ "Vendor-specific uti.")
+
+ # The libdir suffix must exactly match whatever LLVM's configuration used.
+-set(CLANG_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}")
++set(CLANG_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}" CACHE STRING "")
+
+ set(CLANG_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+ set(CLANG_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
+--
+2.4.3
+
diff --git a/sys-devel/llvm/files/cmake/compiler-rt-0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi.patch b/sys-devel/llvm/files/cmake/compiler-rt-0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi.patch
new file mode 100644
index 000000000000..93538009d291
--- /dev/null
+++ b/sys-devel/llvm/files/cmake/compiler-rt-0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi.patch
@@ -0,0 +1,25 @@
+From 8bd62a681744d3c31a0837c0f84f99ea4987e017 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Tue, 9 Jun 2015 12:17:57 +0200
+Subject: [PATCH] cmake: Install compiler-rt into /usr/lib (without suffix)
+
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0d8a880..5ae98a9 100644
+--- a/projects/compiler-rt/CMakeLists.txt
++++ b/projects/compiler-rt/CMakeLists.txt
+@@ -52,7 +52,7 @@ if (NOT COMPILER_RT_STANDALONE_BUILD)
+ # Setup the paths where compiler-rt runtimes and headers should be stored.
+ set(COMPILER_RT_OUTPUT_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION})
+ set(COMPILER_RT_EXEC_OUTPUT_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR})
+- set(COMPILER_RT_INSTALL_PATH lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION})
++ set(COMPILER_RT_INSTALL_PATH lib/clang/${CLANG_VERSION})
+ option(COMPILER_RT_INCLUDE_TESTS "Generate and build compiler-rt unit tests."
+ ${LLVM_INCLUDE_TESTS})
+ option(COMPILER_RT_ENABLE_WERROR "Fail and stop if warning is triggered"
+--
+2.4.3
+
diff --git a/sys-devel/llvm/llvm-9999.ebuild b/sys-devel/llvm/llvm-9999.ebuild
index 641b29a25196..90feb0a2ec9b 100644
--- a/sys-devel/llvm/llvm-9999.ebuild
+++ b/sys-devel/llvm/llvm-9999.ebuild
@@ -1,13 +1,14 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/llvm-9999.ebuild,v 1.110 2015/06/05 14:48:25 voyageur Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/llvm-9999.ebuild,v 1.111 2015/06/09 16:54:50 mgorny Exp $
EAPI=5
+: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
PYTHON_COMPAT=( python2_7 pypy )
-inherit eutils flag-o-matic git-r3 multibuild multilib \
- multilib-minimal python-r1 toolchain-funcs pax-utils check-reqs
+inherit check-reqs cmake-utils eutils flag-o-matic git-r3 multilib \
+ multilib-minimal python-r1 toolchain-funcs pax-utils
DESCRIPTION="Low Level Virtual Machine"
HOMEPAGE="http://llvm.org/"
@@ -18,9 +19,8 @@ EGIT_REPO_URI="http://llvm.org/git/llvm.git
LICENSE="UoI-NCSA"
SLOT="0/${PV}"
KEYWORDS=""
-IUSE="clang debug doc gold libedit +libffi multitarget ncurses ocaml python
- +static-analyzer test xml video_cards_radeon
- kernel_Darwin"
+IUSE="clang debug doc gold libedit +libffi multitarget ncurses ocaml
+ python +static-analyzer test xml video_cards_radeon kernel_Darwin"
COMMON_DEPEND="
sys-libs/zlib:0=
@@ -36,7 +36,10 @@ COMMON_DEPEND="
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= )"
+ 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
@@ -64,11 +67,6 @@ PDEPEND="clang? ( =sys-devel/clang-${PV}-r100 )"
REQUIRED_USE="${PYTHON_REQUIRED_USE}
test? ( || ( $(python_gen_useflags 'python*') ) )"
-# Some people actually override that in make.conf. That sucks since
-# we need to run install per-directory, and ninja can't do that...
-# so why did it call itself ninja in the first place?
-CMAKE_MAKEFILE_GENERATOR=emake
-
pkg_pretend() {
# in megs
# !clang !debug !multitarget -O2 400
@@ -144,195 +142,172 @@ src_unpack() {
}
src_prepare() {
- epatch "${FILESDIR}"/${PN}-3.7-nodoctargz.patch
epatch "${FILESDIR}"/${PN}-3.5-gcc-4.9.patch
- epatch "${FILESDIR}"/${PN}-3.6-gentoo-install.patch
# 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
- fi
- if use prefix && use clang; then
- sed -i -e "/^CFLAGS /s@-Werror@-I${EPREFIX}/usr/include@" \
- projects/compiler-rt/make/platform/clang_*.mk || die
- fi
+ sed -i -e "s^@EPREFIX@^${EPREFIX}^" \
+ tools/clang/tools/scan-build/scan-build || die
- local sub_files=(
- Makefile.config.in
- Makefile.rules
- tools/llvm-config/llvm-config.cpp
- )
- use clang && sub_files+=(
- tools/clang/lib/Driver/Tools.cpp
- tools/clang/tools/scan-build/scan-build
- )
+ # 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
- # unfortunately ./configure won't listen to --mandir and the-like, so take
- # care of this.
- # note: we're setting the main libdir intentionally.
- # where per-ABI is appropriate, we use $(GENTOO_LIBDIR) make.
- einfo "Fixing install dirs"
- sed -e "s,@libdir@,$(get_libdir),g" \
- -e "s,@PF@,${PF},g" \
- -e "s,@EPREFIX@,${EPREFIX},g" \
- -i "${sub_files[@]}" \
- || die "install paths sed failed"
+ # 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
+ fi
# User patches
epatch_user
python_setup
+
+ # Native libdir is used to hold LLVMgold.so
+ NATIVE_LIBDIR=$(get_libdir)
}
multilib_src_configure() {
- # disable timestamps since they confuse ccache
- local conf_flags=(
- --disable-timestamps
- --enable-keep-symbols
- --enable-shared
- --with-optimize-option=
- $(tc-is-static-only && echo --disable-shared)
- $(use_enable !debug optimized)
- $(use_enable debug assertions)
- $(use_enable debug expensive-checks)
- $(use_enable libedit)
- $(use_enable ncurses terminfo)
- $(use_enable libffi)
- )
-
- # well, it's used only by clang executable c-index-test
- if multilib_is_native_abi && use clang && use xml; then
- conf_flags+=( XML2CONFIG="$(tc-getPKG_CONFIG) libxml-2.0" )
- else
- conf_flags+=( ac_cv_prog_XML2CONFIG="" )
- fi
-
- local targets bindings
+ local targets
if use multitarget; then
- targets='all'
+ targets=all
else
- targets='host,cpp'
- use video_cards_radeon && targets+=',r600'
+ targets='host;CppBackend'
+ use video_cards_radeon && targets+=';R600'
fi
- conf_flags+=( --enable-targets=${targets} )
- if multilib_is_native_abi; then
- use gold && conf_flags+=( --with-binutils-include="${EPREFIX}"/usr/include/ )
- # extra commas don't hurt
- use ocaml && bindings+=',ocaml'
+ 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
- [[ ${bindings} ]] || bindings='none'
- conf_flags+=( --enable-bindings=${bindings} )
+ local libdir=$(get_libdir)
+ local mycmakeargs=(
+ "${mycmakeargs[@]}"
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
- if use libffi; then
- local CPPFLAGS=${CPPFLAGS}
- append-cppflags "$(pkg-config --cflags libffi)"
- fi
+ -DBUILD_SHARED_LIBS=ON
+ -DLLVM_ENABLE_TIMESTAMPS=OFF
+ -DLLVM_TARGETS_TO_BUILD="${targets}"
+ -DLLVM_BUILD_TESTS=$(usex test)
- # Enable large file support, bug #550708
- append-lfs-flags
- # llvm prefers clang over gcc, so we may need to force that
- tc-export CC CXX
+ -DLLVM_ENABLE_FFI=$(usex libffi)
+ -DLLVM_ENABLE_TERMINFO=$(usex ncurses)
+ -DLLVM_ENABLE_ASSERTIONS=$(usex debug)
- ECONF_SOURCE=${S} \
- econf "${conf_flags[@]}"
-}
+ -DWITH_POLLY=OFF # TODO
-set_makeargs() {
- MAKEARGS=(
- VERBOSE=1
- REQUIRES_RTTI=1
- GENTOO_LIBDIR=$(get_libdir)
+ -DLLVM_HOST_TRIPLE="${CHOST}"
+
+ -DFFI_INCLUDE_DIR="${ffi_cflags#-I}"
+ -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}"
+
+ -DHAVE_HISTEDIT_H=$(usex libedit)
)
- # for tests, we want it all! otherwise, we may use a little filtering...
- # adding ONLY_TOOLS also disables unittest building...
- if [[ ${EBUILD_PHASE_FUNC} != src_test ]]; then
- local tools=( llvm-config )
- use clang && tools+=( clang )
-
- if multilib_is_native_abi; then
- tools+=(
- opt llvm-as llvm-dis llc llvm-ar llvm-nm llvm-link lli
- llvm-extract llvm-mc llvm-bcanalyzer llvm-diff macho-dump
- llvm-objdump llvm-readobj llvm-rtdyld llvm-dwarfdump llvm-cov
- llvm-size llvm-stress llvm-mcmarkup llvm-profdata
- llvm-symbolizer obj2yaml yaml2obj lto bugpoint
- )
+ 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
- # the build system runs explicitly specified tools in parallel,
- # so we need to split it into two runs
- if [[ ${1} != -1 ]]; then
- # those require lto
- tools+=( llvm-lto )
- use gold && tools+=( gold )
-
- # those require clang :)
- # we need to explicitly specify all its tools
- # since we're passing BUILD_CLANG_ONLY
- use clang && tools+=(
- clang/tools/{clang-check,clang-format,extra}
- )
- fi
+ if multilib_is_native_abi; then
+ mycmakeargs+=(
+ -DLLVM_BUILD_DOCS=ON
+ -DLLVM_ENABLE_DOXYGEN=OFF
+ -DLLVM_ENABLE_SPHINX=ON
+ -DSPHINX_OUTPUT_HTML=$(usex doc)
+
+ -DLLVM_INSTALL_HTML="${EPREFIX}/usr/share/doc/${PF}/html"
+ )
+
+ if use clang; then
+ mycmakeargs+=(
+ -DCLANG_INSTALL_HTML="${EPREFIX}/usr/share/doc/${PF}/clang"
+ )
fi
- MAKEARGS+=(
- # filter tools + disable unittests implicitly
- ONLY_TOOLS="${tools[*]}"
+ if use gold; then
+ mycmakeargs+=(
+ -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include
+ )
+ 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
+ fi
- # this disables unittests & docs from clang
- BUILD_CLANG_ONLY=YES
+ 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() {
- local MAKEARGS
- set_makeargs -1
- emake "${MAKEARGS[@]}"
-
- if multilib_is_native_abi; then
- set_makeargs
- emake -C tools "${MAKEARGS[@]}"
+ cmake-utils_src_compile
- emake -C "${S}"/docs -f Makefile.sphinx man
- use clang && emake -C "${S}"/tools/clang/docs/tools \
- BUILD_FOR_WEBSITE=1 DST_MAN_DIR="${T}"/ man
- use doc && emake -C "${S}"/docs -f Makefile.sphinx html
- fi
-
- if use debug; then
- pax-mark m Debug+Asserts+Checks/bin/llvm-rtdyld
- pax-mark m Debug+Asserts+Checks/bin/lli
- pax-mark m Debug+Asserts+Checks/bin/lli-child-target
- else
- pax-mark m Release/bin/llvm-rtdyld
- pax-mark m Release/bin/lli
- pax-mark m Release/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() {
- local MAKEARGS
- set_makeargs
-
- # build the remaining tools & unittests
- emake "${MAKEARGS[@]}"
-
- pax-mark m unittests/ExecutionEngine/JIT/Release/JITTests
- pax-mark m unittests/ExecutionEngine/MCJIT/Release/MCJITTests
- pax-mark m unittests/Support/Release/SupportTests
-
# respect TMPDIR!
local -x LIT_PRESERVES_TMP=1
- emake "${MAKEARGS[@]}" check
- use clang && emake "${MAKEARGS[@]}" -C tools/clang test
+ 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() {
@@ -346,12 +321,16 @@ src_install() {
)
if use clang; then
- # note: magic applied below
+ # note: magic applied in multilib_src_install()!
+ CLANG_VERSION=3.7
+
MULTILIB_CHOST_TOOLS+=(
/usr/bin/clang
/usr/bin/clang++
- /usr/bin/clang-${PV}
- /usr/bin/clang++-${PV}
+ /usr/bin/clang-cl
+ /usr/bin/clang-${CLANG_VERSION}
+ /usr/bin/clang++-${CLANG_VERSION}
+ /usr/bin/clang-cl-${CLANG_VERSION}
)
MULTILIB_WRAPPED_HEADERS+=(
@@ -359,112 +338,59 @@ src_install() {
)
fi
+
multilib-minimal_src_install
}
multilib_src_install() {
- local MAKEARGS
- set_makeargs
-
- local root=${D}/_${ABI}
-
- emake "${MAKEARGS[@]}" DESTDIR="${root}" install
- multibuild_merge_root "${root}" "${D}"
+ cmake-utils_src_install
- if ! multilib_is_native_abi; then
- # Backwards compat, will be happily removed someday.
- dosym "${CHOST}"-llvm-config /usr/bin/llvm-config.${ABI}
- else
+ if multilib_is_native_abi; then
# Install docs.
- doman "${S}"/docs/_build/man/*.1
- use clang && doman "${T}"/clang.1
- use doc && dohtml -r "${S}"/docs/_build/html/
+ #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
+ 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 PV to clang executables
+ # 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++ )
+ local clang_tools=( clang clang++ clang-cl )
local i
- # append ${PV} and symlink back
- # TODO: use alternatives.eclass? does that make any sense?
- # maybe with USE=-clang on :0 and USE=clang on older
- for i in "${clang_tools[@]}"; do
- mv "${ED%/}/usr/bin/${i}"{,-${PV}} || die
- dosym "${i}"-${PV} /usr/bin/${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}-${PV}" || die
+ rm "${ED%/}/usr/bin/${i}-${CLANG_VERSION}" || die
cat > "${T}"/wrapper.tmp <<-_EOF_
#!${EPREFIX}/bin/sh
- exec "${i}-${PV}" $(get_abi_CFLAGS) "\${@}"
+ exec "${i}-${CLANG_VERSION}" $(get_abi_CFLAGS) "\${@}"
_EOF_
- newbin "${T}"/wrapper.tmp "${i}-${PV}"
+ newbin "${T}"/wrapper.tmp "${i}-${CLANG_VERSION}"
done
fi
fi
-
- # Fix install_names on Darwin. The build system is too complicated
- # to just fix this, so we correct it post-install
- local lib= f= odylib= ndylib= libpv=${PV}
- if [[ ${CHOST} == *-darwin* ]] ; then
- eval $(grep PACKAGE_VERSION= configure)
- [[ -n ${PACKAGE_VERSION} ]] && libpv=${PACKAGE_VERSION}
- libpvminor=${libpv%.[0-9]*}
- for lib in lib{EnhancedDisassembly,LLVM-${libpv},LTO,profile_rt,clang}.dylib LLVMHello.dylib clang/${libpv}/lib/darwin/libclang_rt.asan_{osx,iossim}_dynamic.dylib; do
- # libEnhancedDisassembly is Darwin10 only, so non-fatal
- # + omit clang libs if not enabled
- [[ -f ${ED}/usr/lib/${lib} ]] || continue
-
- ebegin "fixing install_name of $lib"
- install_name_tool \
- -id "${EPREFIX}"/usr/lib/${lib} \
- "${ED}"/usr/lib/${lib}
- eend $?
- done
- for f in "${ED}"/usr/bin/* "${ED}"/usr/lib/lib*.dylib "${ED}"/usr/lib/clang/${libpv}/lib/darwin/*.dylib ; do
- # omit clang libs if not enabled
- [[ -f "${f}" ]] || continue
-
- scanmacho -BF'%n#f' "${f}" | tr ',' '\n' | \
- while read odylib ; do
- ndylib=
- case ${odylib} in
- */libclang.dylib)
- ndylib="${EPREFIX}"/usr/lib/libclang.dylib
- ;;
- */libLLVM-${libpv}.dylib)
- ndylib="${EPREFIX}"/usr/lib/libLLVM-${libpv}.dylib
- ;;
- */libLLVM-${libpvminor}.dylib)
- ndylib="${EPREFIX}"/usr/lib/libLLVM-${libpvminor}.dylib
- ;;
- */libLTO.dylib)
- ndylib="${EPREFIX}"/usr/lib/libLTO.dylib
- ;;
- esac
- if [[ -n ${ndylib} ]] ; then
- ebegin "fixing install_name reference to ${odylib} of ${f##*/}"
- install_name_tool \
- -change "${odylib}" "${ndylib}" \
- "${f}"
- eend $?
- fi
- done
- done
- fi
}
multilib_src_install_all() {