Skip to content

Commit b7d444e

Browse files
committed
Add flang-new to list of Fortran compilers and restrict mpif.h deprecation
Only add the deprecation warning to mpif.h if we compile with flang-new, which seems to properly handle the `#warning` preprocessor statement. Signed-off-by: Joseph Schuchart <[email protected]>
1 parent 1bce6a6 commit b7d444e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

config/ompi_setup_fc.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ AC_DEFUN_ONCE([_OMPI_SETUP_FC_COMPILER],[
4343
# Fortran compilers (excluding the f77 compiler names) from AC's
4444
# default list of compilers and use it here. This is the main
4545
# reason we have an OMPI-ized version of the PROG_FC macro.
46-
AC_PROG_FC([gfortran f95 fort xlf95 ifort ifc efc pgfortran pgf95 lf95 f90 xlf90 pgf90 epcf90 nagfor nvfortran])
46+
AC_PROG_FC([gfortran flang-new f95 fort xlf95 ifort ifc efc pgfortran pgf95 lf95 f90 xlf90 pgf90 epcf90 nagfor nvfortran])
4747
FCFLAGS="$ompi_fcflags_save"
4848
OPAL_VAR_SCOPE_POP
4949
])

config/ompi_setup_mpi_fortran.m4

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[
5959
AC_ARG_ENABLE([deprecate-mpif-h],
6060
[AS_HELP_STRING([--enable-deprecate-mpif-h],
6161
[Mark the mpif.h bindings as deprecated (default: enabled)])])
62-
if test "$enable_deprecate_mpif_h" = "no"; then
62+
if test "x$FC" != "xflang-new"; then
63+
AC_MSG_RESULT([no (only for flang-new)])
64+
OMPI_FORTRAN_DEPRECATE_MPIF_H=""
65+
elif test "$enable_deprecate_mpif_h" = "no"; then
6366
AC_MSG_RESULT([no])
6467
OMPI_FORTRAN_DEPRECATE_MPIF_H=""
6568
else

0 commit comments

Comments
 (0)