mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2025-12-08 00:05:33 +03:00
dev-util/hip: do not include stdlibc++ file in HIPRTC header
When any hip header included with -D__HIPCC_RTC__, it means that compiler was launched with -E -P to produce a preprocessed header. In this case not a single libstdc++ header can be used, otherwise it causes function redefinition on next attempt to include the same header elsewhere. Closes: https://bugs.gentoo.org/966188 Signed-off-by: Sv. Lockal <lockalsash@gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/44725 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
parent
edd7dacac7
commit
dacbed530e
@ -13,7 +13,7 @@ Bug: https://bugs.gentoo.org/955623
|
||||
#define __HIP_HAS_GET_PCH ${_pchStatus}\n
|
||||
+
|
||||
+// Workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115740
|
||||
+#if defined(__has_include) && defined(__cplusplus) && defined(__HIP__)
|
||||
+#if defined(__has_include) && defined(__cplusplus) && defined(__HIP__) && !defined(__HIPCC_RTC__)
|
||||
+ #if __has_include(\"bits/c++config.h\")
|
||||
+ #include <bits/c++config.h>
|
||||
+ #undef __glibcxx_assert
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user