package/dracut: pass HOST_CONFIGURE_OPTS to make

Dracut-internal executables were linked against system libraries,
instead of Buildroot host packages. For example:

$ ldd host/lib/dracut/dracut-install
	linux-vdso.so.1 (0x00007f578cf06000)
	libc.so.6 => /usr/lib/x86_64-linux-gnu/libc.so.6 (0x00007f578cccd000)
	libkmod.so.2 => /usr/lib/x86_64-linux-gnu/libkmod.so.2 (0x00007f578ccb1000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f578cf08000)
	libcrypto.so.3 => /usr/lib/x86_64-linux-gnu/libcrypto.so.3 (0x00007f578c600000)
	libz.so.1 => /usr/lib/x86_64-linux-gnu/libz.so.1 (0x00007f578cc92000)
	libzstd.so.1 => /usr/lib/x86_64-linux-gnu/libzstd.so.1 (0x00007f578c536000)

The reason is that Dracut is not a "real" autoconf package, and the
hand-written ./configure script does not preserve LDFLAGS for
make. Pass the environment variables directly to fix this.

Signed-off-by: Fiona Klute (othermo GmbH) <fiona.klute@gmx.de>
[Julien: add comment in dracut.mk]
Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
Fiona Klute (othermo GmbH)
2026-08-31 19:53:58 +02:00
committed by Julien Olivain
parent a31afeb8a4
commit 45acb281ca

View File

@@ -11,6 +11,9 @@ DRACUT_LICENSE_FILES = COPYING
DRACUT_CPE_ID_VALID = YES
HOST_DRACUT_DEPENDENCIES = host-pkgconf host-kmod host-cross-ldd
# Dracut is not a real autotools package, and the hand-written
# ./configure script does not preserve LDFLAGS for make.
HOST_DRACUT_MAKE_ENV = $(HOST_CONFIGURE_OPTS)
HOST_DRACUT_INSTALL_OPTS = systemdsystemunitdir="" install
ifeq ($(BR2_PACKAGE_HOST_RUSTC),y)