Repository navigation
sys-devel/DPC++: Update to release 7.2.0 #1402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Emimendoza
wants to merge
8
commits into
gentoo:master
Choose a base branch
from
Emimendoza:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
68e10b0
sys-devel/DPC++-2026.06.18 bump level-zero requirement
Emimendoza 8c77021
Update sys-devel/DPC++-2026.06.18.ebuild
Emimendoza 55da363
fix missing dependancy and using system vc-intrinsics
Emimendoza 1467903
Apply suggestions from code review
Emimendoza a3d66c9
streamline DPC++ configuration
Emimendoza f49efb7
DPC++: Upgrade to release 7.2.0
Emimendoza c908b82
Apply suggestion from @APN-Pucky
Emimendoza aea39a6
DPC++: Apply -fno-strict-aliasing suggestion
Emimendoza File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,190 @@ | ||
| # Copyright 2026 Gentoo Authors | ||
| # Distributed under the terms of the GNU General Public License v2 | ||
|
|
||
| EAPI=8 | ||
|
|
||
| PYTHON_COMPAT=( python3_{11..15} ) | ||
| inherit cmake python-any-r1 toolchain-funcs flag-o-matic | ||
| DOCS_BUILDER="doxygen" | ||
| DOCS_DIR="build/docs" | ||
| DOCS_CONFIG_NAME="doxygen.cfg" | ||
| DOCS_DEPEND=" | ||
| media-gfx/graphviz | ||
| virtual/latex-base | ||
| $(python_gen_any_dep ' | ||
| dev-python/sphinx[${PYTHON_USEDEP}] | ||
| dev-python/recommonmark[${PYTHON_USEDEP}] | ||
| dev-python/myst-parser[${PYTHON_USEDEP}] | ||
| ') | ||
| " | ||
| inherit docs | ||
| KEYWORDS="~amd64" | ||
|
|
||
| # We cannot unbundle this because it has to be compiled with the clang/llvm | ||
| # that we are building here. Otherwise we run into problems running the compiler. | ||
| #from sycl/llvm/lib/SYCLLowerIR/CMakeLists.txt | ||
| VC_INTR_COMMIT="4fc83e12979096db72c129bd432238d5ca397e4d" | ||
|
|
||
| # This one can be unbundled I think | ||
| UMF_PV="1.1.0" | ||
| NIGHTLY_VER="nightly-${PV//./-}" | ||
| RELEASE_VER="v${PV}" | ||
|
|
||
| if [[ -z "${KEYWORDS}" ]]; then | ||
| SYCL_COMPILER_VERSION="${PV//./}" | ||
| MY_VER="${NIGHTLY_VER}" | ||
| else | ||
| # should be taken from timestamp of tag yyyymmdd | ||
| SYCL_COMPILER_VERSION="20261014" | ||
| MY_VER="${RELEASE_VER}" | ||
| fi | ||
|
|
||
| # From sycl/cmake/modules/FetchEmhash.cmake | ||
| EMHASH_COMMIT="5e131ba09a5290823fe71099d9c35eb5df5345b6" | ||
|
|
||
| DESCRIPTION="oneAPI Data Parallel C++ compiler" | ||
| HOMEPAGE="https://github.com/intel/llvm" | ||
| SRC_URI=" | ||
| https://github.com/intel/llvm/archive/refs/tags/${MY_VER}.tar.gz -> ${P}.tar.gz | ||
| https://github.com/intel/vc-intrinsics/archive/${VC_INTR_COMMIT}.tar.gz -> ${P}-vc-intrinsics-${VC_INTR_COMMIT}.tar.gz | ||
| https://github.com/ktprime/emhash/archive/${EMHASH_COMMIT}.tar.gz -> ${P}-emhash-${EMHASH_COMMIT}.tar.gz | ||
| https://github.com/oneapi-src/unified-memory-framework/archive/refs/tags/v${UMF_PV}.tar.gz -> ${P}-unified-memory-framework-${UMF_PV}.tar.gz | ||
| " | ||
| S="${WORKDIR}/llvm-${MY_VER#v}" | ||
| CMAKE_USE_DIR="${S}/llvm" | ||
| BUILD_DIR="${S}/build" | ||
|
|
||
| LICENSE="Apache-2.0 MIT" | ||
| SLOT="0/9" # Based on libsycl.so | ||
|
|
||
| IUSE="cuda hip test jit debug +zstd cpu +default-lld" | ||
| REQUIRED_USE=" | ||
| " | ||
| RESTRICT="!test? ( test )" | ||
|
|
||
| BDEPEND="virtual/pkgconfig" | ||
|
|
||
| DEPEND=" | ||
| dev-libs/boost:= | ||
| >=dev-libs/level-zero-1.32.0:= | ||
| dev-libs/intel-compute-runtime | ||
| dev-libs/opencl-icd-loader | ||
| >=dev-util/opencl-headers-2025.06.13 | ||
| >=dev-util/spirv-headers-1.4.357.0 | ||
| dev-util/spirv-tools | ||
| media-libs/libva | ||
| dev-build/libtool | ||
| >=dev-cpp/parallel-hashmap-1.3.12 | ||
| cuda? ( dev-util/nvidia-cuda-toolkit:=[profiler] ) | ||
| hip? ( dev-util/hip:= ) | ||
| zstd? ( app-arch/zstd ) | ||
| " | ||
| RDEPEND="${DEPEND}" | ||
|
|
||
| PATCHES=( | ||
| "${FILESDIR}/DPC++-6.3.0-buildbot-configure.patch" | ||
| ) | ||
|
|
||
| src_configure() { | ||
| cp "${BROOT}/usr/share/gnuconfig/config.guess" llvm/cmake/ || die | ||
| filter-lto | ||
|
Emimendoza marked this conversation as resolved.
Resolved
|
||
| local buildbot_flags=( | ||
| --print-cmake-flags | ||
| -s "${S}" | ||
| -o "${BUILD_DIR}" | ||
| --no-assertions | ||
| --llvm-external-projects lld | ||
| ) | ||
| use cpu && buildbot_flags+=( --native_cpu ) | ||
| use doc && buildbot_flags+=( --docs ) | ||
| use cuda && buildbot_flags+=( --cuda ) | ||
| use hip && buildbot_flags+=( --hip ) | ||
| use jit || buildbot_flags+=( --disable-jit ) | ||
|
|
||
| if [[ $(tc-get-cxx-stdlib) == libc++ ]]; then | ||
| buildbot_flags+=( | ||
| --use-libcxx | ||
| ) | ||
| fi | ||
|
|
||
| local mycmakeargs=( $(python3 "${S}/buildbot/configure.py" "${buildbot_flags[@]}") ) | ||
|
|
||
| mycmakeargs+=( | ||
| -DLLVM_APPEND_VC_REV=OFF | ||
| -DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR="${ESYSROOT}/usr" | ||
| -DCMAKE_DISABLE_FIND_PACKAGE_LLVMGenXIntrinsics=ON | ||
| -DFETCHCONTENT_SOURCE_DIR_VC-INTRINSICS="${WORKDIR}/vc-intrinsics-${VC_INTR_COMMIT}" | ||
| -DFETCHCONTENT_SOURCE_DIR_EMHASH="${WORKDIR}/emhash-${EMHASH_COMMIT}" | ||
| -DFETCHCONTENT_SOURCE_DIR_UNIFIED-MEMORY-FRAMEWORK="${WORKDIR}/unified-memory-framework-${UMF_PV}" | ||
| -DUR_USE_EXTERNAL_UMF=OFF | ||
| -DCMAKE_INSTALL_PREFIX="${BUILD_DIR}/install" | ||
| -DCMAKE_INSTALL_MANDIR="${BUILD_DIR}/install/share/man" | ||
| -DCMAKE_INSTALL_INFODIR="${BUILD_DIR}/install/share/info" | ||
| -DCMAKE_INSTALL_DOCDIR="${BUILD_DIR}/install/share/doc/${PF}" | ||
| -DLLVM_USE_SPLIT_DWARF=OFF | ||
| -DSYCL_COMPILER_VERSION="${SYCL_COMPILER_VERSION}" | ||
| ) | ||
|
|
||
| use default-lld && mycmakeargs+=( -DCLANG_DEFAULT_LINKER=lld ) | ||
| use doc && mycmakeargs+=( -DSPHINX_WARNINGS_AS_ERRORS=OFF ) | ||
|
|
||
| if use hip; then | ||
| mycmakeargs+=( | ||
| -DUR_HIP_ROCM_DIR="$(hipconfig -R)" | ||
| -DUR_HIP_LIB_DIR="$(hipconfig -R)/$(get_libdir)" | ||
| ) | ||
| fi | ||
|
|
||
| if use zstd; then | ||
| mycmakeargs+=( | ||
| -DLLVM_ENABLE_ZSTD=FORCE_ON | ||
| -DLLVM_USE_STATIC_ZSTD=OFF | ||
| ) | ||
| fi | ||
|
|
||
| use debug || append-cppflags -DNDEBUG | ||
|
|
||
| cmake_src_configure | ||
| } | ||
|
|
||
| src_compile() { | ||
| # Need offload before unified-runtime can be compiled | ||
| # cmake_build runtimes/install | ||
| # Build sycl (this also installs some stuff already) | ||
| cmake_build deploy-sycl-toolchain | ||
|
|
||
| use doc && cmake_build docs/all | ||
|
|
||
| # Finish compiling | ||
| cmake_src_compile | ||
| # Despite the above, the install step still builds files | ||
| cmake_build install | ||
| } | ||
|
|
||
| src_test() { | ||
| cmake_build check | ||
| } | ||
|
|
||
| src_install() { | ||
| einstalldocs | ||
|
|
||
| local LLVM_INTEL_DIR="/usr/lib/llvm/intel" | ||
| dodir "${LLVM_INTEL_DIR}" | ||
|
|
||
| # Copy our temporary directory to the image directory | ||
| mv "${BUILD_DIR}/install"/* "${ED}/${LLVM_INTEL_DIR}" || die | ||
|
|
||
| # Convienence symlinks | ||
| dosym -r "${LLVM_INTEL_DIR}/bin/clang" "/usr/bin/icx" | ||
| dosym -r "${LLVM_INTEL_DIR}/bin/clang++" "/usr/bin/icpx" | ||
| dosym -r "${LLVM_INTEL_DIR}/bin/clang++" "/usr/bin/dpc++" | ||
|
|
||
| # Copied from llvm ebuild, put env file last so we don't overwrite main llvm/clang | ||
| newenvd - "60llvm-intel" <<-_EOF_ | ||
| PATH="${EPREFIX}${LLVM_INTEL_DIR}/bin" | ||
| # we need to duplicate it in ROOTPATH for Portage to respect... | ||
| ROOTPATH="${EPREFIX}${LLVM_INTEL_DIR}/bin" | ||
| MANPATH="${EPREFIX}${LLVM_INTEL_DIR}/share/man" | ||
| LDPATH="${EPREFIX}${LLVM_INTEL_DIR}/lib:${EPREFIX}${LLVM_INTEL_DIR}/lib64" | ||
| _EOF_ | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
sys-devel/DPC++/files/DPC++-6.3.0-buildbot-configure.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| diff --git a/buildbot/configure.py b/buildbot/configure.py | ||
| index 4874c0a44557..35b0a15474fe 100644 | ||
| --- a/buildbot/configure.py | ||
| +++ b/buildbot/configure.py | ||
| @@ -165,9 +165,6 @@ def do_configure(args, passthrough_args): | ||
|
|
||
| cmake_cmd = [ | ||
| "cmake", | ||
| - "-G", | ||
| - args.cmake_gen, | ||
| - "-DCMAKE_BUILD_TYPE={}".format(args.build_type), | ||
| "-DLLVM_ENABLE_ASSERTIONS={}".format(llvm_enable_assertions), | ||
| "-DLLVM_TARGETS_TO_BUILD={}".format(llvm_targets_to_build), | ||
| "-DLLVM_EXTERNAL_PROJECTS={}".format(llvm_external_projects), | ||
| @@ -259,7 +256,6 @@ def do_configure(args, passthrough_args): | ||
| cmake_cmd.extend(["-DEXTRA_SECURITY_FLAGS={}".format(args.add_security_flags)]) | ||
|
|
||
| # Add path to root CMakeLists.txt | ||
| - cmake_cmd.append(llvm_dir) | ||
|
|
||
| if args.use_libcxx: | ||
| cmake_cmd.extend( | ||
| @@ -271,7 +267,7 @@ def do_configure(args, passthrough_args): | ||
| cmake_cmd += passthrough_args | ||
|
|
||
| if args.print_cmake_flags: | ||
| - print(" ".join(map(shlex.quote, cmake_cmd[1:]))) | ||
| + print(" ".join(cmake_cmd[1:])) | ||
| else: | ||
| print("[Cmake Command]: {}".format(" ".join(map(shlex.quote, cmake_cmd)))) | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.