diff options
Diffstat (limited to 'sys-libs/libomp')
-rw-r--r-- | sys-libs/libomp/Manifest | 2 | ||||
-rw-r--r-- | sys-libs/libomp/libomp-14.0.6-r1.ebuild | 143 |
2 files changed, 145 insertions, 0 deletions
diff --git a/sys-libs/libomp/Manifest b/sys-libs/libomp/Manifest index f7f4d1110005..6d7eaf9f0d75 100644 --- a/sys-libs/libomp/Manifest +++ b/sys-libs/libomp/Manifest @@ -1,5 +1,6 @@ DIST llvm-gentoo-patchset-12.0.1.tar.xz 5280 BLAKE2B 963d005bc7b636570be90eb841ac5bcaeb927538cc7de27683167111a17d6496677c7517de2ecfaf14b5d8ac22bad357be490b8a2ed9aba502fd5f447ecc99e9 SHA512 fc7c38e671555751650299c3a8bee44d5c7f26e11b68d5538c507fb7fe9ff2d349bdcd43bce90a448a747f082d523b3849d6bcda5e3ae2e998edcb926d6aa249 DIST llvm-gentoo-patchset-13.0.1.tar.xz 6288 BLAKE2B 899222b962486e924e4f8a2b574d285531a3f87af9385ff68c81db92aa224a0cde6d4ee049b5405056bedb4b232b50e1d5840024071a4a215f6311853304c92d SHA512 b2805337f1deca626768a44c5e7ac9ed16e0c31bead1647d44a493a8123c1b8e8f1c8ceee3536bcc6fa87fdd3fcec408229f701adf30eff07e7ef9889b847b01 +DIST llvm-gentoo-patchset-14.0.6-r1.tar.xz 5960 BLAKE2B eadca4c09c216674fa27301670e2609a054d5d6df938502c37bb0e0c011cb7d9284eeb5eb223d3aba386ea2d6255d6a34d85913b976268c4d252764361669d81 SHA512 f4cb73c4a07206cae170cda5c2f2244431c0ce1f7f3c8b79a7253957b998cb4f3225737ec2a049d26eebabe9482378c7e9a5e6e069a6f96890ef8f85c599f07c DIST llvm-project-14.0.5.src.tar.xz 105617748 BLAKE2B a68a6eb58302702f560d1204eb97d34b695eb5df417ccefb50117dbd641ba3c3dda9e64c04506e646dd40c1151eb60b12843e206996ef74b35b2841b8dabafda SHA512 db5a7ea1149988c2aab4ed634f14e00bb9a8042089350b811f875e295ced7b5add80a11b91cad80ba0ba9801261502644a720021506483c14dfb1bc24a7f54d5 DIST llvm-project-14.0.5.src.tar.xz.sig 566 BLAKE2B ecf66df5d0acb382c9d441aee053404254fa4087d57130b04bb496af9cbb71c59e82f0938f44953d7fd777524781d13d1327b6c64065cf45b177bc3ea0e5c3f2 SHA512 a785e38f11863a46de8766ff4495a73173479cdbd95dc539804b0381a7a834a409713dbaf441272a9cc2963a3c7015c95dc6f0dcfa745e8d6047b1ad5feacff7 DIST llvm-project-14.0.6.src.tar.xz 105618228 BLAKE2B ee67c5407df8cef493b9c0004f15e428f22a536a17e5f4e3eb29a003b8a8ec0abe0fa3e072591161d5f30ef7d8867c1ce34d1b341ad858e93c00263499941a99 SHA512 6fc6eeb60fac698702d1aac495fc0161eb7216a1f8db2020af8fccec5837831f7cc20dc2a169bf4f0b5f520748280b4a86621f3697d622aa58faaa45dbfaad13 @@ -15,6 +16,7 @@ EBUILD libomp-14.0.1.ebuild 3817 BLAKE2B 7f5c80c1a8e6995b58576911a3ab73a3dd1b663 EBUILD libomp-14.0.3.ebuild 3828 BLAKE2B 0887d1ac8543821e06bb09a1c3b3331c7d727fc9101232893f19270a7bdc0092c9be0c85e5a9976450e7c131fff8918346515fbf880c700ebd113a5c399948a8 SHA512 d82f5e9129e7515cbf2d836519de4b7ddecc14ed9948584f3a49ea58d6dbd27a0b90a88d5329a9bc568e4063daf0c9ce8755c6c9ddcadad1a56a1f7142511721 EBUILD libomp-14.0.4.ebuild 3824 BLAKE2B af89b4531c3b7b27ba98bc08f34b544bbb22b9b140c296c347e1662d3a4960fd886b8174e5a889bd5f7f20d23d90f9b13adfe5be12afd321d208ac7e3850d7c6 SHA512 2f0fe64953485799bdb7b820987cbff8b6c6025803da9f5af7c664179f3c0ba753cdcc54b90fca54bc3a2fe4c007e5f2dceff69c539739d3ec4d0e3d1ed561c6 EBUILD libomp-14.0.5.ebuild 3828 BLAKE2B 0887d1ac8543821e06bb09a1c3b3331c7d727fc9101232893f19270a7bdc0092c9be0c85e5a9976450e7c131fff8918346515fbf880c700ebd113a5c399948a8 SHA512 d82f5e9129e7515cbf2d836519de4b7ddecc14ed9948584f3a49ea58d6dbd27a0b90a88d5329a9bc568e4063daf0c9ce8755c6c9ddcadad1a56a1f7142511721 +EBUILD libomp-14.0.6-r1.ebuild 3851 BLAKE2B 305000b58e0c3dfc970028705928afd31dd61d881af764b666acc57a42823f2041fc48af19571c4c07e5d3f0ed4efb14a22b882490070a6980f3cfd93cf54a8c SHA512 949b2dadf7745e86281ca1c7594133143aa6c6027a102f8928ce9faea10a2099353bf4074be4469394fa9774e737f584cf44c6eec94af30b9d332f20b9e4621c EBUILD libomp-14.0.6.ebuild 3828 BLAKE2B 0887d1ac8543821e06bb09a1c3b3331c7d727fc9101232893f19270a7bdc0092c9be0c85e5a9976450e7c131fff8918346515fbf880c700ebd113a5c399948a8 SHA512 d82f5e9129e7515cbf2d836519de4b7ddecc14ed9948584f3a49ea58d6dbd27a0b90a88d5329a9bc568e4063daf0c9ce8755c6c9ddcadad1a56a1f7142511721 EBUILD libomp-15.0.0.9999.ebuild 3762 BLAKE2B ec449c1019da76ad9d1835e9a86f776e97a83740da240a2e98221d3f5d5eff7911b894584bb37da8fe2375670d5a6a67e41a5523f957694cd3e138543b5ba925 SHA512 643d3c43a9fba97ea44b94d3edd07ffbb487aa8260856fed8a158646873a7e45797c11aed020b224642db7e90da0fb705cd10f69fd0da5139d42b9560b9f2542 MISC metadata.xml 826 BLAKE2B 94bad2982b52156c2755f4fcdc534648e30b45b514f486028d7beba9af050c3c6847a33fdc11cbf26195794b8e8a7cbeb4e110b8b4398f784c7b7c3edeea02ca SHA512 60de2890b1edc3d60feb5b04dbce840b17e0812ff301f00fd7c12242d3b81cdb3b8ad7afeb3624d70526a93cf8285c96a65b5fcd0384dd093b722c1ae645fa2f diff --git a/sys-libs/libomp/libomp-14.0.6-r1.ebuild b/sys-libs/libomp/libomp-14.0.6-r1.ebuild new file mode 100644 index 000000000000..344b9b53e021 --- /dev/null +++ b/sys-libs/libomp/libomp-14.0.6-r1.ebuild @@ -0,0 +1,143 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +CMAKE_ECLASS=cmake +PYTHON_COMPAT=( python3_{8..10} ) +inherit cmake-multilib linux-info llvm llvm.org python-any-r1 + +DESCRIPTION="OpenMP runtime library for LLVM/clang compiler" +HOMEPAGE="https://openmp.llvm.org" + +LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x64-macos" +IUSE=" + cuda debug hwloc offload ompt test + llvm_targets_AMDGPU llvm_targets_NVPTX +" +RESTRICT="!test? ( test )" +# CUDA works only with the x86_64 ABI +REQUIRED_USE=" + cuda? ( llvm_targets_NVPTX ) + offload? ( cuda? ( abi_x86_64 ) ) +" + +RDEPEND=" + hwloc? ( >=sys-apps/hwloc-2.5:0=[${MULTILIB_USEDEP}] ) + offload? ( + virtual/libelf:=[${MULTILIB_USEDEP}] + dev-libs/libffi:=[${MULTILIB_USEDEP}] + ~sys-devel/llvm-${PV}[${MULTILIB_USEDEP}] + cuda? ( dev-util/nvidia-cuda-toolkit:= ) + ) +" +# tests: +# - dev-python/lit provides the test runner +# - sys-devel/llvm provide test utils (e.g. FileCheck) +# - sys-devel/clang provides the compiler to run tests +DEPEND=" + ${RDEPEND} +" +BDEPEND=" + dev-lang/perl + offload? ( + llvm_targets_AMDGPU? ( sys-devel/clang ) + llvm_targets_NVPTX? ( sys-devel/clang ) + virtual/pkgconfig + ) + test? ( + $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') + sys-devel/clang + ) +" + +LLVM_COMPONENTS=( openmp llvm/include ) +LLVM_PATCHSET=${PV}-r1 +llvm.org_set_globals + +python_check_deps() { + has_version "dev-python/lit[${PYTHON_USEDEP}]" +} + +kernel_pds_check() { + if use kernel_linux && kernel_is -lt 4 15 && kernel_is -ge 4 13; then + local CONFIG_CHECK="~!SCHED_PDS" + local ERROR_SCHED_PDS="\ +PDS scheduler versions >= 0.98c < 0.98i (e.g. used in kernels >= 4.13-pf11 +< 4.14-pf9) do not implement sched_yield() call which may result in horrible +performance problems with libomp. If you are using one of the specified +kernel versions, you may want to disable the PDS scheduler." + + check_extra_config + fi +} + +pkg_pretend() { + kernel_pds_check +} + +pkg_setup() { + use offload && LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup + use test && python-any-r1_pkg_setup +} + +multilib_src_configure() { + # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 + use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" + + local libdir="$(get_libdir)" + local mycmakeargs=( + -DOPENMP_LIBDIR_SUFFIX="${libdir#lib}" + + -DLIBOMP_USE_HWLOC=$(usex hwloc) + -DLIBOMP_OMPT_SUPPORT=$(usex ompt) + + -DOPENMP_ENABLE_LIBOMPTARGET=$(usex offload) + + # do not install libgomp.so & libiomp5.so aliases + -DLIBOMP_INSTALL_ALIASES=OFF + # disable unnecessary hack copying stuff back to srcdir + -DLIBOMP_COPY_EXPORTS=OFF + ) + + if use offload; then + if has "${CHOST%%-*}" aarch64 powerpc64le x86_64; then + mycmakeargs+=( + -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=$(usex !cuda) + -DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=$(usex llvm_targets_AMDGPU) + -DLIBOMPTARGET_BUILD_NVPTX_BCLIB=$(usex llvm_targets_NVPTX) + # a cheap hack to force clang + -DLIBOMPTARGET_NVPTX_CUDA_COMPILER="$(type -P "${CHOST}-clang")" + # upstream defaults to looking for it in clang dir + # this fails when ccache is being used + -DLIBOMPTARGET_NVPTX_BC_LINKER="$(type -P llvm-link)" + ) + else + mycmakeargs+=( + -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON + -DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=OFF + -DLIBOMPTARGET_BUILD_NVPTX_BCLIB=OFF + ) + fi + fi + + use test && mycmakeargs+=( + # this project does not use standard LLVM cmake macros + -DOPENMP_LLVM_LIT_EXECUTABLE="${EPREFIX}/usr/bin/lit" + -DOPENMP_LIT_ARGS="$(get_lit_flags)" + + -DOPENMP_TEST_C_COMPILER="$(type -P "${CHOST}-clang")" + -DOPENMP_TEST_CXX_COMPILER="$(type -P "${CHOST}-clang++")" + ) + addpredict /dev/nvidiactl + cmake_src_configure +} + +multilib_src_test() { + # respect TMPDIR! + local -x LIT_PRESERVES_TMP=1 + + cmake_build check-libomp +} |