Source: gnu-efi
Version: 3.0.2-1
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

gnu-efi is in Build-Depends of systemd. As such it is considered part of
the transitive build closure of the essential system and thus needs to
support cross compilation. The package doesn't do that out of the box,
as it always uses "gcc" without any architecture prefix. I am attaching
a patch that exports the CROSS_COMPILE variable used by gnu-efi's build
system when cross compilation is detected and confirm that this patch is
sufficient to support cross building. Please consider applying it.

Helmut
diff -Nru gnu-efi-3.0.2/debian/changelog gnu-efi-3.0.2/debian/changelog
--- gnu-efi-3.0.2/debian/changelog      2015-05-12 22:02:15.000000000 +0200
+++ gnu-efi-3.0.2/debian/changelog      2015-11-17 20:30:12.000000000 +0100
@@ -1,3 +1,10 @@
+gnu-efi (3.0.2-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS by exporting CROSS_COMPILE (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Tue, 17 Nov 2015 20:22:37 +0100
+
 gnu-efi (3.0.2-1) unstable; urgency=medium
 
   * Imported Upstream version 3.0.2
diff -Nru gnu-efi-3.0.2/debian/rules gnu-efi-3.0.2/debian/rules
--- gnu-efi-3.0.2/debian/rules  2015-05-12 22:02:15.000000000 +0200
+++ gnu-efi-3.0.2/debian/rules  2015-11-17 20:22:33.000000000 +0100
@@ -1,8 +1,13 @@
 #!/usr/bin/make -f
 
 DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
+DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
 
+ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+export CROSS_COMPILE = $(DEB_HOST_GNU_TYPE)-
+endif
+
 # The architecture we are building on
 ifneq (,$(findstring i386,$(DEB_BUILD_ARCH)))
        BUILD_ARCH := ia32

Reply via email to