On Thu, Aug 28, 2014 at 12:09 PM, Gurucharan Shetty <shet...@nicira.com> wrote: > 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" Not CC, sorry. I meant to say: CFLAGS="-O1 -g"
> > 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? Or even better is to simply convert only "-O1" and "-O2" (default) options. Then if someone wants to disable optimization, they pass: ./configure CFLAGS="-g" > > >> >> Saurabh _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev