From 6df332e5c3bbcd76e499360131304a7fbe85dffe Mon Sep 17 00:00:00 2001 From: Bastian Germann Date: Thu, 18 Nov 2021 22:05:11 -0500 Subject: [PATCH] debian: Pass --build and --host to configure xfsprogs fails to cross build because it fails to pass --host to configure. Thus it selects the build architecture as host architecture and fails configure, because the requested libraries are only installed for the host architecture. Link: https://bugs.debian.org/794158 Reported-by: Helmut Grohne Signed-off-by: Bastian Germann Reviewed-by: Darrick J. Wong Signed-off-by: Eric Sandeen --- debian/rules | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/debian/rules b/debian/rules index fe9a1c3a4..e12814b36 100755 --- a/debian/rules +++ b/debian/rules @@ -11,6 +11,9 @@ package = xfsprogs develop = xfslibs-dev bootpkg = xfsprogs-udeb +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) + version = $(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2 | cut -d '-' -f 1) target ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) udebpkg = $(bootpkg)_$(version)_$(target).udeb @@ -23,11 +26,13 @@ pkgdev = DIST_ROOT=`pwd`/$(dirdev); export DIST_ROOT; pkgdi = DIST_ROOT=`pwd`/$(dirdi); export DIST_ROOT; stdenv = @GZIP=-q; export GZIP; +configure_options = --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) + options = export DEBUG=-DNDEBUG DISTRIBUTION=debian \ INSTALL_USER=root INSTALL_GROUP=root \ - LOCAL_CONFIGURE_OPTIONS="--enable-editline=yes --enable-blkid=yes --disable-ubsan --disable-addrsan --disable-threadsan --enable-lto" ; + LOCAL_CONFIGURE_OPTIONS="$(configure_options) --enable-editline=yes --enable-blkid=yes --disable-ubsan --disable-addrsan --disable-threadsan --enable-lto" ; diopts = $(options) \ - export OPTIMIZER=-Os LOCAL_CONFIGURE_OPTIONS="--enable-gettext=no --disable-ubsan --disable-addrsan --disable-threadsan --enable-lto" ; + export OPTIMIZER=-Os LOCAL_CONFIGURE_OPTIONS="$(configure_options) --enable-gettext=no --disable-ubsan --disable-addrsan --disable-threadsan --enable-lto" ; checkdir = test -f debian/rules build: build-arch build-indep -- 2.39.2