https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77473
--- Comment #4 from Rimvydas (RJ) <rimvydas.jas at gmail dot com> --- Yes it is an issue in gthr-posix.h how presence of pthread is checked on DragonFly. libc contains pthread_cancel() stub and it is strange why we detected failures only now on testsuite after new PRNG in libgfortran. Currently we checking if we could exclude pthread_cancel symbol from libc without breaking to much stuff (this would automatically fix previous gcc ports and base compilers on DragonFly 4.7+). Other variants are to use pthread_create() (as in BIONIC case) or special variable from libc (z2.diff), however that depends on what __gthread_active_p() should mean: 1) the pthread library is present and initialized 2) present but might not be initialized yet