Skip to content

FindThreads: Use complete program to test for pthreads in libc

Jerry requested to merge JerryShih/cmake:find-pthread-update into master

Our check for just pthread_create is not sufficient because there are cases where that symbol may be found in libc but not all of pthreads. We first tried to address this in !2629 (merged) by switching to pthread_kill, but that had to be reverted by !3022 (merged) because there are other cases where pthread_kill is in libc but the rest of pthreads is not. Update our check to try a complete program using pthreads as an actual application might.

Fixes: #18994 (closed)

Edited by Brad King

Merge request reports