diff mbox series

[Bug,1885827] Re: building plugin failed on Windows with mingw

Message ID 159383259009.1717.14099413077282497580.malone@chaenomeles.canonical.com
State New
Headers show
Series [Bug,1885827] Re: building plugin failed on Windows with mingw | expand

Commit Message

Emilio G. Cota July 4, 2020, 3:16 a.m. UTC
I never built the plugin code on anything other than Linux :(
All I did for Windows is to try to follow https://gcc.gnu.org/wiki/Visibility

Can you please try the following patch (with no other changes)?
The patch applies on top of v4.2.0.
diff mbox series

Patch

diff --git a/tests/plugin/Makefile b/tests/plugin/Makefile
index 75467b6db8..5b3611ad63 100644
--- a/tests/plugin/Makefile
+++ b/tests/plugin/Makefile
@@ -16,7 +16,7 @@  NAMES += hotpages

 SONAMES := $(addsuffix .so,$(addprefix lib,$(NAMES)))

-QEMU_CFLAGS += -fPIC
+QEMU_CFLAGS += -fPIC -DBUILDING_DLL
 QEMU_CFLAGS += -I$(SRC_PATH)/include/qemu

 all: $(SONAMES)