From p.dalgaard at biostat.ku.dk  Fri Aug 20 20:15:13 2004
From: p.dalgaard at biostat.ku.dk (Peter Dalgaard)
Date: Fri Aug 20 20:19:55 2004
Subject: [Rd] gcc optimization  flag when building R
In-Reply-To: <C698D707214E6F4AB39AB7096C3DE5A563D457@phost015.EVAFUNDS.intermedia.net>
References: <C698D707214E6F4AB39AB7096C3DE5A563D457@phost015.EVAFUNDS.intermedia.net>
Message-ID: <x2pt5lfzgu.fsf@biostat.ku.dk>

"Vadim Ogranovich" <vograno@evafunds.com> writes:

> Hi,
>  
> I am building R on RH Linux 7.3 and I noticed that ./configure does not
> set the optimization flag, -O or -O2, for gcc, but does set for g++ and
> g77. Why is that? Should I try to set it manually, if yes how?
>  
> Thanks,
> Vadim
>  
> P.S. This is the bottom portion of the ./configure run
>  
>  
> R is now configured for i686-pc-linux-gnu
>  
>   Source directory:          .
>   Installation directory:    /usr/local
>  
>   C compiler:                gcc -D__NO_MATH_INLINES -mieee-fp -DNO_PURE
> -Wchar-subscripts -Wformat -Wimplicit -Wreturn-type -Wswitch -Wreorder
> -Wwrite-strings -Woverloaded-virtual -Wshadow -Wno-ctor-dtor-privacy
> -m486 -fPIC -DOSRELMAJOR=2 -DOSRELMINOR=4
>   C++ compiler:              g++ -mieee-fp -g -O2
>   Fortran compiler:          g77 -mieee-fp -g -O2

Something appears to be setting a load of CFLAGS that are not usually
there, though. If you have set CFLAGS on the make line or in a config.site
file, just include -g -O2 

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907


[Rd] gcc optimization flag when building R
Peter Dalgaard