Skip to content

Commit 1ef971d

Browse files
committed
Allow to define Fortran compiler to be used for building GNU-R via GNUR_FC env var
1 parent 695bc8c commit 1ef971d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

com.oracle.truffle.r.native/gnur/Makefile.gnur

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,13 @@ ifndef FASTR_RELEASE
9999
RECPKGS := "--without-recommended-packages"
100100
endif
101101

102+
ifdef GNUR_FC
103+
CONFIGURE_FC := "FC=$(GNUR_FC)"
104+
else
105+
# Hack: define it to something that is not going to hurt
106+
CONFIGURE_FC := "--with-x=no"
107+
endif
108+
102109
GNUR_HOME_BINARY_UNPACKED_PARENT := $(dir $(GNUR_HOME_BINARY_UNPACKED))
103110
GNUR_CONFIG_LOG = $(GNUR_HOME_BINARY_UNPACKED)/gnur_configure.log
104111
GNUR_MAKE_LOG = $(GNUR_HOME_BINARY_UNPACKED)/gnur_make.log
@@ -111,7 +118,7 @@ $(GNUR_HOME_BINARY_UNPACKED)/gnur.done:
111118
rm -rf $(GNUR_HOME_BINARY_UNPACKED)
112119
mkdir -p $(GNUR_HOME_BINARY_UNPACKED_PARENT)
113120
(cd $(GNUR_HOME_BINARY_UNPACKED_PARENT); tar xf R-$(R_VERSION).tar.gz)
114-
(cd $(GNUR_HOME_BINARY_UNPACKED); ./configure --with-x=no --with-aqua=no --disable-openmp --with-pcre2 $(RECPKGS) $(OS_EXTRA_CONFIGURE_FLAGS) --enable-memory-profiling $(GNUR_CONFIG_FLAGS) > $(GNUR_CONFIG_LOG) 2>&1; $(MAKE) -j > $(GNUR_MAKE_LOG) 2>&1) || ((tail -n 50 $(GNUR_CONFIG_LOG) $(GNUR_MAKE_LOG) || true) && exit 1)
121+
(cd $(GNUR_HOME_BINARY_UNPACKED); ./configure --with-x=no --with-aqua=no --disable-openmp --with-pcre2 $(RECPKGS) $(OS_EXTRA_CONFIGURE_FLAGS) $(CONFIGURE_FC) --enable-memory-profiling $(GNUR_CONFIG_FLAGS) > $(GNUR_CONFIG_LOG) 2>&1; $(MAKE) -j > $(GNUR_MAKE_LOG) 2>&1) || ((tail -n 50 $(GNUR_CONFIG_LOG) $(GNUR_MAKE_LOG) || true) && exit 1)
115122
touch $(GNUR_HOME_BINARY_UNPACKED)/gnur.done
116123
else
117124
$(GNUR_HOME_BINARY_UNPACKED)/gnur.done:

0 commit comments

Comments
 (0)