This commit is contained in:
37
d508111ec8fe3ef031685f1e424be62a4a075ddc.patch
Normal file
37
d508111ec8fe3ef031685f1e424be62a4a075ddc.patch
Normal file
@@ -0,0 +1,37 @@
|
||||
From d508111ec8fe3ef031685f1e424be62a4a075ddc Mon Sep 17 00:00:00 2001
|
||||
From: Jeremy Newton <Jeremy.Newton@amd.com>
|
||||
Date: Thu, 1 May 2025 11:21:49 -0400
|
||||
Subject: [PATCH] Don't link against libamd_comgr.so at runtime
|
||||
|
||||
Convention is to always link against .so.* at runtime. Having it link
|
||||
against .so will break on systems that package the .so files in their
|
||||
dev/devel package.
|
||||
---
|
||||
rocclr/device/comgrctx.cpp | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/rocclr/device/comgrctx.cpp b/rocclr/device/comgrctx.cpp
|
||||
index bfc92e4b1..9b5249abb 100644
|
||||
--- a/rocclr/device/comgrctx.cpp
|
||||
+++ b/rocclr/device/comgrctx.cpp
|
||||
@@ -52,16 +52,16 @@ bool Comgr::LoadLib(bool is_versioned) {
|
||||
comgr_versioned_name = kComgrPrefix + major_version + minor_version + std::string(".dll");
|
||||
|
||||
static const char* comgr_lib_name =
|
||||
- LP64_SWITCH(WINDOWS_SWITCH("amd_comgr32.dll", "libamd_comgr32.so"),
|
||||
- WINDOWS_SWITCH(comgr_versioned_name.c_str(), "libamd_comgr.so"));
|
||||
+ LP64_SWITCH(WINDOWS_SWITCH("amd_comgr32.dll", "libamd_comgr32.so.3"),
|
||||
+ WINDOWS_SWITCH(comgr_versioned_name.c_str(), "libamd_comgr.so.3"));
|
||||
cep_.handle = Os::loadLibrary(comgr_lib_name);
|
||||
#endif
|
||||
} else {
|
||||
std::string comgr_major_dll = "amd_comgr_" +
|
||||
std::to_string(AMD_COMGR_INTERFACE_VERSION_MAJOR) + ".dll";
|
||||
static const char* comgr_lib_name =
|
||||
- LP64_SWITCH(WINDOWS_SWITCH("amd_comgr32.dll", "libamd_comgr32.so"),
|
||||
- WINDOWS_SWITCH(comgr_major_dll.c_str(), "libamd_comgr.so"));
|
||||
+ LP64_SWITCH(WINDOWS_SWITCH("amd_comgr32.dll", "libamd_comgr32.so.3"),
|
||||
+ WINDOWS_SWITCH(comgr_major_dll.c_str(), "libamd_comgr.so.3"));
|
||||
cep_.handle = Os::loadLibrary(comgr_lib_name);
|
||||
}
|
||||
if (nullptr == cep_.handle) {
|
Reference in New Issue
Block a user