https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71541
--- Comment #6 from Hans Philipp Annen ---
> -Wl,--whole-archive -lpthread -Wl,--no-whole-archive
This did help.
Without it, the destructor of condition_variable just jumps to nowhere:
> Dump of assembler code for function _ZNSt18condition_vari
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71541
--- Comment #4 from gcc_bugzilla at haphi dot de ---
(In reply to Jonathan Wakely from comment #3)
> You need to link to libpthread to use std::condition_variable_any.
Adding -lpthread doesn't change the situation.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71541
--- Comment #2 from gcc_bugzilla at haphi dot de ---
Created attachment 38702
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38702&action=edit
preprocessed file of trivial repro case
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71541
--- Comment #1 from gcc_bugzilla at haphi dot de ---
compiled with:
> gcc -static -o trivial_repro_case trivial_repro_case.cpp
> ./trivial_repro_case
> Segmentation fault (core dumped)
output of gcc -v:
> Using built-in specs.
>
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: gcc_bugzilla at haphi dot de
Target Milestone: ---
Host: x86_64-linux-gnu
Target: x86_64-linux-gnu
Build: x86_64-linux-gnu
Created attachment 38701