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>
27 lines
941 B
Diff
27 lines
941 B
Diff
Unsetting __noinline__ before inclusion of libc++ __config breaks libc++ headers.
|
|
|
|
Additionally, `[[__gnu__::__noinline__]]` is used in libstdc++-16 `#include <format>`,
|
|
causing build failures in libstdc++ as well.
|
|
|
|
Bug: https://github.com/ROCm/rocm-systems/issues/1874
|
|
--- a/hipamd/include/hip/amd_detail/host_defines.h
|
|
+++ b/hipamd/include/hip/amd_detail/host_defines.h
|
|
@@ -250,6 +250,17 @@ typedef __hip_internal::int64_t __hip_int64_t;
|
|
|
|
#define __global__
|
|
|
|
+// __config in libc++ fails on `__has_attribute(__noinline__)` if __noinline__ is emptied
|
|
+#if defined(__cplusplus) && defined(__has_include)
|
|
+# if __has_include(<__config>)
|
|
+# include <__config>
|
|
+# else
|
|
+// format in libstdc++-16 fails on `[[__gnu__::__noinline__]]` if __noinline__ is emptied
|
|
+// https://github.com/ROCm/rocm-systems/issues/1874#issuecomment-5550937256
|
|
+# include <format>
|
|
+# endif
|
|
+#endif
|
|
+
|
|
#define __noinline__
|
|
#define __forceinline__ inline
|
|
|