mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
Closes: https://bugs.gentoo.org/982294 Signed-off-by: Sv. Lockal <lockalsash@gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/46779 Closes: https://github.com/gentoo/gentoo/pull/46779 Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
22 lines
1.0 KiB
Diff
22 lines
1.0 KiB
Diff
Defining __local before inclusion of libc++ <ranges> or <deque> causes compilation errors.
|
|
|
|
Upstream bug: https://github.com/ROCm/rocm-systems/issues/1874
|
|
--- a/hipamd/include/hip/amd_detail/device_library_decls.h
|
|
+++ b/hipamd/include/hip/amd_detail/device_library_decls.h
|
|
@@ -120,6 +120,15 @@ 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
|
|
+// Deque also uses __local function name; include should be safe, as it is autoincluded anyways
|
|
+# include <deque>
|
|
+#endif
|
|
+
|
|
// Introduce local address space
|
|
#define __local __attribute__((address_space(3)))
|
|
|