summaryrefslogtreecommitdiff
path: root/dev-util/hip/files/hip-5.7.1-disable-stack-protector.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util/hip/files/hip-5.7.1-disable-stack-protector.patch')
-rw-r--r--dev-util/hip/files/hip-5.7.1-disable-stack-protector.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/dev-util/hip/files/hip-5.7.1-disable-stack-protector.patch b/dev-util/hip/files/hip-5.7.1-disable-stack-protector.patch
new file mode 100644
index 000000000000..49d944ef4bc9
--- /dev/null
+++ b/dev-util/hip/files/hip-5.7.1-disable-stack-protector.patch
@@ -0,0 +1,13 @@
+Disable stack-protector (which is enabled by default gentoo-hardened) in device code.
+This is not required after https://github.com/llvm/llvm-project/pull/70799, but helps with older clang.
+Upstream bug: https://github.com/ROCm-Developer-Tools/clr/issues/21
+--- a/hipamd/src/hiprtc/hiprtcInternal.cpp
++++ b/hipamd/src/hiprtc/hiprtcInternal.cpp
+@@ -144,6 +144,7 @@ RTCCompileProgram::RTCCompileProgram(std::string name_) : RTCProgram(name_), fgp
+ compile_options_.push_back("-nogpuinc");
+ compile_options_.push_back("-Wno-gnu-line-marker");
+ compile_options_.push_back("-Wno-missing-prototypes");
++ compile_options_.push_back("-fno-stack-protector");
+ #ifdef _WIN32
+ compile_options_.push_back("-target");
+ compile_options_.push_back("x86_64-pc-windows-msvc");