]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libgomp: Only check for 2*sizeof(void*) int type with Fortran [PR96661]
authorTobias Burnus <tobias@codesourcery.com>
Tue, 28 Sep 2021 13:15:47 +0000 (15:15 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Tue, 28 Sep 2021 13:17:07 +0000 (15:17 +0200)
The depend type is a struct with two pointer members for C/C++ - but for
Fortran OpenMP requires an integer type with kind = omp_depend_kind. Thus,
libgomp's configure checks that an integer type/kind with size 2*sizeof(void*)
is available. However, this integer type/kind is not needed when building without
Fortran support. Thus, only check this when Fortran is enabled.

libgomp/
PR libgomp/96661
* configure.ac: Only check for int-type = 2*size_t support when
building with Fortran support.
* configure: Regenerate.

(cherry picked from commit 1f0a57bd54aed558e0167016dd980177f88f8480)

libgomp/configure
libgomp/configure.ac

index 1917d7e273b0402b99d2c4d6d7d4df71569af885..718a76b4a4014d9be07709c87f45f2ac9be96a9d 100755 (executable)
 if test $OMP_NEST_LOCK_25_SIZE -gt 8 || test $OMP_NEST_LOCK_25_ALIGN -gt $OMP_NEST_LOCK_25_SIZE; then
   OMP_NEST_LOCK_25_KIND=8
 fi
-if test $OMP_DEPEND_KIND -eq 16; then
-  if test $OMP_INT128_SIZE -ne 16; then
-    as_fn_error $? "unsupported system, cannot find Fortran int kind=16, needed for omp_depend_kind" "$LINENO" 5
-  fi
-else
-  if test $OMP_DEPEND_KIND -ne 8; then
-    as_fn_error $? "unsupported system, cannot find Fortran integer kind for omp_depend_kind" "$LINENO" 5
+if test "$ac_cv_fc_compiler_gnu" = yes; then
+  if test $OMP_DEPEND_KIND -eq 16; then
+    if test $OMP_INT128_SIZE -ne 16; then
+      as_fn_error $? "unsupported system, cannot find Fortran int kind=16, needed for omp_depend_kind" "$LINENO" 5
+    fi
+  else
+    if test $OMP_DEPEND_KIND -ne 8; then
+      as_fn_error $? "unsupported system, cannot find Fortran integer kind for omp_depend_kind" "$LINENO" 5
+    fi
   fi
 fi
 
index c23fe004f1d9fcbdf0c2d951d20c8dec5bd43cca..0e238b6a559aed0fda041db2023a4d62db2f7798 100644 (file)
@@ -433,13 +433,15 @@ fi
 if test $OMP_NEST_LOCK_25_SIZE -gt 8 || test $OMP_NEST_LOCK_25_ALIGN -gt $OMP_NEST_LOCK_25_SIZE; then
   OMP_NEST_LOCK_25_KIND=8
 fi
-if test $OMP_DEPEND_KIND -eq 16; then
-  if test $OMP_INT128_SIZE -ne 16; then
-    AC_MSG_ERROR([unsupported system, cannot find Fortran int kind=16, needed for omp_depend_kind])
-  fi
-else
-  if test $OMP_DEPEND_KIND -ne 8; then
-    AC_MSG_ERROR([unsupported system, cannot find Fortran integer kind for omp_depend_kind])
+if test "$ac_cv_fc_compiler_gnu" = yes; then
+  if test $OMP_DEPEND_KIND -eq 16; then
+    if test $OMP_INT128_SIZE -ne 16; then
+      AC_MSG_ERROR([unsupported system, cannot find Fortran int kind=16, needed for omp_depend_kind])
+    fi
+  else
+    if test $OMP_DEPEND_KIND -ne 8; then
+      AC_MSG_ERROR([unsupported system, cannot find Fortran integer kind for omp_depend_kind])
+    fi
   fi
 fi