When I install an R package with cpp codes such as rrcov via CRAN (under R 3.1.1, using no Makevars file and under Ubuntu 14.04 using GCC 4.8), the cpp code is compiled with the -o3 flag (in fact, looking at the Makeconf file this seem to again be the default since R 3.1.1) But when I install my own package via CRAN it is compiled with the -o2 flag.

My questions are what is causing my package's cpp code to be compiled in -o2 and how to fix this?

Here is the content of the src/Makeconf file of my package (it is fairly standard I believe for a package using RcppEigen):

PKG_CXXFLAGS = -I../inst/include -DEIGEN_DONT_PARALLELIZE $(SHLIB_OPENMP_CXXFLAGS) PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"` $(SHLIB_OPENMP_CXXFLAGS)
    CXX_STD = CXX11

and that of rrcov (which I m using for illustration's sake):

    PKG_LIBS=$(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to