Source: mingw-w64
Version: 6.0.0-3
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

mingw-w64 fails to cross build from source, because it fails finding
libmangle at some point. Looking into debian/rules, I see that it takes
great care to handle cross builds correctly. This is fairly impressive!
Unfortunately, there are two configure specializations that lack the
--host and --target flags injected elsewhere. The build actually
performs a cross build of libmangle, but then tries to build a native
gendef against that libmangle. Injecting those missing flags is all that
is needed to fix the (candian) cross build. Congratulations! Please
consider applying the attached patch.

Helmut
diff --minimal -Nru mingw-w64-6.0.0/debian/changelog 
mingw-w64-6.0.0/debian/changelog
--- mingw-w64-6.0.0/debian/changelog    2018-11-11 20:47:29.000000000 +0100
+++ mingw-w64-6.0.0/debian/changelog    2019-04-14 10:33:12.000000000 +0200
@@ -1,3 +1,10 @@
+mingw-w64 (6.0.0-3.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix (candian) cross build. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Sun, 14 Apr 2019 10:33:12 +0200
+
 mingw-w64 (6.0.0-3) unstable; urgency=medium
 
   * Fix widl build on aarch64.
diff --minimal -Nru mingw-w64-6.0.0/debian/rules mingw-w64-6.0.0/debian/rules
--- mingw-w64-6.0.0/debian/rules        2018-10-24 22:19:46.000000000 +0200
+++ mingw-w64-6.0.0/debian/rules        2019-04-14 10:33:12.000000000 +0200
@@ -72,7 +72,7 @@
 $(host)~$(host)~tools-gendef-configure-stamp: autoreconf-stamp 
$(host)~$(host)~libraries-libmangle-install-stamp
        mkdir -p $(call buildfolder,$(host)~$(host)~tools-gendef) && \
        cd $(call buildfolder,$(host)~$(host)~tools-gendef) && \
-       $(call sourcefolder,$(host)~$(host)~tools-gendef)/configure 
--prefix=/usr --with-mangle=$(top_dir)/debian/tmp/usr $(shell 
$(dpkg_hard_buildflags) --export=configure)
+       $(call sourcefolder,$(host)~$(host)~tools-gendef)/configure 
--prefix=/usr --with-mangle=$(top_dir)/debian/tmp/usr $(shell 
$(dpkg_hard_buildflags) --export=configure) --host=$(host) --target=$(host)
        touch $@
 
 # genlib requires libmangle and is installed as mingw-genlib
@@ -80,7 +80,7 @@
 $(host)~$(host)~tools-genlib-configure-stamp: autoreconf-stamp 
$(host)~$(host)~libraries-libmangle-install-stamp
        mkdir -p $(call buildfolder,$(host)~$(host)~tools-genlib) && \
        cd $(call buildfolder,$(host)~$(host)~tools-genlib) && \
-       $(call sourcefolder,$(host)~$(host)~tools-genlib)/configure 
--prefix=/usr --with-mangle=$(top_dir)/debian/tmp/usr $(shell 
$(dpkg_hard_buildflags) --export=configure) --program-prefix=mingw-
+       $(call sourcefolder,$(host)~$(host)~tools-genlib)/configure 
--prefix=/usr --with-mangle=$(top_dir)/debian/tmp/usr $(shell 
$(dpkg_hard_buildflags) --export=configure) --program-prefix=mingw- 
--host=$(host) --target=$(host)
        touch $@
 
 build-arch-stamp: $(patsubst 
%,$(host)~$(host)~tools-%-install-stamp,$(HOST_TOOLS)) $(foreach 
target,$(targets),$(patsubst 
%,$(host)~$(target)~tools-%-install-stamp,$(TARGET_TOOLS)))

Reply via email to