We recently ran into an issue where an R package would not install as it required a more recent ISO C++ standard than provided by gcc. The workaround in this case was to edit the R makefile in lib64/R/etc and set:
CXX11 = g++
CXX11FLAGS = -g -O2 $(LTO)
CXX11PICFLAGS = -fpic