From ernest.turro at ic.ac.uk  Thu Sep 13 17:09:37 2007
From: ernest.turro at ic.ac.uk (Ernest Turro)
Date: Thu, 13 Sep 2007 16:09:37 +0100
Subject: [Rd] Overriding optimisation flags
Message-ID: <A26A3799-7484-42B3-A603-BF53308E8C0D@ic.ac.uk>

Dear all,

If one specifies, say, "PKG_CXXFLAGS= -O3" in a Makevars file, it  
will not make a difference to how the code is compiled if -O2 is  
specified in $R_HOME/etc/Makeconf. This is because PKG_CXXFLAGS is  
prepended to the corresponding flags in $R_HOME/etc/Makeconf instead  
of being appended and gcc only uses the last optimisation flag  
specified. As a result, one has to use targets in Makevars, which  
adds unnecessary complication to the whole process. Would it be  
possible to ensure PKG_CXXFLAGS & co.  are appended instead of  
prepended to the default flags and, if not, is there an easier  
workaround than specifying targets? (targets are easy enough under  
unix, but seems a bit more complicated under windows...)

Thanks!

E



[Rd] Overriding optimisation flags
Ernest Turro