Use CFLAGS/FFLAGS over the SHLIB_* variables
The default CFLAGS/FFLAGS for R 3.x is always '-g -O2' when using gcc.
This commit is contained in:
parent
74c19bc1a0
commit
c17e2b9666
1 changed files with 5 additions and 6 deletions
|
|
@ -75,10 +75,11 @@ compile_r() {
|
||||||
# https://gcc.gnu.org/gcc-10/porting_to.html
|
# https://gcc.gnu.org/gcc-10/porting_to.html
|
||||||
gcc_major_version=$(gcc -dumpversion | cut -d '.' -f 1)
|
gcc_major_version=$(gcc -dumpversion | cut -d '.' -f 1)
|
||||||
if _version_is_less_than "${R_VERSION}" 3.6.2 && _version_is_greater_than "${gcc_major_version}" 9; then
|
if _version_is_less_than "${R_VERSION}" 3.6.2 && _version_is_greater_than "${gcc_major_version}" 9; then
|
||||||
extra_cflags='-fcommon'
|
# Default CFLAGS/FFLAGS for all R 3.x versions is '-g -O2' when using GCC
|
||||||
extra_fflags='-fallow-argument-mismatch'
|
export CFLAGS='-g -O2 -fcommon'
|
||||||
echo "Adding extra CFLAGS: ${extra_cflags}"
|
export FFLAGS='-g -O2 -fallow-argument-mismatch'
|
||||||
echo "Adding extra FFLAGS: ${extra_fflags}"
|
echo "Setting CFLAGS: ${CFLAGS}"
|
||||||
|
echo "Setting FFLAGS: ${FFLAGS}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Avoid a PCRE2 dependency for R 3.5 and 3.6. R 3.x uses PCRE1, but R 3.5+
|
# Avoid a PCRE2 dependency for R 3.5 and 3.6. R 3.x uses PCRE1, but R 3.5+
|
||||||
|
|
@ -121,8 +122,6 @@ compile_r() {
|
||||||
R_PRINTCMD=/usr/bin/lpr \
|
R_PRINTCMD=/usr/bin/lpr \
|
||||||
R_UNZIPCMD=/usr/bin/unzip \
|
R_UNZIPCMD=/usr/bin/unzip \
|
||||||
R_ZIPCMD=/usr/bin/zip \
|
R_ZIPCMD=/usr/bin/zip \
|
||||||
SHLIB_CFLAGS="${extra_cflags}" \
|
|
||||||
SHLIB_FFLAGS="${extra_fflags}" \
|
|
||||||
./configure \
|
./configure \
|
||||||
--prefix=/opt/R/${1} \
|
--prefix=/opt/R/${1} \
|
||||||
${CONFIGURE_OPTIONS} \
|
${CONFIGURE_OPTIONS} \
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue