summaryrefslogtreecommitdiff
path: root/dev-util/hip/files/hip-5.1.3-llvm-15-noinline-keyword.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-11-19 13:00:31 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-11-19 13:00:31 +0000
commit26f79803004cb53e92cf2f0e889de89979385aa9 (patch)
treed46d17cb971a2dffbe96669e4ad8d341eb5ee3c7 /dev-util/hip/files/hip-5.1.3-llvm-15-noinline-keyword.patch
parentc5572b13d51970d6603acd131f27991cc1b66a79 (diff)
gentoo auto-resync : 19:11:2022 - 13:00:31
Diffstat (limited to 'dev-util/hip/files/hip-5.1.3-llvm-15-noinline-keyword.patch')
-rw-r--r--dev-util/hip/files/hip-5.1.3-llvm-15-noinline-keyword.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/dev-util/hip/files/hip-5.1.3-llvm-15-noinline-keyword.patch b/dev-util/hip/files/hip-5.1.3-llvm-15-noinline-keyword.patch
new file mode 100644
index 000000000000..de61356a5cc6
--- /dev/null
+++ b/dev-util/hip/files/hip-5.1.3-llvm-15-noinline-keyword.patch
@@ -0,0 +1,21 @@
+LLVM 15 adds __noinline__ as a keyword to match behaviour of GCC 12.
+
+When this macro is left in, it can cause the expression __attribute__((__noinline__)) to be expanded incorrectly.
+
+When the __noinline__ keyword is available disable the macro.
+
+Ref: https://reviews.llvm.org/D124866
+ https://bugs.gentoo.org/85712
+===================================================================
+--- a/include/hip/amd_detail/host_defines.h
++++ b/include/hip/amd_detail/host_defines.h
+@@ -47,7 +47,9 @@ THE SOFTWARE.
+ #define __constant__ __attribute__((constant))
+ #endif // !__CLANG_HIP_RUNTIME_WRAPPER_INCLUDED__
+
++#if !defined(__has_feature) || !__has_feature(cuda_noinline_keyword)
+ #define __noinline__ __attribute__((noinline))
++#endif
+ #define __forceinline__ inline __attribute__((always_inline))
+
+ #if __HIP_NO_IMAGE_SUPPORT