diff options
| author | rawnix ports <ports@rawnix.org> | 2026-09-26 18:19:05 +0000 |
|---|---|---|
| committer | rawnix ports <ports@rawnix.org> | 2026-09-26 18:19:05 +0000 |
| commit | c82e88dd00d1b0b7fcfb4e5628d99611388cef6f (patch) | |
| tree | 56d864b5a5c6c145edd96178ae219a8f90e191a6 /libs/rocm-opencl | |
| download | ports-c82e88dd00d1b0b7fcfb4e5628d99611388cef6f.tar.gz | |
sync 2026-09-26 18:19 UTC
1672 files changed, 151396 insertions(+)
Diffstat (limited to 'libs/rocm-opencl')
| -rw-r--r-- | libs/rocm-opencl/.footprint | 19 | ||||
| -rw-r--r-- | libs/rocm-opencl/.signature | 7 | ||||
| -rw-r--r-- | libs/rocm-opencl/MAKEPKG | 72 | ||||
| -rw-r--r-- | libs/rocm-opencl/fix-os-posix-basename.awk | 6 |
4 files changed, 104 insertions, 0 deletions
diff --git a/libs/rocm-opencl/.footprint b/libs/rocm-opencl/.footprint new file mode 100644 index 0000000..c93e42e --- /dev/null +++ b/libs/rocm-opencl/.footprint @@ -0,0 +1,19 @@ +drwxr-xr-x root/root etc/ +drwxr-xr-x root/root etc/OpenCL/ +drwxr-xr-x root/root etc/OpenCL/vendors/ +-rw-r--r-- root/root etc/OpenCL/vendors/amdocl64.icd +drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/bin/ +-rwxr-xr-x root/root usr/bin/clinfo +drwxr-xr-x root/root usr/lib/ +-rwxr-xr-x root/root usr/lib/libcltrace.so +drwxr-xr-x root/root usr/lib/opencl/ +-rwxr-xr-x root/root usr/lib/opencl/libamdocl64.so.2.1.0 +lrwxrwxrwx root/root usr/lib/opencl/libamdocl64.so -> libamdocl64.so.2 +lrwxrwxrwx root/root usr/lib/opencl/libamdocl64.so.2 -> libamdocl64.so.2.1.0 +drwxr-xr-x root/root usr/share/ +drwxr-xr-x root/root usr/share/doc/ +drwxr-xr-x root/root usr/share/doc/opencl-asan/ +-rw-r--r-- root/root usr/share/doc/opencl-asan/LICENSE.md +drwxr-xr-x root/root usr/share/doc/opencl/ +-rw-r--r-- root/root usr/share/doc/opencl/LICENSE.md diff --git a/libs/rocm-opencl/.signature b/libs/rocm-opencl/.signature new file mode 100644 index 0000000..74f4cc6 --- /dev/null +++ b/libs/rocm-opencl/.signature @@ -0,0 +1,7 @@ +RWTZ9IduCSQ/mNSrDOPNWKeM2fUOjDf1C1c8lStPZCGVXiEpQhhfLY6aYCnQz+P8Gftp93tL358qtSj5butnXVfFZO9JbrxJuQ4= + +SHA256 (MAKEPKG) = 77005accec5797bb0ff829c80465c6d00ecddd89e922621dfaf42b23d465ed25 +SHA256 (.footprint) = 5bb5cfa59e0748e194e485f1271fbb2925d2f5146d68d235160ac4560834b955 +SHA256 (clr.tar.gz) = 07caed9d726232008a2120da24f4e4bbc4998accbeadd309181fce04a9da9f99 +SHA256 (fix-os-posix-basename.awk) = 0af885dac36e4f2314f226eb7b618dbf468919c3d2d13915c9cc2635c09753d5 +SHA256 (rocm-opencl#10.0-2.pkg.tar.gz) = 58b08ca3b8ca524f586edfd38f0f9fab7eceaba5a61e63f2ca31ba8e4bcb3d92 diff --git a/libs/rocm-opencl/MAKEPKG b/libs/rocm-opencl/MAKEPKG new file mode 100644 index 0000000..8cd541c --- /dev/null +++ b/libs/rocm-opencl/MAKEPKG @@ -0,0 +1,72 @@ +#!/bin/mkpkg +# description: ROCm OpenCL runtime (CLR/opencl) +# url: https://github.com/ROCm/rocm-systems/tree/develop/projects/clr + +name=rocm-opencl +_name=therock +version=10.0 +release=2 +depends=(rocm-rocr-runtime rocm-llvm ocl-icd) +makedeps=(cmake ninja python3) +source=( + https://github.com/ROCm/rocm-systems/releases/download/$_name-$version/clr.tar.gz + fix-os-posix-basename.awk +) +sha256sums=( + "07caed9d726232008a2120da24f4e4bbc4998accbeadd309181fce04a9da9f99" + "0af885dac36e4f2314f226eb7b618dbf468919c3d2d13915c9cc2635c09753d5" +) + +patch() { + # musl: POSIX basename fix + awk -f "$SRC/fix-os-posix-basename.awk" \ + clr/rocclr/os/os_posix.cpp > os_posix.cpp.tmp + mv os_posix.cpp.tmp clr/rocclr/os/os_posix.cpp + + # musl: remove initial-exec TLS model — breaks dlopen on musl + sed -i 's/__attribute__((tls_model("initial-exec")))//g' \ + clr/rocclr/thread/thread.cpp \ + clr/rocclr/thread/thread.hpp \ + clr/rocclr/platform/activity.cpp \ + clr/rocclr/platform/activity.hpp +} + +build() { + export ROCM_LIBPATCH_VERSION=0 + + cmake -S clr -B build -G Ninja -Wno-dev \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_INSTALL_SYSCONFDIR=/etc \ + -DCMAKE_C_COMPILER=/usr/lib/rocm/llvm/bin/clang \ + -DCMAKE_CXX_COMPILER=/usr/lib/rocm/llvm/bin/clang++ \ + -DCMAKE_PREFIX_PATH="/usr;/usr/lib/rocm/llvm" \ + -DCLR_BUILD_HIP=OFF \ + -DCLR_BUILD_OCL=ON \ + -DROCM_PATH=/usr \ + -DBUILD_TESTS=OFF + + ninja -C build + DESTDIR=$PKG ninja -C build install + + # musl ignores ld.so.conf; the ICD below uses an absolute path + rm -rf $PKG/etc/ld.so.conf.d + + # CLR bundles old Khronos 2.2 headers (group-writable); use opencl-headers + rm -rf $PKG/usr/include/CL + rmdir $PKG/usr/include + + # register the ICD (ocl-icd dlopens this absolute path) + install -dm755 $PKG/etc/OpenCL/vendors + printf '%s\n' /usr/lib/opencl/libamdocl64.so \ + > $PKG/etc/OpenCL/vendors/amdocl64.icd +} + +signify() { + untrusted comment: public key + RWTZ9IduCSQ/mL8337TEUinPwT92xFEUpD92hkS7IxcOnzTt9QdpohT3 +} + +# vim: filetype=sh + diff --git a/libs/rocm-opencl/fix-os-posix-basename.awk b/libs/rocm-opencl/fix-os-posix-basename.awk new file mode 100644 index 0000000..4c32ca2 --- /dev/null +++ b/libs/rocm-opencl/fix-os-posix-basename.awk @@ -0,0 +1,6 @@ +/#include <sys\/sysinfo.h>/ { + print + print "#include <libgen.h>" + next +} +{ print } |
