summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-util/hip/files/hip-7.0.2-fix-libcxx-noinline.patch2
-rw-r--r--dev-util/hip/files/hip-7.0.2-fix-libcxx-ranges.patch19
-rw-r--r--dev-util/hip/hip-7.1.0.ebuild1
3 files changed, 22 insertions, 0 deletions
diff --git a/dev-util/hip/files/hip-7.0.2-fix-libcxx-noinline.patch b/dev-util/hip/files/hip-7.0.2-fix-libcxx-noinline.patch
index 28f8e7e55d11..0f77fbf76971 100644
--- a/dev-util/hip/files/hip-7.0.2-fix-libcxx-noinline.patch
+++ b/dev-util/hip/files/hip-7.0.2-fix-libcxx-noinline.patch
@@ -1,4 +1,6 @@
Unsetting __noinline__ before inclusion of libc++ __config breaks libc++ headers.
+
+Upstream PR: https://github.com/ROCm/rocm-systems/pull/1875
--- a/hipamd/include/hip/amd_detail/host_defines.h
+++ b/hipamd/include/hip/amd_detail/host_defines.h
@@ -257,6 +257,13 @@ typedef __hip_internal::int64_t __hip_int64_t;
diff --git a/dev-util/hip/files/hip-7.0.2-fix-libcxx-ranges.patch b/dev-util/hip/files/hip-7.0.2-fix-libcxx-ranges.patch
new file mode 100644
index 000000000000..cbb6035d5df9
--- /dev/null
+++ b/dev-util/hip/files/hip-7.0.2-fix-libcxx-ranges.patch
@@ -0,0 +1,19 @@
+Defining __local before inclusion of libc++ <ranges> causes compilation errors.
+
+Upstream PR: https://github.com/ROCm/rocm-systems/pull/1875
+--- a/hipamd/include/hip/amd_detail/device_library_decls.h
++++ b/hipamd/include/hip/amd_detail/device_library_decls.h
+@@ -120,6 +120,13 @@ extern "C" __device__ __hip_uint64_t __ockl_fprintf_append_string_n(__hip_uint64
+ __hip_uint64_t length,
+ __hip_uint32_t is_last);
+
++// libc++ <ranges> uses __local as function name; include one file, before defining __local macro
++#if defined(__cplusplus) && defined(_LIBCPP_VERSION) && defined(__has_include)
++# if __has_include (<__ranges/join_view.h>)
++# include <__ranges/join_view.h>
++# endif
++#endif
++
+ // Introduce local address space
+ #define __local __attribute__((address_space(3)))
+
diff --git a/dev-util/hip/hip-7.1.0.ebuild b/dev-util/hip/hip-7.1.0.ebuild
index 4e90c13c7a81..b891484de5a9 100644
--- a/dev-util/hip/hip-7.1.0.ebuild
+++ b/dev-util/hip/hip-7.1.0.ebuild
@@ -90,6 +90,7 @@ PATCHES=(
"${FILESDIR}/${PN}-6.3.0-clr-fix-libcxx.patch"
"${FILESDIR}/${PN}-6.4.1-no-glibcxx-assert.patch"
"${FILESDIR}/${PN}-7.0.2-fix-libcxx-noinline.patch"
+ "${FILESDIR}/${PN}-7.0.2-fix-libcxx-ranges.patch"
)
QA_FLAGS_IGNORED="usr/lib.*/libhiprtc-builtins.*"