[llvm] [openmp] [Flang-RT] Fix GCC 15.1 Fortran Runtime libstdc++ Undefined Symbols (PR #157385)
    Michael Kruse via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Sep 15 02:57:00 PDT 2025
    
    
  
Meinersbur wrote:
For (3), a command-line-only replacement would be adding [`-include`](https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html#index-include) of a custom header containing our definition of `_GLIBCXX_THROW_OR_ABORT`. I am not sure how preferable that would be.
For (1), even if cast-to-void, the side-effects must still execute. It's proably that gcc does not emit anything to the mid-end that it can predetermine is never executed (in this case: after a `[[noreturn]]` function) even with `-O2`, like Clang does for statuc functions that are not referenced.
For (4), using C++ without its link library is not an advertised feature of libstdc++ nor libc++, msvc STL (AFAIK), so problems like these may accumulate over time and eventually make a complete replacement necessary, like [libc](https://github.com/llvm/llvm-project/tree/main/libc/src/__support/CPP) did from the beginning. But I agree, if we can get away with it by just defining `_GLIBCXX_THROW_OR_ABORT`, it seems prefereable.
https://github.com/llvm/llvm-project/pull/157385
    
    
More information about the llvm-commits
mailing list