summaryrefslogtreecommitdiff
path: root/sys-devel
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-08-29 20:19:23 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-08-29 20:19:23 +0100
commit12bb627384ddfd47382b9f1b6464481a58d01ebb (patch)
treef9760c04ccd4fcd7de214e2acd5b0e43fb530aa9 /sys-devel
parent5fdd950c7ae03e12746a45c86d85861beaacc846 (diff)
gentoo resync : 29.08.2018
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/Manifest.gzbin9490 -> 9489 bytes
-rw-r--r--sys-devel/binutils-hppa64/Manifest4
-rw-r--r--sys-devel/binutils-hppa64/binutils-hppa64-2.31.1.ebuild4
-rw-r--r--sys-devel/binutils/Manifest4
-rw-r--r--sys-devel/binutils/binutils-2.31.1.ebuild4
-rw-r--r--sys-devel/clang-common/Manifest2
-rw-r--r--sys-devel/clang-common/clang-common-7.0.0_rc2.ebuild33
-rw-r--r--sys-devel/clang-runtime/Manifest1
-rw-r--r--sys-devel/clang-runtime/clang-runtime-7.0.0_rc2.ebuild31
-rw-r--r--sys-devel/clang/Manifest4
-rw-r--r--sys-devel/clang/clang-7.0.0_rc2.ebuild320
-rw-r--r--sys-devel/gcc/Manifest4
-rw-r--r--sys-devel/gcc/gcc-5.4.0-r4.ebuild2
-rw-r--r--sys-devel/lld/Manifest3
-rw-r--r--sys-devel/lld/lld-7.0.0_rc2.ebuild75
-rw-r--r--sys-devel/llvm-common/Manifest2
-rw-r--r--sys-devel/llvm-common/llvm-common-7.0.0_rc2.ebuild35
-rw-r--r--sys-devel/llvm/Manifest2
-rw-r--r--sys-devel/llvm/llvm-7.0.0_rc2.ebuild259
-rw-r--r--sys-devel/make/Manifest2
-rw-r--r--sys-devel/make/files/make-4.2.1-pselect-non-blocking.patch172
-rw-r--r--sys-devel/make/make-4.2.1-r4.ebuild59
-rw-r--r--sys-devel/patch/Manifest2
-rw-r--r--sys-devel/patch/files/patch-2.7.6-fix-error-handling-with-git-style-patches.patch125
-rw-r--r--sys-devel/patch/patch-2.7.6-r2.ebuild36
25 files changed, 1174 insertions, 11 deletions
diff --git a/sys-devel/Manifest.gz b/sys-devel/Manifest.gz
index ee710e803fec..2c115d02e502 100644
--- a/sys-devel/Manifest.gz
+++ b/sys-devel/Manifest.gz
Binary files differ
diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest
index 045e2ac8ce39..0746fd9af9dc 100644
--- a/sys-devel/binutils-hppa64/Manifest
+++ b/sys-devel/binutils-hppa64/Manifest
@@ -15,7 +15,7 @@ DIST binutils-2.29.tar.bz2 29073316 BLAKE2B 0eb7bbefa1ac5f4d753ca9328d339a466d4f
DIST binutils-2.30-patches-2.tar.xz 490272 BLAKE2B a28a5b5bb8faa33fec269f2c69d6ed0e4e7d5a9169861aa4b3c45511794e1e749c216862a8258c2029f1b40c511dcb2a0aeaecda57e75d52418f10d6f345718f SHA512 1686d5b58ee968f2000647acab2bee4c263d1c85fd43fed8c820fccfc0d7024a01211e7853cd5ce452fa90da500bc17309edf6dbc901c7fd6fc7b3e3d6f42581
DIST binutils-2.30-patches-3.tar.xz 548804 BLAKE2B 428a1750233ae3f019e20cb5ed1d8e6fe6455181e8f5961dbfe7b66493d1c42050f889e45c02c1fc1a84d545c9e61f81ad6ffd5afc0b1099a702ccc7637c3abe SHA512 c91e902d1d9fc2e9782df04c93173c3207c771f1c063e2ff12c9336593c954ea3f1b2474a8fc045927d72fe18f7401874059599d100c4a1fd152081f05913d03
DIST binutils-2.30.tar.xz 20286700 BLAKE2B 2dd5436a15a601011a1950e6082ec00082f5916fb82ce95ceab424fd8dc19f6daa7ac32a149f222ccdcc603354165cc206fde070eaa44fe2cc5e57486efc7868 SHA512 e747ea20d8d79fcd21b9d9f6695059caa7189d60f19256da398e34b789fea9a133c32b192e9693b5828d27683739b0198431bf8b3e39fb3b04884cf89d9aa839
-DIST binutils-2.31.1-patches-1.tar.xz 10644 BLAKE2B 3c2e09713593fc01d78d45ee4e4ac92020d5de781325c8ea98a5193a36a2a0a814f1b6730ae718ad92f92c5876e8e47d0eee7c42d2fce281cc0b37fadb85c42b SHA512 d701e6e2c9d22ca5c7ac4bf08d9206a6648b299b7b04a053aaabc34fa94d7c5fd074a08e3f3af66365069918d9000986c646430bf2adf94213cbf0d55d6e6c51
+DIST binutils-2.31.1-patches-2.tar.xz 11232 BLAKE2B b8ac65872017c063650d4e04855efa3fd3e9faa566e81fa9fb3ae777c1337627023c1af85b708a7933b577a69652451ff488340d7cc9f035d3a3a655da0fc8d6 SHA512 2d0ee2e727586fc39cdb8abc7251c12dd350d18dd84103ddacc08978db48d45445c05b7ea5f095842f6e0350db94d593270b23a38920a01ca59c363decaa2a58
DIST binutils-2.31.1.tar.xz 20467996 BLAKE2B 6b914df1fbb7cf54f2159f71b2c2b09f3f6a569b7a3cb4cf9790d0a3733a7548bc0ea32334a178ed3b56e8b97656ae99c7abaf212601beeaeae9a0884c0f6051 SHA512 0fca326feb1d5f5fe505a827b20237fe3ec9c13eaf7ec7e35847fd71184f605ba1cefe1314b1b8f8a29c0aa9d88162849ee1c1a3e70c2f7407d88339b17edb30
EBUILD binutils-hppa64-2.25.1.ebuild 649 BLAKE2B 46ddf5d41f1a24566dcb4ea8d935d45267bbe2b437c3ad0c4ec7302acf463ffe818c96d15aa55a2606d74486bbce3418b86fda08b19ed7eef47252fe3e948724 SHA512 8061b215177024cd77e73cf1897a83bf353f7cff162f035ddfc983d1d2f6c1fecb3b5bc0e4275889b45e450ec98133e8d90e9dacd305c101b1cf6002090fb682
EBUILD binutils-hppa64-2.26.1.ebuild 649 BLAKE2B 7634f79d45f03490a2c5f336fec707880792966bafc8ee07ebc0bf5102d2ba1be51a1a4123b415d6e5e28fee784fbb2fdb86d7cd68a873f941c67286f7edf779 SHA512 8174c2a92d336ecd685eab3a2680bcadd30d7d15205b441d179ade7d3f2e87862062115a45d7ab1e7ab8fe811530f47584ca34d2a2157c09be7468386bfa5d16
@@ -27,5 +27,5 @@ EBUILD binutils-hppa64-2.29.1.ebuild 676 BLAKE2B bf9da84ae57d3756e147bd875941758
EBUILD binutils-hppa64-2.29.ebuild 650 BLAKE2B d5fe2e9a8c5fc3d906838e6c0621329e0082d4705d222a2c4d513bcbaf4e5e6cc64582ea8a8e41ae1deda4d8651bc299892990dcf15670eb8fb5248ea9b8333f SHA512 7786209f9e2c4e1fa40ec08b8a4ff1c89d1471a2f438a7b750cb4067b19520a1a9b9be0c46396b2e0d0b9ad4c0f2d82cbacf4e77397661b04d49da45ebac70fa
EBUILD binutils-hppa64-2.30-r2.ebuild 10688 BLAKE2B 17ad6713868d47398f7a08d4510d0e403ceceb07dd62e6fade49f721f7f3cbe45f2793ad4cc3b52d89e51ace2996b74fa27c05fbd6364cada107f30edfbb44ba SHA512 8226d4dc2d24550222165deb982e97e597c0ef5ddf48ece858a048ea9cf3e6a6cdab1cdfdb5c76d8bf3994b1f7b5c79645ee170de9e6e7c9e873cf2f048ff2af
EBUILD binutils-hppa64-2.30-r3.ebuild 10689 BLAKE2B 4dc6ce16fa2e3e2e39da1b8eb132de17e98dbc86878454192d52fcecbe834b9b63b5201a36866353fb698d35e6b558074056f22b430d962c356962ec9c9709dd SHA512 d092f185d5dabd98cb3ba6bc6ac5f7355c033ad8b0d94b1a562a75eab0f6fde93bdcfb56dfd724eca5e58c384d21702746617c92eec1561af48f93cb5fda069e
-EBUILD binutils-hppa64-2.31.1.ebuild 10714 BLAKE2B 44e639a9bb050a5f9e245145ab29de95defcdd93624a51a5d1b1b045b52d2e7cf8b05d387a21d0accae5fd03238b8f5f3ab8515a42f32b31f00175e29e3a7635 SHA512 25aca58ab25d19650642d8046cbf2271d33087967fd0cfc0ab49e7e174e3becd0ed93152e5a4cf52a04da4281a440dae0cf67019d348fc08ba7da619b9996b41
+EBUILD binutils-hppa64-2.31.1.ebuild 10711 BLAKE2B debe3e5e18c81f44dce882f583405ab278ab478f62ee16cde92dcdaf2c2b7b2dc9a70c53c7fc67b99a89bcfebe0384cb07b34a682aed4d2933e5c19c445eb318 SHA512 d43e204dbce8547ac48310ac3e25abded9942f55f92a589f7ea26d7006f1ec2868c6f0636e5b32b442de385c26eff7f5096c9c6f1077633e0fa6b13d7db530d2
MISC metadata.xml 445 BLAKE2B 38db0981b080e996e57421a2c75b2ebb2172ef38c0cfadf4b6105901985e9d46b5ba1c939641747be35cfacb4e1928a9f711465b2e17909a282d0acf244b8be3 SHA512 dd2ce9defb3a005665ad2f495513c40b5420629e31a336f6640ef91c9effc6f062bd338a87fe70de8a6a2993dda9e141396b602a1e2b7445f15e6f33473d29ef
diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1.ebuild
index f885043c8a25..29675f0e5c23 100644
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1.ebuild
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.31.1.ebuild
@@ -21,7 +21,7 @@ IUSE="+cxx doc multitarget +nls static-libs test"
# for the patchsets
# Default: dilfridge :)
-PATCH_VER=1
+PATCH_VER=2
case ${PV} in
9999)
@@ -43,7 +43,7 @@ KEYWORDS="-* ~hppa"
# The Gentoo patchset
#
PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${BVER}}
-PATCH_DEV=${PATCH_DEV:-dilfridge}
+PATCH_DEV=${PATCH_DEV:-slyfox}
[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest
index 80755d9d1119..a8ca3dc41810 100644
--- a/sys-devel/binutils/Manifest
+++ b/sys-devel/binutils/Manifest
@@ -14,7 +14,7 @@ DIST binutils-2.29.1.tar.bz2 29123355 BLAKE2B 83de518a27bae0f13c57b1979493dd7f7c
DIST binutils-2.30-patches-2.tar.xz 490272 BLAKE2B a28a5b5bb8faa33fec269f2c69d6ed0e4e7d5a9169861aa4b3c45511794e1e749c216862a8258c2029f1b40c511dcb2a0aeaecda57e75d52418f10d6f345718f SHA512 1686d5b58ee968f2000647acab2bee4c263d1c85fd43fed8c820fccfc0d7024a01211e7853cd5ce452fa90da500bc17309edf6dbc901c7fd6fc7b3e3d6f42581
DIST binutils-2.30-patches-3.tar.xz 548804 BLAKE2B 428a1750233ae3f019e20cb5ed1d8e6fe6455181e8f5961dbfe7b66493d1c42050f889e45c02c1fc1a84d545c9e61f81ad6ffd5afc0b1099a702ccc7637c3abe SHA512 c91e902d1d9fc2e9782df04c93173c3207c771f1c063e2ff12c9336593c954ea3f1b2474a8fc045927d72fe18f7401874059599d100c4a1fd152081f05913d03
DIST binutils-2.30.tar.xz 20286700 BLAKE2B 2dd5436a15a601011a1950e6082ec00082f5916fb82ce95ceab424fd8dc19f6daa7ac32a149f222ccdcc603354165cc206fde070eaa44fe2cc5e57486efc7868 SHA512 e747ea20d8d79fcd21b9d9f6695059caa7189d60f19256da398e34b789fea9a133c32b192e9693b5828d27683739b0198431bf8b3e39fb3b04884cf89d9aa839
-DIST binutils-2.31.1-patches-1.tar.xz 10644 BLAKE2B 3c2e09713593fc01d78d45ee4e4ac92020d5de781325c8ea98a5193a36a2a0a814f1b6730ae718ad92f92c5876e8e47d0eee7c42d2fce281cc0b37fadb85c42b SHA512 d701e6e2c9d22ca5c7ac4bf08d9206a6648b299b7b04a053aaabc34fa94d7c5fd074a08e3f3af66365069918d9000986c646430bf2adf94213cbf0d55d6e6c51
+DIST binutils-2.31.1-patches-2.tar.xz 11232 BLAKE2B b8ac65872017c063650d4e04855efa3fd3e9faa566e81fa9fb3ae777c1337627023c1af85b708a7933b577a69652451ff488340d7cc9f035d3a3a655da0fc8d6 SHA512 2d0ee2e727586fc39cdb8abc7251c12dd350d18dd84103ddacc08978db48d45445c05b7ea5f095842f6e0350db94d593270b23a38920a01ca59c363decaa2a58
DIST binutils-2.31.1.tar.xz 20467996 BLAKE2B 6b914df1fbb7cf54f2159f71b2c2b09f3f6a569b7a3cb4cf9790d0a3733a7548bc0ea32334a178ed3b56e8b97656ae99c7abaf212601beeaeae9a0884c0f6051 SHA512 0fca326feb1d5f5fe505a827b20237fe3ec9c13eaf7ec7e35847fd71184f605ba1cefe1314b1b8f8a29c0aa9d88162849ee1c1a3e70c2f7407d88339b17edb30
DIST binutils-9999-patches-1.tar.xz 10116 BLAKE2B 1ae970fd13ea1b94f554ed5b3fde4b6bdd90efcfc2488efc2f1465511279027c2e7f2a7371069afadb91bf833680a24e1a5df50d3169c9ee132c933b3c1fdba9 SHA512 a5d97d7070b876bf072db2a99a2876c239e03409849b9c93467bd3e70cd97c468110031a09e1c182c05d48004ec3e1651f44a1850b0275a385c3bae598cd98d7
EBUILD binutils-2.25.1-r1.ebuild 280 BLAKE2B 6c3abc3c6b80becab91ec1f2c88c1f5dba11e862035355a9ce2c029b865865ca58c359f25496c50aa63cadb3ca08de77eb2a86c2d2286441870f65a7a943b42a SHA512 4cc55460454f6ae62fb900bdbce4896279dd27dfc5b09126d8942675970776cafccdd6d7adfdfba74862ee2e84ad7d2be9b7ddc79319a6dfc09b745e16b18a54
@@ -24,6 +24,6 @@ EBUILD binutils-2.28.1.ebuild 280 BLAKE2B 6c8363e933c3a7e40fc21a737b59d08d2b9bdd
EBUILD binutils-2.29.1-r1.ebuild 328 BLAKE2B 1f38a6896f710e1c18ea80569f02a93814daaf0fa84b08f9762bbe002607189a8c75ddcbee978af878d5976ede247f31d84fda6c00142f5020e7d18b4b03b17c SHA512 7a08fc2878be20f311cd5cf10f59035f17869da5f59822a73c55da3c134a9dffdc57de855f7392b396dfe3a526c1dc4ff60d3202466b6e9c2d26e1cd18a48289
EBUILD binutils-2.30-r2.ebuild 11853 BLAKE2B 6b840541f896cae641685b44911854a2a99c7cf25b01efa0f53c562520215662ecd32892c0aa6426a37d8789c8578b40b8f88f874c6e9232de59925c6806fb0d SHA512 4be914043d4e8b106034e63e3125fa8ab0caa9086a4fa6a082a723e01624a7dbbce6d61cb992c37a09c2b337920d11b8bd03b2c28d7a02a08df929b60f8ba6a3
EBUILD binutils-2.30-r3.ebuild 11864 BLAKE2B 18001b8d905368b565e15ab852cb0e18a3354cfc31db5f3799b0d84ab837dabc50a7e0bb2656622c972fb46525b8007fe641f4ef76e837006791ecca9aa46131 SHA512 ddeedc8aa8c1a72ea16855c15e4660e5db335b8d50e45444233c755928eb9138168819e7ea9998759e71dd6582b296445679333363e0f5abe62788d17417999f
-EBUILD binutils-2.31.1.ebuild 12065 BLAKE2B d7b31543b2e138b5b586d6509387028af5856bf610cb94f42880be77d0fffb57bfd5ad3bdbca18762afeb1c096b8177fabdae5a452fa3c8f09f7fdcabd83d906 SHA512 fcfd5cf8da131b442cdfeb648cf496e46f1d20aeb259511da17faf9e5866386c653e8de573522174e3e62a2e7d2ea30f4eaf3fe0b3fef0efced6468c6f37f572
+EBUILD binutils-2.31.1.ebuild 12062 BLAKE2B d733159c07280791ed54a721f3ea517b490899c0faaa7ac34ca1f7dcf7f2ac658a547dd41b0414f141c8d8dec74925d9bca7500859dc51bda4c0d3c8d6670d8a SHA512 b39036aaa8a9d53f0b7d12f6884ed3f2a414f0a6d8c9198d4fe4387a755d409441ddfb7d64368ffd39bb76ae69442365bef4c1929c648feb355b92d3bfddee2a
EBUILD binutils-9999.ebuild 11970 BLAKE2B a93befebe54cf9531de140a9275eb7215f367cd072165f05e9e6592746e85ee0b42bd376af7b003c42f0f7432301988867234b32e5904746b373b969b15ec7fb SHA512 a2702494f594ccaf3a0698b9c555a2bd68638937f43ca33b5c4c2bac1ba391ea26e9987e6fc5807b1b160af6ff83af45eee8343ac44a080ccd1ee3564efbdf36
MISC metadata.xml 447 BLAKE2B 78d0b6e0a34f19d0f90f568fb84fcddbc995eb2c64f9c4feef2545d49322311fc6825b3b208dc03718bd75d550581efbdc9ee26e7f7a6f856902e640f90bf0f5 SHA512 73cb18db3a677767a78d5cab44ca721083ef17b4a158c10a66a186835b57a3d763b6f6753c836620b32ec912834ae8da2148c8fa0e4932170956b92c75169a9d
diff --git a/sys-devel/binutils/binutils-2.31.1.ebuild b/sys-devel/binutils/binutils-2.31.1.ebuild
index d28b62827bcf..aa2b74cf6c1f 100644
--- a/sys-devel/binutils/binutils-2.31.1.ebuild
+++ b/sys-devel/binutils/binutils-2.31.1.ebuild
@@ -19,7 +19,7 @@ IUSE="+cxx doc multitarget +nls static-libs test"
# for the patchsets
# Default: dilfridge :)
-PATCH_VER=1
+PATCH_VER=2
case ${PV} in
9999)
@@ -49,7 +49,7 @@ esac
# The Gentoo patchset
#
PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-dilfridge}
+PATCH_DEV=${PATCH_DEV:-slyfox}
[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
diff --git a/sys-devel/clang-common/Manifest b/sys-devel/clang-common/Manifest
index dcbd201adcb3..2bb8b080697f 100644
--- a/sys-devel/clang-common/Manifest
+++ b/sys-devel/clang-common/Manifest
@@ -1,5 +1,7 @@
DIST cfe-6.0.1.src.tar.xz 11905772 BLAKE2B abb60e9f9827d1d8a24f0aaf8a1d1e32979293cc401258d230f93290e633645747fd0344af189ac7081b06be2cada503364e1e432b37110ade4b3578e40c7605 SHA512 f64ba9290059f6e36fee41c8f32bf483609d31c291fcd2f77d41fecfdf3c8233a5e23b93a1c73fed03683823bd6e72757ed993dd32527de3d5f2b7a64bb031b9
+DIST cfe-7.0.0rc2.src.tar.xz 12539260 BLAKE2B 7e7f006154aff2e4cfde377820c3482769ddb22a14ef45c98cb1645262ba36a5cb2159097bd159141e37cc4a06dddd93e38fdac4d763450834719daf088a2d15 SHA512 ae4c4f2b5f3c97147bcbb5d74e07588ff2ede7c131cb4e782ff077b68da1f02042a87f44227574a2883da7ce6827cd188898c862b0e09a4a70316df16193811b
EBUILD clang-common-6.0.1.ebuild 777 BLAKE2B 3f19ef0457ce59dffd312ee898a72b4b5e6d21a2f9403d159c2f92c76dd16f212beec6a906fc8652487a7bd7f0b773b86620ceb03ceeaa1974e9fd8bd021a830 SHA512 e469a91c0619ae0aca5f0c25bb14cb22fb5b773c452dbb212a32a499ff5101878455b28b2948fe118713ee5d9d15b24d470fde9a57ce38bbe46f26c0ed2c33da
+EBUILD clang-common-7.0.0_rc2.ebuild 700 BLAKE2B 1041f1c529832712845e4621af003a6aefd1954de189dcbde83978e5d73cf892325041e84ab73f3600d82ed944d10327e120c507a4963daa8546f580f5d3d719 SHA512 d8c69789d80939eba0363d3f3d455c2330737738d922524e0a56428a7af2949336f355d552f963a771f94a8302efa874b5300b152df4d2863199ef6e9eeda522
EBUILD clang-common-7.0.9999.ebuild 666 BLAKE2B f6c1fe58d00db323baffd3c426bb31d1835cf44b5554fbb8d7cbfd3a0ddfcfe968e0007465fdd13297c7aad3bf94b219c6d156e12fcfc95ea72e44a6f273dd40 SHA512 3ad6ab3333f0cbb4aea199b9409668f1ae5d3a1ba8e31f0a68e1dc1d2b4489cef0a54cf144c56ccb256feabe4bada8e764331ddf91c682eb4752527ce8bd54ad
EBUILD clang-common-9999.ebuild 641 BLAKE2B 81f3432382ffcf77a61d9142a0ae83df84499da1ba31cbd542d2080bde11d92676efd0a9a19f1392f55a300fd9aaf7b0268a8dec7f017cd229eec4dde1b7091a SHA512 0e8661594be1482cda90f240792ae7a9e77c0ba167d874735f89994a24ebf232a5cb10858fc9099c9f639174f2fbf79b7eb16e05ca54d17c636002c72f68d7d5
MISC metadata.xml 216 BLAKE2B fe5e49887842aa513fbf1f2e09bed09a884d531fd21bdaeb2d389e8bf590b6c0e7063f0af98f66e2db129308ab0f0804ba327c3c752bbb4c900c59ac109d99aa SHA512 3485598147c953e72e1785693a489a7e7d73d59620b76054db9c0ce95d8bfa0e8ffec29da7f7a9d73a32e5b77eac07ca3306c56a972dc57fd89d477edaebf3d5
diff --git a/sys-devel/clang-common/clang-common-7.0.0_rc2.ebuild b/sys-devel/clang-common/clang-common-7.0.0_rc2.ebuild
new file mode 100644
index 000000000000..144dd9bebea4
--- /dev/null
+++ b/sys-devel/clang-common/clang-common-7.0.0_rc2.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit bash-completion-r1
+
+MY_P=cfe-${PV/_/}.src
+DESCRIPTION="Common files shared between multiple slots of clang"
+HOMEPAGE="https://llvm.org/"
+SRC_URI="https://prereleases.llvm.org/${PV/_//}/${MY_P}.tar.xz"
+
+LICENSE="UoI-NCSA"
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+
+PDEPEND="sys-devel/clang:*"
+
+S=${WORKDIR}/${MY_P}
+
+src_unpack() {
+ einfo "Unpacking parts of ${MY_P}.tar.xz ..."
+ tar -xJf "${DISTDIR}/${MY_P}.tar.xz" "${MY_P}/utils/bash-autocomplete.sh" || die
+}
+
+src_configure() { :; }
+src_compile() { :; }
+src_test() { :; }
+
+src_install() {
+ newbashcomp utils/bash-autocomplete.sh clang
+}
diff --git a/sys-devel/clang-runtime/Manifest b/sys-devel/clang-runtime/Manifest
index d36a9fe4689d..6bc14799c50d 100644
--- a/sys-devel/clang-runtime/Manifest
+++ b/sys-devel/clang-runtime/Manifest
@@ -3,6 +3,7 @@ EBUILD clang-runtime-4.0.1-r1.ebuild 757 BLAKE2B 027d495eb3a9203db1ca76f1f6c99d6
EBUILD clang-runtime-4.0.1.ebuild 639 BLAKE2B 62665ccfdb77a3635995b6ec9a59589e3d5e5b39c3940b378acc314fc9fcb4af23f7d44fba89f61eceb4055622b9d7c35ae26724b3cc207c06ac60bd2eda5a75 SHA512 b42d5fbf0082e194f4fc4ddf987a2d1dd0f06fc673b590ec278b45cacb8854c207b26cd159fe4cccdd1a123884037fff7c9e5908d0f329b93ff4ef0238e550da
EBUILD clang-runtime-5.0.2.ebuild 820 BLAKE2B 52c56a71db4514803c8ecc070e21a479bad960fdaa40e3fbd6de2229f6f71c0f5fbbfc2dfc5fee8bcb8570c5e71c73be921cd3fcaabe442551d10ccf9a4736e7 SHA512 bcde7bededdae2f422da56eb68ed862fcafb618b8ce6cd1932a5472e325f0c0231429c7914806915b2f4b579655d0f46d82e19f5f83420d204f53a81a9596e47
EBUILD clang-runtime-6.0.1.ebuild 819 BLAKE2B ce5fe6e1f47830366c00f80149adfb9f0ac25742fe57dd1cb1f35c30186a919b89cdb679b342ff1db3ed676bc48c58f28c85b5c74e1adaaab18875293b8be1c1 SHA512 25d88ca2c1d51c0140fbb7572fc45786a61902ff27534ad8e2bd8d12155a69229cadeee3c4827533207a265aa290e829de2141f96bc7d2181c59731ce0fbacfc
+EBUILD clang-runtime-7.0.0_rc2.ebuild 739 BLAKE2B ee93e25c573d0a44d401766cd6633883e59355093dcaa918619e9798da89f7d3370dbbfc83958c3303e3e06ef68d1cd34e82f63162cac165125a1c92b25b015b SHA512 9ee759e3e167d2b5e7f88a4120fc4cc589d1b2f219df0b0e8bf5621aa8d2945ef544e2d1dfcc9194829e49ac454ff13fe6732a85fe9218c3a84957ef6d177e85
EBUILD clang-runtime-7.0.9999.ebuild 780 BLAKE2B e62543ab7d24e09ee7c933283e3445103d943196b02fb4891db1af30aef4ee53c709f8f640b4478fc622fdbb243e981fcafbc42fca7cd1e2d2c56576540dab0a SHA512 ab53bd4228bca6cf4eeb52159433dcb0db57fcc920b6c2e2da4f1b43fa65c0de26d8ad6d7a1655eed44031c1deeeff0acd88f80d107f5bdbc7d776cc66f9af06
EBUILD clang-runtime-9999.ebuild 780 BLAKE2B 97af098ee32a2d42a79dcad29edd1ff7471cb82575ce140cf664d95f2ac805dffdb82d1ee7a6a2b1186e72f594a45a651008494dceea77f496f10b6de5c3acb9 SHA512 d13c63d506cfcda5f1ff4b192b4748d7e4236e89faefd99fc5e30a961bc85931ecdbedd333d83111204cf849e1a0e7f066d845aa38d5b52b911865986173949c
MISC metadata.xml 708 BLAKE2B 56cc586deba4a72cc9ebf5d0ac6b9dbb3767b736a96f1c0e4f8d9a715076645be25e42f1c610f55ba69e500bc828d629e7f2253e7c9ed6fd4b01032722bec3c8 SHA512 764eefdff5358c66cad9e8fe18fc7b938c7656268208639cbb92a4b5ae76f7de0dee86a729cc1e6745ddbf7308180885ef99047502e0e040020e738e3d0d1425
diff --git a/sys-devel/clang-runtime/clang-runtime-7.0.0_rc2.ebuild b/sys-devel/clang-runtime/clang-runtime-7.0.0_rc2.ebuild
new file mode 100644
index 000000000000..0a2d24887e05
--- /dev/null
+++ b/sys-devel/clang-runtime/clang-runtime-7.0.0_rc2.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit multilib-build
+
+DESCRIPTION="Meta-ebuild for clang runtime libraries"
+HOMEPAGE="https://clang.llvm.org/"
+SRC_URI=""
+
+LICENSE="metapackage"
+SLOT="${PV%_*}"
+KEYWORDS=""
+IUSE="+compiler-rt crt libcxx openmp +sanitize"
+
+RDEPEND="
+ compiler-rt? (
+ ~sys-libs/compiler-rt-${PV}:${SLOT}
+ sanitize? ( ~sys-libs/compiler-rt-sanitizers-${PV}:${SLOT} )
+ )
+ crt? (
+ || (
+ sys-libs/netbsd-csu[${MULTILIB_USEDEP}]
+ sys-freebsd/freebsd-lib[${MULTILIB_USEDEP}]
+ )
+ )
+ libcxx? ( >=sys-libs/libcxx-${PV}[${MULTILIB_USEDEP}] )
+ openmp? ( >=sys-libs/libomp-${PV}[${MULTILIB_USEDEP}] )"
+
+REQUIRED_USE="sanitize? ( compiler-rt )"
diff --git a/sys-devel/clang/Manifest b/sys-devel/clang/Manifest
index a7dfe1b7ad60..157831af4261 100644
--- a/sys-devel/clang/Manifest
+++ b/sys-devel/clang/Manifest
@@ -10,14 +10,17 @@ AUX 6.0.1/darwin_prefix-include-paths.patch 690 BLAKE2B cfb96eb259fb7d557d215be0
DIST cfe-4.0.1.src.tar.xz 10933628 BLAKE2B bc1bb8875e83ccecd446a48cfa41f5c98a09d6ad24ff439a983f629711b4513b9c4bee4070f8df13b6b2a52d673b0706733a4c151ce5021a0233147debff14ac SHA512 936c9e1626b27e63a4fb11f3c0cb998eeaf9a520ad6e2bcd67cb4352e59e7781ecc700df79794f3fd70473d90b7e2ba418a39038eb0146b68e843f0705c1f964
DIST cfe-5.0.2.src.tar.xz 11459216 BLAKE2B 80d9b2ab70b00c0dfd5c5386a44e0c15d8252e6175c9da55a0519c4f9b8192e32e215110d7d3808225786e2c7f906f2dfbe11dd09bdf21574e99709ae237ed0b SHA512 9931afceb5569ad6caec85d506180c810f7fea94af8c997143b0a37cbf413fcea0d92520478610627eeee1efb65fde684066ace0dfcbbf7b61ecd709d22dd0b1
DIST cfe-6.0.1.src.tar.xz 11905772 BLAKE2B abb60e9f9827d1d8a24f0aaf8a1d1e32979293cc401258d230f93290e633645747fd0344af189ac7081b06be2cada503364e1e432b37110ade4b3578e40c7605 SHA512 f64ba9290059f6e36fee41c8f32bf483609d31c291fcd2f77d41fecfdf3c8233a5e23b93a1c73fed03683823bd6e72757ed993dd32527de3d5f2b7a64bb031b9
+DIST cfe-7.0.0rc2.src.tar.xz 12539260 BLAKE2B 7e7f006154aff2e4cfde377820c3482769ddb22a14ef45c98cb1645262ba36a5cb2159097bd159141e37cc4a06dddd93e38fdac4d763450834719daf088a2d15 SHA512 ae4c4f2b5f3c97147bcbb5d74e07588ff2ede7c131cb4e782ff077b68da1f02042a87f44227574a2883da7ce6827cd188898c862b0e09a4a70316df16193811b
DIST clang-tools-extra-4.0.1.src.tar.xz 581788 BLAKE2B 52ca89eda6fe1e0fbbdc46e17f4067f03a9a9440dcdcc98811651087d0c9ab24dfe3eefb0b80a32ec41abe0766cb3e47031de61c4cff02b7d0e08c8fd03e3faa SHA512 ea26d926f428e62e76cf8a073e63ffe05645f6592e05d7717d5c257908870ae9217727d3e1578227b14eda5937085872463f1a8e99970256179c68b8a92e69e0
DIST clang-tools-extra-5.0.2.src.tar.xz 646272 BLAKE2B 8a15a0c3ed9e8c31706d744017aa8be52616037790075c2314c3a613c9e1aa86b0b980c4e3bd9a775b234440f17436392196b41f1691ab25a33b432a25affb68 SHA512 241d85652e7c3ad5d77754ad9a694bddab3c14098067da4119223007c5a4a765d1cd7e7c7dba91666ccd5506f8703c82c9ee487f28249a00c2c4edbd0d1f2640
DIST clang-tools-extra-6.0.1.src.tar.xz 757256 BLAKE2B 1d91d7459a34e7251007af91db1803ee6d04f1ef3e0fcf134a7e0d1d3456b094a80339ee60db3f0bdd12961f3a05caee7edfc5c6b9c48d49cd55a5dc3c102c3a SHA512 cf29d117b6dabcb7a8e5f6dab5016ce5a5c8f475679001a43fd5c935f2c368f37cdef50aae2080a1e4524f647f6d83458d4a5dec5b45d03fb374f463caf7c3f5
+DIST clang-tools-extra-7.0.0rc2.src.tar.xz 903424 BLAKE2B 3414bfe1cb50ce732200941f51ea49080e4ced4ac6a99d1963fc53a67007b7b4859e589ab4494d0cde8e298c7204c9e4a4240c9a175b7ad894a97732b71252aa SHA512 4b78046d9247160a566a48c84d0f75fd86fd80df5a9acd659f86c6c27c99b4b6d9296c04dff089697fede0109c531845572c3f8d99ebb28800ebb18c28ce9f6b
DIST llvm-4.0.1.src.tar.xz 21065652 BLAKE2B 6327eed2d1feb108440f22d2581d1ff86c10a10c29793538d8d899c7e2dc83d3f7b147d3fd4bcce2bd2bf57c071b08c624aeafe40a3e7a3914506e7751727e6c SHA512 16adc39b34ddb628f81b171119a8e2a0e9138b25011e803ef0b688e2fbea116fc4953d3a1b61b90a98a75e33619f81566b7cb06a9a2ea4d04ac5e0eb303a2d1d
DIST llvm-5.0.2-manpages.tar.bz2 93977 BLAKE2B 8c5e8899e0df9d6037fb7d5c373de6492ccdc9fd2c26cc7dfbd8fb2b9e68418ca8fdf42cdc303c361e649cc6939bf5229cbad017bdccbd5d791e92752328252f SHA512 568615bce5a75d42e4b6d592557472d366d49a99f8e81be10ae679804f1fe674c7fd0bbdac09af44fc67ee5aa34c4ed2153c2767c536ac8e45dd15c811c92dcb
DIST llvm-5.0.2.src.tar.xz 23451868 BLAKE2B b7082be2e4ad557b29b9f6869811f262adcf5c73d552faf91b339bede75cf5eab58afefa12fa779a38be71fe2b8f4ea297c3213ee4e8370cc01972c59249d91c SHA512 3588be5ed969c3f7f6f16f56a12a6af2814d3d3c960d4a36ffebb0446cc75f19220bccee7fc605f9b01f5d5c188a905a046193cc12dec42dd5922048b5c27fe1
DIST llvm-6.0.1-manpages.tar.bz2 102656 BLAKE2B 9088ca0bdda69f63354e61b7495df54505d5db2504bc61860a7260343722ec8cdd5e937d0843263a5bf5077b9cf386c337fa127039b996bab10d2ca5c2caeb59 SHA512 c468e97a2d5610aee9e72cb795e4e65375a079d733550f05380230fb44ba0ed67d407ad06e2340b66f13d19c06583b657e8d01fcdca2146ae43964cea309e0b3
DIST llvm-6.0.1.src.tar.xz 25306628 BLAKE2B 60232d4d22f8096b565cc8d81fea0639f24f14e8fc4f66ade69fa15479181f07f655f26dff3fa24bf105762b495da316c5c9352db234bd0af6b9c3fff6d4d881 SHA512 cbbb00eb99cfeb4aff623ee1a5ba075e7b5a76fc00c5f9f539ff28c108598f5708a0369d5bd92683def5a20c2fe60cab7827b42d628dbfcc79b57e0e91b84dd9
+DIST llvm-7.0.0rc2.src.tar.xz 28320756 BLAKE2B 92707da30fe73a6dec2614acceada06560332d3b54edeae5047543f23808cf13b24aecc9c853ccbc3341951e1fbceff85509465aa6207275fc54c75f94baff55 SHA512 4211fdbd2278ed325d3f6a1f1fa706351e768e2cd1445abf6664bed39b7b5d0c5e04514711d627f9ae1e271300f410635bb54ba004a5bece0d68450d3a1b52e4
DIST llvm-manpages-4.0.1.tar.bz2 87981 BLAKE2B 79ffd254ee5c6e09159c954913ef820f74107d4fcea5e3ed82592dc36af8fdfbf1e850547ba8bfc20aa9a5ecdd26c50329e6a6d558ae3aa5475a930789ce3e01 SHA512 d5b3213567c25db58ef364d272314a79c311a80fc21d98c09a5540af45a8190a38f489228663fe9a9b63bf0f2b952c460c4196a8fc8d6f221619f6e7ed2fc415
EBUILD clang-3.4.2-r100.ebuild 972 BLAKE2B b11888e71750e7de7363d0e74a43999b31baf54dd43438c98d037b5b49d4043a74fdda70dd2b0eb405451c2579ee0285404b28792cc525c1c26e81a07bfd2dc9 SHA512 b42ec4379b4a70eb638ae6a6d45a287cd83f5ac339ac25ade2c6c77bd8d05c208d389d6f09e4cfe567e67d3e616adfbaffa1b1a9a7f35f5ecb7a0e7ccdc720fc
EBUILD clang-3.5.2-r100.ebuild 972 BLAKE2B 0f17918969ee1034e1febc34afe95a29dddcf6056caa53920ade66a887b57939933f31b022fb68fb29bf8a5e387f659f6e3b618594cda4cd50f913ec14d0f0de SHA512 1e9a9f67ecd1cea111599376e676c665c6c1e731514a06065751502d221f8c6d7033dc23376f21850a63d036a33fbf241845a9127beca6ee8549348866cdce3e
@@ -27,6 +30,7 @@ EBUILD clang-3.9.1-r100.ebuild 1471 BLAKE2B a3f8f43d3f07cc8598a4bdd8e0c59d1da652
EBUILD clang-4.0.1.ebuild 9614 BLAKE2B ef0c63cfe38db99be4b9236d04eba4107092869e6c4dcc64e5a4cddf2d7931652607fce6292a8158ea9ff545ffb0296bca3670fd386e132c05239384190bbde9 SHA512 77045fdf3606b88c4f7f3021399c34b61876e80be7fa84ccb3a464e8caa19fcdbc896eb4f2d08d4f9f39dd7bdb03b9557135a710a00b92714ac2b29d6ba8e2d5
EBUILD clang-5.0.2.ebuild 10447 BLAKE2B 884093b2cfd7b64844627b8ca8ed3a7e2626c8a9da94c4035def0e1843b7b731f9920be651a7735d46e874eb5b4ee07d4b1e7446a6c2a17d80e7dd0ee69d6926 SHA512 f758de9f1b4828bb0b71ac23b1c1a596ac4f27aa345183b05c09652bac375c0dcf31cff738fc64e61002ac2a17d3a6a1a90f73c1056e527ab628813b5d859e05
EBUILD clang-6.0.1.ebuild 10267 BLAKE2B 0cf2f2b6b079a6670139efa2097eb1fbd2684e2d8baaae751819086ff213cb03065f0345e36b76d826c9bbf45109d24105dccd2882bd4317ccbc98988fe118c5 SHA512 4418a336d2dbeb5e62d16c39df797a473492befe9feaa7550218e560ad92ce98d669f956634391d7fe86770fafc6ee62d53d95fcab1c8e4bdf47c5e10e080668
+EBUILD clang-7.0.0_rc2.ebuild 10057 BLAKE2B 658ef40651c9b1743faf7c98d188becc9ba031be3cd9b6c4967a9fbb6000801281c051c9926653daae50b1c961c53b642349d1c9d5e1945d940fe9516286cd08 SHA512 f7366a26913cb481df6045e37038dc443381192ae8c500fd4db82e41209a4a18ef08eef9f49c14897c07bb74e783f3520fef54afcb16498e83a41aa29928c424
EBUILD clang-7.0.9999.ebuild 9422 BLAKE2B 7e607b9c3fb5ef8c9b30bd4bdfa02f7ff1f7dd948ad0971d336088fb153886ef4ab9bb3ea5c3209deb5803f1d5ae73d14370532a5c6bd8dde0e87e81a21aadf7 SHA512 dd78ec6962da4423fd03d2fd1865e019c6c17dcd894f77f9b8eb4be5fc79c7822bbc5597ef32cc717bca91b5c68de035b14fe7432e9a9e2c001877c4c37aca6d
EBUILD clang-9999.ebuild 9487 BLAKE2B 54baeb90b6ae969e538af934760bd2ce0631f7ac731031cd4e1f36901449a45f0efc96bd31d5b99b4fd407b4fb49fbc6110a44067a94318c0123c369e65a128d SHA512 660dba0cd16af5b84db4f73957ccadb6b8106e39e1aa0549865410f445a1e8c5ab7377f6e877c461d2accefdadf52982fd35a0e3c5c0243687e06efbc7df8111
MISC metadata.xml 1455 BLAKE2B 9dd88bba7158dfdc83bfc48fa4134e1f5a3357ab778cad400a51e348bbb4b44d2740ec417fdc888df0b4fd820441649e92b7adffdd4db558a2f4c3f4830a83a1 SHA512 369a87bd551e483e81ff56f5167177b1bcfedf9bc97f501ef2b07bfdfea3a25532f5e86af062568b3b22a53fe07318fd93dc55bd83b453dd10a0f4d3e88cb932
diff --git a/sys-devel/clang/clang-7.0.0_rc2.ebuild b/sys-devel/clang/clang-7.0.0_rc2.ebuild
new file mode 100644
index 000000000000..6a0721cd4eb0
--- /dev/null
+++ b/sys-devel/clang/clang-7.0.0_rc2.ebuild
@@ -0,0 +1,320 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
+# (needed due to CMAKE_BUILD_TYPE != Gentoo)
+CMAKE_MIN_VERSION=3.7.0-r1
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils eapi7-ver flag-o-matic llvm \
+ multilib-minimal multiprocessing pax-utils prefix python-single-r1 \
+ toolchain-funcs
+
+MY_P=cfe-${PV/_/}.src
+EXTRA_P=clang-tools-extra-${PV/_/}.src
+LLVM_P=llvm-${PV/_/}.src
+
+DESCRIPTION="C language family frontend for LLVM"
+HOMEPAGE="https://llvm.org/"
+SRC_URI="https://prereleases.llvm.org/${PV/_//}/${MY_P}.tar.xz
+ https://prereleases.llvm.org/${PV/_//}/${EXTRA_P}.tar.xz
+ test? ( https://prereleases.llvm.org/${PV/_//}/${LLVM_P}.tar.xz )"
+# !doc? ( https://dev.gentoo.org/~mgorny/dist/llvm/llvm-${PV}-manpages.tar.bz2 )"
+
+# Keep in sync with sys-devel/llvm
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
+ NVPTX PowerPC Sparc SystemZ X86 XCore )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
+
+LICENSE="UoI-NCSA"
+SLOT="$(ver_cut 1)"
+KEYWORDS=""
+IUSE="debug default-compiler-rt default-libcxx doc +static-analyzer
+ test xml z3 kernel_FreeBSD ${ALL_LLVM_TARGETS[*]}"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ ~sys-devel/llvm-${PV}:${SLOT}=[debug=,${LLVM_TARGET_USEDEPS// /,},${MULTILIB_USEDEP}]
+ static-analyzer? (
+ dev-lang/perl:*
+ z3? ( sci-mathematics/z3:0= )
+ )
+ xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
+ ${PYTHON_DEPS}"
+# configparser-3.2 breaks the build (3.3 or none at all are fine)
+DEPEND="${RDEPEND}
+ doc? ( dev-python/sphinx )
+ xml? ( virtual/pkgconfig )
+ !!<dev-python/configparser-3.3.0.2
+ ${PYTHON_DEPS}"
+RDEPEND="${RDEPEND}
+ !<sys-devel/llvm-4.0.0_rc:0
+ !sys-devel/clang:0"
+PDEPEND="
+ sys-devel/clang-common
+ ~sys-devel/clang-runtime-${PV}
+ default-compiler-rt? ( =sys-libs/compiler-rt-${PV%_*}* )
+ default-libcxx? ( >=sys-libs/libcxx-${PV} )"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}
+ || ( ${ALL_LLVM_TARGETS[*]} )
+ doc"
+
+# We need extra level of indirection for CLANG_RESOURCE_DIR
+S=${WORKDIR}/x/y/${MY_P}
+
+# least intrusive of all
+CMAKE_BUILD_TYPE=RelWithDebInfo
+
+PATCHES=(
+ # add Prefix include paths for Darwin
+ "${FILESDIR}"/6.0.1/darwin_prefix-include-paths.patch
+)
+
+# Multilib notes:
+# 1. ABI_* flags control ABIs libclang* is built for only.
+# 2. clang is always capable of compiling code for all ABIs for enabled
+# target. However, you will need appropriate crt* files (installed
+# e.g. by sys-devel/gcc and sys-libs/glibc).
+# 3. ${CHOST}-clang wrappers are always installed for all ABIs included
+# in the current profile (i.e. alike supported by sys-devel/gcc).
+#
+# Therefore: use sys-devel/clang[${MULTILIB_USEDEP}] only if you need
+# multilib clang* libraries (not runtime, not wrappers).
+
+pkg_setup() {
+ LLVM_MAX_SLOT=${SLOT} llvm_pkg_setup
+ python-single-r1_pkg_setup
+}
+
+src_unpack() {
+ # create extra parent dir for CLANG_RESOURCE_DIR
+ mkdir -p x/y || die
+ cd x/y || die
+
+ einfo "Unpacking ${MY_P}.tar.xz ..."
+ tar -xf "${DISTDIR}/${MY_P}.tar.xz" || die
+ einfo "Unpacking ${EXTRA_P}.tar.xz ..."
+ tar -xf "${DISTDIR}/${EXTRA_P}.tar.xz" || die
+
+ mv "${EXTRA_P}" "${S}"/tools/extra || die
+ if use test; then
+ einfo "Unpacking parts of ${LLVM_P}.tar.xz ..."
+ tar -xf "${DISTDIR}/${LLVM_P}.tar.xz" \
+ "${LLVM_P}"/lib/Testing/Support \
+ "${LLVM_P}"/utils/{lit,llvm-lit,unittest} || die
+ mv "${LLVM_P}" "${WORKDIR}"/llvm || die
+ fi
+
+ if ! use doc; then
+ einfo "Unpacking llvm-${PV}-manpages.tar.bz2 ..."
+ tar -xf "${DISTDIR}/llvm-${PV}-manpages.tar.bz2" || die
+ fi
+}
+
+src_prepare() {
+ cmake-utils_src_prepare
+ eprefixify lib/Frontend/InitHeaderSearch.cpp
+}
+
+multilib_src_configure() {
+ local llvm_version=$(llvm-config --version) || die
+ local clang_version=$(ver_cut 1-3 "${llvm_version}")
+
+ local mycmakeargs=(
+ # ensure that the correct llvm-config is used
+ -DLLVM_CONFIG="$(type -P "${CHOST}-llvm-config")"
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}"
+ -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
+ # relative to bindir
+ -DCLANG_RESOURCE_DIR="../../../../lib/clang/${clang_version}"
+
+ -DBUILD_SHARED_LIBS=ON
+ -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
+ -DLLVM_BUILD_TESTS=$(usex test)
+
+ # these are not propagated reliably, so redefine them
+ -DLLVM_ENABLE_EH=ON
+ -DLLVM_ENABLE_RTTI=ON
+
+ -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
+
+ # override default stdlib and rtlib
+ -DCLANG_DEFAULT_CXX_STDLIB=$(usex default-libcxx libc++ "")
+ -DCLANG_DEFAULT_RTLIB=$(usex default-compiler-rt compiler-rt "")
+
+ -DCLANG_ENABLE_ARCMT=$(usex static-analyzer)
+ -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer)
+ # z3 is not multilib-friendly
+ -DCLANG_ANALYZER_BUILD_Z3=$(multilib_native_usex z3)
+ )
+ use test && mycmakeargs+=(
+ -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
+ -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}"
+ )
+
+ if multilib_is_native_abi; then
+ mycmakeargs+=(
+ # normally copied from LLVM_INCLUDE_DOCS but the latter
+ # is lacking value in stand-alone builds
+ -DCLANG_INCLUDE_DOCS=$(usex doc)
+ -DCLANG_TOOLS_EXTRA_INCLUDE_DOCS=$(usex doc)
+ )
+ use doc && mycmakeargs+=(
+ -DLLVM_BUILD_DOCS=ON
+ -DLLVM_ENABLE_SPHINX=ON
+ -DCLANG_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
+ -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra"
+ -DSPHINX_WARNINGS_AS_ERRORS=OFF
+ )
+ use z3 && mycmakeargs+=(
+ -DZ3_INCLUDE_DIR="${EPREFIX}/usr/include/z3"
+ )
+ else
+ mycmakeargs+=(
+ -DLLVM_TOOL_CLANG_TOOLS_EXTRA_BUILD=OFF
+ )
+ fi
+
+ if [[ -n ${EPREFIX} ]]; then
+ mycmakeargs+=(
+ -DGCC_INSTALL_PREFIX="${EPREFIX}/usr"
+ )
+ fi
+
+ if tc-is-cross-compiler; then
+ [[ -x "/usr/bin/clang-tblgen" ]] \
+ || die "/usr/bin/clang-tblgen not found or usable"
+ mycmakeargs+=(
+ -DCMAKE_CROSSCOMPILING=ON
+ -DCLANG_TABLEGEN=/usr/bin/clang-tblgen
+ )
+ fi
+
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+ cmake-utils_src_configure
+}
+
+multilib_src_compile() {
+ cmake-utils_src_compile
+
+ # provide a symlink for tests
+ if [[ ! -L ${WORKDIR}/lib/clang ]]; then
+ mkdir -p "${WORKDIR}"/lib || die
+ ln -s "${BUILD_DIR}/$(get_libdir)/clang" "${WORKDIR}"/lib/clang || die
+ fi
+}
+
+multilib_src_test() {
+ # respect TMPDIR!
+ local -x LIT_PRESERVES_TMP=1
+ cmake-utils_src_make check-clang
+ multilib_is_native_abi && cmake-utils_src_make check-clang-tools
+}
+
+src_install() {
+ MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/clang/Config/config.h
+ )
+
+ multilib-minimal_src_install
+
+ # Move runtime headers to /usr/lib/clang, where they belong
+ mv "${ED%/}"/usr/include/clangrt "${ED%/}"/usr/lib/clang || die
+ # move (remaining) wrapped headers back
+ mv "${ED%/}"/usr/include "${ED%/}"/usr/lib/llvm/${SLOT}/include || die
+
+ # Apply CHOST and version suffix to clang tools
+ # note: we use two version components here (vs 3 in runtime path)
+ local llvm_version=$(llvm-config --version) || die
+ local clang_version=$(ver_cut 1 "${llvm_version}")
+ local clang_full_version=$(ver_cut 1-3 "${llvm_version}")
+ local clang_tools=( clang clang++ clang-cl clang-cpp )
+ local abi i
+
+ # cmake gives us:
+ # - clang-X
+ # - clang -> clang-X
+ # - clang++, clang-cl, clang-cpp -> clang
+ # we want to have:
+ # - clang-X
+ # - clang++-X, clang-cl-X, clang-cpp-X -> clang-X
+ # - clang, clang++, clang-cl, clang-cpp -> clang*-X
+ # also in CHOST variant
+ for i in "${clang_tools[@]:1}"; do
+ rm "${ED%/}/usr/lib/llvm/${SLOT}/bin/${i}" || die
+ dosym "clang-${clang_version}" "/usr/lib/llvm/${SLOT}/bin/${i}-${clang_version}"
+ dosym "${i}-${clang_version}" "/usr/lib/llvm/${SLOT}/bin/${i}"
+ done
+
+ # now create target symlinks for all supported ABIs
+ for abi in $(get_all_abis); do
+ local abi_chost=$(get_abi_CHOST "${abi}")
+ for i in "${clang_tools[@]}"; do
+ dosym "${i}-${clang_version}" \
+ "/usr/lib/llvm/${SLOT}/bin/${abi_chost}-${i}-${clang_version}"
+ dosym "${abi_chost}-${i}-${clang_version}" \
+ "/usr/lib/llvm/${SLOT}/bin/${abi_chost}-${i}"
+ done
+ done
+
+ # Remove unnecessary headers on FreeBSD, bug #417171
+ if use kernel_FreeBSD; then
+ rm "${ED}"usr/lib/clang/${clang_full_version}/include/{std,float,iso,limits,tgmath,varargs}*.h || die
+ fi
+}
+
+multilib_src_install() {
+ cmake-utils_src_install
+
+ # move headers to /usr/include for wrapping & ABI mismatch checks
+ # (also drop the version suffix from runtime headers)
+ rm -rf "${ED%/}"/usr/include || die
+ mv "${ED%/}"/usr/lib/llvm/${SLOT}/include "${ED%/}"/usr/include || die
+ mv "${ED%/}"/usr/lib/llvm/${SLOT}/$(get_libdir)/clang "${ED%/}"/usr/include/clangrt || die
+}
+
+multilib_src_install_all() {
+ python_fix_shebang "${ED}"
+ if use static-analyzer; then
+ python_optimize "${ED}"usr/lib/llvm/${SLOT}/share/scan-view
+ fi
+
+ # install pre-generated manpages
+ if ! use doc; then
+ insinto "/usr/lib/llvm/${SLOT}/share/man/man1"
+ doins "${WORKDIR}/x/y/llvm-${PV}-manpages/clang"/*.1
+ fi
+
+ docompress "/usr/lib/llvm/${SLOT}/share/man"
+ # match 'html' non-compression
+ use doc && docompress -x "/usr/share/doc/${PF}/tools-extra"
+ # +x for some reason; TODO: investigate
+ use static-analyzer && fperms a-x "/usr/lib/llvm/${SLOT}/share/man/man1/scan-build.1"
+}
+
+pkg_postinst() {
+ if [[ ${ROOT} == / && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
+ eselect compiler-shadow update all
+ fi
+
+ elog "You can find additional utility scripts in:"
+ elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/clang"
+ elog "To use these scripts, you will need Python 2.7. Some of them are vim"
+ elog "integration scripts (with instructions inside). The run-clang-tidy.py"
+ elog "scripts requires the following additional package:"
+ elog " dev-python/pyyaml"
+}
+
+pkg_postrm() {
+ if [[ ${ROOT} == / && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
+ eselect compiler-shadow clean all
+ fi
+}
diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest
index 19f607458463..349df5107b2f 100644
--- a/sys-devel/gcc/Manifest
+++ b/sys-devel/gcc/Manifest
@@ -60,7 +60,7 @@ DIST gcc-4.9.4-patches-1.3.tar.bz2 26060 BLAKE2B a61cb29111e8a9e35d810c0c557e901
DIST gcc-4.9.4-piepatches-v0.6.4.tar.bz2 14414 BLAKE2B 2eccd4f2a164fbb32d13c7fe91627a2424c0a5570fe0cac97c2bb1c95294ba3d770832da7c445f75c91791466c5139a1e13753a3a40d87ff5e44e42749adee27 SHA512 243fa272ea0e49f700a76508bab3e03bbb353bcb930581b2f87f9a47df5cd3880e29f20b71612b21190adc463849e1e6ac2a38a49c0002b562d93d436f538285
DIST gcc-4.9.4-uclibc-patches-1.0.tar.bz2 2618 BLAKE2B bff85a4088fb94fdb7a8b0bd552be98ace3e6d145889b6f8b4a1f2db2dad14342d155890ab159b42d5b55d88dfb7c392eb7f92590084e1958f6284c561da30f1 SHA512 5a1f44caa9261f4947101379628143869b31dec67fa28605e8e1f3894d4b7120c3f68ba6deb59da7a74fa906e27ab32cd3767761837dc3dfebc37865d349d6db
DIST gcc-4.9.4.tar.bz2 90097606 BLAKE2B 373ff939ea72d6c4a7f3ab899b852b4c919481af2cfe3291281d9354c58a270d2eba73a0f301d90840dfabf423c82b368e113df7a2cb6cc28b2a703b0b6eb585 SHA512 93abb78e16277454f41a8e9810f41f66c0fdffdc539a762ff6b67d3037f78db971378683fd2ebf707d1d51c059fad2161fe42d110c330027f40214b7db0f3efe
-DIST gcc-5.4.0-patches-1.8.tar.bz2 32886 BLAKE2B 85879ba552ff21e198de568b2a1f2544d6cf542174af3ca571e41a504373bbc8912a87177a413883f194d909237eeeaf65366e6b93c2b917f803b3edd10bbff5 SHA512 10c1102a37d9d485665cca606318a1da6eec2188998d340b91a371c9defa6fae285619f9cadad2546de0b7f1068e9eaf653714462d3331db3197308799927a6b
+DIST gcc-5.4.0-patches-1.9.tar.bz2 33602 BLAKE2B 2c914ad9c62eb1aa4ef941f332c1cc840b09e7aafa9eabe6598ddd6635816286e53ed142b466f10ed3616fe6bd39f4a42e2ed1d8f23596506f4f2ac3e032e467 SHA512 b83163722582d7ee92a87fde5018009f6ca4188ed77f89c34d9d35330126740e4bd54d3b4f2c2db9a1694632417b1b37a92499817a9f168a8cc6a3d8865216cf
DIST gcc-5.4.0-piepatches-v0.6.5.tar.bz2 14551 BLAKE2B 6f3de9be0990a7580785821d8c85114a1907571c06bdf3a15ad91258f7c9e8bb6a4d2ddb8615f33bedf0ad036d215507e004fc095f788e40c824ae0ab3ffbb05 SHA512 4890f0713d261982ab81a20f93c5f65193aa1dfa171e3f9e5867f0b80ec7c1e76c5a997b1a4e6f47f8ce36af54ac91125c5bff8bf6d971b7d77c65a57a40a3c0
DIST gcc-5.4.0-uclibc-patches-1.0.tar.bz2 3731 BLAKE2B fa436d1c1d9c150714092132f816740f8218dfeb4f9a6a8c830ea54d211a020f209e6fd1fcc313b2560b82c7855120053d346af72b7c12c88a7a948379dd2356 SHA512 009f34197e79c5e8c6497a0db01ac45cc657e92e56a663b4f3281661d108b2a129cd977fab5f0064f225d6812ae91e82bab22a2b10ae02c486881eeed85ec7a3
DIST gcc-5.4.0.tar.bz2 95661481 BLAKE2B bf882acfa28cc1064cddd21e25332fff6bc65505d6af9acb2e455916edbc4f6b1de9b3524867f51d7819fc4f213ce21332fbf67cf71cd6c7b96fb8907e51d570 SHA512 2941cc950c8f2409a314df497631f9b0266211aa74746c1839c46e04f1c7c299afe2528d1ef16ea39def408a644ba48f97519ec7a7dd37d260c3e9423514265b
@@ -87,7 +87,7 @@ EBUILD gcc-4.6.4.ebuild 768 BLAKE2B 9f38ecd86d75d9040e3674e4f33cc71e070c43d33a98
EBUILD gcc-4.7.4-r1.ebuild 1291 BLAKE2B 960d5072a4d03ee507cc5f7ea57f272165378daba273ec05e625dab2c38b0676f9261e46e6733649a49dc2dc50227449d480c90f8faa7af35a4cda8c2d4d7277 SHA512 44882746c9ee2920073722cf2847e717c412672e89656c6ee84e44903e935d0a84c6e7fdec327fddc8ba95cce1b8690d29847caff220f571e7d81dd556674b25
EBUILD gcc-4.8.5-r1.ebuild 1401 BLAKE2B 669ceca836569aa02247049b00d1beb820b12a8fd08bc8da703b650a01629bb6b9b9607d83152889770cc7116a2ce9e058db7d5eee5e91921ae2342a32890c40 SHA512 22f68cc6733b59e3d4f43df088fa0440ebbb40c3cfbb88e538a1ccca849f1111a83c9a2cf0d0733eb16eec956e65c5accaae1c6598a8027a497d20f3293a2934
EBUILD gcc-4.9.4.ebuild 1460 BLAKE2B 60ac80417d49608501a2956ad5b62162fc0e5ce089a8786c7482328cdf4b0d7ab8a10045c2479b3ecf602ca934796e9c32459c9b421a3444a3333b79faf3026d SHA512 c0a443c8c0629b12047f1bdad0b62a23a423f2fad4408b765d5093f8cb2a4ab54b6470f6f4e2b2d4f444817a2e71c11568fadc8d11bfdcc068a8fb4b7fd826f3
-EBUILD gcc-5.4.0-r4.ebuild 1275 BLAKE2B 22b567881a1abbccc5622724141d50c5344c3da7c02ed58d59775e1b0861d556a01bf06de3908115f47d22a204468850a8a57f9e088ad241f05bb004a6bad295 SHA512 c5638c9a78270e06db2423acd6a5a109befb0b883d569ed8978ecd6c7755ecce5ff3450a91ee2fe12a3dda88717b31364dce0e621cd475307dec18f204fc8cfe
+EBUILD gcc-5.4.0-r4.ebuild 1275 BLAKE2B f8246e6904d1d39cccacb972a9e62bebd41ac2df8f45be771be421c8a9905a03486500ac57a8b08d090569eb3f17ed3effad54e337048f1c9ce34f655c86005a SHA512 212b36ca6b5a55855ee91a82ba37c8597d34117a581135ea49ad88b9b7495549e0889a0add86f499208ec27eb81ef8ab786d2ca97d565dd60e6eb09f76ebec61
EBUILD gcc-6.4.0-r1.ebuild 525 BLAKE2B 4ef6e95caec3cd198f9eac05585a691ea6babeca2278e92b6092dc9c19a8708a4abc1ddb7af687f862b8e47cb4ed4380589a76499e45df5cab03d4b6b2620dd3 SHA512 191f06a355369bb2ad9eff92299d9d4c5c78edf7bd11d27d791fd1c8f438829ef3b0ced2478e126c9470ea198f3ccd20d2ca52e216952130788892c280c213e6
EBUILD gcc-6.4.0-r3.ebuild 535 BLAKE2B 90253d08589df1f1a953aa2ccd2aca5f999013a4cc1156968ce888113ecac32882e374fa3b9227ebb891cd4cafb9891e8f6fb6b42cf6b3784ee0f7292782177c SHA512 e6dbcb67bb9e0007255e82cac54fea22cd6f5f1f9e9011ba116c8101aeaff9647daa0918155fac8ba463c9c1c50b4c0aafcbf0249cac6cb543357edca9acd85a
EBUILD gcc-7.3.0-r3.ebuild 536 BLAKE2B 0dc56a5a86bb440c0cd3a6ab98fb03bbd7433ea196ca9b02cc9fd38b734be1753b391d59ae081d2d81efe4288968ef4b1665310a229d58f4f637e01fee347d5f SHA512 bf7fbe3e011bb7f0ceba93cdce355a793d11e9d2f5e7747109685a0109db3b4291d42c4c7f0377556617567801935416fc04a8447ed01156357565430d390271
diff --git a/sys-devel/gcc/gcc-5.4.0-r4.ebuild b/sys-devel/gcc/gcc-5.4.0-r4.ebuild
index 754dd78bb1e1..181c11eabbbd 100644
--- a/sys-devel/gcc/gcc-5.4.0-r4.ebuild
+++ b/sys-devel/gcc/gcc-5.4.0-r4.ebuild
@@ -3,7 +3,7 @@
EAPI="5"
-PATCH_VER="1.8"
+PATCH_VER="1.9"
UCLIBC_VER="1.0"
# Hardened gcc 4 stuff
diff --git a/sys-devel/lld/Manifest b/sys-devel/lld/Manifest
index 70febd809891..cd02a5db3ff6 100644
--- a/sys-devel/lld/Manifest
+++ b/sys-devel/lld/Manifest
@@ -3,12 +3,15 @@ AUX 4.0.1/0003-test-Fix-zlib-cond-when-building-stand-alone-clean-u.patch 2924 B
DIST lld-4.0.1.src.tar.xz 593796 BLAKE2B 58eb8f013a4562ef60dd7e17ddd741f434b8f0228a3d3d746ec8c30521ce667863d0b6db6565659a1b86cb91550cdaa43a27600d3a979460523faf24eac8ea3f SHA512 63bd0813094dc7fa9a95fdee93eb7b97026882a15548f819b5c67f3f0f9fa2a582d968af27ad8f802dbff1f6cd1b8c2fb26b3c7c80379488d05c4a4984d7af68
DIST lld-5.0.2.src.tar.xz 671776 BLAKE2B 11c470fb7eb4e8ddad043cff7daa714b55b862fe0a540e135db7252314caa101e3bb9063d5a7b32e0a86721cc01f602cafe087566d49ef5c6865f19ba3daf6b3 SHA512 6edafc277a5475a4b44fdf2d77bb8d0a80e8717f74c6db6c0208e0f1492a552f50640503ba8687bcd87a3d677b571dc4f9579b1e5c0bf53059c259ecbcc78c0e
DIST lld-6.0.1.src.tar.xz 787804 BLAKE2B 6b1d42bf24ca4c4dbfd060f1e40efa106e4adb73ee44a219f1568168b90b2a1430c3bd9c9e7996fda1f90423f8154678d6ee795ba4e179a0a72d86e980cbba52 SHA512 856ccc125255ab6184919f1424372f0f8a5de8477777047e2ab1a131a2ecec0caa9b5163d01409c7c510df9c794f0bc8d65cc904df2baf6462ef53bc163e002a
+DIST lld-7.0.0rc2.src.tar.xz 914612 BLAKE2B 5e2d1bef65d7f6e2c11b9276551175e38db01c0e92d43e6aead5d2f4d0d60d95d5f17c153999982dd8211cb1067397fb6ec2196022e1eef1d4d01d03b66b16b7 SHA512 401ef1a55bddf21ffe2f90bc24e2592526311e3627c4602b75605379c5975504d2ee8a1de78fc006c31df1b3c444be47f33175dce81848e8d73a86cab7c706c1
DIST llvm-4.0.1.src.tar.xz 21065652 BLAKE2B 6327eed2d1feb108440f22d2581d1ff86c10a10c29793538d8d899c7e2dc83d3f7b147d3fd4bcce2bd2bf57c071b08c624aeafe40a3e7a3914506e7751727e6c SHA512 16adc39b34ddb628f81b171119a8e2a0e9138b25011e803ef0b688e2fbea116fc4953d3a1b61b90a98a75e33619f81566b7cb06a9a2ea4d04ac5e0eb303a2d1d
DIST llvm-5.0.2.src.tar.xz 23451868 BLAKE2B b7082be2e4ad557b29b9f6869811f262adcf5c73d552faf91b339bede75cf5eab58afefa12fa779a38be71fe2b8f4ea297c3213ee4e8370cc01972c59249d91c SHA512 3588be5ed969c3f7f6f16f56a12a6af2814d3d3c960d4a36ffebb0446cc75f19220bccee7fc605f9b01f5d5c188a905a046193cc12dec42dd5922048b5c27fe1
DIST llvm-6.0.1.src.tar.xz 25306628 BLAKE2B 60232d4d22f8096b565cc8d81fea0639f24f14e8fc4f66ade69fa15479181f07f655f26dff3fa24bf105762b495da316c5c9352db234bd0af6b9c3fff6d4d881 SHA512 cbbb00eb99cfeb4aff623ee1a5ba075e7b5a76fc00c5f9f539ff28c108598f5708a0369d5bd92683def5a20c2fe60cab7827b42d628dbfcc79b57e0e91b84dd9
+DIST llvm-7.0.0rc2.src.tar.xz 28320756 BLAKE2B 92707da30fe73a6dec2614acceada06560332d3b54edeae5047543f23808cf13b24aecc9c853ccbc3341951e1fbceff85509465aa6207275fc54c75f94baff55 SHA512 4211fdbd2278ed325d3f6a1f1fa706351e768e2cd1445abf6664bed39b7b5d0c5e04514711d627f9ae1e271300f410635bb54ba004a5bece0d68450d3a1b52e4
EBUILD lld-4.0.1.ebuild 1721 BLAKE2B f3e848199052fbec33376e9630afd80c031cd729457d1e3c302d78c42a128cc7d8baa626ed294bdde19dc2ec00683a01e4e9d5d0f6d893e24a575024b9e92556 SHA512 e971195cbf8976a0bd5140c62c3c4d9a375beaf3813119342f3f8f28db9843e53dc9804cb13b6f1a49a1b7dc60cd631cd69f742faf1de56001f59230625dbef1
EBUILD lld-5.0.2.ebuild 1589 BLAKE2B ce6f2b7d0b095223600a236432966cbc44d89d781f6fe20b699aeb77b859bbcdf65bab0b1ad37df63918ce95f75c018a5eb9d56605e5d56d057e062399427271 SHA512 16b397e9d580a52fa430b07788a1c73aabfdc3dec87ed8ee12807e231c9590f637966f412a0657a574476b3b27b0a952718c61de955246cc1f585ab4526d49cc
EBUILD lld-6.0.1.ebuild 1736 BLAKE2B fc3a21c3abd1e6777644dcbef0e7ce1fd6b4b895934fd39a8c265926e24f33bd84382d4d1e9c357b06885364e75d495f79100bd039465ac3f69a410a6a5c6ce6 SHA512 7d1833c83406eae3af97546bbf4a34d7f9744bed0b541a06114f6406f73a4dfff15f6b2f3a6643b9840208999485cc4109c79052cb4d8f3fa65afff8554c81ce
+EBUILD lld-7.0.0_rc2.ebuild 1712 BLAKE2B 1b1c08c4c5a5d0840d1ac9a99de04a1a606ef4360d1733e551631fbca275db8c0affc0d3b57ceed47087997845f53542314c92c2669922d6406cbe2cb5317cec SHA512 d5a0e60a264d83289e45699b96c17efb7f5a74f73d2f75a7468653e0908e74144f8e8762a65898cad577eca9f0dbd485bf37a0e1733768b72645e267677007e8
EBUILD lld-7.0.9999.ebuild 1674 BLAKE2B 14f026b7d86c935329e9909ac9ed73519350e8a845dffd669a1c0c1f1f82c8ef9ccfa06140f25efe78ff765eed2e05a667f495007a2a40259b1e75fb798a48a3 SHA512 6d1786893ec8348de2b8efb675c13672be1d366b108f633adf1772c0b96e3f2574aaf624cd37bca76af86032431589cd3788cca76e5fc64b4aa49a86904498e1
EBUILD lld-9999.ebuild 1625 BLAKE2B 2308235d2368d9eb25a1d8ae41eaa6b182475e5d49aeb37ff5fc025cb500d268a2f935b4dbe26ed1c2ab950d082e40030a5d5d39a5e3357ca8610f927ccc0fb6 SHA512 6abdc37eef950c50164a29752ab370e08aefe9db909a4ac2ec1f9eb1e6a8b3fdca8ed776945f0e9b745bed11633b2ff33f1f00853e7fdfd22664756eba839f14
MISC metadata.xml 216 BLAKE2B fe5e49887842aa513fbf1f2e09bed09a884d531fd21bdaeb2d389e8bf590b6c0e7063f0af98f66e2db129308ab0f0804ba327c3c752bbb4c900c59ac109d99aa SHA512 3485598147c953e72e1785693a489a7e7d73d59620b76054db9c0ce95d8bfa0e8ffec29da7f7a9d73a32e5b77eac07ca3306c56a972dc57fd89d477edaebf3d5
diff --git a/sys-devel/lld/lld-7.0.0_rc2.ebuild b/sys-devel/lld/lld-7.0.0_rc2.ebuild
new file mode 100644
index 000000000000..80d0ae18c7bc
--- /dev/null
+++ b/sys-devel/lld/lld-7.0.0_rc2.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
+# (needed due to CMAKE_BUILD_TYPE != Gentoo)
+CMAKE_MIN_VERSION=3.7.0-r1
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils llvm multiprocessing python-any-r1
+
+MY_P=${P/_/}.src
+LLVM_P=llvm-${PV/_/}.src
+
+DESCRIPTION="The LLVM linker (link editor)"
+HOMEPAGE="https://llvm.org/"
+SRC_URI="https://prereleases.llvm.org/${PV/_//}/${MY_P}.tar.xz
+ test? ( https://prereleases.llvm.org/${PV/_//}/${LLVM_P}.tar.xz )"
+
+LICENSE="UoI-NCSA"
+SLOT="0"
+KEYWORDS=""
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="~sys-devel/llvm-${PV}"
+DEPEND="${RDEPEND}
+ test? ( $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]") )"
+
+S=${WORKDIR}/${MY_P}
+
+# least intrusive of all
+CMAKE_BUILD_TYPE=RelWithDebInfo
+
+python_check_deps() {
+ has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup
+ use test && python-any-r1_pkg_setup
+}
+
+src_unpack() {
+ einfo "Unpacking ${MY_P}.tar.xz ..."
+ tar -xf "${DISTDIR}/${MY_P}.tar.xz" || die
+
+ if use test; then
+ einfo "Unpacking parts of ${LLVM_P}.tar.xz ..."
+ tar -xf "${DISTDIR}/${LLVM_P}.tar.xz" \
+ "${LLVM_P}"/utils/{lit,unittest} || die
+ mv "${LLVM_P}" llvm || die
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_SHARED_LIBS=ON
+
+ -DLLVM_INCLUDE_TESTS=$(usex test)
+ )
+ use test && mycmakeargs+=(
+ -DLLVM_BUILD_TESTS=ON
+ -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}"
+ )
+
+ cmake-utils_src_configure
+}
+
+src_test() {
+ cmake-utils_src_make check-lld
+}
diff --git a/sys-devel/llvm-common/Manifest b/sys-devel/llvm-common/Manifest
index d9f1c2588b9c..66941fac0576 100644
--- a/sys-devel/llvm-common/Manifest
+++ b/sys-devel/llvm-common/Manifest
@@ -1,9 +1,11 @@
DIST llvm-4.0.1.src.tar.xz 21065652 BLAKE2B 6327eed2d1feb108440f22d2581d1ff86c10a10c29793538d8d899c7e2dc83d3f7b147d3fd4bcce2bd2bf57c071b08c624aeafe40a3e7a3914506e7751727e6c SHA512 16adc39b34ddb628f81b171119a8e2a0e9138b25011e803ef0b688e2fbea116fc4953d3a1b61b90a98a75e33619f81566b7cb06a9a2ea4d04ac5e0eb303a2d1d
DIST llvm-5.0.2.src.tar.xz 23451868 BLAKE2B b7082be2e4ad557b29b9f6869811f262adcf5c73d552faf91b339bede75cf5eab58afefa12fa779a38be71fe2b8f4ea297c3213ee4e8370cc01972c59249d91c SHA512 3588be5ed969c3f7f6f16f56a12a6af2814d3d3c960d4a36ffebb0446cc75f19220bccee7fc605f9b01f5d5c188a905a046193cc12dec42dd5922048b5c27fe1
DIST llvm-6.0.1.src.tar.xz 25306628 BLAKE2B 60232d4d22f8096b565cc8d81fea0639f24f14e8fc4f66ade69fa15479181f07f655f26dff3fa24bf105762b495da316c5c9352db234bd0af6b9c3fff6d4d881 SHA512 cbbb00eb99cfeb4aff623ee1a5ba075e7b5a76fc00c5f9f539ff28c108598f5708a0369d5bd92683def5a20c2fe60cab7827b42d628dbfcc79b57e0e91b84dd9
+DIST llvm-7.0.0rc2.src.tar.xz 28320756 BLAKE2B 92707da30fe73a6dec2614acceada06560332d3b54edeae5047543f23808cf13b24aecc9c853ccbc3341951e1fbceff85509465aa6207275fc54c75f94baff55 SHA512 4211fdbd2278ed325d3f6a1f1fa706351e768e2cd1445abf6664bed39b7b5d0c5e04514711d627f9ae1e271300f410635bb54ba004a5bece0d68450d3a1b52e4
EBUILD llvm-common-4.0.1.ebuild 641 BLAKE2B a8543b8d909c48caecbcc423f15742aa56412971320650a87742cf907b0d0d3d143e7caa54b947b592380b40d340bd1957c8df05053f6cc6f932332ce5e71eb7 SHA512 b497a3c7edd56bb634e307a8ad9acecb6f21f2f262ab5f50ee6c9b2bd4c40f0defd8df61ad6f0b0c74222468388cb18d3634e0a0d1662ed4c74d5c2e3db30188
EBUILD llvm-common-5.0.2.ebuild 839 BLAKE2B d7e6aaba7df7b7da6da5f7cc9cc165b8921758d8969f498f289c5797facfb383c7299617655d8228641e53d02a782a48b22b9c08ea9c3e8e6bc33a842fa24567 SHA512 6647d800604efe1eae94a55a632075d491c11c128bbb7a0903a6b3a93a49f071d74049b98fc4f765d5c7dae9e52de772f127d158e397e9160ef80b3b7dd09595
EBUILD llvm-common-6.0.1.ebuild 838 BLAKE2B 7c30c7e7e52916af34728e11cc6e00e6add5363974affd53e7940bcbacfb3b7a73bd17d86b29b10684535ced07c0237909473c4500e2439d5824b4cbcf924d7e SHA512 d642ce674d3a0a742e5afaeb97a5e67e5a616ddd18642777dc640c44fc65c9f5d34c5e1398483c062152e87c9ab076b5518ad3ab5d39df9d1ce1331eb2784464
+EBUILD llvm-common-7.0.0_rc2.ebuild 757 BLAKE2B a834fa8af3d16f76a6a8c79a9ae1619a578312a69e4e33f6dd44c99750c9bd1b7404216fbb562e131582eb8678dbf1155e259a5dc5a9dfa2ae5889ca6b4a43c5 SHA512 feb66e0a9ebf7eb46048f51ae6d0a37a77bcd42185e9963ace8701655ce473f40256b45901634fbfe159a947d6f6706c6d8105e3c4127fec784374a913eed240
EBUILD llvm-common-7.0.9999.ebuild 729 BLAKE2B da80aa6feb2e836dc2549dac86659c920be0b8430a70c322d7337a5771963d2cff95d497486904a5e96706002123c098ba446a50925269122c14abdb8cdae76e SHA512 b45c99bc3f1c5ec05df418b2206245159b5604c6780e497f16ce52f50def0d0e867151ee7f6811b5ac72150336f0821dc1c4e56ed1e9302d840dd23b6a651a26
EBUILD llvm-common-9999.ebuild 704 BLAKE2B bfcd46a0c3754d0c5542eb1b03c8696ef355ebe34e94c98ab6a23442a88bc6b9a8aa8d2c89b18ed0ceea47bd2adcd7df67c8d201876a04ba7816257f83c53706 SHA512 4a7fd7260e93fa3b44a565c915a8be2e207085a506018b97263740851fd78dacf88e582b73d74a06aa36de2975b751c258ceb7997a5e6ee7db4d404fbed865bf
MISC metadata.xml 216 BLAKE2B fe5e49887842aa513fbf1f2e09bed09a884d531fd21bdaeb2d389e8bf590b6c0e7063f0af98f66e2db129308ab0f0804ba327c3c752bbb4c900c59ac109d99aa SHA512 3485598147c953e72e1785693a489a7e7d73d59620b76054db9c0ce95d8bfa0e8ffec29da7f7a9d73a32e5b77eac07ca3306c56a972dc57fd89d477edaebf3d5
diff --git a/sys-devel/llvm-common/llvm-common-7.0.0_rc2.ebuild b/sys-devel/llvm-common/llvm-common-7.0.0_rc2.ebuild
new file mode 100644
index 000000000000..d0543b011f4c
--- /dev/null
+++ b/sys-devel/llvm-common/llvm-common-7.0.0_rc2.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+MY_P=llvm-${PV/_/}.src
+DESCRIPTION="Common files shared between multiple slots of LLVM"
+HOMEPAGE="https://llvm.org/"
+SRC_URI="https://prereleases.llvm.org/${PV/_//}/${MY_P}.tar.xz"
+
+LICENSE="UoI-NCSA"
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+
+RDEPEND="!sys-devel/llvm:0"
+
+S=${WORKDIR}/${MY_P}
+
+src_unpack() {
+ einfo "Unpacking parts of ${MY_P}.tar.xz ..."
+ tar -xJf "${DISTDIR}/${MY_P}.tar.xz" "${MY_P}/utils/vim" || die
+}
+
+src_configure() { :; }
+src_compile() { :; }
+src_test() { :; }
+
+src_install() {
+ insinto /usr/share/vim/vimfiles
+ doins -r utils/vim/*/
+ # some users may find it useful
+ newdoc utils/vim/README README.vim
+ dodoc utils/vim/vimrc
+}
diff --git a/sys-devel/llvm/Manifest b/sys-devel/llvm/Manifest
index d44a31274053..3cdc48ee7100 100644
--- a/sys-devel/llvm/Manifest
+++ b/sys-devel/llvm/Manifest
@@ -40,6 +40,7 @@ DIST llvm-5.0.2-manpages.tar.bz2 93977 BLAKE2B 8c5e8899e0df9d6037fb7d5c373de6492
DIST llvm-5.0.2.src.tar.xz 23451868 BLAKE2B b7082be2e4ad557b29b9f6869811f262adcf5c73d552faf91b339bede75cf5eab58afefa12fa779a38be71fe2b8f4ea297c3213ee4e8370cc01972c59249d91c SHA512 3588be5ed969c3f7f6f16f56a12a6af2814d3d3c960d4a36ffebb0446cc75f19220bccee7fc605f9b01f5d5c188a905a046193cc12dec42dd5922048b5c27fe1
DIST llvm-6.0.1-manpages.tar.bz2 102656 BLAKE2B 9088ca0bdda69f63354e61b7495df54505d5db2504bc61860a7260343722ec8cdd5e937d0843263a5bf5077b9cf386c337fa127039b996bab10d2ca5c2caeb59 SHA512 c468e97a2d5610aee9e72cb795e4e65375a079d733550f05380230fb44ba0ed67d407ad06e2340b66f13d19c06583b657e8d01fcdca2146ae43964cea309e0b3
DIST llvm-6.0.1.src.tar.xz 25306628 BLAKE2B 60232d4d22f8096b565cc8d81fea0639f24f14e8fc4f66ade69fa15479181f07f655f26dff3fa24bf105762b495da316c5c9352db234bd0af6b9c3fff6d4d881 SHA512 cbbb00eb99cfeb4aff623ee1a5ba075e7b5a76fc00c5f9f539ff28c108598f5708a0369d5bd92683def5a20c2fe60cab7827b42d628dbfcc79b57e0e91b84dd9
+DIST llvm-7.0.0rc2.src.tar.xz 28320756 BLAKE2B 92707da30fe73a6dec2614acceada06560332d3b54edeae5047543f23808cf13b24aecc9c853ccbc3341951e1fbceff85509465aa6207275fc54c75f94baff55 SHA512 4211fdbd2278ed325d3f6a1f1fa706351e768e2cd1445abf6664bed39b7b5d0c5e04514711d627f9ae1e271300f410635bb54ba004a5bece0d68450d3a1b52e4
DIST llvm-manpages-4.0.1.tar.bz2 87981 BLAKE2B 79ffd254ee5c6e09159c954913ef820f74107d4fcea5e3ed82592dc36af8fdfbf1e850547ba8bfc20aa9a5ecdd26c50329e6a6d558ae3aa5475a930789ce3e01 SHA512 d5b3213567c25db58ef364d272314a79c311a80fc21d98c09a5540af45a8190a38f489228663fe9a9b63bf0f2b952c460c4196a8fc8d6f221619f6e7ed2fc415
EBUILD llvm-3.4.2-r100.ebuild 7682 BLAKE2B 5915477569456fae852c4e6f29ffc405ced369e0cbaf9c2da54b3fa2b09237fdaa3afcda77df87534cf8c4343cf2f886e77a95e27e9861696395dbcad42fb815 SHA512 152d9d8167a153b3273a4e8c670eb50cd267354cc925584a416738de104f72bf66bc42d55a672c09e8d80c475ddcb254aff71878384df2266c112259d0822d69
EBUILD llvm-3.5.2-r100.ebuild 7837 BLAKE2B 224f7bf982e0f65a512a873e6eca951d05d4e81e7ae636e95d03308c19faea77016357207c2e4d2534d9c4de561a7ff5215f37e9d02e6c6c68aa02191f63610f SHA512 3753dab4281fa0fd5061a9b4231e6fceb567bf40ac89f3bc9b2f52164e21e1b6283d3e6bb48b72dc8dfb0c21a7567ef0661d1a820943c032bb3a6ebdff59c5c9
@@ -50,6 +51,7 @@ EBUILD llvm-4.0.1-r1.ebuild 6985 BLAKE2B e280f2ce69aeef46f6043c9ebb49205788045d7
EBUILD llvm-5.0.2.ebuild 7795 BLAKE2B d09a6cf50eb4da309e68ff7ac347da1ecea7c8f7f994cf7b69b5c98823d373a5e0e4023271a8b5b920d0eba79d5a70f865d2b4d50bf148731f93abf0991ed94d SHA512 3ce3fd983255ce1c1762c4e9186b06f26d4fc7cbf409709c9326b8ee6d9fab9e0a090560de3af87e544b4ae2ae631f55c76160de6a77109a0b02677345172ef1
EBUILD llvm-6.0.1-r1.ebuild 7997 BLAKE2B d25f6f3d2814b66db41936b808d72f625f432393619d1a7658fa959918244c00ba94f63b959f0e2feddd71b7b0f1f8fd6fa0549cedfb5a4d0962c5c3aeb52293 SHA512 e8228d1f4d63052f3b5c56f8d2d36ada7815aa1758ea0264e92eec341a87b64db97d682fdf55e4fa2da11f0caf4e349083c0040bbc7ed6eae71ea40e50c8a7b8
EBUILD llvm-6.0.1.ebuild 7820 BLAKE2B 0077de543904f588bf856b4f279d1ced9a06bfe77da0e7149469ff960b4d0c7c1e557d92074c4c0570a7054a0b14d8663d2a502678884581fb35060f8bb0397f SHA512 b1fc081efff6cc0c77230058b261c5880fe57641544b21e03ff55ab993d64c00b4df1b12a5af5fa4b5f5528a1bb0c04a3f056be2aa8b528fbac29ec484e7f35b
+EBUILD llvm-7.0.0_rc2.ebuild 7557 BLAKE2B a23e760daf51d485cc0ea9c0106ceae7775acda2439a5a7dfffc7c729f78cb3c98441951a49444b2a06110be9841442568f38c0f190d47bf15c2cccea10f8edb SHA512 393386925b0b6ab8fe66470d510d0ef563600131e92fad8487e1de7e10da10cf43b555da161a7e5add43e199f341ad68076cab858903d2c7a4b6ca10465317e1
EBUILD llvm-7.0.9999.ebuild 7322 BLAKE2B 285a4798f539dad91bb406569731bbb59c69b7e46124431a532187f0dbdc705d9440c21a68ab6258b3bc46455df7a411a10222a7d4d89593c89d0aea2b1ff9e9 SHA512 a2c0e0afa9a3618e0d021680d12d96d739b49750279fcb8b435c6566ffebc9c83ef39428d7b4c197bbff16ea0314b519ed599d78beb83dd0f10b15b8e707e1a7
EBUILD llvm-9999.ebuild 8174 BLAKE2B 2ad19fa2c09eb2114a8d072379164a6a2f6b80b8cc5250f25bf7974886eb12aa755c880f781c489190c7b623e034073b18663011d078eb643e43390e35b7ad00 SHA512 842c699901352029ff681857c0bf4a7c50f0fdf60469fa618eaf288dc16b40d723fa8a6579ecd8fa0cbc750f2cb9f64c15b27157cdc89c498c22a1071eabab73
MISC metadata.xml 2861 BLAKE2B 3102fbcb2d2fe9f173f01dddc4617115e8cd569b2ced486c45affcba348a922cf09974e1bf977f0ac5ec8bb42b9fb87b1005cebcf74120cdb96f03ad8a1ae406 SHA512 0ea8dc63287f86428f6c7cce5f5be821d16f2b473c2b8d09c2edcc1e1d3ed445e3eaba1c96aaedbd13163f61e0c1deaad9df5c410bf1e73d05ad1bace88ec95e
diff --git a/sys-devel/llvm/llvm-7.0.0_rc2.ebuild b/sys-devel/llvm/llvm-7.0.0_rc2.ebuild
new file mode 100644
index 000000000000..8497bb829a70
--- /dev/null
+++ b/sys-devel/llvm/llvm-7.0.0_rc2.ebuild
@@ -0,0 +1,259 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
+# (needed due to CMAKE_BUILD_TYPE != Gentoo)
+CMAKE_MIN_VERSION=3.7.0-r1
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils eapi7-ver flag-o-matic multilib-minimal \
+ multiprocessing pax-utils python-any-r1 toolchain-funcs
+
+DESCRIPTION="Low Level Virtual Machine"
+HOMEPAGE="https://llvm.org/"
+SRC_URI="https://prereleases.llvm.org/${PV/_//}/${P/_/}.src.tar.xz"
+# !doc? ( https://dev.gentoo.org/~mgorny/dist/llvm/${P}-manpages.tar.bz2 )"
+
+# Keep in sync with CMakeLists.txt
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
+ NVPTX PowerPC Sparc SystemZ X86 XCore )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+
+# Additional licenses:
+# 1. OpenBSD regex: Henry Spencer's license ('rc' in Gentoo) + BSD.
+# 2. ARM backend: LLVM Software Grant by ARM.
+# 3. MD5 code: public-domain.
+# 4. Tests (not installed):
+# a. gtest: BSD.
+# b. YAML tests: MIT.
+
+LICENSE="UoI-NCSA rc BSD public-domain
+ llvm_targets_ARM? ( LLVM-Grant )"
+SLOT="$(ver_cut 1)"
+KEYWORDS=""
+IUSE="debug doc gold libedit +libffi ncurses test xar xml
+ kernel_Darwin ${ALL_LLVM_TARGETS[*]}"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ sys-libs/zlib:0=
+ 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}] )
+ xar? ( app-arch/xar )
+ xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )"
+# configparser-3.2 breaks the build (3.3 or none at all are fine)
+DEPEND="${RDEPEND}
+ dev-lang/perl
+ || ( >=sys-devel/gcc-3.0 >=sys-devel/llvm-3.5
+ ( >=sys-freebsd/freebsd-lib-9.1-r10 sys-libs/libcxx )
+ )
+ kernel_Darwin? (
+ <sys-libs/libcxx-$(ver_cut 1-3).9999
+ >=sys-devel/binutils-apple-5.1
+ )
+ doc? ( dev-python/sphinx )
+ gold? ( sys-libs/binutils-libs )
+ libffi? ( virtual/pkgconfig )
+ !!<dev-python/configparser-3.3.0.2
+ ${PYTHON_DEPS}"
+# There are no file collisions between these versions but having :0
+# installed means llvm-config there will take precedence.
+RDEPEND="${RDEPEND}
+ !sys-devel/llvm:0"
+PDEPEND="sys-devel/llvm-common
+ gold? ( >=sys-devel/llvmgold-${SLOT} )"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}
+ || ( ${ALL_LLVM_TARGETS[*]} )
+ doc"
+
+S=${WORKDIR}/${P/_/}.src
+
+# least intrusive of all
+CMAKE_BUILD_TYPE=RelWithDebInfo
+
+src_prepare() {
+ # Fix llvm-config for shared linking and sane flags
+ # https://bugs.gentoo.org/show_bug.cgi?id=565358
+ eapply "${FILESDIR}"/9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch
+
+ # disable use of SDK on OSX, bug #568758
+ sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die
+
+ # User patches + QA
+ cmake-utils_src_prepare
+}
+
+multilib_src_configure() {
+ local ffi_cflags ffi_ldflags
+ if use libffi; then
+ ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi)
+ ffi_ldflags=$($(tc-getPKG_CONFIG) --libs-only-L libffi)
+ fi
+
+ local libdir=$(get_libdir)
+ local mycmakeargs=(
+ # disable appending VCS revision to the version to improve
+ # direct cache hit ratio
+ -DLLVM_APPEND_VC_REV=OFF
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}"
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+
+ -DBUILD_SHARED_LIBS=ON
+ -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
+ -DLLVM_BUILD_TESTS=$(usex test)
+
+ -DLLVM_ENABLE_FFI=$(usex libffi)
+ -DLLVM_ENABLE_LIBEDIT=$(usex libedit)
+ -DLLVM_ENABLE_TERMINFO=$(usex ncurses)
+ -DLLVM_ENABLE_LIBXML2=$(usex xml)
+ -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}"
+ # used only for llvm-objdump tool
+ -DHAVE_LIBXAR=$(multilib_native_usex xar 1 0)
+
+ # disable OCaml bindings (now in dev-ml/llvm-ocaml)
+ -DOCAMLFIND=NO
+ )
+
+# 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
+
+ use test && mycmakeargs+=(
+ -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}"
+ )
+
+ if multilib_is_native_abi; then
+ mycmakeargs+=(
+ -DLLVM_BUILD_DOCS=$(usex doc)
+ -DLLVM_ENABLE_OCAMLDOC=OFF
+ -DLLVM_ENABLE_SPHINX=$(usex doc)
+ -DLLVM_ENABLE_DOXYGEN=OFF
+ -DLLVM_INSTALL_UTILS=ON
+ )
+ use doc && mycmakeargs+=(
+ -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
+ -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
+ -DSPHINX_WARNINGS_AS_ERRORS=OFF
+ )
+ use gold && mycmakeargs+=(
+ -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include
+ )
+ fi
+
+ if tc-is-cross-compiler; then
+ local tblgen="${EPREFIX}/usr/lib/llvm/${SLOT}/bin/llvm-tblgen"
+ [[ -x "${tblgen}" ]] \
+ || die "${tblgen} not found or usable"
+ mycmakeargs+=(
+ -DCMAKE_CROSSCOMPILING=ON
+ -DLLVM_TABLEGEN="${tblgen}"
+ )
+ fi
+
+ # workaround BMI bug in gcc-7 (fixed in 7.4)
+ # https://bugs.gentoo.org/649880
+ # apply only to x86, https://bugs.gentoo.org/650506
+ if tc-is-gcc && [[ ${MULTILIB_ABI_FLAG} == abi_x86* ]] &&
+ [[ $(gcc-major-version) -eq 7 && $(gcc-minor-version) -lt 4 ]]
+ then
+ local CFLAGS="${CFLAGS} -mno-bmi"
+ local CXXFLAGS="${CXXFLAGS} -mno-bmi"
+ fi
+
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+ 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
+ cmake-utils_src_make check
+}
+
+src_install() {
+ local MULTILIB_CHOST_TOOLS=(
+ /usr/lib/llvm/${SLOT}/bin/llvm-config
+ )
+
+ local MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/llvm/Config/llvm-config.h
+ )
+
+ local LLVM_LDPATHS=()
+ multilib-minimal_src_install
+
+ # move wrapped headers back
+ mv "${ED%/}"/usr/include "${ED%/}"/usr/lib/llvm/${SLOT}/include || die
+}
+
+multilib_src_install() {
+ cmake-utils_src_install
+
+ # move headers to /usr/include for wrapping
+ rm -rf "${ED%/}"/usr/include || die
+ mv "${ED%/}"/usr/lib/llvm/${SLOT}/include "${ED%/}"/usr/include || die
+
+ LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)" )
+}
+
+multilib_src_install_all() {
+ local revord=$(( 9999 - ${SLOT} ))
+ newenvd - "10llvm-${revord}" <<-_EOF_
+ PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin"
+ # we need to duplicate it in ROOTPATH for Portage to respect...
+ ROOTPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin"
+ MANPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
+ LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )"
+ _EOF_
+
+ # install pre-generated manpages
+ if ! use doc; then
+ # (doman does not support custom paths)
+ insinto "/usr/lib/llvm/${SLOT}/share/man/man1"
+ doins "${WORKDIR}/${P}-manpages/llvm"/*.1
+ fi
+
+ docompress "/usr/lib/llvm/${SLOT}/share/man"
+}
+
+pkg_postinst() {
+ elog "You can find additional opt-viewer utility scripts in:"
+ elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/opt-viewer"
+ elog "To use these scripts, you will need Python 2.7 along with the following"
+ elog "packages:"
+ elog " dev-python/pygments (for opt-viewer)"
+ elog " dev-python/pyyaml (for all of them)"
+}
diff --git a/sys-devel/make/Manifest b/sys-devel/make/Manifest
index 2a7745d461a0..0992bd3a4edb 100644
--- a/sys-devel/make/Manifest
+++ b/sys-devel/make/Manifest
@@ -4,6 +4,8 @@ AUX make-4.2.1-glob-internals.patch 1752 BLAKE2B 97616f18dcc30dbda296942d7dfa5b1
AUX make-4.2.1-glob-v2.patch 1073 BLAKE2B bcced0694ed0206394d750452cec2c0ee8356fd8b779b9ee4d6fbf0d3dd736a0465b0f12a1629508669efb7c4ffe1d17f1aeb9b925d86e9e75a5b90119ddd5c9 SHA512 2f19578979cc5af622d6571e4d9c97e5567acd4036076e9c426a8d4505b6da191cf9b6edb1cecc0aff14efce52d3062c21d10a36d569743acdfc660007f928f4
AUX make-4.2.1-guile-2.2.patch 11401 BLAKE2B 0bd3c4d813d0205eb2a204f4819fcad3f188bd3a2656e9883643561c82cbf2a58aa22cae46429094856aea76e0396529df3c39aa37f6f69ea9fbc2379e686a62 SHA512 c1c827f1f6400a973fee87d143061c0635b1d37c6aa25b0d1c92a83dc535aff1edf515d92006d029575e10b4199be4ac290a01a8ab433c71e075852274a8ae43
AUX make-4.2.1-perl526.patch 655 BLAKE2B 98bc8bf7ec5bcdb0d726b046ae58cebada8e360087da4c212da19a4cda622c5bbc1c00782802589aee3142a62c3b8a2df18cfa8bc98c523e2eb65aaa29398a6d SHA512 3817f6efed5fbcd2bb9d1747bea4af5a197ef4aa552ab79accee5139d25241956eca669edd19eff32df2a51fee666b6bc398fb6277b1f92f6175eca2d2228d6e
+AUX make-4.2.1-pselect-non-blocking.patch 4476 BLAKE2B da96e19c42a4a98714fa1de17e32bd0acd6cb553e34622945b2ea1c7cc6269b0c033fd60a7da19b80b80469e1340f33dfeedb42508e610dd5726c461bdf7d914 SHA512 39c83ee50cc2a5e8d30c77081e3c12e2848ba558bbbb3cc9eade7087a5514aaed13cdbb23caa7d4ab2047e62a65fc638622310b53faa4ff80b20daafb2e33d7c
DIST make-4.2.1.tar.bz2 1407126 BLAKE2B fa6d43f5fd46182182a296c58dcd138a1a4568104eda760bbb3c241c023dee216789cf3128e5ac2b416cec76e1ba82d5b5e7852da12e86138a7d0865c85a42b4 SHA512 9cf00869a2f938492554f71d8cb288b5b009b3bd0489ef164f2c8f6532fc37db5c7e20af1dea288536e7c9710ee0bc6e1ddcdfc4928a8540e6e43661741825b8
EBUILD make-4.2.1-r3.ebuild 1662 BLAKE2B 996e5bc27c0e26ffef1a876e79f5dfef58cda43a6a676f45bf05aad301cb7c11e5c8cd7c786a2d751720b73f0f276edd3da826f43c6bab422a3e7a345ef1b5cf SHA512 12360a215fa6fc924bcf34bef9c544ac989b6db4cc76463e3134356a1201fc8d73a31d256cbd5b9746a381a4aa3b486b17fc386a70a80fc8f4a7a2d96ff1ee83
+EBUILD make-4.2.1-r4.ebuild 1731 BLAKE2B 05f7012267af0a47636d7a38059c9dd5996ca53242142d87f8ae43d207928c99f669d7d59ed6d7217d5701975cb0ceb2b3ad236da0c5f5253793d826332be108 SHA512 f0350f156a400b45cae90e0a2ac0f7c3f8e5ff2d2a9b627814de416ca984c55931bddd957d67536b0bcbae07096d5b0cb0bc88ae64590d70eabb129e658e0388
MISC metadata.xml 253 BLAKE2B 295e9d6d93aaa12af413972e1590c67087801cc09c9aa6b59d4606c0f4106d1dacf2baa9858559083b4c6d91beeef218d0729e8593a33788958da6d2897e8ce2 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555
diff --git a/sys-devel/make/files/make-4.2.1-pselect-non-blocking.patch b/sys-devel/make/files/make-4.2.1-pselect-non-blocking.patch
new file mode 100644
index 000000000000..61e19516f3c3
--- /dev/null
+++ b/sys-devel/make/files/make-4.2.1-pselect-non-blocking.patch
@@ -0,0 +1,172 @@
+https://bugs.gentoo.org/664632
+
+From b552b05251980f693c729e251f93f5225b400714 Mon Sep 17 00:00:00 2001
+From: Paul Smith <psmith@gnu.org>
+Date: Sat, 3 Jun 2017 16:20:51 -0400
+Subject: [SV 51159] Use a non-blocking read with pselect to avoid hangs.
+
+* posixos.c (set_blocking): Set blocking on a file descriptor.
+(jobserver_setup): Set non-blocking on the jobserver read side.
+(jobserver_parse_auth): Ditto.
+(jobserver_acquire_all): Set blocking to avoid a busy-wait loop.
+(jobserver_acquire): If the non-blocking read() returns without
+taking a token then try again.
+---
+ posixos.c | 97 ++++++++++++++++++++++++++++++++++++++++++++++-----------------
+ 1 file changed, 71 insertions(+), 26 deletions(-)
+
+diff --git a/posixos.c b/posixos.c
+index e642d7f..dbafa51 100644
+--- a/posixos.c
++++ b/posixos.c
+@@ -62,6 +62,24 @@ make_job_rfd (void)
+ #endif
+ }
+
++static void
++set_blocking (int fd, int blocking)
++{
++ // If we're not using pselect() don't change the blocking
++#ifdef HAVE_PSELECT
++ int flags;
++ EINTRLOOP (flags, fcntl (fd, F_GETFL));
++ if (flags >= 0)
++ {
++ int r;
++ flags = blocking ? (flags & ~O_NONBLOCK) : (flags | O_NONBLOCK);
++ EINTRLOOP (r, fcntl (fd, F_SETFL, flags));
++ if (r < 0)
++ pfatal_with_name ("fcntl(O_NONBLOCK)");
++ }
++#endif
++}
++
+ unsigned int
+ jobserver_setup (int slots)
+ {
+@@ -86,6 +104,9 @@ jobserver_setup (int slots)
+ pfatal_with_name (_("init jobserver pipe"));
+ }
+
++ /* When using pselect() we want the read to be non-blocking. */
++ set_blocking (job_fds[0], 0);
++
+ return 1;
+ }
+
+@@ -121,6 +142,9 @@ jobserver_parse_auth (const char *auth)
+ return 0;
+ }
+
++ /* When using pselect() we want the read to be non-blocking. */
++ set_blocking (job_fds[0], 0);
++
+ return 1;
+ }
+
+@@ -169,7 +193,10 @@ jobserver_acquire_all (void)
+ {
+ unsigned int tokens = 0;
+
+- /* Close the write side, so the read() won't hang. */
++ /* Use blocking reads to wait for all outstanding jobs. */
++ set_blocking (job_fds[0], 1);
++
++ /* Close the write side, so the read() won't hang forever. */
+ close (job_fds[1]);
+ job_fds[1] = -1;
+
+@@ -236,18 +263,12 @@ jobserver_pre_acquire (void)
+ unsigned int
+ jobserver_acquire (int timeout)
+ {
+- sigset_t empty;
+- fd_set readfds;
+ struct timespec spec;
+ struct timespec *specp = NULL;
+- int r;
+- char intake;
++ sigset_t empty;
+
+ sigemptyset (&empty);
+
+- FD_ZERO (&readfds);
+- FD_SET (job_fds[0], &readfds);
+-
+ if (timeout)
+ {
+ /* Alarm after one second (is this too granular?) */
+@@ -256,28 +277,52 @@ jobserver_acquire (int timeout)
+ specp = &spec;
+ }
+
+- r = pselect (job_fds[0]+1, &readfds, NULL, NULL, specp, &empty);
+-
+- if (r == -1)
++ while (1)
+ {
+- /* Better be SIGCHLD. */
+- if (errno != EINTR)
+- pfatal_with_name (_("pselect jobs pipe"));
+- return 0;
+- }
++ fd_set readfds;
++ int r;
++ char intake;
+
+- if (r == 0)
+- /* Timeout. */
+- return 0;
++ FD_ZERO (&readfds);
++ FD_SET (job_fds[0], &readfds);
+
+- /* The read FD is ready: read it! */
+- EINTRLOOP (r, read (job_fds[0], &intake, 1));
+- if (r < 0)
+- pfatal_with_name (_("read jobs pipe"));
++ r = pselect (job_fds[0]+1, &readfds, NULL, NULL, specp, &empty);
++ if (r < 0)
++ switch (errno)
++ {
++ case EINTR:
++ /* SIGCHLD will show up as an EINTR. */
++ return 0;
++
++ case EBADF:
++ /* Someone closed the jobs pipe.
++ That shouldn't happen but if it does we're done. */
++ O (fatal, NILF, _("job server shut down"));
+
+- /* What does it mean if read() returns 0? It shouldn't happen because only
+- the master make can reap all the tokens and close the write side...?? */
+- return r > 0;
++ default:
++ pfatal_with_name (_("pselect jobs pipe"));
++ }
++
++ if (r == 0)
++ /* Timeout. */
++ return 0;
++
++ /* The read FD is ready: read it! This is non-blocking. */
++ EINTRLOOP (r, read (job_fds[0], &intake, 1));
++
++ if (r < 0)
++ {
++ /* Someone sniped our token! Try again. */
++ if (errno == EAGAIN)
++ continue;
++
++ pfatal_with_name (_("read jobs pipe"));
++ }
++
++ /* read() should never return 0: only the master make can reap all the
++ tokens and close the write side...?? */
++ return r > 0;
++ }
+ }
+
+ #else
+--
+cgit v1.0-41-gc330
+
diff --git a/sys-devel/make/make-4.2.1-r4.ebuild b/sys-devel/make/make-4.2.1-r4.ebuild
new file mode 100644
index 000000000000..fbc399d853b2
--- /dev/null
+++ b/sys-devel/make/make-4.2.1-r4.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit flag-o-matic
+
+DESCRIPTION="Standard tool to compile source trees"
+HOMEPAGE="https://www.gnu.org/software/make/make.html"
+SRC_URI="mirror://gnu//make/${P}.tar.bz2"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="guile nls static"
+
+CDEPEND="guile? ( >=dev-scheme/guile-1.8:= )"
+DEPEND="${CDEPEND}
+ nls? ( sys-devel/gettext )"
+RDEPEND="${CDEPEND}
+ nls? ( virtual/libintl )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.82-darwin-library_search-dylib.patch
+ "${FILESDIR}"/${PN}-4.2-default-cxx.patch
+ "${FILESDIR}"/${PN}-4.2.1-perl526.patch
+ "${FILESDIR}"/${PN}-4.2.1-glob-internals.patch
+ "${FILESDIR}"/${PN}-4.2.1-pselect-non-blocking.patch
+)
+
+src_prepare() {
+ default
+ # These patches require special handling as they modify configure.ac
+ # which in turn triggers maintainer-mode when being applied the
+ # usual way.
+ eapply -Z "${FILESDIR}"/${PN}-4.2.1-glob-v2.patch \
+ "${FILESDIR}"/${P}-guile-2.2.patch
+}
+
+src_configure() {
+ use static && append-ldflags -static
+ local myeconfargs=(
+ --program-prefix=g
+ $(use_with guile)
+ $(use_enable nls)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc AUTHORS NEWS README*
+ if [[ ${USERLAND} == "GNU" ]] ; then
+ # we install everywhere as 'gmake' but on GNU systems,
+ # symlink 'make' to 'gmake'
+ dosym gmake /usr/bin/make
+ dosym gmake.1 /usr/share/man/man1/make.1
+ fi
+}
diff --git a/sys-devel/patch/Manifest b/sys-devel/patch/Manifest
index b07c1e3590f6..84b722ceb961 100644
--- a/sys-devel/patch/Manifest
+++ b/sys-devel/patch/Manifest
@@ -1,6 +1,8 @@
+AUX patch-2.7.6-fix-error-handling-with-git-style-patches.patch 3582 BLAKE2B c443abb5112283aeb20db4ccf57c0d1241bfa586ad8d54d0ff2e1ae9026174f560df37dda1fedfc39db8178db05f77a4f94827ede80982311f475f460e4ae57f SHA512 1c05cf05b7348b86c878bd464a3f2f978b3e97655bf4f9aa83732af8bfd1e82046b88db39b7ce70e33ffc00c7f09c28ba777fba3fbd9538fd76767bfc396f382
AUX patch-2.7.6-fix-test-suite.patch 2610 BLAKE2B e750283b85f0cb9d52324f28b8a03087980e8a61b16c3465914eeca65a3b800d8946a10c4dd0ab08b18c1cbc37810e55fb5c35314082a8c11e383b7d50d1bd3f SHA512 7ced1f9b937bf62131654d8a25c8d2a3f3cfe5fa8961e2e000542cce68061b10895bc0001ded898b9a43608af1f9c07903dc5c2f0a41662470d97188ed682115
DIST patch-2.7.5.tar.xz 727704 BLAKE2B a7aefd05da73329ae301f0f6429306661d72fedd59c6d35acef4828c7e5951c0ce3e8cedfc8ed9ac45d45f6eff564c2e41c0ccb95fbe1c668f63844b7069520c SHA512 6620ac8101f60c0b456ce339fa5e371f40be0b391e2e9728f34f3625f9907e516de61dac2f91bc76e6fd28a9bd1224efc3ba827cfaa606d857730c1af4195a0f
DIST patch-2.7.6.tar.xz 783756 BLAKE2B e3dd2d155a94c39cb60eafc26677e84de14c3a6d5814dff69de091ded52f21862490970254297795f2c42a0c3203f7e88a8f65bb66968f8dfd6e066bf53f2dfb SHA512 fcca87bdb67a88685a8a25597f9e015f5e60197b9a269fa350ae35a7991ed8da553939b4bbc7f7d3cfd863c67142af403b04165633acbce4339056a905e87fbd
EBUILD patch-2.7.5.ebuild 911 BLAKE2B 3eda3342754fb82470d8abbd3a9b9e3ee24b6e8ed62f8d0629fa3b6c3e248a4b522aa1a0074011108d8a74ddf4a94d00aa8d8423efd1b7755b4895438fbe3180 SHA512 f15e1b045b40506b1390a98bcf71834e153bc99d03fac764fea092ada307ac9f36444919052ff4c3a13ba3d5cb9b2afb089f0694f95a19f2636cef43cf149698
EBUILD patch-2.7.6-r1.ebuild 997 BLAKE2B 197e49254bbe881c02991ab5c1647f1445629079b242b84c5717f1255accc7ed15e85b8e2e514ba48dd89e5a86b51f791c6e323c9e615459d474f859f433cb77 SHA512 a96d34e7e6ac6fbfbf2bb742ec523f2810d605bd9b65cfc31658c4362ba46a4b31ffe46ab81184ef8f177f2bdbdaf99c532e7d7e0a3ffb635dc74d7b0906c5df
+EBUILD patch-2.7.6-r2.ebuild 1088 BLAKE2B e369a161b562b640b29a289d394480f14fc148044983d3e4e63af883582c539e71c9653e15abf1bad8395d98f1d520fe9e971a295b6e4567821f2077b40eda44 SHA512 5c4b3be3d8eba7b8580468410fdf1527ae6b977695587162eb6ff433e68139291169df4e8b2d8070435a258eae279b42765ab1f8b1afcb1ba477fde5b056f2f4
MISC metadata.xml 253 BLAKE2B 295e9d6d93aaa12af413972e1590c67087801cc09c9aa6b59d4606c0f4106d1dacf2baa9858559083b4c6d91beeef218d0729e8593a33788958da6d2897e8ce2 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555
diff --git a/sys-devel/patch/files/patch-2.7.6-fix-error-handling-with-git-style-patches.patch b/sys-devel/patch/files/patch-2.7.6-fix-error-handling-with-git-style-patches.patch
new file mode 100644
index 000000000000..a4f127dd7ce4
--- /dev/null
+++ b/sys-devel/patch/files/patch-2.7.6-fix-error-handling-with-git-style-patches.patch
@@ -0,0 +1,125 @@
+Backport for Gentoo patch-2.7.x.
+
+https://bugs.gentoo.org/664640
+
+
+Original patch:
+Author: Lubomir Rintel <lkundrak@v3.sk>
+Date: Tue Feb 27 16:52:00 2018 +0100
+Subject: Fix error handling with git-style patches
+
+When an error is encountered in output_files(), the subsequent call to
+cleanup() calls back into output_files() resulting in an infinte recursion.
+This is trivially reproduced with a git-style patch (which utilizes
+output_file_later()) that tries to patch a nonexistent or unreadable
+file (see attached test case).
+
+* src/patch.c: (output_files) clear the files_to_output list before
+iterating it, so that recursive calls won't iterate the same files.
+* tests/git-error: New test case.
+* tests/Makefile.am (TESTS): Add test case.
+
+Origin: https://lists.gnu.org/archive/html/bug-patch/2018-02/msg00010.html
+
+--- a/src/patch.c
++++ b/src/patch.c
+@@ -1938,8 +1938,12 @@ output_files (struct stat const *st)
+ {
+ gl_list_iterator_t iter;
+ const void *elt;
++ gl_list_t files;
+
+- iter = gl_list_iterator (files_to_output);
++ files = files_to_output;
++ init_files_to_output ();
++
++ iter = gl_list_iterator (files);
+ while (gl_list_iterator_next (&iter, &elt, NULL))
+ {
+ const struct file_to_output *file_to_output = elt;
+@@ -1957,8 +1961,8 @@ output_files (struct stat const *st)
+ /* Free the list up to here. */
+ for (;;)
+ {
+- const void *elt2 = gl_list_get_at (files_to_output, 0);
+- gl_list_remove_at (files_to_output, 0);
++ const void *elt2 = gl_list_get_at (files, 0);
++ gl_list_remove_at (files, 0);
+ if (elt == elt2)
+ break;
+ }
+@@ -1967,7 +1971,7 @@ output_files (struct stat const *st)
+ }
+ }
+ gl_list_iterator_free (&iter);
+- gl_list_clear (files_to_output);
++ gl_list_free (files);
+ }
+
+ /* Fatal exit with cleanup. */
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -40,6 +40,7 @@ TESTS = \
+ filename-choice \
+ git-binary-diff \
+ git-cleanup \
++ git-error \
+ garbage \
+ global-reject-files \
+ inname \
+--- a/tests/Makefile.in
++++ b/tests/Makefile.in
+@@ -1316,6 +1316,7 @@ TESTS = \
+ filename-choice \
+ git-binary-diff \
+ git-cleanup \
++ git-error \
+ garbage \
+ global-reject-files \
+ inname \
+@@ -1695,6 +1696,13 @@ git-cleanup.log: git-cleanup
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
++git-error.log: git-error
++ @p='git-error'; \
++ b='git-error'; \
++ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
++ --log-file $$b.log --trs-file $$b.trs \
++ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
++ "$$tst" $(AM_TESTS_FD_REDIRECT)
+ garbage.log: garbage
+ @p='garbage'; \
+ b='garbage'; \
+--- /dev/null
++++ b/tests/git-error
+@@ -0,0 +1,29 @@
++# Copyright (C) 2018 Free Software Foundation, Inc.
++#
++# Copying and distribution of this file, with or without modification,
++# in any medium, are permitted without royalty provided the copyright
++# notice and this notice are preserved.
++
++. $srcdir/test-lib.sh
++
++require cat
++use_local_patch
++use_tmpdir
++
++cat > f.diff <<EOF
++diff --git a/boo b/boo
++--- /dev/fd/63 2018-02-27 16:32:54.861266246 +0100
+++++ /dev/fd/62 2018-02-27 16:32:54.861266246 +0100
++@@ -1 +1 @@
++-abc
+++def
++
++EOF
++
++check 'patch .nonexistent < f.diff || echo "Status: $?"' <<EOF
++patching file .nonexistent
++Hunk #1 FAILED at 1.
++1 out of 1 hunk FAILED -- saving rejects to file .nonexistent.rej
++$PATCH: **** Can't reopen file .nonexistent : No such file or directory
++Status: 2
++EOF
diff --git a/sys-devel/patch/patch-2.7.6-r2.ebuild b/sys-devel/patch/patch-2.7.6-r2.ebuild
new file mode 100644
index 000000000000..9a9734424328
--- /dev/null
+++ b/sys-devel/patch/patch-2.7.6-r2.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit flag-o-matic
+
+DESCRIPTION="Utility to apply diffs to files"
+HOMEPAGE="https://www.gnu.org/software/patch/patch.html"
+SRC_URI="mirror://gnu/patch/${P}.tar.xz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="static test xattr"
+
+RDEPEND="xattr? ( sys-apps/attr )"
+DEPEND="${RDEPEND}
+ test? ( sys-apps/ed )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-fix-test-suite.patch
+ "${FILESDIR}"/${PN}-2.7.6-fix-error-handling-with-git-style-patches.patch
+)
+
+src_configure() {
+ use static && append-ldflags -static
+
+ local myeconfargs=(
+ $(use_enable xattr)
+ --program-prefix="$(use userland_BSD && echo g)"
+ )
+ # Do not let $ED mess up the search for `ed` 470210.
+ ac_cv_path_ED=$(type -P ed) \
+ econf "${myeconfargs[@]}"
+}