Use -std=gnu++0x on CentOS/RHEL 6 for compatibility with the default gcc

CentOS/RHEL 6 have gcc 4.4.7 by default, which does not support -std=gnu++11.
Previously, packages like digest were failing to compile on CentOS 6 using the
default gcc.
This commit is contained in:
Greg Lin 2019-10-03 16:57:03 -05:00
commit ff7f7906c6

View file

@ -24,7 +24,7 @@ export GEM_PATH=/.gems
sed -i 's/^CXX11\ =\ .*/CXX11\ =\ g++/g' /opt/R/${R_VERSION}/lib/R/etc/Makeconf
sed -i 's/^CXX11FLAGS\ =\ .*/CXX11FLAGS\ =\ -g\ -O2\ \$\(LTO\)/g' /opt/R/${R_VERSION}/lib/R/etc/Makeconf
sed -i 's/^CXX11PICFLAGS\ =\ .*/CXX11PICFLAGS\ =\ -fpic/g' /opt/R/${R_VERSION}/lib/R/etc/Makeconf
sed -i 's/^CXX11STD\ =\ .*/CXX11STD\ =\ -std=gnu++11/g' /opt/R/${R_VERSION}/lib/R/etc/Makeconf
sed -i 's/^CXX11STD\ =\ .*/CXX11STD\ =\ -std=gnu++0x/g' /opt/R/${R_VERSION}/lib/R/etc/Makeconf
fpm \
-s dir \