From: Philip Prindeville Date: Sun, 25 May 2025 19:04:08 +0000 (-0600) Subject: bind: enable building against jemalloc library X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=1724aeda5ba650aaa66b2b492d93960b70c527b4;p=feed%2Fpackages.git bind: enable building against jemalloc library This provides better instrumentation for finding where memory is being used, and/or leaked. Signed-off-by: Philip Prindeville --- diff --git a/net/bind/Config.in b/net/bind/Config.in index f1b83c7465..f36d0a3e35 100644 --- a/net/bind/Config.in +++ b/net/bind/Config.in @@ -42,3 +42,13 @@ config BIND_ENABLE_GSSAPI Disable it by default as krb5-libs is rather large. endif + +config BIND_JEMALLOC + bool + default n + prompt "Include jemalloc for heap debugging in bind-server" + help + BIND 9 allows linking against jemalloc which can provide + more detailed memory usage information to assist in + diagnosing heap utilization issues. + diff --git a/net/bind/Makefile b/net/bind/Makefile index 71dafc2a24..f1c56fcd57 100644 --- a/net/bind/Makefile +++ b/net/bind/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bind PKG_VERSION:=9.20.9 -PKG_RELEASE:=2 +PKG_RELEASE:=3 USERID:=bind=57:bind=57 PKG_MAINTAINER:=Noah Meyerhans @@ -34,10 +34,14 @@ PKG_BUILD_PARALLEL:=1 PKG_CONFIG_DEPENDS := \ CONFIG_BIND_LIBJSON \ CONFIG_BIND_LIBXML2 \ + CONFIG_BIND_JEMALLOC \ CONFIG_BIND_ENABLE_DOH \ CONFIG_BIND_ENABLE_GSSAPI -PKG_BUILD_DEPENDS += BIND_LIBXML2:libxml2 BIND_LIBJSON:libjson-c +PKG_BUILD_DEPENDS += \ + BIND_LIBXML2:libxml2 \ + BIND_LIBJSON:libjson-c \ + BIND_JEMALLOC:libjemalloc include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk @@ -66,7 +70,8 @@ define Package/bind-libs +BIND_ENABLE_GSSAPI:krb5-libs \ +BIND_ENABLE_GSSAPI:libcomerr \ +BIND_LIBXML2:libxml2 \ - +BIND_LIBJSON:libjson-c + +BIND_LIBJSON:libjson-c \ + +BIND_JEMALLOC:libjemalloc TITLE:=bind shared libraries URL:=https://www.isc.org/software/bind endef @@ -170,6 +175,14 @@ else --with-libxml2=no endif +ifdef CONFIG_BIND_JEMALLOC + CONFIGURE_ARGS += \ + --with-jemalloc=yes +else + CONFIGURE_ARGS += \ + --without-jemalloc +endif + ifdef CONFIG_BIND_ENABLE_DOH CONFIGURE_ARGS += \ --enable-doh