Skip to content

Commit b33cd5c

Browse files
committed
Use gfotran even in the Labs LLVM Toolchain Makeconf version
1 parent 3660806 commit b33cd5c

File tree

4 files changed

+46
-14
lines changed

4 files changed

+46
-14
lines changed

com.oracle.truffle.r.native/run/fastr_etc/Darwin/Makeconf.llvm

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,25 @@ ECHO_N =
7878
ECHO_T =
7979
F_VISIBILITY =
8080
## FC is the compiler used for all Fortran as from R 3.6.0
81-
## FastR Note: the tool 'f2c-wrapper' tries to use f2c (bundled with FastR) and
82-
## if it fails it delegates to the fortran compiler given as the argument.
83-
## If gfortran is installed in a non-standard location on your system,
84-
## replace the second path pointing to "safe-forward-gfortran" with the correct
85-
## path to the gfortran executable on your system.
86-
FC = "$(R_HOME)/bin/f2c-wrapper" "$(R_HOME)/bin/safe-forward-gfortran"
81+
##
82+
## If gfortran is installed in a non-standard location, which is not on $PATH,
83+
## replace the "$(R_HOME)/bin/safe-forward-gfortran" with the path to gfortran
84+
## on your system.
85+
##
86+
## FastR uses gfortran even for the LLVM toolchain compilation, which implies
87+
## that R packages that contain Fortran code will not be runnable on the
88+
## FastR's LLVM backend (--R.BackEnd=llvm). However, the default backend is
89+
## the "native" (--R.BackEnd=native) and one can choose to run only specific
90+
## packages via the LLVM backend (--R.BackEndLLVM=mypackage).
91+
##
92+
## FastR also provides tool 'f2c-wrapper' (disabled by default), which tries to
93+
## use f2c (bundled with FastR) and if it fails it delegates to the Fortran compiler
94+
## given as the first argument to 'f2c-wrapper'. If the F2C compilation succeedes
95+
## for all Fortran files in an R package, then the resulting library will contain
96+
## LLVM bitcode and will be runnable via FastR's LLVM backend.
97+
FC = "$(R_HOME)/bin/safe-forward-gfortran"
98+
## To use f2c uncomment the following line
99+
# FC = "$(R_HOME)/bin/f2c-wrapper" "$(FC)"
87100
FCFLAGS = -O2 $(LTO)
88101
## additional libs needed when linking with $(FC), e.g. on some Oracle compilers
89102
FCLIBS_XTRA =

com.oracle.truffle.r.native/run/fastr_etc/Darwin/Makeconf.native

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,10 @@ ECHO_N =
7878
ECHO_T =
7979
F_VISIBILITY =
8080
## FC is the compiler used for all Fortran as from R 3.6.0
81-
## FastR Note: the wrapper tries to use f2c, if it fails it uses the tool given as the first argument
81+
##
82+
## If gfortran is installed in a non-standard location, which is not on $PATH,
83+
## replace the "$(R_HOME)/bin/safe-forward-gfortran" with the path to gfortran
84+
## on your system.
8285
FC = "$(R_HOME)/bin/safe-forward-gfortran"
8386
FCFLAGS = -O2 $(LTO)
8487
## additional libs needed when linking with $(FC), e.g. on some Oracle compilers

com.oracle.truffle.r.native/run/fastr_etc/Linux/Makeconf.llvm

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,25 @@ ECHO_N = -n
7878
ECHO_T =
7979
F_VISIBILITY = -fvisibility=hidden
8080
## FC is the compiler used for all Fortran as from R 3.6.0
81-
## FastR Note: the tool 'f2c-wrapper' tries to use f2c (bundled with FastR) and
82-
## if it fails it delegates to the fortran compiler given as the argument.
83-
## If gfortran is installed in a non-standard location on your system,
84-
## replace the second path pointing to "safe-forward-gfortran" with the correct
85-
## path to the gfortran executable on your system.
86-
FC = "$(R_HOME)/bin/f2c-wrapper" "$(R_HOME)/bin/safe-forward-gfortran"
81+
##
82+
## If gfortran is installed in a non-standard location, which is not on $PATH,
83+
## replace the "$(R_HOME)/bin/safe-forward-gfortran" with the path to gfortran
84+
## on your system.
85+
##
86+
## FastR uses gfortran even for the LLVM toolchain compilation, which implies
87+
## that R packages that contain Fortran code will not be runnable on the
88+
## FastR's LLVM backend (--R.BackEnd=llvm). However, the default backend is
89+
## the "native" (--R.BackEnd=native) and one can choose to run only specific
90+
## packages via the LLVM backend (--R.BackEndLLVM=mypackage).
91+
##
92+
## FastR also provides tool 'f2c-wrapper' (disabled by default), which tries to
93+
## use f2c (bundled with FastR) and if it fails it delegates to the Fortran compiler
94+
## given as the first argument to 'f2c-wrapper'. If the F2C compilation succeedes
95+
## for all Fortran files in an R package, then the resulting library will contain
96+
## LLVM bitcode and will be runnable via FastR's LLVM backend.
97+
FC = "$(R_HOME)/bin/safe-forward-gfortran"
98+
## To use f2c uncomment the following line
99+
# FC = "$(R_HOME)/bin/f2c-wrapper" "$(FC)"
87100
FCFLAGS = -O2 $(LTO)
88101
## additional libs needed when linking with $(FC), e.g. on some Oracle compilers
89102
FCLIBS_XTRA =

com.oracle.truffle.r.native/run/fastr_etc/Linux/Makeconf.native

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,10 @@ ECHO_N = -n
7878
ECHO_T =
7979
F_VISIBILITY = -fvisibility=hidden
8080
## FC is the compiler used for all Fortran as from R 3.6.0
81-
## FastR Note: the wrapper tries to use f2c, if it fails it uses the tool given as the first argument
81+
##
82+
## If gfortran is installed in a non-standard location, which is not on $PATH,
83+
## replace the "$(R_HOME)/bin/safe-forward-gfortran" with the path to gfortran
84+
## on your system.
8285
FC = "$(R_HOME)/bin/safe-forward-gfortran"
8386
FCFLAGS = -O2 $(LTO)
8487
## additional libs needed when linking with $(FC), e.g. on some Oracle compilers

0 commit comments

Comments
 (0)