diff -Nru mingw-w64-7.0.0/debian/changelog mingw-w64-7.0.0/debian/changelog --- mingw-w64-7.0.0/debian/changelog 2019-11-11 22:13:04.000000000 +0000 +++ mingw-w64-7.0.0/debian/changelog 2019-11-15 21:53:07.000000000 +0000 @@ -1,3 +1,12 @@ +mingw-w64 (7.0.0-2) unstable; urgency=medium + + * Avoid erroring out in the build on CPUs which aren’t used on Windows; + instead, require that the target be specified when widl is used on + such systems. This allows building the package on architectures other + than x86, ARM and PowerPC. + + -- Stephen Kitt Fri, 15 Nov 2019 22:53:07 +0100 + mingw-w64 (7.0.0-1) unstable; urgency=medium * New upstream release. diff -Nru mingw-w64-7.0.0/debian/patches/series mingw-w64-7.0.0/debian/patches/series --- mingw-w64-7.0.0/debian/patches/series 2018-11-11 17:39:17.000000000 +0000 +++ mingw-w64-7.0.0/debian/patches/series 2019-11-14 22:04:15.000000000 +0000 @@ -9,3 +9,4 @@ genlib-lm.patch widl-pathtools-bsd.patch widl-windef-aarch64.patch +widl-cpu.patch diff -Nru mingw-w64-7.0.0/debian/patches/widl-cpu.patch mingw-w64-7.0.0/debian/patches/widl-cpu.patch --- mingw-w64-7.0.0/debian/patches/widl-cpu.patch 1970-01-01 00:00:00.000000000 +0000 +++ mingw-w64-7.0.0/debian/patches/widl-cpu.patch 2019-11-15 21:51:21.000000000 +0000 @@ -0,0 +1,46 @@ +Description: Don’t error out on non-Windows CPUs +Author: Stephen Kitt + +--- a/mingw-w64-tools/widl/src/widl.c ++++ b/mingw-w64-tools/widl/src/widl.c +@@ -103,7 +103,7 @@ + #elif defined(__aarch64__) + enum target_cpu target_cpu = CPU_ARM64; + #else +-#error Unsupported CPU ++enum target_cpu target_cpu = CPU_UNKNOWN; + #endif + + int debuglevel = DEBUGLEVEL_NONE; +@@ -758,13 +758,17 @@ + if (pointer_size == 4) target_cpu = CPU_x86; + else pointer_size = 8; + break; ++ case CPU_ARM: ++ case CPU_POWERPC: ++ if (pointer_size == 8) error( "Cannot build 64-bit code for this CPU\n" ); ++ pointer_size = 4; ++ break; + case CPU_ARM64: + if (pointer_size == 4) error( "Cannot build 32-bit code for this CPU\n" ); + pointer_size = 8; + break; + default: +- if (pointer_size == 8) error( "Cannot build 64-bit code for this CPU\n" ); +- pointer_size = 4; ++ error("Undetermined target, please specify one\n"); + break; + } + +--- a/mingw-w64-tools/widl/src/widl.h ++++ b/mingw-w64-tools/widl/src/widl.h +@@ -76,7 +76,8 @@ + + enum target_cpu + { +- CPU_x86, CPU_x86_64, CPU_POWERPC, CPU_ARM, CPU_ARM64, CPU_LAST = CPU_ARM64 ++ CPU_x86, CPU_x86_64, CPU_POWERPC, CPU_ARM, CPU_ARM64, CPU_LAST = CPU_ARM64, ++ CPU_UNKNOWN + }; + + extern enum target_cpu target_cpu;