From: Jakub Sitnicki <jkbs@redhat•com>
To: David Ahern <dsa@cumulusnetworks•com>
Cc: netdev@vger•kernel.org, stephen@networkplumber•org
Subject: Re: [PATCH iproute2] Enable use of extra debugging information
Date: Wed, 22 Jun 2016 10:36:39 +0200 [thread overview]
Message-ID: <87oa6tmxgo.fsf@frog.home> (raw)
In-Reply-To: <1466551629-7921-1-git-send-email-dsa@cumulusnetworks.com>
Hi David,
On Wed, Jun 22, 2016 at 01:27 AM CEST, David Ahern <dsa@cumulusnetworks•com> wrote:
> Add -g flag to builds if DEBUG parameter is set. Improves
> debugging with gdb.
>
> Signed-off-by: David Ahern <dsa@cumulusnetworks•com>
> ---
> Makefile | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index 15c81ecfdca3..8e006759079d 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -39,7 +39,11 @@ HOSTCC = gcc
> DEFINES += -D_GNU_SOURCE
> # Turn on transparent support for LFS
> DEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
> +ifdef DEBUG
> +CCOPTS = -g
> +else
> CCOPTS = -O2
> +endif
> WFLAGS := -Wall -Wstrict-prototypes -Wmissing-prototypes
> WFLAGS += -Wmissing-declarations -Wold-style-definition -Wformat=2
This implies a change of optimization level to -O0 when building with
DEBUG set, doesn't it? Was it intentional?
Perhaps it would be less surprising to explicitly set -O0, if that was
your intention. Just a thought.
Thanks,
Jakub
next prev parent reply other threads:[~2016-06-22 12:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-21 23:27 [PATCH iproute2] Enable use of extra debugging information David Ahern
2016-06-22 8:36 ` Jakub Sitnicki [this message]
2016-06-22 16:55 ` David Ahern
2016-06-27 17:52 ` Stephen Hemminger
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=87oa6tmxgo.fsf@frog.home \
--to=jkbs@redhat$(echo .)com \
--cc=dsa@cumulusnetworks$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=stephen@networkplumber$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox