Is there an easy way to override the compile options when installing
packages from CRAN on Unix-style systems? I tried setting CFLAGS,
CXXFLAGS, and FFLAGS but they are not picked up.
For example (with a random package and adding -mtune only to try to get
rid of the default)
export CFLAGS="-march=native -mtune=native"
export CXXFLAGS="-march=native -mtune=native"
R CMD INSTALL gstat_0.9-60.tar.gz
[...]
gcc -m64 -std=gnu99 -I/usr/include/R -I/usr/local/include -fpic -O2
-g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -c block.c -o block.o
[...]
I am building a custom system and I'd like to get rid of '-g' (won't
debug on that system) and change '-mtune=generic' to '-march=native'
(don't need compatibility with other systems).
Is there an easy way of doing this for all packages I build?
Allan
(Currently re-compiling BLAS and friends with -march=native.)
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.