From 06e0e6be13970979fff0ab14e476d4d37f1cbe4b Mon Sep 17 00:00:00 2001 From: Aaron En Ye Shi Date: Tue, 18 May 2021 21:54:48 +0000 Subject: [PATCH] SWDEV-283266 - Fix hipRTC mcin missing symbol Add back the .type directive needed for ELF format to add the section to symbol table. For COFF format the symbol is already added to the symbol table. Change-Id: I4920e8dae0af23b4dcabd324b47abc228fcab10f [ROCm/hip commit: ad570e3b9939811cb22db2440addad9798a82175] --- projects/hip/bin/hip_embed_pch.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/projects/hip/bin/hip_embed_pch.sh b/projects/hip/bin/hip_embed_pch.sh index a4cb64c972..6ec5568809 100755 --- a/projects/hip/bin/hip_embed_pch.sh +++ b/projects/hip/bin/hip_embed_pch.sh @@ -71,8 +71,10 @@ else fi if [[ "$OSTYPE" == cygwin || "$OSTYPE" == msys ]]; then + isWindows=1 tmpdir=. else + isWindows=0 tmpdir=/tmp fi @@ -132,13 +134,19 @@ EOF generate_rtc_header() { tmp=$tmpdir/hip_rtc.$$ mkdir -p $tmp + local headerFile="$tmp/hipRTC_header.h" + local mcinFile="$tmp/hipRTC_header.mcin" -cat >$tmp/hipRTC_header.h <$headerFile <$tmp/hipRTC_header.mcin < $mcinFile + if [[ $isWindows -eq 0 ]]; then + echo " .type __hipRTC_header,@object" >> $mcinFile + fi +cat >>$mcinFile <