Name: ROCm-CompilerSupport Version: 4.5.2 Release: 1%{?dist} Summary: Various AMD ROCm LLVM related services Url: https://github.com/RadeonOpenCompute/ROCm-CompilerSupport #License breakdown of non-BSD code can be found in lib/comgr/NOTICES.txt License: BSD and NCSA and MIT Source0: https://github.com/RadeonOpenCompute/%{name}/archive/refs/tags/rocm-%{version}.tar.gz#/%{name}-%{version}.tar.gz #Patch to allow dynamic clang linking: Patch0: 0001-Link-libclang-dynamically.patch #Patches from upstream (amd-stg-open branch) to fix building with LLVM 13: Patch101: 0001-Fix-for-upcoming-merge.patch Patch102: 0002-COMGR-updates-required-for-https-github.com-llvm-llv.patch Patch103: 0003-Changes-to-comgr-related-to-this-llvm-patch.patch Patch104: 0004-Updates-required-for-the-merge-F_None-OF_None-F_Text.patch BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: cmake BuildRequires: clang-devel BuildRequires: lld-devel BuildRequires: llvm-devel BuildRequires: ROCm-Device-Libs BuildRequires: zlib-devel #Only the following architectures are supported: ExclusiveArch: x86_64 aarch64 %description This package currently contains one library, the Code Object Manager (Comgr) %package -n ROCm-Comgr Summary: AMD ROCm LLVM Code Object Manager %description -n ROCm-Comgr The AMD Code Object Manager (Comgr) is a shared library which provides operations for creating and inspecting code objects. %package -n ROCm-Comgr-devel Summary: AMD ROCm LLVM Code Object Manager Requires: ROCm-Comgr%{?_isa} = %{version}-%{release} #Since there's currently only one devel package: Provides: %{name}-devel = %{version}-%{release} %description -n ROCm-Comgr-devel The AMD Code Object Manager (Comgr) development package. The API is documented in the header file: "%{_includedir}/amd_comgr.h" %prep %autosetup -p1 -n %{name}-rocm-%{version} #Fix location of cmake file, I've already emailed upstream a patch: sed -i 's|lib\(/cmake/amd_comgr\)|${CMAKE_INSTALL_LIBDIR}\1|' \ lib/comgr/CMakeLists.txt %build %cmake lib/comgr -DCMAKE_BUILD_TYPE="RELEASE" %cmake_build %install %cmake_install %files -n ROCm-Comgr %license LICENSE.txt lib/comgr/NOTICES.txt %doc lib/comgr/README.md %{_libdir}/libamd_comgr.so.* %{_datadir}/amd_comgr %files -n ROCm-Comgr-devel %{_includedir}/amd_comgr.h %{_libdir}/libamd_comgr.so %{_libdir}/cmake/amd_comgr %changelog * Mon Jan 24 2022 Jeremy Newton - 4.5.2-1 - Initial package