Source: ebtables
Version: 2.0.10.4-3.5
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

ebtables fails to cross build from source, because it uses the build
architecture compiler. dh_strip thus fails operating on build
architecture ELF objects expecting host architecture ones. Prefixing the
compiler with the host triplet solves this problem. Please consider
applying the attached patch.

Helmut
diff --minimal -Nru ebtables-2.0.10.4/debian/changelog 
ebtables-2.0.10.4/debian/changelog
--- ebtables-2.0.10.4/debian/changelog  2016-05-25 20:37:15.000000000 +0200
+++ ebtables-2.0.10.4/debian/changelog  2016-12-21 06:18:21.000000000 +0100
@@ -1,3 +1,10 @@
+ebtables (2.0.10.4-3.6) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Pass triplet-prefixed CC to make (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Wed, 21 Dec 2016 06:18:21 +0100
+
 ebtables (2.0.10.4-3.5) unstable; urgency=medium
 
   * Non-maintainer upload.
diff --minimal -Nru ebtables-2.0.10.4/debian/rules 
ebtables-2.0.10.4/debian/rules
--- ebtables-2.0.10.4/debian/rules      2016-02-05 02:12:50.000000000 +0100
+++ ebtables-2.0.10.4/debian/rules      2016-12-21 06:18:19.000000000 +0100
@@ -1,5 +1,9 @@
 #!/usr/bin/make -f
 
+include /usr/share/dpkg/architecture.mk
+ifeq ($(origin CC),default)
+CC := $(DEB_HOST_GNU_TYPE)-gcc
+endif
 export DPKG_EXPORT_BUILDFLAGS = 1
 export DEB_CFLAGS_MAINT_APPEND=-fstack-protector-all
 include /usr/share/dpkg/buildflags.mk
@@ -13,7 +17,7 @@
 DEB_DH_INSTALLINIT_ARGS:=-- start 20 S . stop 80 0 1 6 .
 
 build/ebtables::
-       make CFLAGS="$(CPPFLAGS) $(CFLAGS)" CFLAGS_SH_LIB="-fPIC" 
LDFLAGS="$(LDFLAGS)" $(MAKE_PATH_REDIRECTIONS)
+       make CC="$(CC)" CFLAGS="$(CPPFLAGS) $(CFLAGS)" CFLAGS_SH_LIB="-fPIC" 
LDFLAGS="$(LDFLAGS)" $(MAKE_PATH_REDIRECTIONS)
 
 clean::
        dh_testdir

Reply via email to