As discussed Jerry, tested on i686 and x86_64 darwin, pushed to trunk,
thanks
Iain

--- 8< ---

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]>
---
 libgfortran/configure    | 6 ++++++
 libgfortran/configure.ac | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/libgfortran/configure b/libgfortran/configure
index 6d31fa11be2..e81d6d7c6d1 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 c5f84a031cd..a63e1c4480c 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
-- 
2.50.1 (Apple Git-155)

Reply via email to