[Buildroot] [PATCH v2 1/2] package/exim: fix build with libexecinfo

Thomas Petazzoni thomas.petazzoni at bootlin.com
Sat Jan 6 10:12:36 UTC 2024


Hello,

On Wed,  3 Jan 2024 20:11:50 +0100
Bernd Kuhls <bernd at kuhls.net> wrote:

> diff --git a/package/exim/exim.mk b/package/exim/exim.mk
> index fb9eecd71b..25d171875d 100644
> --- a/package/exim/exim.mk
> +++ b/package/exim/exim.mk
> @@ -104,6 +104,7 @@ define EXIM_CONFIGURE_TOOLCHAIN
>  	$(call exim-config-add,HOSTCC,$(HOSTCC))
>  	$(call exim-config-add,HOSTCFLAGS,$(HOSTCFLAGS))
>  	$(EXIM_FIX_IP_OPTIONS_FOR_MUSL)
> +	$(EXIM_EXTRALIBS)

I've changed this to:

+       $(call exim-config-add,EXTRALIBS,$(EXIM_EXTRALIBS))

> +ifeq ($(BR2_PACKAGE_LIBEXECINFO),y)
> +EXIM_DEPENDENCIES += libexecinfo
> +define EXIM_EXTRALIBS
> +$(call exim-config-add,EXTRALIBS,-lexecinfo)
> +endef
> +else ifneq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
> +EXIM_C_FLAGS = -DNO_EXECINFO
> +endif

And changed this to:

+ifeq ($(BR2_PACKAGE_LIBEXECINFO),y)
+EXIM_DEPENDENCIES += libexecinfo
+EXIM_EXTRALIBS += -lexecinfo
+else ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),)
+EXIM_CFLAGS = -DNO_EXECINFO
+endif

so EXIM_EXTRALIBS becomes really the list of extra libraries, and the
exim-config-add call is inside EXIM_CONFIGURE_TOOLCHAIN. This means
that we can add more things to EXIM_EXTRALIBS for other reasons if
needed in the future.

Also, I've used EXIM_CFLAGS instead of EXIM_C_FLAGS, and used a
slightly different construct for the glibc condition.

Applied with those changes, thanks a lot!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com



More information about the buildroot mailing list