Skip to content

Commit

Permalink
add some notes on flang/flang-new/Intel ABI
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@84754 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
ripley committed Jul 26, 2023
1 parent e896626 commit 5666079
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
7 changes: 4 additions & 3 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -5860,9 +5860,9 @@ fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $r_cv_prog_texi2any_v5" >&5
printf "%s\n" "$r_cv_prog_texi2any_v5" >&6; }
## Also record whether texi2any is at least 7 to appropriately handle
## HTML and EPUB output changes, see
## <https://lists.gnu.org/archive/html/bug-texinfo/2022-11/msg00036.html>.
## Also record whether texi2any is at least 7 to appropriately handle
## HTML and EPUB output changes, see
## <https://lists.gnu.org/archive/html/bug-texinfo/2022-11/msg00036.html>.
if test ${r_cv_prog_texi2any_v7+y}
then :
printf %s "(cached) " >&6
Expand Down Expand Up @@ -29207,6 +29207,7 @@ if test "${ac_cv_fc_compiler_gnu}" = yes; then
R_SYSTEM_ABI="${R_SYSTEM_ABI},gfortran,gfortran"
else
case "${FC}" in
## This means Classic flang
*flang)
R_SYSTEM_ABI="${R_SYSTEM_ABI},flang,flang"
;;
Expand Down
15 changes: 11 additions & 4 deletions m4/R.m4
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,9 @@ elif test ${r_cv_prog_texi2any_version_maj} -lt 5 \
else
r_cv_prog_texi2any_v5=yes
fi])
## Also record whether texi2any is at least 7 to appropriately handle
## HTML and EPUB output changes, see
## <https://lists.gnu.org/archive/html/bug-texinfo/2022-11/msg00036.html>.
## Also record whether texi2any is at least 7 to appropriately handle
## HTML and EPUB output changes, see
## <https://lists.gnu.org/archive/html/bug-texinfo/2022-11/msg00036.html>.
AC_CACHE_VAL([r_cv_prog_texi2any_v7],
[if test ${r_cv_prog_texi2any_v5} = yes \
&& test ${r_cv_prog_texi2any_version_maj} -ge 7; then
Expand Down Expand Up @@ -3946,6 +3946,7 @@ fi
dnl Need to exclude Intel compilers, where this does not work correctly.
dnl The flag is documented and is effective, but also hides
dnl unsatisfied references. We cannot test for GCC, as icc passes that test.
dnl Seems to work for the revamped icx.
case "${CC}" in
## Intel compiler: note that -c99 may have been appended
*icc*)
Expand All @@ -3971,6 +3972,7 @@ fi
dnl Need to exclude Intel compilers, where this does not work correctly.
dnl The flag is documented and is effective, but also hides
dnl unsatisfied references. We cannot test for GCC, as icc passes that test.
dnl Seems to work for the revamped icpx.
case "${CXX}" in
## Intel compiler
*icc*|*icpc*)
Expand All @@ -3993,7 +3995,8 @@ if test "${r_cv_prog_fc_vis}" = yes; then
F_VISIBILITY="-fvisibility=hidden"
fi
fi
dnl need to exclude Intel compilers.
dnl flang accepts this but ignores it.
dnl Need to exclude Intel compilers, but ifx seems to work.
case "${FC}" in
## Intel compiler
*ifc|*ifort)
Expand Down Expand Up @@ -4267,6 +4270,7 @@ dnl Compiler types
dnl C: AC_PROG_CC does
dnl If using the GNU C compiler, set shell variable `GCC' to `yes'.
dnl Alternatively, could use ac_cv_c_compiler_gnu (undocumented).
dnl clang and Intel compilers identify as GNU, which is OK here
if test "${GCC}" = yes; then
R_SYSTEM_ABI="${R_SYSTEM_ABI},gcc"
else
Expand All @@ -4282,6 +4286,7 @@ fi
dnl C++: AC_PROG_CXX does
dnl If using the GNU C++ compiler, set shell variable `GXX' to `yes'.
dnl Alternatively, could use ac_cv_cxx_compiler_gnu (undocumented).
dnl clang and Intel compilers identify as GNU, which is OK here
if test "${GXX}" = yes; then
R_SYSTEM_ABI="${R_SYSTEM_ABI},gxx"
else
Expand All @@ -4297,7 +4302,9 @@ dnl Fortran (fixed- then free-form):
if test "${ac_cv_fc_compiler_gnu}" = yes; then
R_SYSTEM_ABI="${R_SYSTEM_ABI},gfortran,gfortran"
else
dnl Needs entries here for flang-new and Intel (ifort, ifx)
case "${FC}" in
## This means Classic flang
*flang)
R_SYSTEM_ABI="${R_SYSTEM_ABI},flang,flang"
;;
Expand Down
6 changes: 5 additions & 1 deletion src/library/tools/R/sotools.R
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ so_symbol_names_table <-
"linux, Fortran, gfortran, stop, _gfortran_stop_numeric_f08",
"linux, Fortran, gfortran, stop, _gfortran_stop_string",
"linux, Fortran, gfortran, rand, _gfortran_rand",
## These are for classic flang
"linux, Fortran, flang, open, f90io_open03",
"linux, Fortran, flang, open, f90io_open2003",
"linux, Fortran, flang, close, f90io_close",
Expand All @@ -159,6 +160,9 @@ so_symbol_names_table <-
"linux, Fortran, flang, stop, f90_stop",
"linux, Fortran, flang, stop, f90_stop08",
"linux, Fortran, flang, rand, rand",
## Need entries here for flang-new and Intel compilers.
## flang-new currently has static libs for its runtimes,
## so having them would be problematic.

## Apple clang identifies itself as gcc, so configure has used that
"macos, C, gcc, abort, _abort",
Expand Down Expand Up @@ -828,7 +832,7 @@ function(dir)
"base::.C", "base::.Call",
"base::.Fortran", "base::.External",
## internal ones
".Call.graphics", ".External.graphics",
".Call.graphics", ".External.graphics",
".External2")

predicate <- function(e) {
Expand Down

0 comments on commit 5666079

Please sign in to comment.