[ovs-dev] [PATCH 2/2] cccl: Enable compiler optimization by default.

Saurabh Shah ssaurabh at vmware.com
Fri Aug 29 00:29:01 UTC 2014



> -----Original Message-----
> From: Gurucharan Shetty [mailto:shettyg at nicira.com]
> Sent: Thursday, August 28, 2014 12:10 PM
> To: Saurabh Shah
> Cc: Eitan Eliahu; dev at openvswitch.org; Gurucharan Shetty
> Subject: Re: [ovs-dev] [PATCH 2/2] cccl: Enable compiler optimization by
> default.
> 
> On Thu, Aug 28, 2014 at 11:45 AM, Saurabh Shah <ssaurabh at vmware.com>
> wrote:
> >> -----Original Message-----
> >> From: dev [mailto:dev-bounces at openvswitch.org] On Behalf Of
> >> Gurucharan Shetty
> >> Sent: Thursday, August 28, 2014 10:54 AM
> >> To: Eitan Eliahu
> >> Cc: dev at openvswitch.org; Gurucharan Shetty
> >> Subject: Re: [ovs-dev] [PATCH 2/2] cccl: Enable compiler optimization
> >> by default.
> >>
> >> On Thu, Aug 28, 2014 at 10:45 AM, Eitan Eliahu <eliahue at vmware.com>
> >> wrote:
> >> >
> >> > Hi Guru,
> >> > Do we distinguish between Debug and Releases builds? ( I recall we
> >> > discussed this before but forgot what was the outcome) Enabling
> >> optimization may cause some issues for the debugger to match the
> >> source to the code.
> >> We currently do not have a way to do that. I currently remove the
> >> "/O2" flag manually from cccl file to debug. (I do the same in
> >> Makefile for Linux, i.e., manually remove it)
> >>
> >
> > It would be useful to have a configure flag to do this (--with-optimize or --
> with-debug).
> The way 'cccl' works is that it converts gcc type option to msvc type option.
> You cannot pass to it something from a configure option directly, unless, you
> pass it first to gcc. So a "--with-optimize"
> should first do something similar to gcc (which can be done). BUT we do not
> have a 1-1 mapping between gcc and msvc when it comes to compiler
> optimization flags(When cccl gets options, it assumes that it is not a msvc
> option and tries to convert it). So, you get a drift of the problem?
> 
> Currently on Linux, you can do something like:
> ./configure CC="-g -O1"
> 
> So one option is to only convert "-O1" and "-O2" and as a special case, if the
> i/p is "-Od" (disable optimization), keep it the same.
> Does that sound okay?
> 

Yes, that what I was getting at.

> 
> >
> > Saurabh


More information about the dev mailing list