https://gcc.gnu.org/g:56aa8efa78194dac05e76ed4e6505ca75a12742a

commit r17-3937-g56aa8efa78194dac05e76ed4e6505ca75a12742a
Author: Iain Sandoe <[email protected]>
Date:   Fri Sep 4 19:47:52 2026 +0100

    libgfortran, Darwin: Update configuration for shared memory coarrays.
    
    The current implmentation makes use of a shared memory segement and
    PTHREAD_PROCESS_SHARED which is not supported until macOS 10.7
    (darwin11).  Disable this implementation on the earlier systems, it
    juast contributes testsuite noise.
    
    libgfortran/ChangeLog:
    
            * configure: Regenerate.
            * configure.ac: Account for missing runtime support for
            PTHREAD_PROCESS_SHARED on Darwin versions earlier that
            Darwin11.
    
    Signed-off-by: Iain Sandoe <[email protected]>

Diff:
---
 libgfortran/configure    | 6 ++++++
 libgfortran/configure.ac | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/libgfortran/configure b/libgfortran/configure
index 6d31fa11be2a..e81d6d7c6d16 100755
--- a/libgfortran/configure
+++ b/libgfortran/configure
@@ -18475,6 +18475,12 @@ fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   CFLAGS="$save_CFLAGS"
 fi
+case ${host} in
+  *-*-darwin[89]* | *-*-darwin10*)
+    # These versions define PTHREAD_PROCESS_SHARED but the functionality
+    # is not available at runtime, so the configure check misleads.
+    enable_caf_shmem=false;;
+esac
  if test x$enable_caf_shmem = xtrue; then
   ENABLE_CAF_SHMEM_TRUE=
   ENABLE_CAF_SHMEM_FALSE='#'
diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac
index c5f84a031cd3..a63e1c4480c3 100644
--- a/libgfortran/configure.ac
+++ b/libgfortran/configure.ac
@@ -375,6 +375,12 @@ if test x$enable_caf_shmem = xtrue; then
      enable_caf_shmem=false])
   CFLAGS="$save_CFLAGS"
 fi
+case ${host} in
+  *-*-darwin[[89]]* | *-*-darwin10*)
+    # These versions define PTHREAD_PROCESS_SHARED but the functionality
+    # is not available at runtime, so the configure check misleads.
+    enable_caf_shmem=false;;
+esac
 AM_CONDITIONAL([ENABLE_CAF_SHMEM], [test x$enable_caf_shmem = xtrue])
 
 # Check strerror_r, cannot be above as versions with two and three arguments 
exist

Reply via email to