GCC Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
libgfortran

libgfortran: Enable CAF shared memory for Cygwin and MinGW

Enables shared memory support for Coarray Fortran (CAF) on Cygwin and MinGW by default.

This commit ensures that the shared memory implementation for Coarray Fortran (CAF) is enabled by default for Cygwin and MinGW hosts. Previously, the build configuration excluded building the libcaf_shmem library on these platforms because they do not typically require the POSIX threads library. This change overrides that exclusion, allowing CAF shared memory to be used when available on these systems.

In Details

The libgfortran/caf/shmem/thread_support.{h,c} headers conditionally include pthread.h based on !defined(WIN32) && !defined(__CYGWIN__). This commit modifies configure.ac to unconditionally set enable_caf_shmem to true for Cygwin and MinGW hosts, ensuring the shared memory backend is built even if a separate pthread library isn't linked, as these platforms use native mutexes/semaphores.

For Context
libgfortran
The runtime library for the GNU Fortran compiler (gfortran).
CAF
Coarray Fortran, a parallel programming extension to the Fortran language that simplifies data-parallel programming.
shmem
Shared memory, a form of inter-process communication where multiple processes can access the same region of physical memory.
Cygwin
A POSIX-compatible environment that runs on Windows, providing a Unix-like layer.
MinGW
Minimalist GNU for Windows, a development environment that provides a GNU toolchain for creating Windows applications.
Filed Under: libgfortranparallel programmingwindowsconfigure