All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2] fitering out -fstack-protector-strong
@ 2015-04-01 16:38 Joseph Hindin
  2015-04-01 16:38 ` [Qemu-devel] [PATCH v2] qga: " Joseph Hindin
  0 siblings, 1 reply; 3+ messages in thread
From: Joseph Hindin @ 2015-04-01 16:38 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, pbonzini, Joseph Hindin, mdroth

The cross-compilation of VSS DLL from QEMU GA for Windows with MinGW
fails because of disreparancy between compiler's and linker's stack
protection options. The current qga/vss-win32/Makefile.objs filters
out option '-fstack-protector-all' from compiler's option, but commit
63678e17c introduced changes in configure script, setting
'-fstack-protector-strong' compiler option when available.

The '-fstack-protector-strong' option was not filtered out by the VSS
DLL Makefile.objs file, resulting in linking error.

Paolo Bonzini in the message
http://lists.nongnu.org/archive/html/qemu-devel/2015-03/msg02719.html
from 12.03.2015 suggested to fix the problem in a way similar to existing.

The patch follows the advice and filters out both '-fstack-protector-strong' and '-fstack-protector-all' from compiler's options' list.

Joseph Hindin (1):
  qga: fitering out -fstack-protector-strong

 qga/vss-win32/Makefile.objs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.1.0

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

* [Qemu-devel] [PATCH v2] qga: fitering out -fstack-protector-strong
  2015-04-01 16:38 [Qemu-devel] [PATCH v2] fitering out -fstack-protector-strong Joseph Hindin
@ 2015-04-01 16:38 ` Joseph Hindin
  2015-04-02 12:16   ` Paolo Bonzini
  0 siblings, 1 reply; 3+ messages in thread
From: Joseph Hindin @ 2015-04-01 16:38 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, pbonzini, Joseph Hindin, mdroth

configure script may add -fstack-protector-strong option instead
of -fstack-protector-all, depending on availability ( see
commit 63678e17c ). Both options have to by filtered out for
qga-vss.dll, otherwise MinGW cross-compilation fails at linking
stage.

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..7c96c6b 100644
--- a/qga/vss-win32/Makefile.objs
+++ b/qga/vss-win32/Makefile.objs
@@ -3,7 +3,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-obj-y): QEMU_CXXFLAGS = $(filter-out -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wold-style-declaration -Wold-style-definition -Wredundant-decls -fstack-protector-all -fstack-protector-strong, $(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: $(obj-qga-vss-dll-obj-y) $(SRC_PATH)/$(obj)/qga-vss.def
-- 
2.1.0

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

* Re: [Qemu-devel] [PATCH v2] qga: fitering out -fstack-protector-strong
  2015-04-01 16:38 ` [Qemu-devel] [PATCH v2] qga: " Joseph Hindin
@ 2015-04-02 12:16   ` Paolo Bonzini
  0 siblings, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2015-04-02 12:16 UTC (permalink / raw)
  To: Joseph Hindin, qemu-devel; +Cc: qemu-trivial, mdroth



On 01/04/2015 18:38, Joseph Hindin wrote:
> configure script may add -fstack-protector-strong option instead
> of -fstack-protector-all, depending on availability ( see
> commit 63678e17c ). Both options have to by filtered out for
> qga-vss.dll, otherwise MinGW cross-compilation fails at linking
> stage.
> 
> Signed-off-by: Joseph Hindin <jhindin@daynix.com>

Thanks, applied.  For 2.4 it would be interesting to see if we can
actually enable the stack protector.

Paolo

> ---
>  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..7c96c6b 100644
> --- a/qga/vss-win32/Makefile.objs
> +++ b/qga/vss-win32/Makefile.objs
> @@ -3,7 +3,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-obj-y): QEMU_CXXFLAGS = $(filter-out -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wold-style-declaration -Wold-style-definition -Wredundant-decls -fstack-protector-all -fstack-protector-strong, $(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: $(obj-qga-vss-dll-obj-y) $(SRC_PATH)/$(obj)/qga-vss.def
> 

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

end of thread, other threads:[~2015-04-02 12:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-01 16:38 [Qemu-devel] [PATCH v2] fitering out -fstack-protector-strong Joseph Hindin
2015-04-01 16:38 ` [Qemu-devel] [PATCH v2] qga: " Joseph Hindin
2015-04-02 12:16   ` Paolo Bonzini

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.