https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104852
--- Comment #1 from Jackson Huff <lightningdzeyenr at gmail dot com> --- Note that my CMake command includes -lpthread even though CMake has been configured to link it already with -pthread, so when reproducing it, remove -lpthread to better replicate the situation (I only realized this after posting).