Merge pull request #39 from rstudio/fix-centos6-cxx11

Fix incompatibility with default gcc on CentOS/RHEL 6
This commit is contained in:
Greg Lin 2019-10-07 10:05:52 -05:00 committed by GitHub
commit 355ab5aada
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 19 additions and 2 deletions

View file

@ -1,3 +1,5 @@
#!/bin/bash
if [[ ! -d /tmp/output/centos-6 ]]; then
mkdir -p /tmp/output/centos-6
fi
@ -20,11 +22,14 @@ export PATH=/usr/local/rvm/rubies/ruby-2.6.3/bin/:/.gems/bin:${PATH}
export GEM_HOME=/.gems
export GEM_PATH=/.gems
# Additional config for c++11 support
# Additional config for C++11 support in R 3.6.
# R 3.6.0 no longer sets CXX11 flags without a full C++11 compiler present, but
# the default gcc 4.4.7 still partially supports C++11 through -std=gnu++0x.
# Use the same CXX11 flags as the defaults in R versions prior to 3.6.0.
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 \

View file

@ -1,3 +1,5 @@
#!/bin/bash
if [[ ! -d /tmp/output/centos-7 ]]; then
mkdir -p /tmp/output/centos-7
fi

View file

@ -1,3 +1,5 @@
#!/bin/bash
if [[ ! -d /tmp/output/debian-9 ]]; then
mkdir -p /tmp/output/debian-9
fi

View file

@ -1,3 +1,5 @@
#!/bin/bash
if [[ ! -d /tmp/output/opensuse-15 ]]; then
mkdir -p /tmp/output/opensuse-15
fi

View file

@ -1,3 +1,5 @@
#!/bin/bash
if [[ ! -d /tmp/output/opensuse-42 ]]; then
mkdir -p /tmp/output/opensuse-42
fi

View file

@ -1,3 +1,5 @@
#!/bin/bash
if [[ ! -d /tmp/output/ubuntu-1604 ]]; then
mkdir -p /tmp/output/ubuntu-1604
fi

View file

@ -1,3 +1,5 @@
#!/bin/bash
if [[ ! -d /tmp/output/ubuntu-1804 ]]; then
mkdir -p /tmp/output/ubuntu-1804
fi