All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Weil <sw@weilnetz.de>
To: Joseph Hindin <jhindin@daynix.com>, qemu-devel@nongnu.org
Cc: Michael Roth <mdroth@linux.vnet.ibm.com>,
	Tomoki Sekiyama <tomoki.sekiyama@hds.com>
Subject: Re: [Qemu-devel] [PATCH] windows build: -lssp added to qga-vss.dll libraries list
Date: Wed, 11 Mar 2015 20:59:43 +0100	[thread overview]
Message-ID: <55009EAF.40306@weilnetz.de> (raw)
In-Reply-To: <1426093841-32765-1-git-send-email-jhindin@daynix.com>

Am 11.03.2015 um 18:10 schrieb Joseph Hindin:
> When building qga-bss.dll with 64-bit mingw toolchain v. 4.9.2, the

Typo: qga-vss.dll

> 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)$@")
>   

Adding -lssp works, but adding -fstack-protector-all to the linker flags 
also works and might be the better solution.

-$(obj)/qga-vss.dll: LDFLAGS = -shared 
-Wl,--add-stdcall-alias,--enable-stdcall-fixup -lole32 -loleaut32 
-lshlwapi -luuid -static
+$(obj)/qga-vss.dll: LDFLAGS = -fstack-protector-all -shared 
-Wl,--add-stdcall-alias,--enable-stdcall-fixup -lole32 -loleaut32 
-lshlwapi -luuid -static

Could you please try that and send an updated patch? Please cc it also 
to qemu-trivial.

Regards
Stefan

  reply	other threads:[~2015-03-11 20:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-11 17:10 [Qemu-devel] [PATCH] windows build: -lssp added to qga-vss.dll libraries list Joseph Hindin
2015-03-11 19:59 ` Stefan Weil [this message]
2015-03-12 14:08   ` Paolo Bonzini
2015-03-12 21:31     ` Stefan Weil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55009EAF.40306@weilnetz.de \
    --to=sw@weilnetz.de \
    --cc=jhindin@daynix.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=tomoki.sekiyama@hds.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.