Skip to content
Open

llvm23 #62475

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions common/shlibs
Original file line number Diff line number Diff line change
Expand Up @@ -964,9 +964,11 @@ libLLVM.so.18.1 libllvm18-18.1.8_1
libLLVM.so.19.1 libllvm19-19.1.0_1
libLLVM.so.21.1 libllvm21-21.1.4_1
libLLVM.so.22.1 libllvm22-22.1.1_1
libLLVM.so.23.1 libllvm23-23.1.1_1
libLLVMSPIRVLib.so.19.1 SPIRV-LLVM-Translator19-19.1.1_1
libLLVMSPIRVLib.so.21.1 SPIRV-LLVM-Translator21-21.1.1_1
libLLVMSPIRVLib.so.22.1 SPIRV-LLVM-Translator22-22.1.1_1
libLLVMSPIRVLib.so.23.1 SPIRV-LLVM-Translator23-23.1.1_1
libomp.so.5 libomp-17.0.6_1
libomptarget.so.18.1 libomp-18.1.8_1
libisofs.so.6 libisofs-0.6.24_1
Expand Down
4 changes: 2 additions & 2 deletions srcpkgs/SPIRV-Headers/template
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Template file for 'SPIRV-Headers'
pkgname=SPIRV-Headers
reverts="1.5.4.raytracing.fixed_1 1.5.3_2 1.5.3_1 1.5.1_1"
version=1.4.350.1
version=1.4.357.0
revision=1
build_style=cmake
short_desc="Machine-readable files for the SPIR-V Registry"
maintainer="Daniel Martinez <danielmartinez@cock.li>"
license="MIT"
homepage="https://github.com/KhronosGroup/SPIRV-Headers"
distfiles="https://github.com/KhronosGroup/SPIRV-Headers/archive/vulkan-sdk-${version}.tar.gz"
checksum=9e6d5c78878172d2b810e97f3a74ecbbb14b4ad52b07384ce915fbbeb226d610
checksum=4d703067a7e06331ccb37bdfed3f9b7879cc61969a2689ae95c95db34a47ff07

post_install() {
vlicense LICENSE
Expand Down
1 change: 1 addition & 0 deletions srcpkgs/SPIRV-LLVM-Translator23-devel
41 changes: 41 additions & 0 deletions srcpkgs/SPIRV-LLVM-Translator23/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Template file for 'SPIRV-LLVM-Translator23'
pkgname=SPIRV-LLVM-Translator23
version=23.1.1
revision=1
_llvm_ver=${version%%.*}
build_style=cmake
configure_args="
-DBUILD_SHARED_LIBS=ON
-DCMAKE_PREFIX_PATH=${XBPS_CROSS_BASE}/usr/lib/llvm/${_llvm_ver}
-DCMAKE_SKIP_RPATH=ON
-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=/usr
-DLLVM_LINK_LLVM_DYLIB=ON
-DLLVM_SPIRV_INCLUDE_TESTS=OFF
"
hostmakedepends="clang${_llvm_ver} llvm${_llvm_ver} pkg-config"
makedepends="llvm${_llvm_ver}-devel SPIRV-Headers SPIRV-Tools-devel"
short_desc="API and commands for processing SPIR-V modules - LLVM ${_llvm_ver}"
maintainer="Duncaen <duncaen@voidlinux.org>"
license="NCSA"
homepage="https://github.com/KhronosGroup/SPIRV-LLVM-Translator"
distfiles="https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/refs/tags/v${version}.tar.gz"
checksum=9e0bf1beb0ab7edca6cd8c17fd9bbb7ce3dcd520f3e969e0485ff5b00931f929

alternatives="llvm-spirv:llvm-spirv:/usr/bin/llvm-spirv-${_llvm_ver}"

post_install() {
mv ${DESTDIR}/usr/bin/llvm-spirv ${DESTDIR}/usr/bin/llvm-spirv-${_llvm_ver}
vlicense LICENSE.TXT
}

SPIRV-LLVM-Translator23-devel_package() {
depends="SPIRV-LLVM-Translator${_llvm_ver}-${version}_${revision}"
conflicts="SPIRV-LLVM-Translator-devel>=0 SPIRV-LLVM-Translator21-devel>=0
SPIRV-LLVM-Translator19-devel>=0"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
}
}
1 change: 1 addition & 0 deletions srcpkgs/SPIRV-LLVM-Translator23/update
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pattern="refs/tags/v\K23\.[0-9.]+($|(?=^))"
4 changes: 2 additions & 2 deletions srcpkgs/SPIRV-Tools/template
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Template file for 'SPIRV-Tools'
pkgname=SPIRV-Tools
version=2026.2
version=2026.3
revision=1
build_style=cmake
configure_args="-DSPIRV_SKIP_TESTS=ON -DSPIRV_WERROR=OFF
Expand All @@ -13,7 +13,7 @@ license="Apache-2.0"
homepage="https://github.com/KhronosGroup/SPIRV-Tools"
changelog="https://raw.githubusercontent.com/KhronosGroup/SPIRV-Tools/master/CHANGES"
distfiles="https://github.com/KhronosGroup/SPIRV-Tools/archive/refs/tags/v${version}.tar.gz"
checksum=b4390652e64ab188eede9d556cf183b3c1c4be44d4fcd104b0d4af3bea2712d1
checksum=fff0667b25dfb98177da3cc4cc61ac277d076786df42baaf8d9635a25bdf9226
LDFLAGS="-Wl,--no-undefined"

SPIRV-Tools-devel_package() {
Expand Down
1 change: 1 addition & 0 deletions srcpkgs/clang-analyzer23
1 change: 1 addition & 0 deletions srcpkgs/clang-tools-extra23
1 change: 1 addition & 0 deletions srcpkgs/clang23
1 change: 1 addition & 0 deletions srcpkgs/clang23-devel
1 change: 1 addition & 0 deletions srcpkgs/clang23-headers
1 change: 1 addition & 0 deletions srcpkgs/compiler-rt23
1 change: 1 addition & 0 deletions srcpkgs/flang23
1 change: 1 addition & 0 deletions srcpkgs/flang23-devel
1 change: 1 addition & 0 deletions srcpkgs/libclang-cpp23
1 change: 1 addition & 0 deletions srcpkgs/libclang23
1 change: 1 addition & 0 deletions srcpkgs/libclc23
1 change: 0 additions & 1 deletion srcpkgs/libcxx

This file was deleted.

2 changes: 1 addition & 1 deletion srcpkgs/libcxx-devel
133 changes: 133 additions & 0 deletions srcpkgs/libcxx/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
# Template file for 'libcxx'
pkgname=libcxx
version=23.1.1
revision=1
_llvmver=${version%%.*}
build_style=cmake
configure_args="
-DCMAKE_INSTALL_PREFIX=/usr
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DLLVM_ENABLE_RUNTIMES=libcxx;libcxxabi;libunwind
-DLIBCXXABI_ENABLE_STATIC_UNWINDER=ON
-DLIBCXXABI_USE_COMPILER_RT=ON
-DLIBCXXABI_USE_LLVM_UNWINDER=ON
-DLIBCXX_CXX_ABI=libcxxabi
-DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON
-DLIBCXX_USE_COMPILER_RT=ON
-DLLVM_ENABLE_SPHINX=ON
-DSPHINX_WARNINGS_AS_ERRORS=ON"
hostmakedepends="clang${_llvmver} python3-Sphinx"
short_desc="LLVM libc++ - C++ Standard Library"
maintainer="Duncaen <duncaen@voidlinux.org>"
license="Apache-2.0"
homepage="https://libcxx.llvm.org/"
changelog="https://libcxx.llvm.org/ReleaseNotes.html"
distfiles="https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-${version/rc/-rc}.tar.gz"
checksum=851b3d701a4fbdd9f69536d4acda578469e810ca7056687d6556443f5fd39557

# custom order so that libcxx-devel can just move remaining header files
subpackages="libcxxabi libcxxabi-devel llvm-libunwind llvm-libunwind-devel libcxx-devel"

case "$XBPS_TARGET_MACHINE" in
i686*) _arch="X86";;
x86_64*) _arch="X86";;
armv5*) _arch="Armv5te";;
armv6*) _arch="Armv6";;
armv7*) _arch="Armv7";;
aarch64*) _arch="AArch64";;
mips*) _arch="Mips";;
ppc*) _arch="PowerPC";;
riscv64*) _arch="RISCV64";;
esac

configure_args+="
-DLLVM_TARGET_ARCH=${_arch}
-DCMAKE_C_COMPILER=clang
-DCMAKE_CXX_COMPILER=clang++"

if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
configure_args+=" -DLIBCXX_HAS_MUSL_LIBC=ON"
fi

do_configure() {
local _triplet=${XBPS_CROSS_TRIPLET:-$XBPS_TRIPLET}
configure_args+="
-DLLVM_HOST_TRIPLE=${_triplet}
-DLLVM_DEFAULT_TARGET_TRIPLE=${_triplet}
-DCMAKE_ASM_COMPILER_TARGET=${_triplet}
-DCMAKE_C_COMPILER_TARGET=${_triplet}
-DCMAKE_CXX_COMPILER_TARGET=${_triplet}"

CFLAGS="-DNDEBUG ${CFLAGS/ -pipe / }" \
CXXFLAGS="-DNDEBUG ${CXXFLAGS/ -pipe / }" \
cmake ${XBPS_VERBOSE--Wno-dev} \
-B build -S runtimes -G Ninja \
${configure_args}
}

post_patch() {
# need libssp_nonshared on some musl platforms (because of nodefaultlibs)
case "$XBPS_TARGET_MACHINE" in
ppc64*) ;;
ppc*-musl|i686-musl|mips*-musl)
vsed -i 's,^# Setup flags.$,add_library_flags(ssp_nonshared),' \
${wrksrc}/libunwind/src/CMakeLists.txt
vsed -i 's,^# Setup flags.$,add_library_flags(ssp_nonshared),' \
${wrksrc}/libcxxabi/src/CMakeLists.txt
vsed -i 's,#ssp,,' ${wrksrc}/libcxx/CMakeLists.txt
;;
esac
}

libcxx-devel_package() {
short_desc+=" - C++ standard library - development files"
depends="libcxx>=${version}_${revision}"
pkg_install() {
vmove "usr/include/c++"
vmove "usr/lib/libc++.a"
vmove "usr/lib/libc++.modules.json"
vmove "usr/lib/libc++.so"
vmove "usr/lib/libc++experimental.a"
vmove "usr/share/libc++"
}
}

libcxxabi_package() {
short_desc+=" - low level support for LLVM libc++"
pkg_install() {
vmove "usr/lib/libc++abi.so.*"
}
}

libcxxabi-devel_package() {
short_desc+="low level support for LLVM libc++ - development files"
depends="libcxxabi>=${version}_${revision}"
pkg_install() {
vmove "usr/include/c++/v1/__cxxabi_config.h"
vmove "usr/include/c++/v1/cxxabi.h"
vmove "usr/lib/libc++abi.a"
vmove "usr/lib/libc++abi.so"
}
}

llvm-libunwind_package() {
short_desc="LLVM Unwinder"
pkg_install() {
vmove "usr/lib/libunwind.so.*"
}
}

llvm-libunwind-devel_package() {
short_desc="LLVM Unwinder - development files"
depends="llvm-libunwind>=${version}_${revision}"
conflicts="libunwind-devel>=0"
pkg_install() {
vmove "usr/include/__libunwind_config.h"
vmove "usr/include/libunwind.h"
vmove "usr/include/libunwind.modulemap"
vmove "usr/include/mach-o/compact_unwind_encoding.h"
vmove "usr/include/unwind*.h"
vmove "usr/lib/libunwind.a"
vmove "usr/lib/libunwind.so"
}
}
2 changes: 1 addition & 1 deletion srcpkgs/libcxxabi
2 changes: 1 addition & 1 deletion srcpkgs/libcxxabi-devel
1 change: 1 addition & 0 deletions srcpkgs/liblldb23
1 change: 1 addition & 0 deletions srcpkgs/libllvm23
1 change: 1 addition & 0 deletions srcpkgs/libomp23
1 change: 1 addition & 0 deletions srcpkgs/libomp23-devel
1 change: 1 addition & 0 deletions srcpkgs/lld23
1 change: 1 addition & 0 deletions srcpkgs/lld23-devel
1 change: 1 addition & 0 deletions srcpkgs/lldb23
1 change: 1 addition & 0 deletions srcpkgs/lldb23-devel
1 change: 1 addition & 0 deletions srcpkgs/llvm-bolt23
2 changes: 1 addition & 1 deletion srcpkgs/llvm-libunwind
2 changes: 1 addition & 1 deletion srcpkgs/llvm-libunwind-devel
1 change: 1 addition & 0 deletions srcpkgs/llvm23-bootstrap/patches
76 changes: 76 additions & 0 deletions srcpkgs/llvm23-bootstrap/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Template file for 'llvm23-bootstrap'
pkgname=llvm23-bootstrap
version=23.1.1
revision=1
_spirv_version=v23.1.1
build_wrksrc=llvm
build_style=cmake
configure_args="
-DCMAKE_BUILD_TYPE=Release -Wno-dev
-DENABLE_LINKER_BUILD_ID=YES
-DLLVM_INSTALL_UTILS=YES
-DLLVM_BINUTILS_INCDIR=/usr/include
-DBASE_LLVM_VERSION=${version}
-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=/usr
-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=NO
-DLLVM_TARGETS_TO_BUILD=Native
-DLLVM_ENABLE_PROJECTS=clang;lld
"
hostmakedepends="perl python3 pkg-config"
makedepends="python3-devel zlib-devel elfutils-devel libffi-devel libedit-devel
libxml2-devel binutils-devel z3-devel SPIRV-Headers SPIRV-Tools-devel"
short_desc="LLVM Compiler Infrastructure Project - Version ${_major}"
maintainer="Duncaen <duncaen@voidlinux.org>"
license="Apache-2.0 AND NCSA AND custom:Apache-2.0-with-llvm-exception"
homepage="https://www.llvm.org"
distfiles="https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-${version/rc/-rc}.tar.gz
https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/${_spirv_version}.tar.gz"
checksum="851b3d701a4fbdd9f69536d4acda578469e810ca7056687d6556443f5fd39557
9e0bf1beb0ab7edca6cd8c17fd9bbb7ce3dcd520f3e969e0485ff5b00931f929"

skip_extraction=${_spirv_version}.tar.gz

conflicts="llvm23>=0 llvm22>=0 llvm21>=0 llvm19>=0 llvm18>=0 llvm17>=0 llvm15>=0"

lib32disabled=yes
python_version=3
nodebug=yes
repository=bootstrap
nocross="bootstrap package"

# fails to build with libquadmth on musl
case "$XBPS_TARGET_MACHINE" in
x86_64|i686) makedepends+=" libquadmath-devel" ;;
esac

if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
configure_args+=" -DLIBCXX_HAS_MUSL_LIBC=YES
-DCOMPILER_RT_BUILD_GWP_ASAN=OFF"
fi

case "$XBPS_TARGET_MACHINE" in
i686*) _arch="X86";;
x86_64*) _arch="X86";;
armv5*) _arch="Armv5te";;
armv6*) _arch="Armv6";;
armv7*) _arch="Armv7";;
aarch64*) _arch="AArch64";;
mips*) _arch="Mips";;
ppc*) _arch="PowerPC";;
riscv64*) _arch="RISCV64";;
esac

configure_args+=" -DLLVM_TARGET_ARCH=${_arch}"

pre_configure() {
configure_args+=" -DLLVM_HOST_TRIPLE=$($CC -dumpmachine)"
configure_args+=" -DLLVM_DEFAULT_TARGET_TRIPLE=$($CXX -dumpmachine)"
}

post_extract() {
vsrcextract -C llvm/projects/llvm-spirv "${_spirv_version}.tar.gz"
}

post_install() {
vlicense "${wrksrc}/LICENSE.TXT"
}
1 change: 1 addition & 0 deletions srcpkgs/llvm23-cross-tools
Loading
Loading