Source: zerofree
Version: 1.0.3-1
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

zerofree fails to cross build from source, because it uses the build
architecture compiler and thus fails stripping wrong architecture
binaries. Passing a triplet-prefixed compiler makes the build work both
cross and natively. Please consider applying the attached patch.

Helmut
diff --minimal -Nru zerofree-1.0.3/debian/changelog 
zerofree-1.0.3/debian/changelog
--- zerofree-1.0.3/debian/changelog     2014-03-31 16:32:57.000000000 +0200
+++ zerofree-1.0.3/debian/changelog     2016-11-05 07:20:02.000000000 +0100
@@ -1,3 +1,10 @@
+zerofree (1.0.3-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Pass triplet-prefixed CC to make (Closes: #-1).
+
+ -- Helmut Grohne <hel...@subdivi.de>  Sat, 05 Nov 2016 07:19:07 +0100
+
 zerofree (1.0.3-1) unstable; urgency=low
 
   * New upstream release.
diff --minimal -Nru zerofree-1.0.3/debian/rules zerofree-1.0.3/debian/rules
--- zerofree-1.0.3/debian/rules 2014-03-31 15:58:04.000000000 +0200
+++ zerofree-1.0.3/debian/rules 2016-11-05 07:19:05.000000000 +0100
@@ -11,13 +11,15 @@
 
 -include /usr/share/dpkg/buildflags.mk
 
-CC=gcc $(CFLAGS) $(LDFLAGS) $(CPPFLAGS)
+ifeq ($(origin CC),default)
+CC = $(DEB_HOST_GNU_TYPE)-gcc
+endif
 
 build: build-indep build-arch
 build-indep build-arch: build-stamp
 build-stamp: zerofree.c debian/zerofree.sgml
        dh_testdir
-       $(MAKE) CC="$(CC)"
+       $(MAKE) CC="$(CC) $(CFLAGS) $(LDFLAGS) $(CPPFLAGS)"
        docbook-to-man debian/zerofree.sgml > zerofree.8
        touch $@
 

Reply via email to