https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124512
--- Comment #9 from Christopher Albert <albert at tugraz dot at> --- Created attachment 63969 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63969&action=edit Proposed patch: disable shmem CAF when pthread_mutexattr_setpshared is absent Proposed patch attached. This adds an AC_CHECK_FUNC for pthread_mutexattr_setpshared after AX_PTHREAD in libgfortran/configure.ac. When the function is absent (NetBSD, OpenBSD), ENABLE_CAF_SHMEM is set to false and the shmem CAF library is not built. Also adds aarch64*-*-netbsd* to the host detection pattern in gcc/config.host for host_detect_local_cpu (matching the existing arm*-*-netbsd* pattern). Tested so far: - cfarm428 (NetBSD 10.1, aarch64): full build succeeds, shmem CAF correctly disabled (ENABLE_CAF_SHMEM_TRUE='#'), no thread_support.o built. - Linux x86_64 (local): build succeeds, shmem CAF remains enabled. check-gfortran running (0 failures so far). - cfarm220 (OpenBSD 7.8, amd64): pthread_mutexattr_setpshared confirmed absent. Build test in progress. - cfarm428 check-gfortran also in progress. Platform survey of pthread_mutexattr_setpshared availability: NetBSD 10.1 aarch64 (cfarm428): absent OpenBSD 7.8 amd64 (cfarm220): absent OpenBSD 7.8 aarch64 (cfarm429): absent FreeBSD 16 aarch64 (cfarm427): present DragonFly 6.4 amd64 (cfarm152): present GNU/Hurd amd64 (cfarm431): present Will follow up with full test results.
