From 90ac28c5d6411ef1efbcaf80783d1e74315ac588 Mon Sep 17 00:00:00 2001 From: Jeremy Newton Date: May 25 2023 18:33:43 +0000 Subject: Attempt to fix RHBZ#2207599 I think the default should be 5, as this is what rocclr tries to use in 5.5.1. --- diff --git a/0001-Update-default-code-object-device-lib-from-v4-to-v5.patch b/0001-Update-default-code-object-device-lib-from-v4-to-v5.patch new file mode 100644 index 0000000..f9b545a --- /dev/null +++ b/0001-Update-default-code-object-device-lib-from-v4-to-v5.patch @@ -0,0 +1,38 @@ +From 632e33b28ddaaa776592105fa4a8f4a0c561eea6 Mon Sep 17 00:00:00 2001 +From: Jacob Lambert +Date: Thu, 27 Apr 2023 15:16:50 -0700 +Subject: [PATCH] Update default code object device lib from v4 to v5 + +When compiling and adding device libraries, Comgr first checks +for an -mcode-object-version=X option. If no option is provided, +Comgr previously assumed v4. With this update, we now assume v5. + +Change-Id: Iec1c916b59a1369edf04a87e952a99f09e3bc5f0 +--- + lib/comgr/src/comgr-device-libs.cpp | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/lib/comgr/src/comgr-device-libs.cpp b/lib/comgr/src/comgr-device-libs.cpp +index 80786d1..42bf9c3 100644 +--- a/lib/comgr/src/comgr-device-libs.cpp ++++ b/lib/comgr/src/comgr-device-libs.cpp +@@ -194,12 +194,12 @@ amd_comgr_status_t addDeviceLibraries(DataAction *ActionInfo, + return Status; + } + } +- // Assume v4 if no option is given ++ // Assume v5 if no option is given + else { + if (auto Status = addObject(ResultSet, AMD_COMGR_DATA_KIND_BC, +- "oclc_abi_version_400_lib.bc", +- oclc_abi_version_400_lib, +- oclc_abi_version_400_lib_size)) { ++ "oclc_abi_version_500_lib.bc", ++ oclc_abi_version_500_lib, ++ oclc_abi_version_500_lib_size)) { + return Status; + } + } +-- +2.40.1 + diff --git a/rocm-compilersupport.spec b/rocm-compilersupport.spec index 5306913..7e51ab7 100644 --- a/rocm-compilersupport.spec +++ b/rocm-compilersupport.spec @@ -11,7 +11,7 @@ Name: rocm-compilersupport Version: %{llvm_maj_ver}.%{bugfix_version} -Release: 2%{?dist} +Release: 3%{?dist} Summary: Various AMD ROCm LLVM related services Url: https://github.com/RadeonOpenCompute/ROCm-CompilerSupport @@ -19,6 +19,9 @@ License: NCSA # I fork upstream sources because they don't target stable LLVM, but rather the # bleeding edge LLVM branch. My fork is a snapshot with bugfixes backported: Source0: https://github.com/Mystro256/%{upstreamname}/archive/refs/tags/%{version}.tar.gz#/%{upstreamname}-%{version}.tar.gz +# Should fix RHBZ#2207599: +# https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/commit/79948e1807bca7108722982b9018d61dde9420f2 +Patch0: 0001-Update-default-code-object-device-lib-from-v4-to-v5.patch BuildRequires: cmake BuildRequires: clang-devel >= %{llvm_maj_ver} @@ -92,6 +95,9 @@ sed -i 's/lib\(\/clang\)/%{_lib}\1/' lib/comgr/src/comgr-compiler.cpp %{_includedir}/amd_comgr.h %changelog +* Thu May 25 2023 Jeremy Newton - 16.1-3 +- Add fix for RHBZ#2207599 + * Wed Apr 19 2023 Jeremy Newton - 16.1-2 - Rebuild against 16.1 rocm-device-libs