From: Thomas Monjalon <thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
To: Marc Sune <marc.sune-kpkqNMk1I7M@public.gmane.org>
Cc: dev-VfR2kkLFssw@public.gmane.org
Subject: Re: [PATCH] mk: add support for gdb debug info generation
Date: Tue, 03 Mar 2015 14:32:36 +0100 [thread overview]
Message-ID: <1653665.mL9en1i6hD@xps13> (raw)
In-Reply-To: <20150303130301.GA11084@bricha3-MOBL3>
2015-03-03 13:03, Bruce Richardson:
> On Tue, Mar 03, 2015 at 01:56:19PM +0100, Marc Sune wrote:
> > On 03/03/15 13:40, Panu Matilainen wrote:
> > >My 5c is that if anything, DPDK needs *less* places that muck around with
> > >compiler flags, not more. If you something like this for all the libraries
> > >in DPDK the number doesn't just increase a bit, it explodes.
> >
> > If you check the part below this one in my original email, that you stripped
> > out (without notice), the suggestion was also to add a global _DEBUG
> > parameter for the entire DPDK set of libraries, to change all the CFLAGS at
> > once (not in the attached PATCH).
> >
> > >I dont see that much point in this thing, but I'd approach it by defining
> > >the debug flags someplace central, say DEBUG_FLAGS, and append that to the
> > >common cflags when *_DEBUG config is enabled. At least with gcc the last
> > >option wins so if you just append -O0 when debugging then that's what
> > >wins, the earlier -O3 does not matter.
> >
> > The original problem is the one you expose; libraries hardcode the CFLAGS,
> > ignoring user-flags. There is no way to change this unless you change the
> > Makefiles directly.
> >
> > But right now, each library does hardcode its *own* flags (check Makefiles
> > for the libraries), so there is already not a unified approach here. I see
> > for instance KNI having -fno-strict-aliasing while other libraries don't.
> >
> > Having said that, there are moments, specially with -O3, in which to be able
> > to reproduce a bug, you need to compile certain parts of code with -O3 and
> > the rest with -O0 -g (the ones to be debugged). The approach proposed (both
> > a global *and* a lib specific) allows that.
> >
> > Marc
>
> I believe that the global option of overriding the CFLAGS is already sufficiently
> covered - including being documented in programmers guide - by EXTRA_CFLAGS. The
> ability to turn off optimization support for a single library is not covered
> anywhere, and that suggestion seems reasonable to me. For each library, we can
> just append '-O0 -g' to the CFLAGS in that libraries makefile if the debug option
> is set. I don't see that as significantly complicating things [though I wouldn't
> make any changes to the rte.app.mk to allow this, just have it per lib in the
> lib's makefile]
The difficult thing with a build system, is to know which options and use cases
we should support. Today you are suggesting some debug options for gdb.
Tomorrow someone would like to have a valgrind support and someone else would
like more options for a static analyzer.
I think that these usages are restricted to developers use and they already
can tune the Makefiles of the libs they are working on.
next prev parent reply other threads:[~2015-03-03 13:32 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-03 17:31 [PATCH] mk: add support for gdb debug info generation Cyril Chemparathy
[not found] ` <1396546285-29972-1-git-send-email-cchemparathy-kv+TWInifGbQT0dZR+AlfA@public.gmane.org>
2014-04-04 9:57 ` Ananyev, Konstantin
[not found] ` <2601191342CEEE43887BDE71AB9772580EF948F7-kPTMFJFq+rEu0RiL9chJVbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-02-22 11:51 ` Marc Sune
[not found] ` <54E9C2C0.3090108-kpkqNMk1I7M@public.gmane.org>
2015-03-02 17:32 ` Marc Sune
[not found] ` <54F49E9D.6070201-kpkqNMk1I7M@public.gmane.org>
2015-03-03 9:33 ` Bruce Richardson
2015-03-03 12:19 ` Marc Sune
[not found] ` <54F5A6CF.2090203-kpkqNMk1I7M@public.gmane.org>
2015-03-03 12:40 ` Panu Matilainen
[not found] ` <54F5ABCA.4010707-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-03-03 12:56 ` Marc Sune
[not found] ` <54F5AF73.1060109-kpkqNMk1I7M@public.gmane.org>
2015-03-03 13:03 ` Bruce Richardson
2015-03-03 13:27 ` Marc Sune
[not found] ` <54F5B6CD.7090209-kpkqNMk1I7M@public.gmane.org>
2015-03-04 9:44 ` Olivier MATZ
2015-03-03 13:31 ` Ananyev, Konstantin
[not found] ` <2601191342CEEE43887BDE71AB977258213F38C9-pww93C2UFcwu0RiL9chJVbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-03-03 14:39 ` Marc Sune
[not found] ` <54F5C79F.1090705-kpkqNMk1I7M@public.gmane.org>
2015-03-03 16:24 ` Ananyev, Konstantin
2015-03-03 13:32 ` Thomas Monjalon [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-06-19 21:29 Cyril Chemparathy
2015-06-22 7:44 ` Gonzalez Monroy, Sergio
2015-06-22 7:56 ` Simon Kågström
2015-06-23 7:39 ` Gonzalez Monroy, Sergio
2015-06-23 7:47 ` Thomas Monjalon
2015-06-23 10:08 ` Simon Kågström
2015-06-22 16:41 ` Cyril Chemparathy
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=1653665.mL9en1i6hD@xps13 \
--to=thomas.monjalon-pdr9zngts4eavxtiumwx3w@public.gmane.org \
--cc=dev-VfR2kkLFssw@public.gmane.org \
--cc=marc.sune-kpkqNMk1I7M@public.gmane.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.