When we cross build uboot-tools, the dtc tool is still compiled for
the host. Therefore, we should not attempt to link the OpenWrt system
libraries. CPU architecture mismatch can lead to build errors.
Fixes: https://github.com/openwrt/openwrt/issues/22924
Fixes: 55925650aabb ("uboot-tools: update to v2026.04")
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/22927
Signed-off-by: Robert Marko <robimarko@gmail.com>
ARCH="sandbox" \
TARGET_CFLAGS="$(TARGET_CFLAGS)" \
TARGET_LDFLAGS="$(TARGET_LDFLAGS)" \
ARCH="sandbox" \
TARGET_CFLAGS="$(TARGET_CFLAGS)" \
TARGET_LDFLAGS="$(TARGET_LDFLAGS)" \
- PKG_CONFIG_SYSROOT_DIR="$(STAGING_DIR)" \
+ PKG_CONFIG_SYSROOT_DIR="$(STAGING_DIR_HOST)" \
NO_PYTHON=1 \
V=$(if $(findstring c,$(OPENWRT_VERBOSE)),1,)
NO_PYTHON=1 \
V=$(if $(findstring c,$(OPENWRT_VERBOSE)),1,)