Received: from eggs.gnu.org ([140.186.70.92]:35202) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qm35l-0007EG-Qb for qemu-devel@nongnu.org; Wed, 27 Jul 2011 08:20:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qm35k-0006VP-Ib for qemu-devel@nongnu.org; Wed, 27 Jul 2011 08:20:01 -0400 Received: from nm12.bullet.mail.sp2.yahoo.com ([98.139.91.82]:36502) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Qm35k-0006VK-5u for qemu-devel@nongnu.org; Wed, 27 Jul 2011 08:20:00 -0400 Message-ID: <1311769198.45671.YahooMailClassic@web110401.mail.gq1.yahoo.com> Date: Wed, 27 Jul 2011 05:19:58 -0700 (PDT) From: Kenneth Salerno In-Reply-To: <1311688921.3293.YahooMailClassic@web110412.mail.gq1.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v5 01/18] Add hard build dependency on glib List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --- On Tue, 7/26/11, Kenneth Salerno wrote:=0A= =0A> From: Kenneth Salerno =0A> Subject: Re: [Qem= u-devel] [PATCH v5 01/18] Add hard build dependency on glib=0A> To: qemu-de= vel@nongnu.org=0A> Date: Tuesday, July 26, 2011, 10:02 AM=0A> From: =A0=A0= =A0 Michael=0A> Roth=0A> Subject: =A0=A0=A0 [Qemu-devel] [PATCH v5 01/18]= =0A> Add hard build dependency on glib=0A> Date: =A0=A0=A0 Tue, 5 Jul 2011 = 08:02:28 -0500=0A> =0A> > From: Anthony Liguori =0A> >=0A> = > GLib is an extremely common library that has a=0A> portable thread implem= entation=0A> > along with tons of other goodies.=0A> >=0A> > GLib and GObje= ct have a fantastic amount of=0A> infrastructure we can leverage in=0A> > Q= EMU including an object oriented programming=0A> infrastructure.=0A> >=0A> = > Short term, it has a very nice thread pool=0A> implementation that we cou= ld leverage=0A> > in something like virtio-9p.=A0 It also has a test=0A> ha= rness implementation that=0A> > this series will use.=0A> >=0A> > Signed-of= f-by: Anthony Liguori =0A> > Signed-off-by: Michael Roth =0A> > ---=0A> > Makefile=A0 =A0 =A0 =A0 |=A0 =A0 2=0A> ++=0A= > > Makefile.objs=A0=A0=A0|=A0 =A0 2 ++=0A> > Makefile.target |=A0 =A0 1 += =0A> > configure=A0 =A0=0A> =A0=A0=A0|=A0=A0=A013 +++++++++++++=0A> > 4 fil= es changed, 18 insertions(+), 0 deletions(-)=0A> >=0A> > diff --git a/Makef= ile b/Makefile=0A> > index b3ffbe2..42ae4e5 100644=0A> > --- a/Makefile=0A>= > +++ b/Makefile=0A> > @@ -106,6 +106,8 @@ audio/audio.o audio/fmodaudio.o= :=0A> QEMU_CFLAGS +=3D =0A> > $(FMOD_CFLAGS)=0A> > =0A> > QEMU_CFLAGS+=3D$(= CURL_CFLAGS)=0A> > =0A> > +QEMU_CFLAGS+=3D$(GLIB_CFLAGS)=0A> > +=0A> > ui/c= ocoa.o: ui/cocoa.m=0A> > =0A> > ui/sdl.o audio/sdlaudio.o ui/sdl_zoom.o bau= m.o:=0A> QEMU_CFLAGS +=3D $(SDL_CFLAGS)=0A> > diff --git a/Makefile.objs b/= Makefile.objs=0A> > index cea15e4..493c988 100644=0A> > --- a/Makefile.objs= =0A> > +++ b/Makefile.objs=0A> > @@ -376,3 +376,5 @@ vl.o:=0A> QEMU_CFLAGS+= =3D$(GPROF_CFLAGS)=0A> >=A0 =0A> >=A0 vl.o: QEMU_CFLAGS+=3D$(SDL_CFLAGS)=0A= > >=A0 =0A> > +vl.o: QEMU_CFLAGS+=3D$(GLIB_CFLAGS)=0A> > +=0A> > diff --git= a/Makefile.target b/Makefile.target=0A> > index a53a2ff..b8256ae 100644=0A= > > --- a/Makefile.target=0A> > +++ b/Makefile.target=0A> > @@ -203,6 +203,= 7 @@ QEMU_CFLAGS +=3D $(VNC_TLS_CFLAGS)=0A> >=A0 QEMU_CFLAGS +=3D $(VNC_SAS= L_CFLAGS)=0A> >=A0 QEMU_CFLAGS +=3D $(VNC_JPEG_CFLAGS)=0A> >=A0 QEMU_CFLAGS= +=3D $(VNC_PNG_CFLAGS)=0A> > +QEMU_CFLAGS +=3D $(GLIB_CFLAGS)=0A> >=A0 =0A= > >=A0 # xen backend driver support=0A> >=A0 obj-i386-$(CONFIG_XEN) +=3D xe= n_machine_pv.o=0A> xen_domainbuild.o=0A> > diff --git a/configure b/configu= re=0A> > index 88159ac..63156a2 100755=0A> > --- a/configure=0A> > +++ b/co= nfigure=0A> > @@ -1803,6 +1803,18 @@ EOF=0A> >=A0 fi=0A> =0A> >=A0 #######= ###################################=0A> > +# glib support probe=0A> > +if $= pkg_config --modversion gthread-2.0 gio-2.0 >=0A> /dev/null 2>&1 ; then=0A>= > +=A0 =A0 glib_cflags=3D`$pkg_config --cflags=0A> gthread-2.0 gio-2.0 2>/= dev/null`=0A> > +=A0 =A0 glib_libs=3D`$pkg_config --libs=0A> gthread-2.0 gi= o-2.0 2>/dev/null`=0A> > +=A0 =A0 libs_softmmu=3D"$glib_libs=0A> $libs_soft= mmu"=0A> > +=A0 =A0 libs_tools=3D"$glib_libs $libs_tools"=0A> > +else=0A> >= +=A0 =A0 echo "glib-2.0 required to compile=0A> QEMU"=0A> > +=A0 =A0 exit = 1=0A> > +fi=0A> > +=0A> > +##########################################=0A> >= =A0 # pthread probe=0A> >=A0 PTHREADLIBS_LIST=3D"-lpthread -lpthreadGC2"=0A= > >=A0 =0A> > @@ -2849,6 +2861,7 @@ if test "$bluez" =3D "yes" ; then=0A> >= =A0 =A0 echo "CONFIG_BLUEZ=3Dy" >>=0A> $config_host_mak=0A> >=A0 =A0 echo "= BLUEZ_CFLAGS=3D$bluez_cflags"=0A> >> $config_host_mak=0A> >=A0 fi=0A> > +ec= ho "GLIB_CFLAGS=3D$glib_cflags" >>=0A> $config_host_mak=0A> >=A0 if test "$= xen" =3D "yes" ; then=0A> >=A0 =A0 echo "CONFIG_XEN=3Dy" >>=0A> $config_hos= t_mak=0A> >=A0 =A0 echo=0A> "CONFIG_XEN_CTRL_INTERFACE_VERSION=3D$xen_ctrl_= version"=0A> >> =0A> > $config_host_mak=0A> > -- =0A> > 1.7.0.4=0A> =0A> = =0A> =0A> That sounds like a good idea, especially if it will help=0A> reso= lve the multi-threading issue in Cygwin which creates=0A> the need to pin Q= EMU to one CPU core.=0A> =0A> However, this has broken the MinGW build in C= ygwin because=0A> there is no Glib2 (or gettext or libiconv) built and=0A> = distributed for MinGW by the Cygwin project which means I=0A> now have to c= ompile those packages myself as a prerequisite=0A> if I want to try to buil= d the latest snapshot of QEMU=0A> development code (and future releases of = QEMU stable for=0A> that matter)...=0A> =0A=0A=0AIgnore. My apologies - I d= idn't have pkg-config installed.=0A=0AKen