diff options
Diffstat (limited to 'sys-libs/libomp')
-rw-r--r-- | sys-libs/libomp/Manifest | 12 | ||||
-rw-r--r-- | sys-libs/libomp/libomp-13.0.1.ebuild | 135 | ||||
-rw-r--r-- | sys-libs/libomp/libomp-14.0.0.9999.ebuild | 38 | ||||
-rw-r--r-- | sys-libs/libomp/libomp-14.0.0_rc4.ebuild (renamed from sys-libs/libomp/libomp-13.0.1.9999.ebuild) | 38 | ||||
-rw-r--r-- | sys-libs/libomp/libomp-15.0.0.9999.ebuild (renamed from sys-libs/libomp/libomp-13.0.1_rc3.ebuild) | 39 |
5 files changed, 205 insertions, 57 deletions
diff --git a/sys-libs/libomp/Manifest b/sys-libs/libomp/Manifest index 1e8ef025e3e7..a79b733ecc10 100644 --- a/sys-libs/libomp/Manifest +++ b/sys-libs/libomp/Manifest @@ -1,14 +1,16 @@ DIST llvm-gentoo-patchset-12.0.1.tar.xz 5280 BLAKE2B 963d005bc7b636570be90eb841ac5bcaeb927538cc7de27683167111a17d6496677c7517de2ecfaf14b5d8ac22bad357be490b8a2ed9aba502fd5f447ecc99e9 SHA512 fc7c38e671555751650299c3a8bee44d5c7f26e11b68d5538c507fb7fe9ff2d349bdcd43bce90a448a747f082d523b3849d6bcda5e3ae2e998edcb926d6aa249 DIST llvm-gentoo-patchset-13.0.0-r2.tar.xz 6500 BLAKE2B 0ce8d0c4a5508f70c8ec49dbc03dfbfc6371ac224bc5dfc9a39f71def0f574405a06df5666baf6159afafd83a8028c5ea6cb369f22a06f927f3ce6795e96994d SHA512 800d44b382c03b673b43965d80d6ed1b7e8e4ced8d066183b9b8df722b2cc002a6aa54092e600f0d77611be581d312f8886ce8af25b23ff818115a209ec21312 -DIST llvm-gentoo-patchset-13.0.1-rc3.tar.xz 4808 BLAKE2B d8ed3ae424914437413e2e8c029880072e93d79ca79b842ad59451df46594c9b0d73ee5d49d3b65c4c7a40c86b2e0d43501ef106aea7c481f22425a5245a3411 SHA512 10430a720b120a340a681fa435a7f050741c75270607e3f5214bf829313d274c11f019f1ac072857dc5d7f868e6eb013932d1c94446e8cb2e151ac818a081914 +DIST llvm-gentoo-patchset-13.0.1.tar.xz 6288 BLAKE2B 899222b962486e924e4f8a2b574d285531a3f87af9385ff68c81db92aa224a0cde6d4ee049b5405056bedb4b232b50e1d5840024071a4a215f6311853304c92d SHA512 b2805337f1deca626768a44c5e7ac9ed16e0c31bead1647d44a493a8123c1b8e8f1c8ceee3536bcc6fa87fdd3fcec408229f701adf30eff07e7ef9889b847b01 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.tar.gz 147270176 BLAKE2B 628f316b580e1edf3a58d4825b724df759e6ed2a4116802470c04562caefc392fa325c91f388036365a2e45a9595cca6d3557fab12984fc8bcfef29c9116d822 SHA512 8004c05d32b9720fb3391783621690c1df9bd1e97e72cbff9192ed88a84b0acd303b61432145fa917b5b5e548c8cee29b24ef8547dcc8677adf4816e7a8a0eb2 -DIST llvmorg-13.0.1-rc3.tar.gz 147302323 BLAKE2B 9ac2f97568062d7dd618295a68d6e14898fcd69e2bb66290b999ceb8c12132371f4e9b59d8ba2b252e5e5cb249045676b24fc50c117b2afae20abab98f426582 SHA512 88a04ad02af2d41ec21c7a62bad21ee0e627b7276a16795875afd062ed29ac7fb4aadec5b5e48785a6502c9fd797a4b67d648a21f193c9f7602112870b10a3d1 +DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f +DIST llvmorg-14.0.0-rc4.tar.gz 158082013 BLAKE2B 0e717898d8f1ed160e525a68aba56a84b7d31856ea72fdb8fa02e863c5a2074245a38d4a4aa7d178beab1ea64aa92d0ba9dcad4373ebb03868070bf718112107 SHA512 a942848aa5042b97bab6d0d5bcee11ea2f85f1244d7eaadb8f7000bf104b2160e6034c04e3755501dd178bc99c26669cf4aca40edb4bba598fdde6bcf3f40ddc EBUILD libomp-11.1.0.ebuild 2888 BLAKE2B fa9005fa8b8d26e264ac7555ab755fe0402c93c82205dbcc1802ac0ae54b245f33ebef8aa7d17c125652acd08f59bcd1efaca169e28fd5e5fcf266c4cbf0d1ba SHA512 24e44ea53c7b6238f3de78088076b3c4d426cc6039dbac5c2bbb1694f9b1e4088b7bf8ada2ad51eca525c4f6fff772178511fe07f449c200e95206c828a2095a EBUILD libomp-12.0.1.ebuild 2955 BLAKE2B 731a206c38d7c982b1b746517061de539c64e1d3bd5afd24c2e1d441bbcd7e91d80e6b20920d64eabaf0c3de85d5e269ef59c17ebdbe30c8808f1deeff495b88 SHA512 0d27c7374062a9831edcadbbea0787998184fca979637da1bab9b8848b3c7165e5e558fc9ef388a1f8d9e20e913b61e7fd19c3e9f2ecf885990a041a0f436156 EBUILD libomp-13.0.0-r2.ebuild 3808 BLAKE2B a24b4436e0547b1f7d7becb8866288c19da6e345f0fd8b5ffb6c016634f3891833de79864bc85f0e310c48ab1eada3d3d59cc7658ef8c96995fd8340a0a1b179 SHA512 decaeeda70320eee804dd6d2320e464d3d4b744c4c5a8ee9bf9a191e80f72ca1e97a1251d0ef69a6608740da2706dc1eea8a379b1e3b0ef06858dc043a2529c7 -EBUILD libomp-13.0.1.9999.ebuild 3720 BLAKE2B b06a9a498165e06f2d54b9d7511feb30c1bb40b5e530a75523b3fa3c2a31f9aae323fa2079f8441e132029bbe43a20860a381f935e59483e93e8a2f50e33bfbd SHA512 1ea61f7616276152c2aed3507b64cd8fd2900362a2b6c27f352b555536fc4f9690e36b95b5bf42c067bc062c8b632bc4892e59af21cfdc7d674a63d891542016 -EBUILD libomp-13.0.1_rc3.ebuild 3744 BLAKE2B bd637b54a2f61a4c3b78b46bb592e45f6168aaae7d4e0329ef67c7026f60253e1db33be577dd819e04551d936bb653eea0e66562e00e38ff0890087282bd70e9 SHA512 897fcf1c1aed0c3fda24258364bf08a15c5ecc7c95c00f1fbf55fd7408ed868a2dfbece665442812797766828a40031736b710eb2ce5f73014aa98ea0af269b0 -EBUILD libomp-14.0.0.9999.ebuild 3720 BLAKE2B b06a9a498165e06f2d54b9d7511feb30c1bb40b5e530a75523b3fa3c2a31f9aae323fa2079f8441e132029bbe43a20860a381f935e59483e93e8a2f50e33bfbd SHA512 1ea61f7616276152c2aed3507b64cd8fd2900362a2b6c27f352b555536fc4f9690e36b95b5bf42c067bc062c8b632bc4892e59af21cfdc7d674a63d891542016 +EBUILD libomp-13.0.1.ebuild 3838 BLAKE2B 37e71494f702ba47713cb523380566557dc1aeb522fe06da8a2a4879bb47d638dd4bbe5630361ed78c09df7b9f4d25fdf31fcc13b0701c32270190e77b26d2f0 SHA512 b8c7d1591a59603391160ae3ffe9213b7081c808a1a56f5517a04f48d177670f4fe0c6fb989665a02b23d03245a267e3f58a54937530f2af2188d296a7c78aa1 +EBUILD libomp-14.0.0.9999.ebuild 3751 BLAKE2B 849748f2a27549b150afbff92be3279dbf67c8d8e3d7fa1460c9693bc8ae9e684d737e6a1ae79ee4a351759b6c1523ebaab7a17889e58c7328180344492572c8 SHA512 bb4a8c5512249ad1553b0c849882865c98482859eab81f17702283b27253fdc079ee32864af617817c1e13e717b78df39814b4d7b48db0b208e2d8b55e18e216 +EBUILD libomp-14.0.0_rc4.ebuild 3751 BLAKE2B 849748f2a27549b150afbff92be3279dbf67c8d8e3d7fa1460c9693bc8ae9e684d737e6a1ae79ee4a351759b6c1523ebaab7a17889e58c7328180344492572c8 SHA512 bb4a8c5512249ad1553b0c849882865c98482859eab81f17702283b27253fdc079ee32864af617817c1e13e717b78df39814b4d7b48db0b208e2d8b55e18e216 +EBUILD libomp-15.0.0.9999.ebuild 3751 BLAKE2B 849748f2a27549b150afbff92be3279dbf67c8d8e3d7fa1460c9693bc8ae9e684d737e6a1ae79ee4a351759b6c1523ebaab7a17889e58c7328180344492572c8 SHA512 bb4a8c5512249ad1553b0c849882865c98482859eab81f17702283b27253fdc079ee32864af617817c1e13e717b78df39814b4d7b48db0b208e2d8b55e18e216 MISC metadata.xml 826 BLAKE2B 94bad2982b52156c2755f4fcdc534648e30b45b514f486028d7beba9af050c3c6847a33fdc11cbf26195794b8e8a7cbeb4e110b8b4398f784c7b7c3edeea02ca SHA512 60de2890b1edc3d60feb5b04dbce840b17e0812ff301f00fd7c12242d3b81cdb3b8ad7afeb3624d70526a93cf8285c96a65b5fcd0384dd093b722c1ae645fa2f diff --git a/sys-libs/libomp/libomp-13.0.1.ebuild b/sys-libs/libomp/libomp-13.0.1.ebuild new file mode 100644 index 000000000000..257f646b023e --- /dev/null +++ b/sys-libs/libomp/libomp-13.0.1.ebuild @@ -0,0 +1,135 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +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" +# CUDA works only with the x86_64 ABI +REQUIRED_USE=" + cuda? ( llvm_targets_NVPTX ) + offload? ( cuda? ( abi_x86_64 ) )" +RESTRICT="!test? ( test )" + +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/_/-} +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 +} diff --git a/sys-libs/libomp/libomp-14.0.0.9999.ebuild b/sys-libs/libomp/libomp-14.0.0.9999.ebuild index 81e776270450..dbee89f1997c 100644 --- a/sys-libs/libomp/libomp-14.0.0.9999.ebuild +++ b/sys-libs/libomp/libomp-14.0.0.9999.ebuild @@ -92,24 +92,28 @@ multilib_src_configure() { # disable unnecessary hack copying stuff back to srcdir -DLIBOMP_COPY_EXPORTS=OFF ) - if use offload && 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 - ) + + 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" diff --git a/sys-libs/libomp/libomp-13.0.1.9999.ebuild b/sys-libs/libomp/libomp-14.0.0_rc4.ebuild index 81e776270450..dbee89f1997c 100644 --- a/sys-libs/libomp/libomp-13.0.1.9999.ebuild +++ b/sys-libs/libomp/libomp-14.0.0_rc4.ebuild @@ -92,24 +92,28 @@ multilib_src_configure() { # disable unnecessary hack copying stuff back to srcdir -DLIBOMP_COPY_EXPORTS=OFF ) - if use offload && 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 - ) + + 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" diff --git a/sys-libs/libomp/libomp-13.0.1_rc3.ebuild b/sys-libs/libomp/libomp-15.0.0.9999.ebuild index 6447245880b8..dbee89f1997c 100644 --- a/sys-libs/libomp/libomp-13.0.1_rc3.ebuild +++ b/sys-libs/libomp/libomp-15.0.0.9999.ebuild @@ -46,7 +46,6 @@ BDEPEND="dev-lang/perl )" LLVM_COMPONENTS=( openmp llvm/include ) -LLVM_PATCHSET=${PV/_/-} llvm.org_set_globals python_check_deps() { @@ -93,24 +92,28 @@ multilib_src_configure() { # disable unnecessary hack copying stuff back to srcdir -DLIBOMP_COPY_EXPORTS=OFF ) - if use offload && 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 - ) + + 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" |