From 88655a00df9719a91dca13e8e0a4dc3eb78ad073 Mon Sep 17 00:00:00 2001 From: Jeremy Newton Date: Sep 19 2022 21:31:14 +0000 Subject: Fix for HIP related issue Relating to this upstream bug: https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/issues/49 - remove redundant includes - fix libdir path --- diff --git a/rocm-compilersupport.spec b/rocm-compilersupport.spec index e5014f1..bb4e650 100644 --- a/rocm-compilersupport.spec +++ b/rocm-compilersupport.spec @@ -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