https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118811

--- Comment #18 from Nicholas Williams <nicholas at nicholaswilliams dot net> 
---
(In reply to Jonathan Wakely from comment #17)
> (In reply to Nicholas Williams from comment #1)
> > Created attachment 60438 [details]
> > gcc -v output from buggy RHEL/GCC14
> 
> The reason this doesn't work is because gcc-toolset-14 links to
> libstdc++_nonshared.a for the C++20 std::chrono pieces, so it's a static
> link.
> 
> You'll get the same behaviour on Ubuntu if you use -static-libstdc++, it's
> nothing to do with the compiler version or the OS, it's the way that the
> symbols are linked into the executable.

Yes, you are right! Adding -static-libstdc++ did indeed make my test
application fail on Ubuntu with GCC 13. That makes much more sense to me,
because I was having a hard time comparing libstdc++ 13 vs 14 code and seeing
anything that could have caused this to work in 13 and stop working in 14.

Because I'm incredibly curious and love learning new things, could you explain
*why* the static link breaks this? I've only been doing C++ dev for about 5
years, and I understand a lot by this point, but I

Reply via email to