aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2021-02-21 07:46:21 +0000
committerRon Yorston <rmy@pobox.com>2021-02-21 09:51:13 +0000
commitddc4704db62865b5e2c0621f17cc2dc6909c1208 (patch)
treead8a8527363f2916eff6333108630d05002cadfc
parent4bca7987f38b24867d93efc4a11a1ef661734056 (diff)
downloadbusybox-w32-ddc4704db62865b5e2c0621f17cc2dc6909c1208.tar.gz
busybox-w32-ddc4704db62865b5e2c0621f17cc2dc6909c1208.tar.bz2
busybox-w32-ddc4704db62865b5e2c0621f17cc2dc6909c1208.zip
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.
-rw-r--r--win32/resources/Kbuild.src1
-rw-r--r--win32/resources/dummy.c2
2 files changed, 3 insertions, 0 deletions
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 @@
7obj-y := 7obj-y :=
8 8
9obj-$(CONFIG_FEATURE_RESOURCES) += resources.o 9obj-$(CONFIG_FEATURE_RESOURCES) += resources.o
10obj-$(CONFIG_FEATURE_RESOURCES) += dummy.o
10 11
11# return commit level if available or 0 12# return commit level if available or 0
12bb_level = $(or $(word 2,$(subst -, ,$1)),0) 13bb_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 @@
1extern void wibble(void);
2void wibble(void) {}