Source: arachne-pnr
Version: 0.1+20180909git840bdfd-1
Tags: patch
User: debian-cr...@lists.debian.org
Usertags: ftcbfs

arachne-pnr fails to cross build from source, because the Debian
packaging does not pass the variables that upstream needs. The upstream
Makefile does support cross compilation, it just works subtly different
than dh_auto_build passes. In addition, their cross build pass somehow
smuggles a -Werror into the compiler invocation that makes the build
fail. Please consider applying the attached patch.

Helmut
diff --minimal -Nru arachne-pnr-0.1+20180909git840bdfd/debian/changelog 
arachne-pnr-0.1+20180909git840bdfd/debian/changelog
--- arachne-pnr-0.1+20180909git840bdfd/debian/changelog 2018-12-20 
11:28:31.000000000 +0100
+++ arachne-pnr-0.1+20180909git840bdfd/debian/changelog 2020-03-02 
15:57:15.000000000 +0100
@@ -1,3 +1,12 @@
+arachne-pnr (0.1+20180909git840bdfd-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Export HOST_* variables.
+    + cross.patch: Drop -Werror.
+
+ -- Helmut Grohne <hel...@subdivi.de>  Mon, 02 Mar 2020 15:57:15 +0100
+
 arachne-pnr (0.1+20180909git840bdfd-1) unstable; urgency=medium
 
   * New upstream version
diff --minimal -Nru 
arachne-pnr-0.1+20180909git840bdfd/debian/patches/cross.patch 
arachne-pnr-0.1+20180909git840bdfd/debian/patches/cross.patch
--- arachne-pnr-0.1+20180909git840bdfd/debian/patches/cross.patch       
1970-01-01 01:00:00.000000000 +0100
+++ arachne-pnr-0.1+20180909git840bdfd/debian/patches/cross.patch       
2020-03-02 15:57:15.000000000 +0100
@@ -0,0 +1,11 @@
+--- arachne-pnr-0.1+20180909git840bdfd.orig/Makefile
++++ arachne-pnr-0.1+20180909git840bdfd/Makefile
+@@ -31,7 +31,7 @@
+ # Cross-compile logic
+ HOST_CC ?= $(CC)
+ HOST_CXX ?= $(CXX)
+-HOST_CXXFLAGS += -I$(SRC) -std=c++11 $(OPTDEBUGFLAGS) -Wall -Wshadow 
-Wsign-compare -Werror
++HOST_CXXFLAGS += -I$(SRC) -std=c++11 $(OPTDEBUGFLAGS) -Wall -Wshadow 
-Wsign-compare
+ HOST_LIBS ?= $(LIBS)
+ 
+ IS_CROSS_COMPILING = no
diff --minimal -Nru arachne-pnr-0.1+20180909git840bdfd/debian/patches/series 
arachne-pnr-0.1+20180909git840bdfd/debian/patches/series
--- arachne-pnr-0.1+20180909git840bdfd/debian/patches/series    2018-12-20 
11:28:31.000000000 +0100
+++ arachne-pnr-0.1+20180909git840bdfd/debian/patches/series    2020-03-02 
15:57:15.000000000 +0100
@@ -2,3 +2,4 @@
 05_prevent_dependency_on_git.patch
 0003-Not-Werror.patch
 0006-Do-not-add-all-the-flags-to-src-version_xx.c.patch
+cross.patch
diff --minimal -Nru arachne-pnr-0.1+20180909git840bdfd/debian/rules 
arachne-pnr-0.1+20180909git840bdfd/debian/rules
--- arachne-pnr-0.1+20180909git840bdfd/debian/rules     2018-12-20 
11:28:31.000000000 +0100
+++ arachne-pnr-0.1+20180909git840bdfd/debian/rules     2020-03-02 
15:57:14.000000000 +0100
@@ -2,6 +2,10 @@
 #export DH_VERBOSE = 1
 
 include /usr/share/dpkg/pkg-info.mk
+include /usr/share/dpkg/buildtools.mk
+
+export HOST_CC ?= $(CC_FOR_BUILD)
+export HOST_CXX ?= $(CXX_FOR_BUILD)
 
 export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
 

Reply via email to