Source: makedumpfile
Version: 1:1.6.8-4
Tags: patch
User: debian-cr...@lists.debian.org
Usertags: ftcbfs

makedumpfile fails to cross build from source when building on amd64 for
arm64, because the upstream Makefile passes the architecture to gcc via
a macro and detects it using uname. As such, the __x86_64__ macro is set
and a structure is defined twice. makedumpfile does support cross
building, but one has to explicitly define a TARGET variable to do so.
Please consider applying the attached patch.

Helmut
diff --minimal -Nru makedumpfile-1.6.8/debian/changelog 
makedumpfile-1.6.8/debian/changelog
--- makedumpfile-1.6.8/debian/changelog 2021-04-08 00:32:38.000000000 +0200
+++ makedumpfile-1.6.8/debian/changelog 2021-06-16 11:33:25.000000000 +0200
@@ -1,3 +1,10 @@
+makedumpfile (1:1.6.8-4.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS for arm64: Pass a suitable TARGET= to make. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Wed, 16 Jun 2021 11:33:25 +0200
+
 makedumpfile (1:1.6.8-4) unstable; urgency=medium
 
   [ Ioanna Alifieraki ]
diff --minimal -Nru makedumpfile-1.6.8/debian/rules 
makedumpfile-1.6.8/debian/rules
--- makedumpfile-1.6.8/debian/rules     2021-04-08 00:32:38.000000000 +0200
+++ makedumpfile-1.6.8/debian/rules     2021-06-16 11:33:24.000000000 +0200
@@ -5,8 +5,13 @@
 %:
        dh $@
 
+MAKE_SETTINGS = LINKTYPE=dynamic USELZO=on
+ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+MAKE_SETTINGS += TARGET=$(DEB_HOST_ARCH)
+endif
+
 override_dh_auto_build:
-       dh_auto_build -- LINKTYPE=dynamic USELZO=on
+       dh_auto_build -- $(MAKE_SETTINGS)
 
 override_dh_auto_install:
        dh_auto_install --destdir debian/tmp

Reply via email to