Hi Helmut,

On Thu, Sep 19, 2019 at 06:07:45AM +0200, Helmut Grohne wrote:
> Source: micro-httpd
> Version: 20051212-15.1
> Tags: patch
> User: [email protected]
> Usertags: ftcbfs
> 
> micro-httpd fails to cross build from source, because debian/rules uses
> the build architecture compiler as a make default for CC. The easiest
> way of fixing that is letting dpkg's buildtools.mk initialize it. Please
> consider applying the attached patch.
<snip>
> diff --minimal -Nru micro-httpd-20051212/debian/rules 
> micro-httpd-20051212/debian/rules
> --- micro-httpd-20051212/debian/rules 2016-07-02 18:14:04.000000000 +0200
> +++ micro-httpd-20051212/debian/rules 2019-09-19 06:04:09.000000000 +0200
> @@ -4,6 +4,7 @@
>  BIN  = micro_httpd
>  
>  include debian/debian-vars.mk
> +-include /usr/share/dpkg/buildtools.mk

I think the attached patch will be better. I have tested it on multiple
arcchtectures now and plannig to add it to the next upload.
Please let me know if you have any concern with my patch.

--
Regards
Sudip
>From ebab8af1d226f328b21b16a69f624b257446504e Mon Sep 17 00:00:00 2001
From: Sudip Mukherjee <[email protected]>
Date: Sat, 30 Nov 2019 23:18:22 +0000
Subject: [PATCH] fix crosscompilation

Use DEB_HOST_GNU_TYPE with CC to crosscompile from source.

Signed-off-by: Sudip Mukherjee <[email protected]>
---
 debian/rules | 1 +
 1 file changed, 1 insertion(+)

diff --git a/debian/rules b/debian/rules
index 4d42214..c46c6cd 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,6 +4,7 @@ export DH_VERBOSE=1
 
 PACKAGE = micro-httpd
 BIN	= micro_httpd
+CC	= $(DEB_HOST_GNU_TYPE)-gcc
 
 include debian/debian-vars.mk
 
-- 
2.20.1

Reply via email to