Skip to content

Commit

Permalink
Fix for HIP related issue
Browse files Browse the repository at this point in the history
Relating to this upstream bug:
ROCm/ROCm-CompilerSupport#49

- remove redundant includes
- fix libdir path
  • Loading branch information
Mystro256 committed Sep 26, 2022
1 parent 1a4a7e6 commit 607c174
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion rocm-compilersupport.spec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Name: rocm-compilersupport
Version: %{rocm_version}
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Various AMD ROCm LLVM related services

Url: https://github.com/RadeonOpenCompute/ROCm-CompilerSupport
Expand Down Expand Up @@ -60,6 +60,14 @@ sed -i -e "/compile_test/d" \
-e "/compile_source_with_device_libs_to_bc_test/d" \
lib/comgr/test/CMakeLists.txt

##Fix issue wit HIP, where compilation flags are incorrect, see issue:
#https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/issues/49
#Remove redundant includes:
sed -i '/Args.push_back(HIPIncludePath/,+1d' lib/comgr/src/comgr-compiler.cpp
sed -i '/Args.push_back(ROCMIncludePath/,+1d' lib/comgr/src/comgr-compiler.cpp
#Source hard codes the libdir too:
sed -i 's/lib\(\/clang\)/%{_lib}\1/' lib/comgr/src/comgr-compiler.cpp

%build
%cmake -S lib/comgr -DCMAKE_BUILD_TYPE="RELEASE" -DBUILD_TESTING=ON
%cmake_build
Expand All @@ -86,6 +94,9 @@ sed -i -e "/compile_test/d" \
%{_libdir}/cmake/amd_comgr

%changelog
* Mon Sep 26 2022 Jeremy Newton <alexjnewt at hotmail dot com> - 5.2.0-2
- Fix HIP related issue

* Sun Jul 03 2022 Jeremy Newton <alexjnewt at hotmail dot com> - 5.2.0-1
- Update to 5.2.0

Expand Down

0 comments on commit 607c174

Please sign in to comment.