From ddc4704db62865b5e2c0621f17cc2dc6909c1208 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Sun, 21 Feb 2021 07:46:21 +0000 Subject: win32: workaround for '0-bit reloc' on MSYS2 There seems to be a bug in the Windows/MSYS2/mingw-w64 toolchain which results in the generated win32/resources/built-in.o lacking relocation data. Forcing an actual C program to be linked along with the resources appears to be an effective workaround. When the toolchain bug is resolved this commit can be reverted. See GitHub issue #200. --- win32/resources/Kbuild.src | 1 + win32/resources/dummy.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/win32/resources/Kbuild.src b/win32/resources/Kbuild.src index 1900d1872..550eddaa0 100644 --- a/win32/resources/Kbuild.src +++ b/win32/resources/Kbuild.src @@ -7,6 +7,7 @@ obj-y := obj-$(CONFIG_FEATURE_RESOURCES) += resources.o +obj-$(CONFIG_FEATURE_RESOURCES) += dummy.o # return commit level if available or 0 bb_level = $(or $(word 2,$(subst -, ,$1)),0) diff --git a/win32/resources/dummy.c b/win32/resources/dummy.c index e69de29bb..2d4b87680 100644 --- a/win32/resources/dummy.c +++ b/win32/resources/dummy.c @@ -0,0 +1,2 @@ +extern void wibble(void); +void wibble(void) {} -- cgit v1.2.3-55-g6feb