Hi Matt,

  Thanks a lot for the info. I also tried building with -O2 and did some 
testing. Seems that linux/gcc is safe to use -O2. 

Would it benefits if runConfigure regard linux as a recognized platform
and set debugflag also to "-w -O2"? (Manually setting the bunch of 10+
environment variables, esp the -D's in CFLAGS/CXXFLAGS, and then using
./configure is troublesome and more difficult to maintain than using
./runConfigure.)

cheers,

Chris

On Thu, 19 May 2005 [EMAIL PROTECTED] wrote:

> I compile with GCC 3.4.3 and max optimizations on Solaris and I do not have
> any problems.
> 
> Try it and see if it works with -O3 -fexpensive-optimizations.
> 
> FYI, in my case, it only got about 2 secs faster on a 1.5 minute test run.
> 
> HTH!
> Matt
> 
> -----Original Message-----
> From: Chris Cheung [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 19, 2005 2:04 AM
> To: [email protected]
> Subject: -O2 on Linux
> 
> 
> Hi,
> 
> In Xerces-C++'s runConfigure script,
> 
>       if test $platform = "os400"; then
>          echo "NATIVE OS400 BUILD"
>          debugflag="";
>       elif test $platform = "irix"; then
>          debugflag="-w -O2";
>       elif test $platform = "aix"; then
>          debugflag="-w -O2";
>       elif test $platform = "os390"; then
>          debugflag="";
>       else
>          debugflag="-w -O";
>       fi
> 
> I notice that only some platforms use -O2, and the default is -O. For
> linux (i686/Fedora Core 3/gcc 3.4.2 and x86_64/SuSe 9/gcc 3.3.3), is there
> any danger in using -O2? Does anyone has experience in using -O2?
> successful or problematic?
> 
> My compilation configuration is:
> 
> ./runConfigure -plinux -minmem -nsocket -tnative -rpthread 
> 
> I add -b64 in x86_64.
> 
> Thanks a lot in advance.
> 
> 

-- 
Best Regards,

Chris Cheung


Reply via email to