qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Patch for 64 bit mingw compilation
@ 2015-03-11 14:51 Joseph Hindin
  2015-03-12 13:57 ` Stefan Hajnoczi
  2015-05-03  8:33 ` Olga Krishtal
  0 siblings, 2 replies; 4+ messages in thread
From: Joseph Hindin @ 2015-03-11 14:51 UTC (permalink / raw)
  To: qemu-devel; +Cc: Michael Roth


[-- Attachment #1.1: Type: text/plain, Size: 376 bytes --]

Hi

   When compiling the QEMU Guest Agent with 64-bit MinGW toolchain version
4.9.2, I run into the following problem: qga-vss.dll linking failed as
linker reported a lot of unresolved symbol __stack_chk_fail errors stemming
from the stack protection. The attached patch solves the problem by adding
libssp to the qga-vss.dll libraries list.

   Regards,
      Joseph Hindin

[-- Attachment #1.2: Type: text/html, Size: 478 bytes --]

[-- Attachment #2: 0001-windows-build-lssp-added-to-qga-vss.dll-library-list.patch --]
[-- Type: application/octet-stream, Size: 1785 bytes --]

From 29d647419c04a8f990fa29c033a718abb4120b20 Mon Sep 17 00:00:00 2001
From: Joseph Hindin <jhindin@daynix.com>
Date: Wed, 11 Mar 2015 15:58:06 +0200
Subject: [PATCH] windows build: -lssp added to qga-vss.dll libraries list

When building qga-bss.dll with 64-bit mingw toolchain v. 4.9.2, the
qga-vss.dll linking fails with unresolved symbols from libssp,
stack protection support, like the following message:

.../qga/vss-win32/install.cpp:52: undefined reference to `__stack_chk_fail'

The patch fixes the problem by adding libssp to the qga-vss.dll
libraries list.

Signed-off-by: Joseph Hindin <jhindin@daynix.com>
---
 qga/vss-win32/Makefile.objs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qga/vss-win32/Makefile.objs b/qga/vss-win32/Makefile.objs
index 6a69d50..bd0840d 100644
--- a/qga/vss-win32/Makefile.objs
+++ b/qga/vss-win32/Makefile.objs
@@ -5,7 +5,7 @@ qga-vss-dll-obj-y += requester.o provider.o install.o
 obj-qga-vss-dll-obj-y = $(addprefix $(obj)/, $(qga-vss-dll-obj-y))
 $(obj-qga-vss-dll-obj-y): QEMU_CXXFLAGS = $(filter-out -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wold-style-declaration -Wold-style-definition -Wredundant-decls -fstack-protector-all, $(QEMU_CFLAGS)) -Wno-unknown-pragmas -Wno-delete-non-virtual-dtor
 
-$(obj)/qga-vss.dll: LDFLAGS = -shared -Wl,--add-stdcall-alias,--enable-stdcall-fixup -lole32 -loleaut32 -lshlwapi -luuid -static
+$(obj)/qga-vss.dll: LDFLAGS = -shared -Wl,--add-stdcall-alias,--enable-stdcall-fixup -lole32 -loleaut32 -lshlwapi -luuid -lssp -static
 $(obj)/qga-vss.dll: $(obj-qga-vss-dll-obj-y) $(SRC_PATH)/$(obj)/qga-vss.def
 	$(call quiet-command,$(CXX) -o $@ $(qga-vss-dll-obj-y) $(SRC_PATH)/qga/vss-win32/qga-vss.def $(CXXFLAGS) $(LDFLAGS),"  LINK  $(TARGET_DIR)$@")
 
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-05-04  8:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-11 14:51 [Qemu-devel] Patch for 64 bit mingw compilation Joseph Hindin
2015-03-12 13:57 ` Stefan Hajnoczi
2015-05-03  8:33 ` Olga Krishtal
2015-05-04  8:46   ` Joseph Hindin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).