[Buildroot] [PATCH 1/2] package/exim: fix build with libexecinfo
Bernd Kuhls
bernd at kuhls.net
Wed Dec 27 18:17:55 UTC 2023
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/
Signed-off-by: Bernd Kuhls <bernd at kuhls.net>
---
package/exim/exim.mk | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/package/exim/exim.mk b/package/exim/exim.mk
index 23d888e6f2..30b0d78c94 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)
endef
ifneq ($(call qstrip,$(BR2_PACKAGE_EXIM_CUSTOM_CONFIG_FILE)),)
@@ -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
+
# We need the host version of macro_predef during the build, before
# building it we need to prepare the makefile.
define EXIM_BUILD_CMDS
@@ -136,7 +146,7 @@ define EXIM_BUILD_CMDS
CFLAGS="-std=c99 $(HOST_CFLAGS)" \
LFLAGS="-fPIC $(HOST_LDFLAGS)"
$(TARGET_MAKE_ENV) build=br $(MAKE) -C $(@D) $(EXIM_STATIC_FLAGS) \
- CFLAGS="-std=c99 $(TARGET_CFLAGS)"
+ CFLAGS="-std=c99 $(TARGET_CFLAGS) $(EXIM_C_FLAGS)"
endef
# Need to replicate the LFLAGS in install, as exim still wants to build
--
2.39.2
More information about the buildroot
mailing list