[Buildroot] [PATCH 1/2] package/exim: fix build with libexecinfo
Luca Ceresoli
luca.ceresoli at bootlin.com
Thu Dec 28 08:51:21 UTC 2023
Hello Bernd,
On Wed, 27 Dec 2023 19:17:55 +0100
Bernd Kuhls <bernd at kuhls.net> wrote:
> Upstream added optional support for execinfo
>
> https://git.exim.org/exim.git/commitdiff/204a7a2c2e8601558905dc34c576a627045a9f21
> https://git.exim.org/exim.git/commitdiff/48ea675fee2d5fee8d33c525e28727b69114cfce
>
> in version 4.97 which was added to buildroot with commit
> faec3ca30e358575f70a036879029f63f7da9b29
>
> Fixes:
> http://autobuild.buildroot.net/results/282/282882371e1d8c224c457bf65016f8abd11f8c45/
Thanks for taking care of the build failures!
> @@ -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.
Luca
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
More information about the buildroot
mailing list