netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsa@cumulusnetworks.com>
To: netdev@vger.kernel.org
Cc: stephen@networkplumber.org, David Ahern <dsa@cumulusnetworks.com>
Subject: [PATCH iproute2] Enable use of extra debugging information
Date: Tue, 21 Jun 2016 16:27:09 -0700	[thread overview]
Message-ID: <1466551629-7921-1-git-send-email-dsa@cumulusnetworks.com> (raw)

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
 
-- 
2.1.4

             reply	other threads:[~2016-06-21 23:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-21 23:27 David Ahern [this message]
2016-06-22  8:36 ` [PATCH iproute2] Enable use of extra debugging information Jakub Sitnicki
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=1466551629-7921-1-git-send-email-dsa@cumulusnetworks.com \
    --to=dsa@cumulusnetworks.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).