> -----Original Message-----
> From: Gurucharan Shetty [mailto:shet...@nicira.com]
> Sent: Thursday, August 28, 2014 12:10 PM
> To: Saurabh Shah
> Cc: Eitan Eliahu; dev@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 <ssaur...@vmware.com>
> wrote:
> >> -----Original Message-----
> >> From: dev [mailto:dev-boun...@openvswitch.org] On Behalf Of
> >> Gurucharan Shetty
> >> Sent: Thursday, August 28, 2014 10:54 AM
> >> To: Eitan Eliahu
> >> Cc: dev@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 <elia...@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
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to