All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas De Schampheleire <patrickdepinguin@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCHv3 11/15] package/sofia-sip: use BR2_ENABLE_RUNTIME_DEBUG iso BR2_ENABLE_DEBUG
Date: Mon, 31 May 2021 12:44:20 +0200	[thread overview]
Message-ID: <CAAXf6LXyd2nCvGPFYs9SH05no7Z9+wy1COn7r1XiYxczU+g70Q@mail.gmail.com> (raw)
In-Reply-To: <b46b5074-12c3-8099-5946-de715f715a8e@mind.be>

Hello,

El vie, 28 may 2021 a las 23:07, Arnout Vandecappelle
(<arnout@mind.be>) escribi?:
>
>
>
> On 28/05/2021 20:35, Thomas De Schampheleire wrote:
> > El mar, 25 may 2021 a las 23:32, Arnout Vandecappelle
> > (<arnout@mind.be>) escribi?:
> >>
> >>
> >> On 25/05/2021 14:27, Thomas De Schampheleire wrote:
> >>> From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
> >>>
> >>> BR2_ENABLE_DEBUG should just steer the availability of debug symbols and
> >>> should have no negative effect on performance.
> >>>
> >>> Introduction of 'assert' statements, 'debug'-type builds with additional
> >>> logging, etc. should be steered by BR2_ENABLE_RUNTIME_DEBUG instead.
> >>>
> >>> Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
> >>> ---
> >>>  package/sofia-sip/sofia-sip.mk | 2 +-
> >>>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>>
> >>> diff --git a/package/sofia-sip/sofia-sip.mk b/package/sofia-sip/sofia-sip.mk
> >>> index 5c383400ff..cb867ba0dc 100644
> >>> --- a/package/sofia-sip/sofia-sip.mk
> >>> +++ b/package/sofia-sip/sofia-sip.mk
> >>> @@ -30,7 +30,7 @@ SOFIA_SIP_CONF_OPTS += \
> >>>       --without-openssl
> >>>  endif
> >>>
> >>> -ifeq ($(BR2_ENABLE_DEBUG),y)
> >>> +ifeq ($(BR2_ENABLE_RUNTIME_DEBUG),y)
> >>>  SOFIA_SIP_CONF_OPTS += --enable-ndebug
> >>  Actually, the logic was inverted here (already wrong in the current situation):
> >> --enable-ndebug should be given when RUNTIME_DEBUG is *not* set.
> > Indeed, you're right. I'll add a patch to fix that first.
> >
> >>  However, I think we should define -DNDEBUG in TARGET_CPPFLAGS, so it wouldn't
> >> be necessary to pass it explicitly here (--enable-ndebug does nothing more than
> >> defining NDEBUG).
> > In a previous iteration I basically did that, but dropped that patch
> > because it also had effect in the toolchain wrapper,
>
>  No it doesn't... TARGET_CFLAGS isn't set in the toolchain wrapper. Only
> arch-specific options are there, and BR2_TARGET_OPTIMIZATION (which is intended
> for arch-specific -m flags).

I had to reproduce the issue in order to understand where my
conclusion was wrong.

The compiler wrapper indeed does not pass these flags.
The problem in our case is that the -DNDEBUG is passed via a
<project>-config script to external compilations. In our case, xenomai
is used, and it provides a 'xeno-config' script to get the correct
compilation and linker flags. The generated file contains the flags
set by Buildroot in XENO_BASE_CFLAGS . With the mentioned patch, this
would include -DNDEBUG.
And the output of 'xeno-config [...] --cflags' was used in the
compilation of the external project.

We can work around that by filtering the output of 'xeno-config' in
our local makefiles.

Note that Thomas Petazzoni had initial doubts on the mentioned patch
(http://patchwork.ozlabs.org/project/buildroot/patch/20210212135451.22786-3-patrickdepinguin at gmail.com/).

If you think we should re-add it to the series, I will do it.

Thanks,
Thomas

  reply	other threads:[~2021-05-31 10:44 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-25 12:27 [Buildroot] [PATCHv3 00/15] Introduce BR2_ENABLE_RUNTIME_DEBUG Thomas De Schampheleire
2021-05-25 12:27 ` [Buildroot] [PATCHv3 01/15] package/Makefile.in: pass '-g0' explicitly if !BR2_ENABLE_DEBUG Thomas De Schampheleire
2021-05-25 20:30   ` Arnout Vandecappelle
2021-05-25 12:27 ` [Buildroot] [PATCHv3 02/15] core: introduce BR2_ENABLE_RUNTIME_DEBUG Thomas De Schampheleire
2021-05-25 20:34   ` Arnout Vandecappelle
2021-06-01 14:17     ` Thomas De Schampheleire
2021-05-25 12:27 ` [Buildroot] [PATCHv3 03/15] package/pkg-cmake.mk: determine CMAKE_BUILD_TYPE depending on BR2_ENABLE_RUNTIME_DEBUG Thomas De Schampheleire
2021-05-25 20:47   ` Arnout Vandecappelle
2021-05-25 12:27 ` [Buildroot] [PATCHv3 04/15] package/flare-engine: update explicit setting of CMAKE_BUILD_TYPE Thomas De Schampheleire
2021-05-25 20:51   ` Arnout Vandecappelle
2021-05-26 14:28     ` Thomas De Schampheleire
2021-05-26 15:18       ` Arnout Vandecappelle
2021-05-28 11:50         ` Thomas De Schampheleire
2021-05-25 12:27 ` [Buildroot] [PATCHv3 05/15] package/sysrepo: use default CMAKE_BUILD_TYPE for host package Thomas De Schampheleire
2021-05-25 20:54   ` Arnout Vandecappelle
2021-05-26  9:19     ` Heiko Thiery
2021-05-25 12:27 ` [Buildroot] [PATCHv3 06/15] package/sysrepo: remove explicit setting of CMAKE_BUILD_TYPE Thomas De Schampheleire
2021-05-25 20:56   ` Arnout Vandecappelle
2021-05-26  9:20     ` Heiko Thiery
2021-06-01 14:24     ` Thomas De Schampheleire
2021-06-01 14:39       ` Arnout Vandecappelle
2021-05-25 12:27 ` [Buildroot] [PATCHv3 07/15] package/boost: use BR2_ENABLE_RUNTIME_DEBUG iso BR2_ENABLE_DEBUG Thomas De Schampheleire
2021-05-25 21:17   ` Arnout Vandecappelle
2021-05-28 10:11     ` Thomas De Schampheleire
2021-05-25 12:27 ` [Buildroot] [PATCHv3 08/15] package/oracle-mysql: " Thomas De Schampheleire
2021-05-25 21:18   ` Arnout Vandecappelle
2021-05-25 12:27 ` [Buildroot] [PATCHv3 09/15] package/qt5: " Thomas De Schampheleire
2021-05-25 21:24   ` Arnout Vandecappelle
2021-05-25 12:27 ` [Buildroot] [PATCHv3 10/15] package/ripgrep: " Thomas De Schampheleire
2021-05-25 21:28   ` Arnout Vandecappelle
2021-05-25 12:27 ` [Buildroot] [PATCHv3 11/15] package/sofia-sip: " Thomas De Schampheleire
2021-05-25 21:32   ` Arnout Vandecappelle
2021-05-28 18:35     ` Thomas De Schampheleire
2021-05-28 21:07       ` Arnout Vandecappelle
2021-05-31 10:44         ` Thomas De Schampheleire [this message]
2021-05-25 12:27 ` [Buildroot] [PATCHv3 12/15] package/uclibc: " Thomas De Schampheleire
2021-05-25 21:43   ` Arnout Vandecappelle
2021-05-28 18:49     ` Thomas De Schampheleire
2021-05-25 12:27 ` [Buildroot] [PATCHv3 13/15] package/zmqpp: " Thomas De Schampheleire
2021-05-25 21:48   ` Arnout Vandecappelle
2021-05-31 10:30     ` Thomas De Schampheleire
2021-05-25 12:27 ` [Buildroot] [PATCHv3 14/15] package/pkg-meson.mk: determine 'buildtype' based on " Thomas De Schampheleire
2021-05-28 21:01   ` Arnout Vandecappelle
2021-05-31 10:02     ` Thomas De Schampheleire
2021-05-25 12:27 ` [Buildroot] [PATCHv3 15/15] utils/genrandconfig: also test BR2_ENABLE_RUNTIME_DEBUG Thomas De Schampheleire
2021-05-25 21:50   ` Arnout Vandecappelle
2021-05-25 20:32 ` [Buildroot] [PATCHv3 00/15] Introduce BR2_ENABLE_RUNTIME_DEBUG Arnout Vandecappelle

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=CAAXf6LXyd2nCvGPFYs9SH05no7Z9+wy1COn7r1XiYxczU+g70Q@mail.gmail.com \
    --to=patrickdepinguin@gmail.com \
    --cc=buildroot@busybox.net \
    /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.