Skip to content

Commit 80f6b5d

Browse files
authored
Merge pull request #9893 from cms-sw/mpich-clang-fix
ROCM: set HIP_PATH and created clang++.cfg to provide gcc-toolchain and target
2 parents 6823630 + f06c0e8 commit 80f6b5d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

rocm.spec

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
### RPM external rocm 6.3.2
22
## INCLUDE cpp-standard
3+
## INITENV SET HIP_PATH %{i}
34

45
%if 0%{?rhel} == 7
56
# allow rpm2cpio dependency on the bootstrap bundle
@@ -148,4 +149,14 @@ find %{i}/bin/ %{i}/libexec/ %{i}/llvm/bin/ %{i}/llvm/lib/ -type f | xargs -r \
148149
cd build/rocprofiler-register
149150
make install
150151

152+
#Create clang cfg file for gcc-toolchain
153+
%if 0%{!?use_system_gcc:1}
154+
host_triple=$(gcc -dumpmachine)
155+
echo "--gcc-toolchain=$GCC_ROOT" > %{i}/llvm/bin/clang++.cfg
156+
echo "--target=$host_triple" >> %{i}/llvm/bin/clang++.cfg
157+
%endif
158+
151159
%post
160+
%if 0%{!?use_system_gcc:1}
161+
%{relocateConfig}/llvm/bin/clang++.cfg
162+
%endif

0 commit comments

Comments
 (0)