Source: rfkill
Version: 0.5-1
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

rfkill fails to cross build from source, because it uses the build
architecture compiler (hardcoded in Makefile) which leads to dh_strip
giving up on wrong architecture objects. The attached patch passes a
suitable CC to the make invocation and makes cross builds succeed.
Please consider applying it.

Helmut
diff --minimal -Nru rfkill-0.5/debian/changelog rfkill-0.5/debian/changelog
--- rfkill-0.5/debian/changelog 2013-09-26 16:21:19.000000000 +0200
+++ rfkill-0.5/debian/changelog 2016-10-05 05:17:42.000000000 +0200
@@ -1,3 +1,10 @@
+rfkill (0.5-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Pass triplet-prefixed CC to make. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Wed, 05 Oct 2016 05:17:29 +0200
+
 rfkill (0.5-1) unstable; urgency=low
 
   * New upstream release.
diff --minimal -Nru rfkill-0.5/debian/rules rfkill-0.5/debian/rules
--- rfkill-0.5/debian/rules     2013-09-26 16:10:22.000000000 +0200
+++ rfkill-0.5/debian/rules     2016-10-05 05:17:27.000000000 +0200
@@ -11,6 +11,10 @@
 
 DPKG_EXPORT_BUILDFLAGS = 1
 include /usr/share/dpkg/buildflags.mk
+include /usr/share/dpkg/architecture.mk
+ifeq ($(origin CC),default)
+CC = $(DEB_HOST_GNU_TYPE)-gcc
+endif
 
 configure: configure-stamp
 configure-stamp:
@@ -22,7 +26,7 @@
 
 build-stamp: configure-stamp
        dh_testdir
-       $(MAKE) VERSION_SUFFIX="$(shell dpkg-parsechangelog | sed -e 
'/^Version:/! d; s/^[^-]*-//; q') ($(shell dpkg-vendor --query VENDOR))"
+       $(MAKE) VERSION_SUFFIX="$(shell dpkg-parsechangelog | sed -e 
'/^Version:/! d; s/^[^-]*-//; q') ($(shell dpkg-vendor --query VENDOR))" 
CC="$(CC)"
        touch $@
 
 clean:

Reply via email to