Files
buildroot/package/haproxy/haproxy.mk
Bernd Kuhls 05021d4075 package/haproxy: bump version to 3.4.4
https://www.haproxy.org/news.html
https://www.haproxy.com/blog/announcing-haproxy-3-4
http://www.haproxy.org/download/3.4/src/CHANGELOG
https://git.haproxy.org/?p=haproxy-3.4.git;a=blob_plain;f=CHANGELOG

Version 3.4.x is the new LTS release which also added OpenSSL 4.0
compatibility.

Removed patch which is included in this release.

Disabled static builds due to upstream commit
https://git.haproxy.org/?p=haproxy-2.8.git;a=commitdiff;h=eaba76b02dd41e0a1a2e85a3e71f91dfc529916d
which was added to version 2.8 and causes build errors during static
linking:

/builds/bkuhls/buildroot/br-test-pkg/br-arm-full-static/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/9.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld:
 /builds/bkuhls/buildroot/br-test-pkg/br-arm-full-static/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/bin/../../usr/lib/libc.a(free.os):
 in function `malloc_trim':
free.c:(.text+0x24c): multiple definition of `malloc_trim';
 src/pool.o:pool.c:(.text+0xa14): first defined here

as suggested by Julien:
https://lists.buildroot.org/pipermail/buildroot/2025-July/782675.html

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2026-09-16 08:44:09 +02:00

95 lines
2.5 KiB
Makefile

################################################################################
#
# haproxy
#
################################################################################
HAPROXY_VERSION_MAJOR = 3.4
HAPROXY_VERSION = $(HAPROXY_VERSION_MAJOR).4
HAPROXY_SITE = http://www.haproxy.org/download/$(HAPROXY_VERSION_MAJOR)/src
HAPROXY_LICENSE = GPL-2.0+ and LGPL-2.1+ with exceptions
HAPROXY_LICENSE_FILES = LICENSE doc/lgpl.txt doc/gpl.txt
HAPROXY_CPE_ID_VENDOR = haproxy
# Incomplete NVD annotations, fixed since v2.6.15
# https://git.haproxy.org/?p=haproxy-2.6.git;a=commit;h=832b672eee54866c7a42a1d46078cc9ae0d544d9
HAPROXY_IGNORE_CVES += CVE-2023-45539
# haproxy relies on signed overflow, so MUST be built with -fwrapv
HAPROXY_MAKE_OPTS = \
LD=$(TARGET_CC) \
CFLAGS="$(TARGET_CFLAGS) -fwrapv" \
PREFIX=/usr \
TARGET=custom
ifeq ($(BR2_STATIC_LIBS),)
HAPROXY_MAKE_OPTS += USE_DL=1
endif
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
HAPROXY_LIBS += -latomic
endif
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS_NPTL),y)
# threads uses atomics on gcc >= 4.7 and sync otherwise (see
# include/common/hathreads.h)
ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_4_7):$(BR2_TOOLCHAIN_HAS_ATOMIC),y:y)
HAPROXY_MAKE_OPTS += USE_THREAD=1
else ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_4_7):$(BR2_TOOLCHAIN_HAS_SYNC_4),:y)
HAPROXY_MAKE_OPTS += USE_THREAD=1
endif
endif
ifeq ($(BR2_PACKAGE_LUA_5_3),y)
HAPROXY_DEPENDENCIES += lua
HAPROXY_MAKE_OPTS += \
LUA_LIB_NAME=lua \
USE_LUA=1
endif
ifeq ($(BR2_PACKAGE_OPENSSL),y)
HAPROXY_DEPENDENCIES += openssl
HAPROXY_MAKE_OPTS += USE_OPENSSL=1
ifeq ($(BR2_STATIC_LIBS),y)
HAPROXY_LIBS += -lz
endif
endif
# pcre and pcre2 can't be enabled at the same time so prefer pcre2
ifeq ($(BR2_PACKAGE_PCRE2),y)
HAPROXY_DEPENDENCIES += pcre2
HAPROXY_MAKE_OPTS += \
PCRE2_CONFIG=$(STAGING_DIR)/usr/bin/pcre2-config \
USE_PCRE2=1
endif
ifeq ($(BR2_PACKAGE_SYSTEMD),y)
HAPROXY_DEPENDENCIES += systemd
HAPROXY_MAKE_OPTS += USE_SYSTEMD=1
endif
ifeq ($(BR2_PACKAGE_ZLIB),y)
HAPROXY_DEPENDENCIES += zlib
HAPROXY_MAKE_OPTS += USE_ZLIB=1
endif
HAPROXY_MAKE_OPTS += ADDLIB="$(HAPROXY_LIBS)"
HAPROXY_CFLAGS = $(TARGET_CFLAGS)
ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_90620),y)
HAPROXY_CFLAGS += -O0
endif
define HAPROXY_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
$(HAPROXY_MAKE_OPTS) DEFINE="$(HAPROXY_CFLAGS)" -C $(@D)
endef
define HAPROXY_INSTALL_TARGET_CMDS
$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
$(HAPROXY_MAKE_OPTS) -C $(@D) DESTDIR=$(TARGET_DIR) install
endef
$(eval $(generic-package))