From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Luca Ceresoli <luca.ceresoli@bootlin.com>
Cc: Bernd Kuhls <bernd@kuhls.net>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/2] package/exim: fix build with libexecinfo
Date: Fri, 29 Dec 2023 22:56:26 +0100 [thread overview]
Message-ID: <ZY9AigY5WWfIPT-m@landeda> (raw)
In-Reply-To: <20231228095121.5255f937@booty>
Bernd, Luca, All,
On 2023-12-28 09:51 +0100, Luca Ceresoli via buildroot spake thusly:
> On Wed, 27 Dec 2023 19:17:55 +0100
> Bernd Kuhls <bernd@kuhls.net> wrote:
> > Upstream added optional support for execinfo
[--SNIP--]
> > @@ -126,6 +127,15 @@ ifeq ($(BR2_STATIC_LIBS),y)
> > EXIM_STATIC_FLAGS = LFLAGS="-pthread --static"
> > endif
> >
> > +ifeq ($(BR2_PACKAGE_LIBEXECINFO),y)
> > +EXIM_DEPENDENCIES += libexecinfo
> > +define EXIM_EXTRALIBS
> > +$(call exim-config-add,EXTRALIBS,-lexecinfo)
> > +endef
> > +else
> > +EXIM_C_FLAGS = -DNO_EXECINFO
> > +endif
>
> I think this logic is not entirely correct. As I read it:
>
> * on non-glibc systems it automatically enables the new exim
> stack dump feature if libexecinfo is enabled
> * on glibc systems, which always have the backtrace() and related
> functions without additional libraries, we never enable this feature
>
> For consistency, the else branch should just be removed to avoid
> setting NO_EXECINFO, thus enabling the stack dump feature whenever it
> is possible.
If I understand correctly, your proposal would not work either: for a
non-glibc config that does not have libexecinfo eabled, we do want to
define NO_EXECINFO.
Instead, the logic should be somthong like:
if glibc:
do nothing, execinfo is available
elif libexecinfo enabled:
add dependency and extra-lib
else:
define NO_EXECINFO
Since libexecinfo embedds the fact that it is also non-glibc, we can
rewrite the condition as:
if libexecinfo:
add dependency and extra-lib
elif non-glibc;
define NO_EXECINFO
So, the 'else' clause only needs to be changed into:
else ifneq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
Unless I missed something less obvious...
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2023-12-29 21:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-27 18:17 [Buildroot] [PATCH 1/2] package/exim: fix build with libexecinfo Bernd Kuhls
2023-12-27 18:17 ` [Buildroot] [PATCH 2/2] package/exim: do not build perl-based utilities Bernd Kuhls
2023-12-28 9:02 ` Luca Ceresoli via buildroot
2023-12-28 8:51 ` [Buildroot] [PATCH 1/2] package/exim: fix build with libexecinfo Luca Ceresoli via buildroot
2023-12-29 21:56 ` Yann E. MORIN [this message]
2024-01-02 7:13 ` Luca Ceresoli via buildroot
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=ZY9AigY5WWfIPT-m@landeda \
--to=yann.morin.1998@free.fr \
--cc=bernd@kuhls.net \
--cc=buildroot@buildroot.org \
--cc=luca.ceresoli@bootlin.com \
/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