Date: Saturday, May 6, 2023 @ 10:22:09
Author: tpkessler
Revision: 1458974
archrelease: copy trunk to community-staging-x86_64
Added:
rocm-llvm/repos/community-staging-x86_64/
rocm-llvm/repos/community-staging-x86_64/PKGBUILD
(from rev 1458973, rocm-llvm/trunk/PKGBUILD)
rocm-llvm/repos/community-staging-x86_64/rocm-llvm-disable-source-date-epoch.patch
(from rev 1458973,
rocm-llvm/trunk/rocm-llvm-disable-source-date-epoch.patch)
rocm-llvm/repos/community-staging-x86_64/rocm-llvm-stdint.patch
(from rev 1458973, rocm-llvm/trunk/rocm-llvm-stdint.patch)
-------------------------------------------+
PKGBUILD | 73 ++++++++++++++++++++++++++++
rocm-llvm-disable-source-date-epoch.patch | 10 +++
rocm-llvm-stdint.patch | 26 +++++++++
3 files changed, 109 insertions(+)
Copied: rocm-llvm/repos/community-staging-x86_64/PKGBUILD (from rev 1458973,
rocm-llvm/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2023-05-06 10:22:09 UTC (rev 1458974)
@@ -0,0 +1,73 @@
+# Maintainer: Torsten Keßler <tpkessler at archlinux dot org>
+# Contributor: acxz <akashpatel2008 at yahoo dot com>
+
+pkgname=rocm-llvm
+pkgdesc='Radeon Open Compute - LLVM toolchain (llvm, clang, lld)'
+pkgver=5.5.0
+pkgrel=1
+arch=('x86_64')
+url='https://docs.amd.com/bundle/ROCm-Compiler-Reference-Guide-v5.5/page/Introduction_to_Compiler_Reference_Guide.html'
+license=('custom:Apache 2.0 with LLVM Exception')
+makedepends=('cmake' 'python' 'ninja')
+_git='https://github.com/RadeonOpenCompute/llvm-project'
+source=("${pkgname}-${pkgver}.tar.gz::$_git/archive/rocm-$pkgver.tar.gz"
+ "${pkgname}-stdint.patch"
+ "${pkgname}-disable-source-date-epoch.patch")
+sha256sums=('5dc6c99f612b69ff73145bee17524e3712990100e16445b71634106acf7927cf'
+ '1065fe9432be701635dc2eebc53d32cb388807b8e46d63de0723f4465016d57d'
+ '197cdc72fcf752734a6226e639d883c6a7c06a313642ec53873d6dba0cce0224')
+options=(staticlibs !lto !debug)
+_dirname="$(basename "$_git")-$(basename "${source[0]}" .tar.gz)"
+
+prepare() {
+ cd "$_dirname"
+ patch -Np1 -i "$srcdir/$pkgname-stdint.patch"
+ patch -Np1 -i "$srcdir/$pkgname-disable-source-date-epoch.patch"
+}
+
+build() {
+ cmake \
+ -G Ninja \
+ -B build \
+ -S "$_dirname/llvm" \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX='/opt/rocm/llvm' \
+ -DLLVM_HOST_TRIPLE=$CHOST \
+ -DLLVM_ENABLE_PROJECTS='llvm;clang;compiler-rt;lld' \
+ -DLLVM_TARGETS_TO_BUILD='AMDGPU;X86' \
+ -DCLANG_DEFAULT_LINKER=lld \
+ -DLLVM_INSTALL_UTILS=ON \
+ -DLLVM_ENABLE_BINDINGS=OFF \
+ -DLLVM_LINK_LLVM_DYLIB=OFF \
+ -DLLVM_BUILD_LLVM_DYLIB=OFF \
+ -DLLVM_LINK_LLVM_DYLIB=OFF \
+ -DLLVM_ENABLE_ASSERTIONS=ON \
+ -DOCAMLFIND=NO \
+ -DLLVM_ENABLE_OCAMLDOC=OFF \
+ -DLLVM_INCLUDE_BENCHMARKS=OFF \
+ -DLLVM_BUILD_TESTS=ON \
+ -DLLVM_INCLUDE_TESTS=ON \
+ -DCLANG_INCLUDE_TESTS=ON \
+ -DLLVM_BINUTILS_INCDIR=/usr/include
+ cmake --build build
+}
+
+check() {
+ LD_LIBRARY_PATH="$PWD/build/lib" \
+ cmake --build build --target check-llvm{,-unit} check-clang{,-unit}
check-lld
+}
+
+package() {
+ DESTDIR="$pkgdir" cmake --install build
+
+ # https://bugs.archlinux.org/task/28479
+ install -d "$pkgdir/opt/rocm/llvm/lib/bfd-plugins"
+ ln -s /opt/rocm/llvm/lib/LLVMgold.so
"$pkgdir/opt/rocm/llvm/lib/bfd-plugins/LLVMgold.so"
+
+ cd "$_dirname"
+ install -Dm644 llvm/LICENSE.TXT
"$pkgdir/usr/share/licenses/$pkgname/llvm-LICENSE"
+ install -Dm644 clang/LICENSE.TXT
"$pkgdir/usr/share/licenses/$pkgname/clang-LICENSE"
+ install -Dm644 clang-tools-extra/LICENSE.TXT
"$pkgdir/usr/share/licenses/$pkgname/clang-tools-extra-LICENSE"
+ install -Dm644 compiler-rt/LICENSE.TXT
"$pkgdir/usr/share/licenses/$pkgname/compiler-rt-LICENSE"
+ install -Dm644 lld/LICENSE.TXT
"$pkgdir/usr/share/licenses/$pkgname/lld-LICENSE"
+}
Copied:
rocm-llvm/repos/community-staging-x86_64/rocm-llvm-disable-source-date-epoch.patch
(from rev 1458973, rocm-llvm/trunk/rocm-llvm-disable-source-date-epoch.patch)
===================================================================
--- community-staging-x86_64/rocm-llvm-disable-source-date-epoch.patch
(rev 0)
+++ community-staging-x86_64/rocm-llvm-disable-source-date-epoch.patch
2023-05-06 10:22:09 UTC (rev 1458974)
@@ -0,0 +1,10 @@
+diff --git a/clang/test/Driver/SOURCE_DATE_EPOCH.c
b/clang/test/Driver/SOURCE_DATE_EPOCH.c
+--- a/clang/test/Driver/SOURCE_DATE_EPOCH.c
++++ b/clang/test/Driver/SOURCE_DATE_EPOCH.c
+@@ -1,5 +1,2 @@
+-// RUN: %clang -E %s -### 2>&1 | FileCheck %s -check-prefix=NO_EPOCH
+-// NO_EPOCH-NOT: "-source-date-epoch"
+-
+ // RUN: env SOURCE_DATE_EPOCH=123 %clang -E %s -### 2>&1 | FileCheck %s
+ // CHECK: "-source-date-epoch" "123"
+
Copied: rocm-llvm/repos/community-staging-x86_64/rocm-llvm-stdint.patch (from
rev 1458973, rocm-llvm/trunk/rocm-llvm-stdint.patch)
===================================================================
--- community-staging-x86_64/rocm-llvm-stdint.patch
(rev 0)
+++ community-staging-x86_64/rocm-llvm-stdint.patch 2023-05-06 10:22:09 UTC
(rev 1458974)
@@ -0,0 +1,26 @@
+diff --git a/llvm/include/llvm/OffloadArch/OffloadArch.h
b/llvm/include/llvm/OffloadArch/OffloadArch.h
+index a3accff9f448..85831fb108df 100644
+--- a/llvm/include/llvm/OffloadArch/OffloadArch.h
++++ b/llvm/include/llvm/OffloadArch/OffloadArch.h
+@@ -11,6 +11,7 @@
+
+ #include <string>
+ #include <vector>
++#include <cstdint>
+
+ #define MAXPATHSIZE 512
+
+diff --git a/openmp/libomptarget/include/Debug.h
b/openmp/libomptarget/include/Debug.h
+index 4e7da8b7d53f..2ce303946a2a 100644
+--- a/openmp/libomptarget/include/Debug.h
++++ b/openmp/libomptarget/include/Debug.h
+@@ -39,6 +39,9 @@
+
+ #include <atomic>
+ #include <mutex>
++#include <string>
++#include <cstdint>
++#include <cstdlib>
+
+ /// 32-Bit field data attributes controlling information presented to the
user.
+ enum OpenMPInfoType : uint32_t {