mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-22 23:07:10 -08:00
sys-libs/libomp: Add 18.0.0_pre20231129 snapshot
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -12,3 +12,4 @@ DIST llvm-project-17.0.5.src.tar.xz.sig 438 BLAKE2B d65bfe2816c49a4b3dda2c70fe5c
|
||||
DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e0654111941649e15794179641806f18919f1dc68c41ca0cabd5693b5096d05dccc3a391cd20d34af1137bf8af92ed3117a1ce84d1b2 SHA512 6d85bf749e0d77553cc215cbfa61cec4ac4f4f652847f56f946b6a892a99a5ea40b6ab8b39a9708a035001f007986941ccf17e4635260a8b0c1fa59e78d41e30
|
||||
DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340
|
||||
DIST llvm-project-5237193b87721134541f228e28edfd544a9c8ac8.tar.gz 201404340 BLAKE2B f028b8b100721202007e3106d8ee91bcf2ac90588f9268ec835dc4ea3941363d4b796338146c65d1a9e88957d18738030f713b3fed770616c79cb40043e706db SHA512 40a4d4f99f1a690a0f8737261aeeaa61af6124eeadcb6bab5c3828e88b36b8cce42a8caee6d3f01e675047c59b62210de017d207e341f680eff97758f798ad45
|
||||
DIST llvm-project-6a4489a73337907d52e7eaf3716f3de9008e6e53.tar.gz 201703120 BLAKE2B 7de783df15ff30ab85aad2f02a5a043d09b18dd7b212c19e21b045870497e2b17a53527523cd533c4ef61b22d605026a9322d2f8d02f0d4f76ed26ab693b788c SHA512 ffc31d7037255d608717faff84e858d63b37abed5659d66599864ae44ed00fc5902e9851eb1b8c848b500623681ef5782b39ad2bf8bcf96ac4f35032efde1490
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
inherit flag-o-matic cmake-multilib linux-info llvm llvm.org
|
||||
inherit python-single-r1 toolchain-funcs
|
||||
|
||||
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/${LLVM_SOABI}"
|
||||
IUSE="
|
||||
+debug gdb-plugin hwloc offload ompt test
|
||||
llvm_targets_AMDGPU llvm_targets_NVPTX
|
||||
"
|
||||
REQUIRED_USE="
|
||||
gdb-plugin? ( ${PYTHON_REQUIRED_USE} )
|
||||
"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
gdb-plugin? ( ${PYTHON_DEPS} )
|
||||
hwloc? ( >=sys-apps/hwloc-2.5:0=[${MULTILIB_USEDEP}] )
|
||||
offload? (
|
||||
dev-libs/libffi:=[${MULTILIB_USEDEP}]
|
||||
~sys-devel/llvm-${PV}[${MULTILIB_USEDEP}]
|
||||
llvm_targets_AMDGPU? ( dev-libs/rocr-runtime:= )
|
||||
)
|
||||
"
|
||||
# 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_DEPS}
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/lit[${PYTHON_USEDEP}]
|
||||
')
|
||||
sys-devel/clang
|
||||
)
|
||||
"
|
||||
|
||||
LLVM_COMPONENTS=( openmp cmake llvm/include )
|
||||
llvm.org_set_globals
|
||||
|
||||
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=${LLVM_MAJOR} llvm_pkg_setup
|
||||
if use gdb-plugin || use test; then
|
||||
python-single-r1_pkg_setup
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
# LTO causes issues in other packages building, #870127
|
||||
filter-lto
|
||||
|
||||
# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
|
||||
use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
|
||||
|
||||
local build_omptarget=OFF
|
||||
# upstream disallows building libomptarget when sizeof(void*) != 8
|
||||
if use offload &&
|
||||
"$(tc-getCC)" ${CFLAGS} ${CPPFLAGS} -c -x c - -o /dev/null \
|
||||
<<-EOF &>/dev/null
|
||||
int test[sizeof(void *) == 8 ? 1 : -1];
|
||||
EOF
|
||||
then
|
||||
build_omptarget=ON
|
||||
fi
|
||||
|
||||
local libdir="$(get_libdir)"
|
||||
local mycmakeargs=(
|
||||
-DOPENMP_LIBDIR_SUFFIX="${libdir#lib}"
|
||||
|
||||
-DLIBOMP_USE_HWLOC=$(usex hwloc)
|
||||
-DLIBOMP_OMPD_GDB_SUPPORT=$(multilib_native_usex gdb-plugin)
|
||||
-DLIBOMP_OMPT_SUPPORT=$(usex ompt)
|
||||
|
||||
-DOPENMP_ENABLE_LIBOMPTARGET=${build_omptarget}
|
||||
|
||||
# do not install libgomp.so & libiomp5.so aliases
|
||||
-DLIBOMP_INSTALL_ALIASES=OFF
|
||||
# disable unnecessary hack copying stuff back to srcdir
|
||||
-DLIBOMP_COPY_EXPORTS=OFF
|
||||
# prevent trying to access the GPU
|
||||
-DLIBOMPTARGET_AMDGPU_ARCH=LIBOMPTARGET_AMDGPU_ARCH-NOTFOUND
|
||||
)
|
||||
|
||||
if [[ ${build_omptarget} == ON ]]; then
|
||||
if has "${CHOST%%-*}" aarch64 powerpc64le x86_64; then
|
||||
mycmakeargs+=(
|
||||
-DLIBOMPTARGET_BUILD_AMDGPU_PLUGIN=$(usex llvm_targets_AMDGPU)
|
||||
-DLIBOMPTARGET_BUILD_CUDA_PLUGIN=$(usex llvm_targets_NVPTX)
|
||||
)
|
||||
else
|
||||
mycmakeargs+=(
|
||||
-DLIBOMPTARGET_BUILD_AMDGPU_PLUGIN=OFF
|
||||
-DLIBOMPTARGET_BUILD_CUDA_PLUGIN=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
|
||||
}
|
||||
Reference in New Issue
Block a user