diff options
| author | Sv. Lockal <lockalsash@gmail.com> | 2025-11-15 09:34:56 +0000 |
|---|---|---|
| committer | Sam James <sam@gentoo.org> | 2025-11-16 09:14:51 +0000 |
| commit | 2e75b4dd03e756ae15367b47e618b03d74fc2347 (patch) | |
| tree | 1f8baf68cb51f130819a4adec47398e91b8f1c78 | |
| parent | a644e0f17d4799db70d9ebc2eedbb0010674b935 (diff) | |
| download | gentoo-2e75b4dd03e756ae15367b47e618b03d74fc2347.tar.gz gentoo-2e75b4dd03e756ae15367b47e618b03d74fc2347.tar.bz2 gentoo-2e75b4dd03e756ae15367b47e618b03d74fc2347.zip | |
dev-util/hip: fix libc++ #include <ranges> in HIP code
Closes: https://bugs.gentoo.org/965954
Signed-off-by: Sv. Lockal <lockalsash@gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/44633
Closes: https://github.com/gentoo/gentoo/pull/44633
Signed-off-by: Sam James <sam@gentoo.org>
| -rw-r--r-- | dev-util/hip/files/hip-7.0.2-fix-libcxx-noinline.patch | 2 | ||||
| -rw-r--r-- | dev-util/hip/files/hip-7.0.2-fix-libcxx-ranges.patch | 19 | ||||
| -rw-r--r-- | dev-util/hip/hip-7.1.0.ebuild | 1 |
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.*" |
