summaryrefslogtreecommitdiff
path: root/sys-devel/clang
diff options
context:
space:
mode:
Diffstat (limited to 'sys-devel/clang')
-rw-r--r--sys-devel/clang/Manifest18
-rw-r--r--sys-devel/clang/clang-10.0.0.9999.ebuild131
-rw-r--r--sys-devel/clang/clang-6.0.1.ebuild2
-rw-r--r--sys-devel/clang/clang-7.1.0.ebuild2
-rw-r--r--sys-devel/clang/clang-8.0.0.ebuild319
-rw-r--r--sys-devel/clang/clang-8.0.1.ebuild2
-rw-r--r--sys-devel/clang/clang-9.0.0.9999.ebuild (renamed from sys-devel/clang/clang-9.0.1.9999.ebuild)0
-rw-r--r--sys-devel/clang/clang-9.0.0.ebuild5
-rw-r--r--sys-devel/clang/files/9.0.0/0003-Fix-Driver-modules.cpp-test-to-work-when-build-direc.patch35
9 files changed, 337 insertions, 177 deletions
diff --git a/sys-devel/clang/Manifest b/sys-devel/clang/Manifest
index ef4e98d21130..4c77cd63e8b2 100644
--- a/sys-devel/clang/Manifest
+++ b/sys-devel/clang/Manifest
@@ -3,27 +3,31 @@ AUX 6.0.1/darwin_prefix-include-paths.patch 690 BLAKE2B cfb96eb259fb7d557d215be0
AUX 7.0.1/0001-clangd-Fix-detecting-atomics-in-stand-alone-builds.patch 1244 BLAKE2B 0a5f0b4af299ae49b13eac0e6ff06ce84264baf05bc09437b481830d4cfafab68ec2a3adf5814fcd8efbe91770e2dda0ce5fa5e10fcefc10d6fbe2c17ca067b6 SHA512 cec3d531b7d6121f7fc5da731d7d89d03a7d1a38e32abd5d7812790ffa62e6d3b9f18084983702203502905d447ad89bd4e2a7f3ca51ee7d696ebe623b035ac6
AUX 9.0.0/0001-clang-unittest-Import-LLVMTestingSupport-if-necessar.patch 1324 BLAKE2B 83a02461f65f2fc660e2ad0a07ec0d75c56da04e7ad849bdb80aeec9200b2cdbfd5f283710294bfa0f4abf26bfa24da2961ac9decd9d50d9d51fbb148fc5d573 SHA512 03669ad470bd85237673c217aea0deca6080d374e2b31531c17da6594959c323dde7e187fcc3ba6ae387b03a9252d89d75caafb8ef715b49b9ba9f2cdd5c242d
AUX 9.0.0/0002-Initialize-all-fields-in-ABIArgInfo.patch 1496 BLAKE2B c35f07b4f97152f9a4885431d0e18066d9223b1f29853d558d39b35a791c4283d5d5fe8000dcb5d2f0ac1e1f1e2aaeb17a7a886b4b210a477170b01906d7274c SHA512 f57e1126578f88c3d53e15148d4e8cee41b58ff69a2a541a3b9ea55d70cabeb640e727e8d967e92123d457e058e0d140a4723d67468f426f217e43574d83e7b1
-AUX 9.0.0/0003-Fix-Driver-modules.cpp-test-to-work-when-build-direc.patch 1034 BLAKE2B 507ffab1a094b50c8b514044f02d5b8860310c61e62aa82a8c8f4c85c0a066c528ea6e4c40c5b35ea00e0b759d3c8450fd55a0704a415eb50730c82490edac7f SHA512 7fabf33ae58988d1dca01d3c456c14b10189b417cfb812b2825185c634eff6b771c3bfe8ae73d50f111b0d82b914f32160fd98cbdd1250f416ece8003ed2de36
DIST cfe-6.0.1.src.tar.xz 11905772 BLAKE2B abb60e9f9827d1d8a24f0aaf8a1d1e32979293cc401258d230f93290e633645747fd0344af189ac7081b06be2cada503364e1e432b37110ade4b3578e40c7605 SHA512 f64ba9290059f6e36fee41c8f32bf483609d31c291fcd2f77d41fecfdf3c8233a5e23b93a1c73fed03683823bd6e72757ed993dd32527de3d5f2b7a64bb031b9
DIST cfe-7.1.0.src.tar.xz 12487872 BLAKE2B ca6ec9e45b94823de1dabf9e68f0c97cdd40b5d2a5e5e15d4b2393f6d7fbdee72a541b957cc22ce4cb726d8ee7190228320941d5713aeb59695673b9e9070ceb SHA512 1cd0b80f32aa4de1118c0c676ba96b1fc78b7ff929b01b6589dfe9b4669e599ac8cfb8f5a0abcd3487594193a7dec06b29530ec3fc03042c20a160f0477a79fd
+DIST cfe-8.0.0.src.tar.xz 12868468 BLAKE2B 3cb96c95c4d9713feb7011e4f1ca24be3e7f6c9b458f6cd9e6905f99737312ca44cb701ed5871e47dd583145e5898d53a65c4cda6456af3d4ca31b670ed84409 SHA512 98e540222719716985e5d8439116e47469cb01201ea91d1da7e46cb6633da099688d9352c3b65e5c5f660cbbae353b3d79bb803fc66b3be663f2b04b1feed1c3
DIST cfe-8.0.1.src.tar.xz 12810056 BLAKE2B 88cee0b6daa477ca0473c76efc45beb634f6194ecd3f45aaec3791e26b203c5dbd33c649435e0d97924096a72c727d76915bffc0b7ea305f24d5e5f06389c4a0 SHA512 1227b2d32052c70b4b494659849000188fce46fc31a71f3352ba8457ac0b0b17e4bc7c8589874c8586d55aa808ee6c1fceb7df501aafa33599f8df7bfd2b791d
DIST cfe-9.0.0.src.tar.xz 13533024 BLAKE2B 61fa57245d54930d09c2ff6024cdefb35592f7d1c644657b0aec9e7cc2dca29b45f08b8a2b716812025a438841e83ac3e30bb6f051498aa860533995ef7757b1 SHA512 83fcca5499102b375e620cdac97d75e6111ebed4ef10240859ddd8a88bc5b022703739d2eae0d8693c91892ad11fc6b531c0dbee62fbce68d3be595b94f0b1fe
DIST clang-tools-extra-6.0.1.src.tar.xz 757256 BLAKE2B 1d91d7459a34e7251007af91db1803ee6d04f1ef3e0fcf134a7e0d1d3456b094a80339ee60db3f0bdd12961f3a05caee7edfc5c6b9c48d49cd55a5dc3c102c3a SHA512 cf29d117b6dabcb7a8e5f6dab5016ce5a5c8f475679001a43fd5c935f2c368f37cdef50aae2080a1e4524f647f6d83458d4a5dec5b45d03fb374f463caf7c3f5
DIST clang-tools-extra-7.1.0.src.tar.xz 901328 BLAKE2B 20865cf188cf08e4eae969d1083d9d69f57159c3dceb71e3e00a3f4dd96814b99e25fe633eb46801923d64cc9f884da24a417c21af71f0b3535bda0cce7d73da SHA512 8c22136324808b42601915e8163e06a90db078693f9e12369050bca6bab8cb971efaddcda82c5abf08e67ba7a5be1ac32e1bef0aff29a1b433e80eca8eba3e7b
+DIST clang-tools-extra-8.0.0.src.tar.xz 1996156 BLAKE2B 26c839669ce4cf531a56e8527c9d507ce458861c00aaf563fa5e58cfa2fa3897d820643746802198c8e77c9e46fc8f4b833fc3746b32d8adc0d4a09dbe3ace7c SHA512 434e4cb7b76f89b0a0af25f05f32f2f2e8edb9e9f14547be845df75f5032c1d9dbf475be408bb989c476ec667c10af54a15d40e42559b05e52d24c5fd416b517
DIST clang-tools-extra-8.0.1.src.tar.xz 1994068 BLAKE2B 7d312c1a958d9c5b24515067cbb1db3a92b34cdf77c2345c08ef2f327d2ae4ca7f05252d72ede6569e25cda34225963a8d415cc64279e39d542449ba56eae9c9 SHA512 d39962c30ee9d8a1679d8007009b48dea2c8aaeb283bed781a9e22a1a57b8186c2cfe058da046658882ace1c84a30ddf9b4cb75bce988891189e8423b6c6a72c
DIST clang-tools-extra-9.0.0.src.tar.xz 2183436 BLAKE2B d9682cc615ddeb2ac4fba665089658b423bea085e935c54f1e8c8c71807a9c3c910aee60652accbb24fc4dae262c7877fc7c2f7e098b118f7dc3eef9c7e5941e SHA512 70fd5cdeb8d371e5bbc369bdea3b94a1e3f450e1fdc109a2328d75b30a09c56fbed31678e211172e0a1fc1ff82c9ab4dfea4238be2cc0b82598f71ce9b7ab7d3
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.1.0-manpages.tar.bz2 120786 BLAKE2B b52a7afe7c5c170894e910ef2c651a5f38f0bd41147a2c63dc5b8a92f0ec37512e913e68efce51e1643e8f20cf0f3f088d31d19c541d2ff361ecb7d89b234b6c SHA512 78a526d889a8e62accf422655acbb4d17e3c22b0f0830003db0068b3c01c367ac32ce4f4be4cbb2966274440865557c25795205af2a59a054a6f6964294d289f
DIST llvm-7.1.0.src.tar.xz 28313784 BLAKE2B b78d9a7fc5ef6e352e77d339e5c4eef5ccedf67c05e7abd949e72619aa8a5ed65e7e5e2008354be8e7916d75581719b99f34227838fcc86c5d0080913c2fb22c SHA512 a7dbd5693d1f2dae6b6e52893a100f9349cbfcfb25c5fdcad46364acbff0dbd3573f8fbc026c68eb9fd56335198aa94b866cc3dd7ea0cbd2cbfb5f8fe3444a7a
+DIST llvm-8.0.0-manpages.tar.bz2 140542 BLAKE2B e6c58865ace0b8848ffe825e931a639daa5b22099317b3263acf8df4b8d5e1e97ed54a85b9241e6874b112c67114bda5617c3014c3bc1430c179bdf389e77269 SHA512 198f5bde8c610aa7953b325fc29c2bebe5c3d81469af6273975ed32cd739a9936813fca7399acc49809c322cf73fbdaa77a834f889bd78fe4672024965ea47fb
+DIST llvm-8.0.0.src.tar.xz 30503732 BLAKE2B d89bdeb0ec7d885e49cfe5ae025da84f00502d409710c0807a3cdd58dbd47c50cf6a635593569483150f7f2ecb0de0310bd6785cb7625219bf9f6224a0d68e1c SHA512 1602343b451b964f5d8c2d6b0654d89384c80d45883498c5f0e2f4196168dd4a1ed2a4dadb752076020243df42ffe46cb31d82ffc145d8e5874163cbb9686a1f
DIST llvm-8.0.1-manpages.tar.bz2 140915 BLAKE2B 13ac9e172728d643dac1d12ac06909b6db3dd9a1a380a92a07867e3cb835f94b265da5d75c4712b5409405a65795d2cb6b32da4098e38cbb95d7023b56bcbbc1 SHA512 23994a2374659fbbf8d9b5160f4d77e9be7c4c9fc14963e8186bbede78b0ee9257f6b6a9c484bc75d72443d65bb24e598841e64af500336283de0f454d6a2073
DIST llvm-8.0.1.src.tar.xz 30477608 BLAKE2B 4319c837b36111401e3b0f9659b8d875c89463bcc7816df1aefe1e3ff989860bbaa92504718f8e15416cfd9f3491c13777cd5cb661877b237b342b0e515b93f5 SHA512 82e120be5cabdfd5111aebbea68a663fe229c8861d73802d6ab09a3bf48f60de333e07e61f8fb61beaa14ac2bea24fcd74fa6f761acaf62469f536b79fcb1e16
DIST llvm-9.0.0-manpages.tar.bz2 158546 BLAKE2B eed6235698a0b5993affe305f7fd22cd4cf444adf931275a1685f2049a5f17cf2933907577d9ce142348a3c579769b0436aa2b5a9a953958504125a8c3e83b7d SHA512 64c8d18061eb2870b379a1df485be0b61eac07cb10b3f97347b54b2ee326faa63437ca04466776be282e120dd3f6147e14fffdd38ca370db85748fe5eb54d764
DIST llvm-9.0.0.src.tar.xz 32994768 BLAKE2B 7f09bff9bcada95ab9c920c78aef92b57e665d9188bab39c734084ceb03a801c942fed48ea77fabeeb6110c648cb69363c659a6ce93ebf67dbba5c187219b13b SHA512 1bb3341e1d231559b948f1505b33c2e2e03989f9b8bbfef0e0cdaff5ac43f85574c9ec5ac53399b914f497d6899425d861411024e8d7e1d1a338c1c6951ac658
-EBUILD clang-10.0.0.9999.ebuild 11554 BLAKE2B 4a5f81509bd9ae901436e3a834fb2dae840f84655e1f2f792922ba276f0139db665e07f85de23c5bcecb68c80f57442c7766ff7a9e74e2bbe68bfc15f2b45d9f SHA512 517816a43844239a3e0bf7f81ab30b078f99f238c298d6b83a282f10eccc28faf2f82863980dbacdb53942785ca9cd82414d105332acabef065043547d8bc776
-EBUILD clang-6.0.1.ebuild 10260 BLAKE2B caa01b8f386069bccd3bc003172b158cb4c82ceb0014cb22c4065f0b8fb257c0a1d418f94b680b86e6386493d68f0192d6a357e98120daa4014283b627394aee SHA512 0efc198053d9f828ef0cc506f3ea731f0e440f2433dcbe3da59673fb7cdb33e746620515585c6d866304087038ce1b70b4b9f35be3cb1cddaf5f413d58e74891
-EBUILD clang-7.1.0.ebuild 10342 BLAKE2B bee118a01e7f6a123406d809e3e87f8f14bdac8060ee9cf0bbd21c0ab99493d215f057d42ce1a50aabab4faab15f5d79313e2123c2815c9346263231ddb18430 SHA512 924d9a98c439918cb1f03da5cda2b87dd412032209752aeaf1e1a69d5bbf8c01f403505681f43c8a08b731aa8a644e35a754bb18624da4d8e4ca5dfebeb17a18
-EBUILD clang-8.0.1.ebuild 10240 BLAKE2B 564acf26ff06469442f634c60cf2ee887f13f8d720f6ee9f104f84057c588e56b5b1e3bd0e3104eff4f25b52d6a69467b95e8f409e67be83887ef41426e8c33d SHA512 fd367c55c9a9f33d765e7d520806802b7e0de6e61eda33b46d1a5a24906e4c6a6295b2467c82d6001db6519be2609097f09ddb11e4b14165a890d85cfbb1ddb0
-EBUILD clang-9.0.0.ebuild 10156 BLAKE2B c2680af0efb87aca3b7b549df42ea1e8d84a3c7df66f71a3b3d63710f8182f14ae744ce8a51bb1f6eb24564a88372d96a517620cf72d87188cb0cdf23b21d740 SHA512 e0d64fc75df9bce9727f825b6cb197670c950cc3aea68a8d1566a86818c912a8ce9bbadef52d1c671a7c6dee307deeb9662e6447f9c55d5b5067ebeb910cf38c
-EBUILD clang-9.0.1.9999.ebuild 9531 BLAKE2B 339c3275077f63069f74ddbc3a9b7aa2e1b48ea0677fd18aeb996b414119d4371f5f226a1e248e10919e798244a7546c557e74fe4170bf93d69e2b502743bf80 SHA512 4bf2f4ab2ca5ab62ba2795089cc9c329e59a1a9c3c3094c770120d94625be74ced3f135b33b4898f69866754f16f6081b76169e0172a80a9ece3f9b07d0c83fc
+EBUILD clang-10.0.0.9999.ebuild 9244 BLAKE2B d2784277681be90d8e86b2891a593bbb56ab7044ebae10ff5253137a43713c5b8c4b34890e694ede4363fe96340ca6345868f1bba36eff52f33f93b63e31ce55 SHA512 59f0fa5c0420f33a65b3ad55533efbff5cd7535c417368f4abcc24533890a19ce5765af408894681b255066aa150ffde0d92453a0d597f8265cefc1605b0df1c
+EBUILD clang-6.0.1.ebuild 10272 BLAKE2B 7f179071a60dad773c4fedd95aae8c7529e84f891f6001808576bf6523baebe92eee713522c03accdcbeff76afc0c0a1329e159eef2cd307a2ff4ba6b598edc1 SHA512 508dc2b7c6758f63e931f83ec851ccf6e07433719e4e8dcb1f366c736bd22cb4fc19723dc2f05f7ff90f1828fc41a71d808d4f7f8332625134294516dc52ce79
+EBUILD clang-7.1.0.ebuild 10354 BLAKE2B 959fd75381491d151b8fde4929210f2251d25cab58fc8733ce0431ec3c15b738679246f98f6d3c67d748f43a45698d633bfbc2968a0482ebecc84d32463fc848 SHA512 f090d4779ed264b6a9fb7864a5f6b924d7d7e9c73864cc11023377f847a5ac6c55439339c1b688874daf556d6ce8d9d93e4140e5233c7c41a1546dc4759111f4
+EBUILD clang-8.0.0.ebuild 10158 BLAKE2B 5864138aa69d8cb51fd0d378516aa83a50b30fa57945a95e159740f42949ccc4f9551c2a851170cbdacd2e93982a76fb34f883657c48d4839bbe865b906fbe01 SHA512 f4eca2292f261751a243bb9b50a2b8aaabb6e0f331ab50ebf88e6b1bc5b172c0e0a0b4efa0db87282d8cbfd0f13942e95f986d75ce9ee0d935a75194b7a1a313
+EBUILD clang-8.0.1.ebuild 10252 BLAKE2B 3e22b49aa6e925a418097d7827551f81cef6e801739b3ea111569151a62ef58adcc1af3e9a1efff199e4207c000c0c5f1642665e98842575dac61132518ec9f6 SHA512 fd3f02ce39380673352df852010c657ed315c3d3a43089e060e37fac2e172368573c02fadaca3269c41a2be35c8a09d9eb2c44b4c03e21d8f01b31cb1c90c066
+EBUILD clang-9.0.0.9999.ebuild 9531 BLAKE2B 339c3275077f63069f74ddbc3a9b7aa2e1b48ea0677fd18aeb996b414119d4371f5f226a1e248e10919e798244a7546c557e74fe4170bf93d69e2b502743bf80 SHA512 4bf2f4ab2ca5ab62ba2795089cc9c329e59a1a9c3c3094c770120d94625be74ced3f135b33b4898f69866754f16f6081b76169e0172a80a9ece3f9b07d0c83fc
+EBUILD clang-9.0.0.ebuild 9988 BLAKE2B 88cd6857f6ea4ae9ad4202f611cf9f42c98844ac54bcf3b257098d0f2a937a76cfb8c692e7a43ef9f0505e75e6dd1c81ca8b38f2d43918587a2c785e84ee533c SHA512 e6a9b42ce02d386e786574362ac5dc9e820918e683b44384bc67761157a904999946a9db07389248ee0f6fdd786a368265acf3b31a7e22f53a828ff3a2c17b0c
MISC metadata.xml 1377 BLAKE2B 8b580be2bcaddb98c2d2b8defd1730c69a7478248f7d241dd00f533d36d750a3f45c1e55161a4fd2731b6211a22c658046cf8ad5a87028c32928dfe0cd4a862f SHA512 b08ea2bd3454abb09abfa92b62e6dae4f4e10db0266c1e4895bef0f6a2d2fadea0b36b9b861831389413e1cca0e3c412b4cf474fc8c4170902b40deeab06686a
diff --git a/sys-devel/clang/clang-10.0.0.9999.ebuild b/sys-devel/clang/clang-10.0.0.9999.ebuild
index aa2c3a2ba5d8..88157e2c8865 100644
--- a/sys-devel/clang/clang-10.0.0.9999.ebuild
+++ b/sys-devel/clang/clang-10.0.0.9999.ebuild
@@ -21,7 +21,7 @@ EGIT_REPO_URI="https://git.llvm.org/git/clang.git
https://github.com/llvm-mirror/clang.git"
# Keep in sync with sys-devel/llvm
-ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC AVR )
+ALL_LLVM_EXPERIMENTAL_TARGETS=( AVR Nios2 )
ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore
"${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}" )
@@ -104,126 +104,6 @@ src_unpack() {
git-r3_checkout "${EGIT_REPO_URI}" "${S}"
}
-check_distribution_components() {
- if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]]; then
- local all_targets=() my_targets=() l
- cd "${BUILD_DIR}" || die
-
- while read -r l; do
- if [[ ${l} == install-*-stripped:* ]]; then
- l=${l#install-}
- l=${l%%-stripped*}
-
- case ${l} in
- # meta-targets
- clang-libraries|distribution)
- continue
- ;;
- # tools
- clang|clangd|clang-*)
- ;;
- # static libraries
- clang*|findAllSymbols)
- continue
- ;;
- esac
-
- all_targets+=( "${l}" )
- fi
- done < <(ninja -t targets all)
-
- while read -r l; do
- my_targets+=( "${l}" )
- done < <(get_distribution_components $"\n")
-
- local add=() remove=()
- for l in "${all_targets[@]}"; do
- if ! has "${l}" "${my_targets[@]}"; then
- add+=( "${l}" )
- fi
- done
- for l in "${my_targets[@]}"; do
- if ! has "${l}" "${all_targets[@]}"; then
- remove+=( "${l}" )
- fi
- done
-
- if [[ ${#add[@]} -gt 0 || ${#remove[@]} -gt 0 ]]; then
- eqawarn "get_distribution_components() is outdated!"
- eqawarn " Add: ${add[*]}"
- eqawarn "Remove: ${remove[*]}"
- fi
- cd - >/dev/null || die
- fi
-}
-
-get_distribution_components() {
- local sep=${1-;}
-
- local out=(
- # common stuff
- clang-cmake-exports
- clang-headers
- clang-resource-headers
- libclang-headers
-
- # libs
- clang-cpp
- libclang
- )
-
- if multilib_is_native_abi; then
- out+=(
- # common stuff
- bash-autocomplete
- libclang-python-bindings
-
- # tools
- c-index-test
- clang
- clang-format
- clang-import-test
- clang-offload-bundler
- clang-offload-wrapper
- clang-refactor
- clang-rename
- clang-scan-deps
- diagtool
- hmaptool
-
- # extra tools
- clang-apply-replacements
- clang-change-namespace
- clang-doc
- clang-include-fixer
- clang-move
- clang-query
- clang-reorder-fields
- clang-tidy
- clangd
- find-all-symbols
- modularize
- pp-trace
- )
-
- use doc && out+=(
- docs-clang-html
- docs-clang-man
- docs-clang-tools-html
- docs-clang-tools-man
- )
-
- use static-analyzer && out+=(
- clang-check
- clang-extdef-mapping
- scan-build
- scan-view
- )
- fi
-
- printf "%s${sep}" "${out[@]}"
-}
-
multilib_src_configure() {
local llvm_version=$(llvm-config --version) || die
local clang_version=$(ver_cut 1-3 "${llvm_version}")
@@ -234,10 +114,7 @@ multilib_src_configure() {
# relative to bindir
-DCLANG_RESOURCE_DIR="../../../../lib/clang/${clang_version}"
- -DBUILD_SHARED_LIBS=OFF
- -DCLANG_LINK_CLANG_DYLIB=ON
- -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components)
-
+ -DBUILD_SHARED_LIBS=ON
-DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
-DLLVM_BUILD_TESTS=$(usex test)
@@ -300,8 +177,6 @@ multilib_src_configure() {
# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
cmake-utils_src_configure
-
- multilib_is_native_abi && check_distribution_components
}
multilib_src_compile() {
@@ -374,7 +249,7 @@ src_install() {
}
multilib_src_install() {
- DESTDIR=${D} cmake-utils_src_make install-distribution
+ cmake-utils_src_install
# move headers to /usr/include for wrapping & ABI mismatch checks
# (also drop the version suffix from runtime headers)
diff --git a/sys-devel/clang/clang-6.0.1.ebuild b/sys-devel/clang/clang-6.0.1.ebuild
index 32c29fff2574..1fc78008da86 100644
--- a/sys-devel/clang/clang-6.0.1.ebuild
+++ b/sys-devel/clang/clang-6.0.1.ebuild
@@ -31,7 +31,7 @@ LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
LICENSE="UoI-NCSA"
SLOT="$(ver_cut 1)"
-KEYWORDS="amd64 arm64 ~ppc64 x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
+KEYWORDS="amd64 arm64 ~ppc64 x86 ~amd64-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
IUSE="debug default-compiler-rt default-libcxx doc +static-analyzer
test xml z3 kernel_FreeBSD ${ALL_LLVM_TARGETS[*]}"
RESTRICT="!test? ( test )"
diff --git a/sys-devel/clang/clang-7.1.0.ebuild b/sys-devel/clang/clang-7.1.0.ebuild
index acd373adf62e..53f44663c4b8 100644
--- a/sys-devel/clang/clang-7.1.0.ebuild
+++ b/sys-devel/clang/clang-7.1.0.ebuild
@@ -31,7 +31,7 @@ LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
LICENSE="UoI-NCSA"
SLOT="$(ver_cut 1)/$(ver_cut 1-2)"
-KEYWORDS="amd64 arm arm64 ~ppc64 x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
+KEYWORDS="amd64 arm arm64 ~ppc64 x86 ~amd64-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
IUSE="debug default-compiler-rt default-libcxx doc +static-analyzer
test xml z3 kernel_FreeBSD ${ALL_LLVM_TARGETS[*]}"
RESTRICT="!test? ( test )"
diff --git a/sys-devel/clang/clang-8.0.0.ebuild b/sys-devel/clang/clang-8.0.0.ebuild
new file mode 100644
index 000000000000..b06ed7f3a681
--- /dev/null
+++ b/sys-devel/clang/clang-8.0.0.ebuild
@@ -0,0 +1,319 @@
+# Copyright 1999-2019 Gentoo Authors
+# 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://releases.llvm.org/${PV/_//}/${MY_P}.tar.xz
+ https://releases.llvm.org/${PV/_//}/${EXTRA_P}.tar.xz
+ test? ( https://releases.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 WebAssembly X86 XCore )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
+
+LICENSE="UoI-NCSA"
+SLOT="$(ver_cut 1)"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
+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-4.7.1:0=[${MULTILIB_USEDEP}] )
+ )
+ 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[*]} )"
+
+# 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_ENABLE_Z3_SOLVER=$(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/clang/clang-8.0.1.ebuild b/sys-devel/clang/clang-8.0.1.ebuild
index 63ed45a9fbb5..3dbe5eb763a4 100644
--- a/sys-devel/clang/clang-8.0.1.ebuild
+++ b/sys-devel/clang/clang-8.0.1.ebuild
@@ -31,7 +31,7 @@ LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
LICENSE="UoI-NCSA"
SLOT="$(ver_cut 1)"
-KEYWORDS="amd64 arm arm64 ppc64 x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
+KEYWORDS="amd64 arm arm64 ppc64 x86 ~amd64-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
IUSE="debug default-compiler-rt default-libcxx doc +static-analyzer
test xml z3 kernel_FreeBSD ${ALL_LLVM_TARGETS[*]}"
RESTRICT="!test? ( test )"
diff --git a/sys-devel/clang/clang-9.0.1.9999.ebuild b/sys-devel/clang/clang-9.0.0.9999.ebuild
index 848de712e241..848de712e241 100644
--- a/sys-devel/clang/clang-9.0.1.9999.ebuild
+++ b/sys-devel/clang/clang-9.0.0.9999.ebuild
diff --git a/sys-devel/clang/clang-9.0.0.ebuild b/sys-devel/clang/clang-9.0.0.ebuild
index 2eabbee087ce..4a4b325876a8 100644
--- a/sys-devel/clang/clang-9.0.0.ebuild
+++ b/sys-devel/clang/clang-9.0.0.ebuild
@@ -35,7 +35,7 @@ LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT"
SLOT="$(ver_cut 1)"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-fbsd ~amd64-linux"
IUSE="debug default-compiler-rt default-libcxx doc +static-analyzer
test xml kernel_FreeBSD ${ALL_LLVM_TARGETS[*]}"
REQUIRED_USE="${PYTHON_REQUIRED_USE}
@@ -73,9 +73,6 @@ PATCHES=(
# fix build with gcc-9.0.0
# https://bugs.llvm.org/show_bug.cgi?id=40547
"${FILESDIR}"/9.0.0/0002-Initialize-all-fields-in-ABIArgInfo.patch
- # fix silly test failure due to '.src' in path
- # https://bugs.llvm.org/show_bug.cgi?id=42979
- "${FILESDIR}"/9.0.0/0003-Fix-Driver-modules.cpp-test-to-work-when-build-direc.patch
)
# Multilib notes:
diff --git a/sys-devel/clang/files/9.0.0/0003-Fix-Driver-modules.cpp-test-to-work-when-build-direc.patch b/sys-devel/clang/files/9.0.0/0003-Fix-Driver-modules.cpp-test-to-work-when-build-direc.patch
deleted file mode 100644
index 250302da8e4c..000000000000
--- a/sys-devel/clang/files/9.0.0/0003-Fix-Driver-modules.cpp-test-to-work-when-build-direc.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From f18d747107de3504ceac73abc1ec351fe8f58c95 Mon Sep 17 00:00:00 2001
-From: Tom Stellard <tstellar@redhat.com>
-Date: Mon, 30 Sep 2019 23:42:17 +0000
-Subject: [PATCH] Fix Driver/modules.cpp test to work when build directory name
- contains '.s'
-
-Reviewers: dyung, rsmith, hansw
-
-Subscribers: mati865, mgorny, cfe-commits
-
-Tags: #clang
-
-Differential Revision: https://reviews.llvm.org/D66176
-
-llvm-svn: 373275
----
- clang/test/Driver/modules.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/clang/test/Driver/modules.cpp b/clang/test/Driver/modules.cpp
-index 7c549c1300f..4f4e3a41400 100644
---- a/test/Driver/modules.cpp
-+++ b/test/Driver/modules.cpp
-@@ -15,7 +15,7 @@
- // RUN: %clang -std=c++2a %t/module.pcm -S -o %t/module.pcm.o -v 2>&1 | FileCheck %s --check-prefix=CHECK-COMPILE
- //
- // CHECK-COMPILE: -cc1 {{.*}} {{-emit-obj|-S}}
--// CHECK-COMPILE-SAME: -o {{.*}}.{{pcm.o|s}}
-+// CHECK-COMPILE-SAME: -o {{.*}}module{{2*}}.pcm.o
- // CHECK-COMPILE-SAME: -x pcm
- // CHECK-COMPILE-SAME: {{.*}}.pcm
-
---
-2.23.0
-