summaryrefslogtreecommitdiff
path: root/dev-util/hip/files/hip-5.7.1-exec-stack.patch
blob: 744ca7b953c3f01ac1ad17c7bcb7932a4ad7415a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Upstream bug: https://github.com/ROCm-Developer-Tools/clr/issues/22
--- a/hipamd/src/hip_embed_pch.sh
+++ b/hipamd/src/hip_embed_pch.sh
@@ -178,6 +178,7 @@ EOF
 
   echo "// Automatically generated script for HIP RTC." > $mcinFile
   if [[ $isWindows -eq 0 ]]; then
+    echo "  .section .note.GNU-stack,"",%progbits" >> $mcinFile
     echo "  .type __hipRTC_header,@object" >> $mcinFile
     echo "  .type __hipRTC_header_size,@object" >> $mcinFile
   fi
--- a/hipamd/src/hiprtc/cmake/HIPRTC.cmake
+++ b/hipamd/src/hiprtc/cmake/HIPRTC.cmake
@@ -98,6 +98,7 @@ macro(generate_hiprtc_mcin HiprtcMcin HiprtcPreprocessedInput)
     set(HIPRTC_TYPE_LINUX_ONLY "")
   else()
     set(HIPRTC_TYPE_LINUX_ONLY
+      "  .section .note.GNU-stack,\"\",%progbits\n"
       "  .type __hipRTC_header,@object\n"
       "  .type __hipRTC_header_size,@object")
   endif()
--- a/hipamd/src/hip_embed_pch.sh
+++ b/hipamd/src/hip_embed_pch.sh
@@ -111,6 +111,7 @@ cat >$tmp/hip_pch.h <<EOF
 EOF
 
 cat >$tmp/hip_pch.mcin <<EOF
+  .section .note.GNU-stack,"",%progbits
   .type __hip_pch_wave32,@object
   .section .hip_pch_wave32,"aMS",@progbits,1
   .data