summaryrefslogtreecommitdiff
path: root/dev-util/hip/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-01-21 11:40:40 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-01-21 11:40:40 +0000
commitbae478b64a6bc9eca66b65bcfa318fc21e7f34bb (patch)
treef713006fd9c119e5dbb3bdafe7d695d2644da94c /dev-util/hip/files
parent374561aeaff53ce5a2836af934749923b4ea3763 (diff)
gentoo auto-resync : 21:01:2023 - 11:40:40
Diffstat (limited to 'dev-util/hip/files')
-rw-r--r--dev-util/hip/files/hip-5.1.3-fno-stack-protector.patch16
1 files changed, 16 insertions, 0 deletions
diff --git a/dev-util/hip/files/hip-5.1.3-fno-stack-protector.patch b/dev-util/hip/files/hip-5.1.3-fno-stack-protector.patch
new file mode 100644
index 000000000000..c5957edba734
--- /dev/null
+++ b/dev-util/hip/files/hip-5.1.3-fno-stack-protector.patch
@@ -0,0 +1,16 @@
+Since 1e9b3a08b9243daae1bebd6bac3da939d924df1f /etc/clang/gentoo-hardened.cfg
+has -fstack-protector-strong which may cause build issues for HIP programs (bug
+#890377) Disable this by adding -fno-stack-protector into c/cxx flags in hipcc.
+===================================================================
+--- HIP-rocm-5.3.3.orig/bin/hipcc.pl
++++ HIP-rocm-5.3.3/bin/hipcc.pl
+@@ -687,6 +687,9 @@ if ($rdc and !$compileOnly and $HIP_PLAT
+ # pass-through CPP mode.
+
+ if ($HIP_PLATFORM eq "amd") {
++ # Append -fno-stack-protector due to stack protection for HIP is not supported
++ $HIPCXXFLAGS .= " -fno-stack-protector";
++ $HIPCFLAGS .= " -fno-stack-protector";
+ # Set default optimization level to -O3 for hip-clang.
+ if ($optArg eq "") {
+ $HIPCXXFLAGS .= " -O3";