qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v1] ./configure: use -lole32 when building with mingw32
@ 2012-02-15 16:41 Meador Inge
  2012-02-15 16:49 ` Peter Maydell
  2012-02-15 19:40 ` Stefan Weil
  0 siblings, 2 replies; 5+ messages in thread
From: Meador Inge @ 2012-02-15 16:41 UTC (permalink / raw)
  To: qemu-devel

glib calls 'CoTaskMemFree' which is defined by ole32.dll.
Therefore when building with mingw32 -lole32 should be in
'LIBS'.

Signed-off-by: Meador Inge <meadori@codesourcery.com>
---
 configure |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/configure b/configure
index 88521d2..40caf81 100755
--- a/configure
+++ b/configure
@@ -502,7 +502,7 @@ if test "$mingw32" = "yes" ; then
   QEMU_CFLAGS="-DWIN32_LEAN_AND_MEAN -DWINVER=0x501 $QEMU_CFLAGS"
   # enable C99/POSIX format strings (needs mingw32-runtime 3.15 or later)
   QEMU_CFLAGS="-D__USE_MINGW_ANSI_STDIO=1 $QEMU_CFLAGS"
-  LIBS="-lwinmm -lws2_32 -liberty -liphlpapi $LIBS"
+  LIBS="-lole32 -lwinmm -lws2_32 -liberty -liphlpapi $LIBS"
   prefix="c:/Program Files/Qemu"
   mandir="\${prefix}"
   datadir="\${prefix}"
-- 
1.7.7.6

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

* Re: [Qemu-devel] [PATCH v1] ./configure: use -lole32 when building with mingw32
  2012-02-15 16:41 [Qemu-devel] [PATCH v1] ./configure: use -lole32 when building with mingw32 Meador Inge
@ 2012-02-15 16:49 ` Peter Maydell
  2012-02-15 17:18   ` Paolo Bonzini
  2012-02-15 17:19   ` Meador Inge
  2012-02-15 19:40 ` Stefan Weil
  1 sibling, 2 replies; 5+ messages in thread
From: Peter Maydell @ 2012-02-15 16:49 UTC (permalink / raw)
  To: Meador Inge; +Cc: qemu-devel

On 15 February 2012 16:41, Meador Inge <meadori@codesourcery.com> wrote:
> glib calls 'CoTaskMemFree' which is defined by ole32.dll.
> Therefore when building with mingw32 -lole32 should be in
> 'LIBS'.

Not that I'm objecting to the patch, but isn't this technically
a bug in the pkg-config for glib with mingw32 that we're working
around?

-- PMM

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

* Re: [Qemu-devel] [PATCH v1] ./configure: use -lole32 when building with mingw32
  2012-02-15 16:49 ` Peter Maydell
@ 2012-02-15 17:18   ` Paolo Bonzini
  2012-02-15 17:19   ` Meador Inge
  1 sibling, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2012-02-15 17:18 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Meador Inge, qemu-devel

On 02/15/2012 05:49 PM, Peter Maydell wrote:
>> glib calls 'CoTaskMemFree' which is defined by ole32.dll.
>> > Therefore when building with mingw32 -lole32 should be in
>> > 'LIBS'.
> Not that I'm objecting to the patch, but isn't this technically
> a bug in the pkg-config for glib with mingw32 that we're working
> around?

Yes, and I object to the patch. :)

Paolo

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

* Re: [Qemu-devel] [PATCH v1] ./configure: use -lole32 when building with mingw32
  2012-02-15 16:49 ` Peter Maydell
  2012-02-15 17:18   ` Paolo Bonzini
@ 2012-02-15 17:19   ` Meador Inge
  1 sibling, 0 replies; 5+ messages in thread
From: Meador Inge @ 2012-02-15 17:19 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel

On 02/15/2012 10:49 AM, Peter Maydell wrote:

> On 15 February 2012 16:41, Meador Inge <meadori@codesourcery.com> wrote:
>> glib calls 'CoTaskMemFree' which is defined by ole32.dll.
>> Therefore when building with mingw32 -lole32 should be in
>> 'LIBS'.
> 
> Not that I'm objecting to the patch, but isn't this technically
> a bug in the pkg-config for glib with mingw32 that we're working
> around?

Yup, the issue is fixed in recent versions of glib:

http://git.gnome.org/browse/glib/commit/?id=b79eae5c197aeec8d57f39c0f7bf5d5114068bea

http://git.gnome.org/browse/glib/commit/?id=5377c0de0108d292ea3e23fa6d90410f9ac9fa00

I am OK with backporting the glib fix for mingw32 builds.  Sorry for the noise.

-- 
Meador Inge
CodeSourcery / Mentor Embedded
http://www.mentor.com/embedded-software

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

* Re: [Qemu-devel] [PATCH v1] ./configure: use -lole32 when building with mingw32
  2012-02-15 16:41 [Qemu-devel] [PATCH v1] ./configure: use -lole32 when building with mingw32 Meador Inge
  2012-02-15 16:49 ` Peter Maydell
@ 2012-02-15 19:40 ` Stefan Weil
  1 sibling, 0 replies; 5+ messages in thread
From: Stefan Weil @ 2012-02-15 19:40 UTC (permalink / raw)
  To: Meador Inge; +Cc: qemu-devel

Am 15.02.2012 17:41, schrieb Meador Inge:
> glib calls 'CoTaskMemFree' which is defined by ole32.dll.
> Therefore when building with mingw32 -lole32 should be in
> 'LIBS'.
>
> Signed-off-by: Meador Inge <meadori@codesourcery.com>
> ---
> configure | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/configure b/configure
> index 88521d2..40caf81 100755
> --- a/configure
> +++ b/configure
> @@ -502,7 +502,7 @@ if test "$mingw32" = "yes" ; then
> QEMU_CFLAGS="-DWIN32_LEAN_AND_MEAN -DWINVER=0x501 $QEMU_CFLAGS"
> # enable C99/POSIX format strings (needs mingw32-runtime 3.15 or later)
> QEMU_CFLAGS="-D__USE_MINGW_ANSI_STDIO=1 $QEMU_CFLAGS"
> - LIBS="-lwinmm -lws2_32 -liberty -liphlpapi $LIBS"
> + LIBS="-lole32 -lwinmm -lws2_32 -liberty -liphlpapi $LIBS"
> prefix="c:/Program Files/Qemu"
> mandir="\${prefix}"
> datadir="\${prefix}"

Hi,

this would be a workaround for a bug in glib-2.0.
If it requires ole32.dll, it should add it to glib-2.0.pc,
so pkg-config will add it to QEMU.

I never had problems caused by a missing ole32.dll.
Which MinGW do you use (native, cross, version),
and where did you get your glib-2.0 from? My
glib-2.0 has no reference to CoTaskMemFree.

Regards,

Stefan Weil

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

end of thread, other threads:[~2012-02-15 19:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-15 16:41 [Qemu-devel] [PATCH v1] ./configure: use -lole32 when building with mingw32 Meador Inge
2012-02-15 16:49 ` Peter Maydell
2012-02-15 17:18   ` Paolo Bonzini
2012-02-15 17:19   ` Meador Inge
2012-02-15 19:40 ` Stefan Weil

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).