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 <[email protected]>
PKG_NAME:=bind
PKG_VERSION:=9.20.11
-PKG_RELEASE:=1
+PKG_RELEASE:=2
USERID:=bind=57:bind=57
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
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 \
--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