[Openmp-commits] [flang] [llvm] [openmp] [Flang-RT] Fix GCC 15.1 Fortran Runtime libstdc++ Undefined Symbols (PR #157385)

Michael Kruse via Openmp-commits openmp-commits at lists.llvm.org
Thu Oct 2 04:29:27 PDT 2025


================
@@ -24,6 +24,9 @@ using cuda::std::variant_size_v;
 using cuda::std::visit;
 } // namespace std
 #else // !RT_USE_LIBCUDACXX
+#include <initializer_list>
----------------
Meinersbur wrote:

Have a look into how libstdc++ defines the macro:
https://github.com/gcc-mirror/gcc/blob/d87c0d5443ba860dcbc6be24921e0ffb463cc96f/libstdc%2B%2B-v3/include/bits/c%2B%2Bconfig#L260-L266
```c
#ifndef _GLIBCXX_THROW_OR_ABORT
# if __cpp_exceptions
#  define _GLIBCXX_THROW_OR_ABORT(_EXC) (throw (_EXC))
# else
#  define _GLIBCXX_THROW_OR_ABORT(_EXC) (__builtin_abort(), (void)(_EXC))
# endif
#endif
```
I.e. it will NOT redefine if it was already defined. Same mechanism as `_GLIBCXX_ASSERTIONS` which is documented to be user-definable.

https://github.com/llvm/llvm-project/pull/157385


More information about the Openmp-commits mailing list