Source: leaktracer
Version: 2.4-6
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

leaktracer fails to cross build from source, because it uses the build
architecture compiler. Passing a host architecture prefixed C++ compiler
to $(MAKE) as CC (non-standard) fixes the build. Please consider
applying the attached patch.

Helmut
diff -u leaktracer-2.4/debian/changelog leaktracer-2.4/debian/changelog
--- leaktracer-2.4/debian/changelog
+++ leaktracer-2.4/debian/changelog
@@ -1,3 +1,10 @@
+leaktracer (2.4-6.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Pass triplet-prefixed CXX as CC to make (Closes: #-1).
+
+ -- Helmut Grohne <hel...@subdivi.de>  Sat, 24 Jun 2017 14:06:53 +0200
+
 leaktracer (2.4-6) unstable; urgency=medium
 
   * Switch to debhelper v9 (Closes: #817515).
diff -u leaktracer-2.4/debian/rules leaktracer-2.4/debian/rules
--- leaktracer-2.4/debian/rules
+++ leaktracer-2.4/debian/rules
@@ -4,6 +4,11 @@
 # based on sample debian/rules that uses debhelper.
 # GNU copyright 1997 to 1999 by Joey Hess.
 
+include /usr/share/dpkg/architecture.mk
+
+ifeq ($(origin CXX),default)
+  CXX := $(DEB_HOST_GNU_TYPE)-g++
+endif
 CFLAGS=-Wall -W -g
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
   CFLAGS += -O0
@@ -21,8 +26,8 @@
 build-stamp: debian/LeakTracer.1
        dh_testdir
 
-       $(MAKE) CFLAGS="${CFLAGS}"
-       [ $(NOCHECK) = 1 ] || $(MAKE) test
+       $(MAKE) CC="$(CXX)" CFLAGS="${CFLAGS}"
+       [ $(NOCHECK) = 1 ] || $(MAKE) test CC="$(CXX)" CFLAGS="${CFLAGS}"
 
        touch build-stamp
 

Reply via email to