Skip to content

Commit

Permalink
updates and tweaks for sotools
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@84778 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
ripley committed Jul 28, 2023
1 parent f364c59 commit e014b92
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 12 deletions.
7 changes: 4 additions & 3 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -29214,9 +29214,10 @@ case "${FC}" in
*flang)
R_SYSTEM_ABI="${R_SYSTEM_ABI},flang,flang"
;;
## we do not consider ifort as it will be disconinued in 2023.
*ifx)
R_SYSTEM_ABI="${R_SYSTEM_ABI},ifx,ifx"
## We need not consider ifort as it will be discontinued in 2023.
## but it seems to have the same runtime.
*ifx|*ifort)
R_SYSTEM_ABI="${R_SYSTEM_ABI},intel,intel"
;;
*)
case "${host_os}" in
Expand Down
7 changes: 4 additions & 3 deletions m4/R.m4
Original file line number Diff line number Diff line change
Expand Up @@ -4315,9 +4315,10 @@ case "${FC}" in
*flang)
R_SYSTEM_ABI="${R_SYSTEM_ABI},flang,flang"
;;
## we do not consider ifort as it will be disconinued in 2023.
*ifx)
R_SYSTEM_ABI="${R_SYSTEM_ABI},ifx,ifx"
## We need not consider ifort as it will be discontinued in 2023.
## but it seems to have the same runtime.
*ifx|*ifort)
R_SYSTEM_ABI="${R_SYSTEM_ABI},intel,intel"
;;
*)
case "${host_os}" in
Expand Down
85 changes: 79 additions & 6 deletions src/library/tools/R/sotools.R
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ so_symbol_names_table <-
"Linux, C, gcc, assert, __assert_fail",
"linux, C, gcc, assert, __assert_fail_base",
"linux, C, gcc, exit, exit",
"linux, C, gcc, _exit, _exit",
"linux, C, gcc, _exit, _exit", ## may not be seen
"linux, C, gcc, _Exit, _Exit", ## _Exit is C99 and may not be a fn call
"linux, C, gcc, printf, printf",
"linux, C, gcc, printf, __printf_chk",
Expand All @@ -125,6 +125,7 @@ so_symbol_names_table <-
"linux, C, gcc, vprintf, vprintf",
"linux, C, gcc, vprintf, __vprintf_chk",
"linux, C, gcc, vsprintf, vsprintf",
"linux, C, gcc, vprintf, vfprintf",
"linux, C, gcc, vsprintf, __vsprintf_chk",
"linux, C++, gxx, std::cout, _ZSt4cout",
"linux, C++, gxx, std::cerr, _ZSt4cerr",
Expand All @@ -148,6 +149,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",
Expand All @@ -160,29 +162,95 @@ 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.

## and for flang-new
## flang-new currently has static libs for its runtimes.
"linux, Fortran, flang-new, stop, _FortranAStopStatement",
"linux, Fortran, flang-new, stop, _FortranAStopStatementText",
"linux, Fortran, flang-new, open, _FortranAioBeginOpenUnit",
"linux, Fortran, flang-new, close, _FortranAioBeginClose",
"linux, Fortran, flang-new, rewind, _FortranAioBeginRewind",
"linux, Fortran, flang-new, read, _FortranAioInputAscii",
"linux, Fortran, flang-new, read, _FortranAioInputCharacter",
"linux, Fortran, flang-new, read, _FortranAioInputComplex32",
"linux, Fortran, flang-new, read, _FortranAioInputComplex64",
"linux, Fortran, flang-new, read, _FortranAioInputInteger",
"linux, Fortran, flang-new, read, _FortranAioInputLogical",
"linux, Fortran, flang-new, read, _FortranAioInputReal32",
"linux, Fortran, flang-new, read, _FortranAioInputReal64",
"linux, Fortran, flang-new, read, _FortranAioInputUnformattedBlock",
"linux, Fortran, flang-new, print, _FortranAioOutputAscii",
"linux, Fortran, flang-new, print, _FortranAioOutputCharacter",
"linux, Fortran, flang-new, print, _FortranAioOutputComplex32",
"linux, Fortran, flang-new, print, _FortranAioOutputComplex64",
"linux, Fortran, flang-new, print, _FortranAioOutputInteger128",
"linux, Fortran, flang-new, print, _FortranAioOutputInteger16",
"linux, Fortran, flang-new, print, _FortranAioOutputInteger32",
"linux, Fortran, flang-new, print, _FortranAioOutputInteger64",
"linux, Fortran, flang-new, print, _FortranAioOutputInteger8",
"linux, Fortran, flang-new, print, _FortranAioOutputLogical",
"linux, Fortran, flang-new, print, _FortranAioOutputReal32",
"linux, Fortran, flang-new, print, _FortranAioOutputReal64",
"linux, Fortran, flang-new, write, _FortranAioOutputAscii",
"linux, Fortran, flang-new, write, _FortranAioOutputCharacter",
"linux, Fortran, flang-new, write, _FortranAioOutputComplex32",
"linux, Fortran, flang-new, write, _FortranAioOutputComplex64",
"linux, Fortran, flang-new, write, _FortranAioOutputInteger128",
"linux, Fortran, flang-new, write, _FortranAioOutputInteger16",
"linux, Fortran, flang-new, write, _FortranAioOutputInteger32",
"linux, Fortran, flang-new, write, _FortranAioOutputInteger64",
"linux, Fortran, flang-new, write, _FortranAioOutputInteger8",
"linux, Fortran, flang-new, write, _FortranAioOutputLogical",
"linux, Fortran, flang-new, write, _FortranAioOutputReal32",
"linux, Fortran, flang-new, write, _FortranAioOutputReal64",
"linux, Fortran, flang-new, write, _FortranAioOutputUnformatedBlock",
## does not support rand()
## https://discourse.llvm.org/t/support-for-gnu-fortran-extensions/69630

## Intel 'Clasic' and 202x
"linux, Fortran, intel, stop, for_stop",
"linux, Fortran, intel, stop, for_stop_core",
"linux, Fortran, intel, stop, for_stop_core8",
"linux, Fortran, intel, stop, for_stop_core_impl",
"linux, Fortran, intel, stop, for_stop_core_int",
"linux, Fortran, intel, stop, for_stop_core_int8",
"linux, Fortran, intel, stop, for_stop_core_quiet",
"linux, Fortran, intel, stop, for_stop_core_quiet_int8",
"linux, Fortran, intel, print, for_write_seq_lis",
"linux, Fortran, intel, open, for_open",
"linux, Fortran, intel, open, for_open_args",
"linux, Fortran, intel, open, for_open_default",
"linux, Fortran, intel, open, for_open_key",
"linux, Fortran, intel, close, for_close",
"linux, Fortran, intel, rewind, for_rewind:",
"linux, Fortran, intel, read, for_read_seq_lis",
"linux, Fortran, intel, read, for_read_seq_fmt",
"linux, Fortran, intel, write, for_write_seq_lis",
"linux, Fortran, intel, write, for_write_seq_fmt",
## does not support rand() except in module ifport

## Apple clang identifies itself as gcc, so configure has used that
"macos, C, gcc, abort, _abort",
"macos, C, gcc, assert, ___assert_rtn",
"macos, C, gcc, exit, _exit",
"macos, C, gcc, _exit, __exit",
"macos, C, gcc, _Exit, __Exit",
"macos, C, gcc, _Exit, __exit",
"macos, C, gcc, printf, _printf",
"macos, C, gcc, printf, _puts",
"macos, C, gcc, puts, _puts",
"macos, C, gcc, putchar, _putchar",
"macos, C, gcc, stderr, ___stderrp",
"macos, C, gcc, stdout, ___stdoutp",
"macos, C, gcc, sprintf, _sprintf",
"macos, C, gcc, sprintf, _sprintf", # old
"macos, C, gcc, sprintf, ___sprintf_chk",
"macos, C, gcc, vprintf, _vprintf",
"macos, C, gcc, vsprintf, _vsprintf",
"macos, C, gcc, vsprintf, _vsprintf", # old
"macos, C, gcc, vsprintf, ___vsprintf_chk",
"macos, C++, gxx, std::cout, __ZSt4cout",
"macos, C++, gxx, std::cerr, __ZSt4cerr",
"macos, C++, gxx, std::cout, __ZNSt3__14coutE",
"macos, C++, gxx, std::cerr, __ZNSt3__14cerrE",
#"macos, C++, gxx, std::terminate, __ZSt9terminatev",
"macos, C, gcc, rand, _rand",
"macos, C, gcc, random, _random",
Expand All @@ -203,6 +271,8 @@ so_symbol_names_table <-
"macos, Fortran, gfortran, stop, __gfortran_stop_string",
"macos, Fortran, gfortran, rand, __gfortran_rand",

## This is old: freebsd defaults to clang these days, and
## gfortran and (classic) flang are available (and 'f18' will be)
"freebsd, C, gcc, abort, abort",
"freebsd, C, gcc, assert, __assert",
"freebsd, C, gcc, exit, exit",
Expand All @@ -219,6 +289,9 @@ so_symbol_names_table <-
"freebsd, C, gcc, vsprintf, vsprintf",
"freebsd, C++, gxx, std::cout, _ZSt4cout",
"freebsd, C++, gxx, std::cerr, _ZSt4cerr",
## libc++ variants
"freebsd, C++, gxx, std::cout, _ZNSt3__14coutE",
"freebsd, C++, gxx, std::cerr, _ZNSt3__14cerrE",
"freebsd, C, gcc, rand, rand",
"freebsd, C, gcc, random, random",
"freebsd, C, gcc, srand, srand",
Expand Down

0 comments on commit e014b92

Please sign in to comment.