All of lore.kernel.org
 help / color / mirror / Atom feed
From: Todor Minchev <todor.minchev@linux.intel.com>
To: Jianxun Zhang <jianxun.zhang@linux.intel.com>
Cc: meta-intel@yoctoproject.org, yocto@yoctoproject.org
Subject: Re: [PATCH v2 2/5] Makefile: add debug target
Date: Tue, 14 Feb 2017 09:33:16 -0800	[thread overview]
Message-ID: <1487093596.40476.40.camel@linux.intel.com> (raw)
In-Reply-To: <F27262EC-7AFE-4678-B743-20890189D5E9@linux.intel.com>

On Fri, 2017-02-10 at 10:58 -0800, Jianxun Zhang wrote:
> > On Feb 9, 2017, at 11:17 AM, Todor Minchev <todor.minchev@linux.intel.com> wrote:
> > 
> > A debug version of the rmc binary can be built by using the debug
> > Makefile target. This will include debug symbols and will disable
> > compiler optimizations.
> > 
> > Example:
> > 
> > make debug
> > 
> > Signed-off-by: Todor Minchev <todor.minchev@linux.intel.com>
> > ---
> > Makefile | 2 ++
> > 1 file changed, 2 insertions(+)
> > 
> > diff --git a/Makefile b/Makefile
> > index c58047a..fdd936f 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -23,6 +23,8 @@ ALL_OBJS := $(RMC_TOOL_OBJ) $(RMC_LIB_OBJ)
> > RMC_CFLAGS := -Wall -I$(TOPDIR)/inc
> > 
> > all: rmc
> > +debug: RMC_CFLAGS += -DDEBUG -g -O0
> > +debug: rmc
> > 
> I missed your feedback of V1, just recap it here also with my comment:
> 
> - "Yup, the above will have the same effect as 'make debug'.
> I thought that 'make debug' might be a convenient way to build a debug
> binary? Do you think it makes sense to keep this extra target for
> convenience since it doesn't affect the other usages of make?"
> 
> You could have to come back to CFLAGS when the a hard coded debug flags is not enough.
> 
> And, why pass -DDEBUG in RMC_CFLAGS when invoking gcc to compile rmc? I don’t see this macro DEBUG in the current rmc code.

I am planning to use the DEBUG macro in the future to add some more
verbosity to binaries built with 'make debug'

> 
> Thanks
> > $(ALL_OBJS): %.o: %.c
> > 	$(CC) -c $(CFLAGS) $(RMC_CFLAGS) $< -o $@
> > -- 
> > 2.11.1
> > 
> 




  reply	other threads:[~2017-02-14 17:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-09 19:17 [PATCH v2 0/5] [meta-intel][rmc] Add fingerprint quering and database extraction functionality to RMC Todor Minchev
2017-02-09 19:17 ` [PATCH v2 1/5] Makefile: disable silent mode in Makefiles Todor Minchev
2017-02-10 18:40   ` Jianxun Zhang
2017-02-09 19:17 ` [PATCH v2 2/5] Makefile: add debug target Todor Minchev
2017-02-10 18:58   ` Jianxun Zhang
2017-02-14 17:33     ` Todor Minchev [this message]
2017-02-09 19:17 ` [PATCH v2 3/5] rmc: Enable reading the contents of an existing fingerprint file Todor Minchev
2017-02-10 19:21   ` Jianxun Zhang
2017-02-09 19:17 ` [PATCH v2 4/5] rmc: remove unnecessary return variable Todor Minchev
2017-02-10 19:22   ` Jianxun Zhang
2017-02-09 19:17 ` [PATCH v2 5/5] rmc: add database extraction functionality Todor Minchev
2017-02-10 19:52   ` Jianxun Zhang
2017-02-14 17:50     ` Todor Minchev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1487093596.40476.40.camel@linux.intel.com \
    --to=todor.minchev@linux.intel.com \
    --cc=jianxun.zhang@linux.intel.com \
    --cc=meta-intel@yoctoproject.org \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.