bind: fix build and bump PKG_RELEASE

bind9 builds for me on 24.10, but it doesn't build on master with or without my
patches.

The build already dies on the configure stage (without my patches applied),
because the autoconf magic manages to mix up the host gcc and the
cross-compiling gcc.

Removing PKG_FIXUP:=autoreconf from the Makefile fixes that, but compilation chokes later instead on libtool magic:

    make[7]: Entering directory '/home/build/openwrt/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/bind-9.20.11/bin/rndc'
    ...
    /bin/bash ../../libtool  --tag=CC   --mode=link arm-openwrt-linux-muslgnueabi-gcc ...
    libtool: link: arm-openwrt-linux-muslgnueabi-gcc ...
    .../bin/ld.bfd: warning: libns-9.20.11.so, needed by ../../lib/isccfg/.libs/libisccfg.so, not found (try using -rpath or -rpath-link)
    ...
    collect2: error: ld returned 1 exit status

Which I did a (compile-tested only) quick and dirty fix for.

Also, BUILD_CC isn't defined anywhere in the current bind sources, so I removed
that as well.

Signed-off-by: David Härdeman <david@hardeman.nu>
This commit is contained in:
David Härdeman
2025-07-27 22:33:38 +02:00
committed by Noah Meyerhans
parent dc68b66797
commit 1884225455

View File

@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=bind
PKG_VERSION:=9.20.11
PKG_RELEASE:=1
PKG_RELEASE:=2
USERID:=bind=57:bind=57
PKG_MAINTAINER:=Noah Meyerhans <frodo@morgul.net>
@@ -24,9 +24,6 @@ PKG_SOURCE_URL:= \
https://ftp.isc.org/isc/bind9/$(PKG_VERSION)
PKG_HASH:=4da2d532e668bc21e883f6e6d9d3d81794d9ec60b181530385649a56f46ee17a
PKG_FIXUP:=autoreconf
PKG_REMOVE_FILES:=aclocal.m4 libtool.m4
PKG_INSTALL:=1
PKG_BUILD_FLAGS:=no-mips16
PKG_BUILD_PARALLEL:=1
@@ -148,9 +145,8 @@ define Package/bind-ddns-confgen
TITLE+= administration tools (ddns-confgen and tsig-keygen only)
endef
export BUILD_CC="$(TARGET_CC)"
TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed \
-Wl,-rpath-link,$(PKG_BUILD_DIR)/lib/ns/.libs
CONFIGURE_ARGS += \
--disable-geoip \
@@ -200,19 +196,6 @@ else
--without-gssapi
endif
CONFIGURE_VARS += \
BUILD_CC="$(TARGET_CC)" \
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR)/lib/dns \
BUILD_CC="$(HOSTCC)" \
CC="$(HOSTCC)" \
CFLAGS="-O2" \
LIBS="" \
gen
$(call Build/Compile/Default)
endef
define Package/bind-libs/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib