diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-09-25 20:21:45 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-09-25 20:21:45 +0100 |
commit | c719fdcee603a5a706a45d10cb598762d56a727d (patch) | |
tree | 620cbf137661399a3fb1eff92914204f9a970713 /sys-devel/clang | |
parent | cc4618c9ba3d974948ebf340b542d8cb01db2f55 (diff) |
gentoo resync : 25.09.2021
Diffstat (limited to 'sys-devel/clang')
-rw-r--r-- | sys-devel/clang/Manifest | 11 | ||||
-rw-r--r-- | sys-devel/clang/clang-13.0.0.9999.ebuild | 18 | ||||
-rw-r--r-- | sys-devel/clang/clang-13.0.0_rc2.ebuild | 18 | ||||
-rw-r--r-- | sys-devel/clang/clang-13.0.0_rc3.ebuild | 18 | ||||
-rw-r--r-- | sys-devel/clang/clang-13.0.0_rc4.ebuild | 426 | ||||
-rw-r--r-- | sys-devel/clang/clang-14.0.0.9999.ebuild | 18 |
6 files changed, 445 insertions, 64 deletions
diff --git a/sys-devel/clang/Manifest b/sys-devel/clang/Manifest index 76e9f99cde0d..fe51b01ed299 100644 --- a/sys-devel/clang/Manifest +++ b/sys-devel/clang/Manifest @@ -6,17 +6,20 @@ DIST llvm-gentoo-patchset-11.1.0-1.tar.xz 4032 BLAKE2B e69138a422e315b31a3d9c11f DIST llvm-gentoo-patchset-12.0.1.tar.xz 5280 BLAKE2B 963d005bc7b636570be90eb841ac5bcaeb927538cc7de27683167111a17d6496677c7517de2ecfaf14b5d8ac22bad357be490b8a2ed9aba502fd5f447ecc99e9 SHA512 fc7c38e671555751650299c3a8bee44d5c7f26e11b68d5538c507fb7fe9ff2d349bdcd43bce90a448a747f082d523b3849d6bcda5e3ae2e998edcb926d6aa249 DIST llvm-gentoo-patchset-13.0.0-rc2.tar.xz 5556 BLAKE2B e6c7ecfe8f842edc4d4f30a20c66973519182ecb46e21fb20b6c5fcb6d54cdef830fcb120a405b77f1332e3557acbbbbfa99170b20d17f137e0a63b2d0dc1258 SHA512 ddeaf1d07f0ba893ce93e5fe1eff1c0716769a7879fc503c397f4db7becb363f94747f59b6d53c204df73a93954fb0ca5aae6ad544ce55c964c4bf441a410cd2 DIST llvm-gentoo-patchset-13.0.0-rc3.tar.xz 5012 BLAKE2B 5399feeffe73e8fbd099c8058f1cc41e2fcb2feb446acc1394589c0397167786895d328d45ff481fb30605f215774b9e51e332124c0b071e969a2f01c5943c04 SHA512 d4fb2b08e253d9fa89070045282b4309ca9938011bf7f9b5364cc69c5030ff9353abb1624895b4bfeef2cd8e2f8c9b9f93fc8196f98dc0970457bca7787270c9 +DIST llvm-gentoo-patchset-13.0.0-rc4.tar.xz 5016 BLAKE2B 021ba4e67904e4cf4dfdf1ecfc1cd1cc860c2f43db97e04c40ca7d95567f6235a27a2a919083c58b89b269eefa2d751cb9c324bda6518c22e9fc01007936a520 SHA512 dce61179dffafc5992fb0e18314bba2d5fbf2f0470a491bc1ffc036274b65d0a1de741b23e2de32e873250c856a53707e06f8c560bd29f8a54a6ae0c74267f43 DIST llvm-gentoo-patchset-9999-2.tar.xz 4064 BLAKE2B 4b29234f10ea4ab2609e83c71bcd5f968cd93abd275c13366146ca899bbc576d55a3364432cc7db353739f5da5762529436689b848857e839e230425d551265b SHA512 c0d40a81bd11dc6018d7b3789e4ca7e1cd784992d44fab8d750b8b5281db39ad9092d320d125cae93164d2dddc42177a173b6d5e4158e4b62d7507db877acb9e DIST llvmorg-10.0.1.tar.gz 120880730 BLAKE2B 30f19f56c4d1f6abcda5fec76256219d1e3c8a6ff1a1f152f94bfe362c07884339fe571ff7fe903ed3b3deb150b2fa868c387887a0dea2930dc08b81db71a5b1 SHA512 48078fff9293a87f1a973f3348f79506f04c3da774295f5eb67d74dd2d1aa94f0973f8ced3f4ab9e8339902071f82c603b43d5608ad7227046c4da769c5d2151 DIST llvmorg-11.1.0.tar.gz 122776532 BLAKE2B ca842ff4afff8f44c82b5e7383962a9c45ca1c93b64fa4c6ebcd70a1d3849dbad2b8e4e24fba02d144c6266d7fab3607ebc6999b28c229cb35256cf40f26a985 SHA512 9a8ce022a935eed42fa71a224f2a207122aadcbef58ee855fdb4825f879e7d028e4dcff22c19b9d336db1c8bf63fb84372d44981acf84615f757e54306c92b81 DIST llvmorg-12.0.1.tar.gz 134259748 BLAKE2B f41de787bc73ff2edfda1b22cc8602be6f65f37dd9e4c8888533cfa8c3ccdcf4f108aaab9de23ab0ab987966eb160f2a553a0bdff99461e71ddd5bfcd086090d SHA512 6eb0dc18e2c25935fabfdfc48b0114be0939158dfdef7b85b395fe2e71042672446af0e68750aae003c9847d10d1f63316fe95d3df738d18f249174292b1b9e1 DIST llvmorg-13.0.0-rc2.tar.gz 147267736 BLAKE2B 153bf7320f2aa911112d366ffc79f7110cb04f135c2a8b176c263f0a75eb768206d9bd462893d45504b0e58aa9e127fdcafb02300eab1666e4616aa654d457dd SHA512 a01baf3eaa02f02af42bfcf6dcf24f166351bf1c09601495617c81e41def23210573bad40a344270f40c5deb881d06863536abac2a6481930766a6a56335fb44 DIST llvmorg-13.0.0-rc3.tar.gz 147281901 BLAKE2B 640065a2f32dc48edf084d776cb6b950fae86c2a204999e2eec67f93b57615df40adec19785099b0ef2fe11837c3304794ec3585289a5b5051a557618c63c749 SHA512 1401d5a4d6bb5c930d74b9cfbc8e792872f721aab7d7f0c819e2ba5cf47fb818d160c1f71784fba69827f3c9b7414aa91a585d2b813c1851b4799f9d62cebc46 +DIST llvmorg-13.0.0-rc4.tar.gz 147286367 BLAKE2B a43c54b8bb379b0374f99ae07066d7ba4ae2a83dfdb61390101c736f91dc44aa07a88778551aaaf903033562b2a0a863ea6b27392b700c9cddc74e2c7899cad1 SHA512 8ccaaea21ec4fe3c4b4446d3a7cae36a47ed196f407d341da45824bcefefffd3c412c0c5c27670ceaba1458bc53107273f9d3aec2de261b6b82c6d209b45b14d EBUILD clang-10.0.1.ebuild 11423 BLAKE2B 865c3da940bea204f8e1136aa75409234523a03a6bcf2439a5dd6c0c7ec33888ba6a0738858e5dcd57fb1b804eb646a1c7d6ea87ecac4882ab7f2ee38a1a71b5 SHA512 7e1edacf288f45223f4db6555863287ca89759bb678eab91083422c1c1fe9d9b46c216c1afd5fe47817aff7bfcd86f841f6573a4a20049c47bb5d14f878d6166 EBUILD clang-11.1.0.ebuild 11781 BLAKE2B e23c30f931cd121b8cc56687faa5900cacc71699a53b06ad2a9daa139537c9fb98bb2b1a0e9ab0dd997299f4afb013187e6f68e93942a0015a223332186ae082 SHA512 ce653ca4ebf0283e2ef9008d0781841a422703f81a9b6eaae61229a203fd65d6ee8ea58c577c5a917f8385c127ab246585b8576838d0e3c28d57afed834c7917 EBUILD clang-12.0.1.ebuild 11934 BLAKE2B 475676d2f39c8fd4943613f38d370c38e54003843b3b9d66a36a8d922e61e284270ad0ce418e5654e3d68836e3e5a2da18f7632e6b7c69efb006ccf24cc1d04b SHA512 a0e45bb854a63cd79d10971d43c80a9db61b2841f0ff7d2ea74d4032ddd7cee1aa6cc46ab3774373310e005924fc92fe45ba0cd0dd2a3fbbd320bc4f2a7685b6 -EBUILD clang-13.0.0.9999.ebuild 11881 BLAKE2B 6095145bfb43808868cba7e800ad9b56946b19c096a98d3fab3ac3007074be73481186649b32f554ace9466717cdfa87610c58f6766e379f8787902014630d2b SHA512 55e1364e02f85ea797d4bc92d5886e5790c8d83653f1c7165a2c432d6a0bfbcab78db65237d9c4440603d83897a7a6066e0f0e6d469fc4ca6f1fa2f5c75c2cf6 -EBUILD clang-13.0.0_rc2.ebuild 11885 BLAKE2B 489cd552bec8991d63844b37d9ba1ce1c57198e6abb89759a6110ab192988a0b61e9b5d08627fbbfbe071d6e6fc38d6f15aa99886f1acd9aca0e3b55d16d275e SHA512 ea50254aac82a3c61f41376b210088bc3a21a47920f2a0a405d2e00b8bb6ec9880ab98cf993f888d66a5c8810d9965f950e6c361017512b105359128d094623d -EBUILD clang-13.0.0_rc3.ebuild 11885 BLAKE2B 718e1d8b83243019c473df25bb8eb5e79d31ca5683c4d76bfee7e79db166c5d6d0f6fa2cd339e055056e51fb911748e44b52e88a14bde059677f1012685f4f02 SHA512 7d6beeaa09803cd82574cd2048dbbe3ee58419ccfe8fd1bafc6c2453357ff0d622183c675f509243ed3f13766150efd4221cbf2730f27f4d42ac31843a80874f -EBUILD clang-14.0.0.9999.ebuild 11881 BLAKE2B 6095145bfb43808868cba7e800ad9b56946b19c096a98d3fab3ac3007074be73481186649b32f554ace9466717cdfa87610c58f6766e379f8787902014630d2b SHA512 55e1364e02f85ea797d4bc92d5886e5790c8d83653f1c7165a2c432d6a0bfbcab78db65237d9c4440603d83897a7a6066e0f0e6d469fc4ca6f1fa2f5c75c2cf6 +EBUILD clang-13.0.0.9999.ebuild 11418 BLAKE2B b974e7829f010dfda3cfd0918bc49641a06cccd5702e997cc1912f072e4cf190ebdc037863732059283083aa14f7b1a1d7702869391ba7956694169f6e5fee98 SHA512 62edc3b9368f456618cd1a74ddf8c95d5bf698f2b7d1c27194da8daf7653354522b133614388abf29e9c749bf445a1bda31c240c3d488727e06616f90585067c +EBUILD clang-13.0.0_rc2.ebuild 11422 BLAKE2B a0199f2280543aa22d5e7bc6da47d0326d34e794acb75f4dd059c9506810cad53f74bfaefa8ac0684a8747921f1b4761f30bc3bb51f7df0c1af6084be31fc2e2 SHA512 511a09a8d88c856472845d03a993f93e99654b10d4442e2cf43183b62a6626d504ef1206c838b911a5e9e73d1b2c037249a08ac4395fc25f7fa3caedd0e29dea +EBUILD clang-13.0.0_rc3.ebuild 11422 BLAKE2B b94064371dfec96cea89164338ac5f81e0f416c83fb20df55d89c06c8f196c7ad0e9de841296f60ab6d6ebca263c665e8d3b81a3e3296281db4da64bdead9005 SHA512 d1030c58e22c8720d3f6647524ca51fb5ebc79c126762711cb730164488d230395dab54d2d276cb5ac1e69b81db002b56eb3d1bd55025a71ea1b6ce86d6fa6ca +EBUILD clang-13.0.0_rc4.ebuild 11421 BLAKE2B 3d9f22720aed21b22770f824b65f6ddc60c22d3ea1d7675e9be681002daac90e7161e84f5edf587b5fe9d02000b4a8869de9070ae9f22ea798d8f61fb794bd09 SHA512 ebb77eb6134fd5c3363d18bccee82b2ccd167fb3e75a0136dd424b421cc236ece79c57e41f2fa99361d34c501b75d7709ec819735d72605eed12d48f42ea10ce +EBUILD clang-14.0.0.9999.ebuild 11418 BLAKE2B b974e7829f010dfda3cfd0918bc49641a06cccd5702e997cc1912f072e4cf190ebdc037863732059283083aa14f7b1a1d7702869391ba7956694169f6e5fee98 SHA512 62edc3b9368f456618cd1a74ddf8c95d5bf698f2b7d1c27194da8daf7653354522b133614388abf29e9c749bf445a1bda31c240c3d488727e06616f90585067c MISC metadata.xml 1337 BLAKE2B 5e4f7d63cd9f3b03600801cbe3b2963a1e6b2fb48e36fdb12862f467829222c182f5958d35b535d8fa8467ebaad05c9641cd645294706e3a0f4a078dc9c2f8cf SHA512 50c1a7c33414f9d6294873478f1017dfb21311b36c916e15a8b068cf2a968fe8d774b51515f61c3632d2b204f103cc7ae6853b14d582291087a0fb8e15c0b35a diff --git a/sys-devel/clang/clang-13.0.0.9999.ebuild b/sys-devel/clang/clang-13.0.0.9999.ebuild index ee05f41d1334..3c3e637a0d19 100644 --- a/sys-devel/clang/clang-13.0.0.9999.ebuild +++ b/sys-devel/clang/clang-13.0.0.9999.ebuild @@ -10,13 +10,6 @@ inherit cmake llvm llvm.org multilib multilib-minimal \ DESCRIPTION="C language family frontend for LLVM" HOMEPAGE="https://llvm.org/" -# Keep in sync with sys-devel/llvm -ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC CSKY M68k VE ) -ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430 - NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore - "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}" ) -ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) - # MSVCSetupApi.h: MIT # sorttable.js: MIT @@ -24,9 +17,8 @@ LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT" SLOT="$(ver_cut 1)" KEYWORDS="" IUSE="debug default-compiler-rt default-libcxx default-lld - doc llvm-libunwind +static-analyzer test xml kernel_FreeBSD ${ALL_LLVM_TARGETS[*]}" -REQUIRED_USE="${PYTHON_REQUIRED_USE} - || ( ${ALL_LLVM_TARGETS[*]} )" + doc llvm-libunwind +static-analyzer test xml kernel_FreeBSD" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" RESTRICT="!test? ( test )" RDEPEND=" @@ -34,11 +26,6 @@ RDEPEND=" static-analyzer? ( dev-lang/perl:* ) xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) ${PYTHON_DEPS}" -for x in "${ALL_LLVM_TARGETS[@]}"; do - RDEPEND+=" - ${x}? ( ~sys-devel/llvm-${PV}:${SLOT}[${x}] )" -done -unset x DEPEND="${RDEPEND}" BDEPEND=" @@ -65,6 +52,7 @@ LLVM_TEST_COMPONENTS=( llvm/utils/{UpdateTestChecks,update_cc_test_checks.py} ) LLVM_PATCHSET=9999-2 +LLVM_USE_TARGETS=llvm llvm.org_set_globals # Multilib notes: diff --git a/sys-devel/clang/clang-13.0.0_rc2.ebuild b/sys-devel/clang/clang-13.0.0_rc2.ebuild index 6fdeef8243e4..5003b7995d1e 100644 --- a/sys-devel/clang/clang-13.0.0_rc2.ebuild +++ b/sys-devel/clang/clang-13.0.0_rc2.ebuild @@ -10,13 +10,6 @@ inherit cmake llvm llvm.org multilib multilib-minimal \ DESCRIPTION="C language family frontend for LLVM" HOMEPAGE="https://llvm.org/" -# Keep in sync with sys-devel/llvm -ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC CSKY M68k VE ) -ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430 - NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore - "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}" ) -ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) - # MSVCSetupApi.h: MIT # sorttable.js: MIT @@ -24,9 +17,8 @@ LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT" SLOT="$(ver_cut 1)" KEYWORDS="" IUSE="debug default-compiler-rt default-libcxx default-lld - doc llvm-libunwind +static-analyzer test xml kernel_FreeBSD ${ALL_LLVM_TARGETS[*]}" -REQUIRED_USE="${PYTHON_REQUIRED_USE} - || ( ${ALL_LLVM_TARGETS[*]} )" + doc llvm-libunwind +static-analyzer test xml kernel_FreeBSD" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" RESTRICT="!test? ( test )" RDEPEND=" @@ -34,11 +26,6 @@ RDEPEND=" static-analyzer? ( dev-lang/perl:* ) xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) ${PYTHON_DEPS}" -for x in "${ALL_LLVM_TARGETS[@]}"; do - RDEPEND+=" - ${x}? ( ~sys-devel/llvm-${PV}:${SLOT}[${x}] )" -done -unset x DEPEND="${RDEPEND}" BDEPEND=" @@ -65,6 +52,7 @@ LLVM_TEST_COMPONENTS=( llvm/utils/{UpdateTestChecks,update_cc_test_checks.py} ) LLVM_PATCHSET=13.0.0-rc2 +LLVM_USE_TARGETS=llvm llvm.org_set_globals # Multilib notes: diff --git a/sys-devel/clang/clang-13.0.0_rc3.ebuild b/sys-devel/clang/clang-13.0.0_rc3.ebuild index 47bd536e1017..6ed4a618f02b 100644 --- a/sys-devel/clang/clang-13.0.0_rc3.ebuild +++ b/sys-devel/clang/clang-13.0.0_rc3.ebuild @@ -10,13 +10,6 @@ inherit cmake llvm llvm.org multilib multilib-minimal \ DESCRIPTION="C language family frontend for LLVM" HOMEPAGE="https://llvm.org/" -# Keep in sync with sys-devel/llvm -ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC CSKY M68k VE ) -ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430 - NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore - "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}" ) -ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) - # MSVCSetupApi.h: MIT # sorttable.js: MIT @@ -24,9 +17,8 @@ LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT" SLOT="$(ver_cut 1)" KEYWORDS="" IUSE="debug default-compiler-rt default-libcxx default-lld - doc llvm-libunwind +static-analyzer test xml kernel_FreeBSD ${ALL_LLVM_TARGETS[*]}" -REQUIRED_USE="${PYTHON_REQUIRED_USE} - || ( ${ALL_LLVM_TARGETS[*]} )" + doc llvm-libunwind +static-analyzer test xml kernel_FreeBSD" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" RESTRICT="!test? ( test )" RDEPEND=" @@ -34,11 +26,6 @@ RDEPEND=" static-analyzer? ( dev-lang/perl:* ) xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) ${PYTHON_DEPS}" -for x in "${ALL_LLVM_TARGETS[@]}"; do - RDEPEND+=" - ${x}? ( ~sys-devel/llvm-${PV}:${SLOT}[${x}] )" -done -unset x DEPEND="${RDEPEND}" BDEPEND=" @@ -65,6 +52,7 @@ LLVM_TEST_COMPONENTS=( llvm/utils/{UpdateTestChecks,update_cc_test_checks.py} ) LLVM_PATCHSET=13.0.0-rc3 +LLVM_USE_TARGETS=llvm llvm.org_set_globals # Multilib notes: diff --git a/sys-devel/clang/clang-13.0.0_rc4.ebuild b/sys-devel/clang/clang-13.0.0_rc4.ebuild new file mode 100644 index 000000000000..6fb09213aaca --- /dev/null +++ b/sys-devel/clang/clang-13.0.0_rc4.ebuild @@ -0,0 +1,426 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{8..10} ) +inherit cmake llvm llvm.org multilib multilib-minimal \ + prefix python-single-r1 toolchain-funcs + +DESCRIPTION="C language family frontend for LLVM" +HOMEPAGE="https://llvm.org/" + +# MSVCSetupApi.h: MIT +# sorttable.js: MIT + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT" +SLOT="$(ver_cut 1)" +KEYWORDS="" +IUSE="debug default-compiler-rt default-libcxx default-lld + doc llvm-libunwind +static-analyzer test xml kernel_FreeBSD" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" +RESTRICT="!test? ( test )" + +RDEPEND=" + ~sys-devel/llvm-${PV}:${SLOT}=[debug=,${MULTILIB_USEDEP}] + static-analyzer? ( dev-lang/perl:* ) + xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) + ${PYTHON_DEPS}" + +DEPEND="${RDEPEND}" +BDEPEND=" + >=dev-util/cmake-3.16 + doc? ( dev-python/sphinx ) + xml? ( virtual/pkgconfig ) + ${PYTHON_DEPS}" +PDEPEND=" + sys-devel/clang-common + ~sys-devel/clang-runtime-${PV} + default-compiler-rt? ( + =sys-libs/compiler-rt-${PV%_*}* + llvm-libunwind? ( sys-libs/llvm-libunwind ) + !llvm-libunwind? ( sys-libs/libunwind ) + ) + default-libcxx? ( >=sys-libs/libcxx-${PV} ) + default-lld? ( sys-devel/lld )" + +LLVM_COMPONENTS=( clang clang-tools-extra ) +LLVM_MANPAGES=build +LLVM_TEST_COMPONENTS=( + llvm/lib/Testing/Support + llvm/utils/{lit,llvm-lit,unittest} + llvm/utils/{UpdateTestChecks,update_cc_test_checks.py} +) +LLVM_PATCHSET=${PV/_/-} +LLVM_USE_TARGETS=llvm +llvm.org_set_globals + +# 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_prepare() { + # create extra parent dir for relative CLANG_RESOURCE_DIR access + mkdir -p x/y || die + BUILD_DIR=${WORKDIR}/x/y/clang + + llvm.org_src_prepare + + # add Gentoo Portage Prefix for Darwin (see prefix-dirs.patch) + eprefixify \ + lib/Frontend/InitHeaderSearch.cpp \ + lib/Driver/ToolChains/Darwin.cpp || die +} + +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 + ;; + # headers for clang-tidy static library + clang-tidy-headers) + continue + ;; + # tools + clang|clangd|clang-*) + ;; + # static libraries + clang*|findAllSymbols) + continue + ;; + # conditional to USE=doc + docs-clang-html|docs-clang-tools-html) + use doc || 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-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 + ) + + if llvm_are_manpages_built; then + out+=( + # manpages + docs-clang-man + docs-clang-tools-man + ) + fi + + use doc && out+=( + docs-clang-html + docs-clang-tools-html + ) + + use static-analyzer && out+=( + clang-check + clang-extdef-mapping + scan-build + scan-build-py + 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}") + + local mycmakeargs=( + -DLLVM_CMAKE_PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)/cmake/llvm" + -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=OFF + -DCLANG_LINK_CLANG_DYLIB=ON + -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components) + + -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 + + # disable using CUDA to autodetect GPU, just build for all + -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON + + # override default stdlib and rtlib + -DCLANG_DEFAULT_CXX_STDLIB=$(usex default-libcxx libc++ "") + -DCLANG_DEFAULT_RTLIB=$(usex default-compiler-rt compiler-rt "") + -DCLANG_DEFAULT_LINKER=$(usex default-lld lld "") + -DCLANG_DEFAULT_UNWINDLIB=$(usex default-compiler-rt libunwind "") + + -DCLANG_ENABLE_ARCMT=$(usex static-analyzer) + -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer) + + -DPython3_EXECUTABLE="${PYTHON}" + ) + use test && mycmakeargs+=( + -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" + -DLLVM_LIT_ARGS="$(get_lit_flags)" + ) + + if multilib_is_native_abi; then + local build_docs=OFF + if llvm_are_manpages_built; then + build_docs=ON + 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 + ) + fi + mycmakeargs+=( + -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra + -DCLANG_INCLUDE_DOCS=${build_docs} + -DCLANG_TOOLS_EXTRA_INCLUDE_DOCS=${build_docs} + ) + 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 can have very high memory consumption while linking, + # exhausting the limit on 32-bit linker executable + use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory" + + # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 + use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" + cmake_src_configure + + multilib_is_native_abi && check_distribution_components +} + +multilib_src_compile() { + cmake_build distribution + + # 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_build check-clang + multilib_is_native_abi && + cmake_build check-clang-tools check-clangd +} + +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() { + DESTDIR=${D} cmake_build install-distribution + + # 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 + + docompress "/usr/lib/llvm/${SLOT}/share/man" + llvm_install_manpages + # 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 [[ -z ${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 "Some of them are vim integration scripts (with instructions inside)." + elog "The run-clang-tidy.py script requires the following additional package:" + elog " dev-python/pyyaml" +} + +pkg_postrm() { + if [[ -z ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then + eselect compiler-shadow clean all + fi +} diff --git a/sys-devel/clang/clang-14.0.0.9999.ebuild b/sys-devel/clang/clang-14.0.0.9999.ebuild index ee05f41d1334..3c3e637a0d19 100644 --- a/sys-devel/clang/clang-14.0.0.9999.ebuild +++ b/sys-devel/clang/clang-14.0.0.9999.ebuild @@ -10,13 +10,6 @@ inherit cmake llvm llvm.org multilib multilib-minimal \ DESCRIPTION="C language family frontend for LLVM" HOMEPAGE="https://llvm.org/" -# Keep in sync with sys-devel/llvm -ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC CSKY M68k VE ) -ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430 - NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore - "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}" ) -ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) - # MSVCSetupApi.h: MIT # sorttable.js: MIT @@ -24,9 +17,8 @@ LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT" SLOT="$(ver_cut 1)" KEYWORDS="" IUSE="debug default-compiler-rt default-libcxx default-lld - doc llvm-libunwind +static-analyzer test xml kernel_FreeBSD ${ALL_LLVM_TARGETS[*]}" -REQUIRED_USE="${PYTHON_REQUIRED_USE} - || ( ${ALL_LLVM_TARGETS[*]} )" + doc llvm-libunwind +static-analyzer test xml kernel_FreeBSD" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" RESTRICT="!test? ( test )" RDEPEND=" @@ -34,11 +26,6 @@ RDEPEND=" static-analyzer? ( dev-lang/perl:* ) xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) ${PYTHON_DEPS}" -for x in "${ALL_LLVM_TARGETS[@]}"; do - RDEPEND+=" - ${x}? ( ~sys-devel/llvm-${PV}:${SLOT}[${x}] )" -done -unset x DEPEND="${RDEPEND}" BDEPEND=" @@ -65,6 +52,7 @@ LLVM_TEST_COMPONENTS=( llvm/utils/{UpdateTestChecks,update_cc_test_checks.py} ) LLVM_PATCHSET=9999-2 +LLVM_USE_TARGETS=llvm llvm.org_set_globals # Multilib notes: |