summaryrefslogtreecommitdiff
path: root/dev-libs/rocm-comgr/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-09-03 10:18:28 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-09-03 10:18:28 +0100
commit015fdd57022ab7a54e47dafe3e81ffc76e502a90 (patch)
tree56dd77e496e4038b74a5c7547be2a320a43ca186 /dev-libs/rocm-comgr/files
parent778487365a91290a8fd0376883de1a4e874fe27b (diff)
gentoo auto-resync : 03:09:2023 - 10:18:27
Diffstat (limited to 'dev-libs/rocm-comgr/files')
-rw-r--r--dev-libs/rocm-comgr/files/9999-include.patch10
-rw-r--r--dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-fix-tests.patch17
-rw-r--r--dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-lld-include.patch22
-rw-r--r--dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-nullopt.patch23
-rw-r--r--dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-opt_mrelax.patch23
-rw-r--r--dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-subtargetfeatures.patch26
6 files changed, 121 insertions, 0 deletions
diff --git a/dev-libs/rocm-comgr/files/9999-include.patch b/dev-libs/rocm-comgr/files/9999-include.patch
new file mode 100644
index 000000000000..58770c819967
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/9999-include.patch
@@ -0,0 +1,10 @@
+--- comgr/src/comgr-env.h.orig 2023-06-07 02:39:28.039489253 +0200
++++ comgr/src/comgr-env.h 2023-06-07 02:39:58.502264137 +0200
+@@ -38,6 +38,7 @@
+
+ #include "llvm/ADT/Optional.h"
+ #include "llvm/ADT/StringRef.h"
++#include "llvm/ADT/None.h"
+
+ namespace COMGR {
+ namespace env {
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-fix-tests.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-fix-tests.patch
new file mode 100644
index 000000000000..9fd14df196a2
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-fix-tests.patch
@@ -0,0 +1,17 @@
+Vanilla LLVM does not support calling AMDGPU_KERNEL across different sources/bitcodes.
+Without this patch https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/issues/45 occurs.
+Reference: https://github.com/llvm/llvm-project/issues/60313
+===================================================================
+--- comgr.orig/test/source/source1.cl
++++ comgr/test/source/source1.cl
+@@ -35,7 +35,9 @@
+
+ #include "include-a.h"
+
++void kernel source3(__global int *j) { *j = FOO; }
++
+ void kernel source1(__global int *j) {
+ *j += 2;
+- source2(j);
++ source3(j);
+ }
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-lld-include.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-lld-include.patch
new file mode 100644
index 000000000000..96df9291eb86
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-lld-include.patch
@@ -0,0 +1,22 @@
+From 271fddf65f43675e675f0cb4e9aaa3d27d34c58a Mon Sep 17 00:00:00 2001
+From: Ron Lieberman <ron.lieberman@amd.com>
+Date: Thu, 29 Dec 2022 05:17:41 -0600
+Subject: [PATCH] [llvm merge] add include of lld/Common/CommonLinkerContext.h
+
+Change-Id: I5767b4c1e683e9df9146804ba23ef3c0c0b6c07a
+---
+ lib/comgr/src/comgr-compiler.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lib/comgr/src/comgr-compiler.cpp b/lib/comgr/src/comgr-compiler.cpp
+index 2a7362a..bb1c9d3 100644
+--- comgr/src/comgr-compiler.cpp
++++ comgr/src/comgr-compiler.cpp
+@@ -39,6 +39,7 @@
+ #include "comgr-compiler.h"
+ #include "comgr-device-libs.h"
+ #include "comgr-env.h"
++#include "lld/Common/CommonLinkerContext.h"
+ #include "lld/Common/Driver.h"
+ #include "clang/Basic/Version.h"
+ #include "clang/CodeGen/CodeGenAction.h"
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-nullopt.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-nullopt.patch
new file mode 100644
index 000000000000..8bb07b55a3ab
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-nullopt.patch
@@ -0,0 +1,23 @@
+From e1da67c6acb2b0e4a8f9c05c89e3778252ea5aa7 Mon Sep 17 00:00:00 2001
+From: Ron Lieberman <ron.lieberman@amd.com>
+Date: Sat, 17 Dec 2022 19:58:26 -0600
+Subject: [PATCH] None -> std::nullopt
+
+Change-Id: I1cc241aa47de538f9f5b1c12cb5655aca8a4502f
+---
+ lib/comgr/src/comgr-env.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/comgr/src/comgr-env.cpp b/lib/comgr/src/comgr-env.cpp
+index 742f4d4..6ab6f0f 100644
+--- comgr/src/comgr-env.cpp
++++ comgr/src/comgr-env.cpp
+@@ -53,7 +53,7 @@ bool shouldSaveTemps() {
+ Optional<StringRef> getRedirectLogs() {
+ static char *RedirectLogs = getenv("AMD_COMGR_REDIRECT_LOGS");
+ if (!RedirectLogs || StringRef(RedirectLogs) == "0") {
+- return None;
++ return std::nullopt;
+ }
+ return StringRef(RedirectLogs);
+ }
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-opt_mrelax.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-opt_mrelax.patch
new file mode 100644
index 000000000000..aa3e7c370a53
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-opt_mrelax.patch
@@ -0,0 +1,23 @@
+From b582dfb33fdb51065c22800fe02dd83207185664 Mon Sep 17 00:00:00 2001
+From: Ron Lieberman <ron.lieberman@amd.com>
+Date: Sun, 1 Jan 2023 10:35:49 -0600
+Subject: [PATCH] [llvm] move to inverted OPT_mrelax_relocations_no
+
+Change-Id: I95e48e8acf5b9124d25e5e7b86c418f1a0d9389d
+---
+ lib/comgr/src/comgr-compiler.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/comgr/src/comgr-compiler.cpp b/lib/comgr/src/comgr-compiler.cpp
+index bb1c9d3..95c1bb4 100644
+--- comgr/src/comgr-compiler.cpp
++++ comgr/src/comgr-compiler.cpp
+@@ -259,7 +259,7 @@ bool AssemblerInvocation::createFromArgs(AssemblerInvocation &Opts,
+ }
+ }
+
+- Opts.RelaxELFRelocations = Args.hasArg(OPT_mrelax_relocations);
++ Opts.RelaxELFRelocations = !Args.hasArg(OPT_mrelax_relocations_no);
+ Opts.DwarfVersion = getLastArgIntValue(Args, OPT_dwarf_version_EQ, 2, Diags);
+ Opts.DwarfDebugFlags =
+ std::string(Args.getLastArgValue(OPT_dwarf_debug_flags));
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-subtargetfeatures.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-subtargetfeatures.patch
new file mode 100644
index 000000000000..340df3852fc2
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-subtargetfeatures.patch
@@ -0,0 +1,26 @@
+From 48c682d577a7955256d0bfac5d497b3feebff11c Mon Sep 17 00:00:00 2001
+From: Ron Lieberman <ron.lieberman@amd.com>
+Date: Mon, 16 Jan 2023 14:29:05 -0600
+Subject: [PATCH] [llvm merge] Move to Expected on SubtargetFeatures
+
+Change-Id: I060ceaa2b51eaa6ed1b472ea42c6788b98001088
+---
+ lib/comgr/src/comgr-objdump.cpp | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/lib/comgr/src/comgr-objdump.cpp b/lib/comgr/src/comgr-objdump.cpp
+index 86a5d7f..6d20a3c 100644
+--- comgr/src/comgr-objdump.cpp
++++ comgr/src/comgr-objdump.cpp
+@@ -1270,7 +1270,10 @@ void llvm::DisassemHelper::DisassembleObject(const ObjectFile *Obj,
+ const Target *TheTarget = getTarget(Obj);
+
+ // Package up features to be passed to target/subtarget
+- SubtargetFeatures Features = Obj->getFeatures();
++ Expected<SubtargetFeatures> FeaturesValue = Obj->getFeatures();
++ if (!FeaturesValue)
++ WithColor::error(errs(), ToolName) << FeaturesValue.takeError();
++ SubtargetFeatures Features = *FeaturesValue;
+ std::vector<std::string> MAttrs = lld::getMAttrs();
+ if (MAttrs.size()) {
+ for (unsigned I = 0; I != MAttrs.size(); ++I) {