Use the host compiler for build tool c-ify. master
authorHelmut Grohne <helmut@subdivi.de>
Tue, 27 Nov 2018 11:59:43 +0000 (22:59 +1100)
committerEmil Mikulic <emikulic@gmail.com>
Wed, 28 Nov 2018 12:42:55 +0000 (23:42 +1100)
Bug#914628: darkstat FTCBFS: uses the host architecture compiler for
build tool c-ify

darkstat fails to cross build from source. The package is quite prepared
for cross building and even has a separate make variable for using a
different compiler for c-ify. It just happens that the variable "HOSTCC"
is wrongly initialized. The attached patch fixes that and makes darkstat
cross buildable.

debian/changelog
debian/rules

index 4e2601c..154313d 100644 (file)
@@ -1,3 +1,9 @@
+darkstat (3.0.719-2) UNRELEASED; urgency=medium
+
+  * Fix FTCBFS: Supply HOSTCC to make. (Closes: #914628)
+
+ -- Emil Mikulic <emikulic@gmail.com>  Sun, 25 Nov 2018 20:38:41 +0100
+
 darkstat (3.0.719-1) unstable; urgency=low
 
   * New upstream release
 darkstat (3.0.719-1) unstable; urgency=low
 
   * New upstream release
index 3eb88a3..e63e77a 100755 (executable)
@@ -8,6 +8,8 @@ DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
 DPKG_EXPORT_BUILDFLAGS = 1
 include /usr/share/dpkg/buildflags.mk
 
 DPKG_EXPORT_BUILDFLAGS = 1
 include /usr/share/dpkg/buildflags.mk
+-include /usr/share/dpkg/buildtools.mk
+CC_FOR_BUILD ?= cc
 
 configure: configure-stamp
 configure-stamp: 
 
 configure: configure-stamp
 configure-stamp: 
@@ -22,7 +24,7 @@ build-indep: build
 
 build-stamp: configure-stamp
        dh_testdir
 
 build-stamp: configure-stamp
        dh_testdir
-       $(MAKE)
+       $(MAKE) HOSTCC=$(CC_FOR_BUILD)
        touch $@
 
 clean: 
        touch $@
 
 clean: