Message ID | 1400814150-31666-2-git-send-email-famz@redhat.com |
---|---|
State | New |
Headers | show |
Il 23/05/2014 05:02, Fam Zheng ha scritto: > Don't include individual objects, just link to archives. > > Signed-off-by: Fam Zheng <famz@redhat.com> > --- > libcacard/Makefile | 9 ++------- > 1 file changed, 2 insertions(+), 7 deletions(-) > > diff --git a/libcacard/Makefile b/libcacard/Makefile > index 881b222..abb6eea 100644 > --- a/libcacard/Makefile > +++ b/libcacard/Makefile > @@ -3,12 +3,7 @@ libcacard_includedir=$(includedir)/cacard > TOOLS += vscclient$(EXESUF) > > # objects linked into a shared library, built with libtool with -fPIC if required > -libcacard-obj-y = $(stub-obj-y) $(libcacard-y) > -libcacard-obj-y += util/osdep.o util/cutils.o util/qemu-timer-common.o > -libcacard-obj-y += util/error.o util/qemu-error.o > -libcacard-obj-$(CONFIG_WIN32) += util/oslib-win32.o util/qemu-thread-win32.o > -libcacard-obj-$(CONFIG_POSIX) += util/oslib-posix.o util/qemu-thread-posix.o > -libcacard-obj-y += $(filter trace/%, $(util-obj-y)) > +libcacard-obj-y = $(libcacard-y) > > libcacard-lobj-y=$(patsubst %.o,%.lo,$(libcacard-obj-y)) > > @@ -17,7 +12,7 @@ $(libcacard-obj-y): | $(libcacard-lobj-y) > > all: libcacard.la libcacard.pc > > -vscclient$(EXESUF): libcacard/vscclient.o libcacard.la > +vscclient$(EXESUF): libcacard/vscclient.o libcacard.la libqemuutil.a libqemustub.a > $(call LINK,$^) > > ######################################################################### > Michael was going to drop the dependency altogether. Also, I am not sure this patch is correct because libcacard is built using libtool and thus should use .la files rather than .a. Paolo
23.05.2014 12:22, Paolo Bonzini wrote: > Il 23/05/2014 05:02, Fam Zheng ha scritto: [] >> -vscclient$(EXESUF): libcacard/vscclient.o libcacard.la >> +vscclient$(EXESUF): libcacard/vscclient.o libcacard.la libqemuutil.a libqemustub.a >> $(call LINK,$^) >> >> ######################################################################### >> > > Michael was going to drop the dependency altogether. This didn't go anywhere -- after spending lots of time inventing glib thread compat layer and fighting over almost moot points I gave up. I will be applying the libcacard de-QEMUifization patches locally in debian. Thanks, /mjt
Il 23/05/2014 10:26, Michael Tokarev ha scritto: > 23.05.2014 12:22, Paolo Bonzini wrote: >> Il 23/05/2014 05:02, Fam Zheng ha scritto: > [] >>> -vscclient$(EXESUF): libcacard/vscclient.o libcacard.la >>> +vscclient$(EXESUF): libcacard/vscclient.o libcacard.la libqemuutil.a libqemustub.a >>> $(call LINK,$^) >>> >>> ######################################################################### >>> >> >> Michael was going to drop the dependency altogether. > > This didn't go anywhere -- after spending lots of time inventing glib > thread compat layer and fighting over almost moot points I gave up. Sad. I will pick up the work. Paolo > I will be applying the libcacard de-QEMUifization patches locally in > debian.
23.05.2014 13:25, Paolo Bonzini wrote: > Il 23/05/2014 10:26, Michael Tokarev ha scritto: >> 23.05.2014 12:22, Paolo Bonzini wrote: >>> Il 23/05/2014 05:02, Fam Zheng ha scritto: >> [] >>>> -vscclient$(EXESUF): libcacard/vscclient.o libcacard.la >>>> +vscclient$(EXESUF): libcacard/vscclient.o libcacard.la libqemuutil.a libqemustub.a >>>> $(call LINK,$^) >>>> >>>> ######################################################################### >>>> >>> >>> Michael was going to drop the dependency altogether. >> >> This didn't go anywhere -- after spending lots of time inventing glib >> thread compat layer and fighting over almost moot points I gave up. > > Sad. I will pick up the work. Here's the last incarnation: http://comments.gmane.org/gmane.comp.emulators.qemu/271372 The prob was re-defining GCond to GCond* in the _thin_ compat layer I wanted to add for _old_ glib (so that all the code uses new glib api, because that's what people know now). That one is fun indeed, but it allows us to go without inventing a thick layer which will just complicate things and add unnecessary and qemu-specific API -- to me it is too much cost for supporting obsolete glib thread api. FWIW, the old glib thread api is a frozen code, so we shouldn't expect any changes in there. And my changes does not wrap new api (except of adding tiny wrappers for static initializers). I've added just the libcacard conversion changes (which are really trivial) to debian - since in debian we don't have that old glib anymore, and I shouldn't care there about it anymore. I tried to make it compatible with other systems too (yet again: using the _thin_, almost non-existing, layer), but apparently failed, and since I don't really care I gave up. Thanks, /mjt
Il 23/05/2014 11:36, Michael Tokarev ha scritto: > Here's the last incarnation: > > http://comments.gmane.org/gmane.comp.emulators.qemu/271372 > > The prob was re-defining GCond to GCond* in the _thin_ compat > layer I wanted to add for _old_ glib (so that all the code uses > new glib api, because that's what people know now). That one > is fun indeed, but it allows us to go without inventing a thick > layer which will just complicate things and add unnecessary and > qemu-specific API -- to me it is too much cost for supporting > obsolete glib thread api. > > FWIW, the old glib thread api is a frozen code, so we shouldn't > expect any changes in there. And my changes does not wrap new > api (except of adding tiny wrappers for static initializers). I liked your approach, but at the same time there is a problem: It would break completely any API that includes GMutex/GCond. GTK itself exposes a GMutex when you use gtk/gtk.h. We can exploit the macro vs. inline function difference to our advantage, to keep the wrapper small (just s/GMutex/CompatGMutex/;s/GCond/CompatGCond/) and also type safe. I'll post my version in a second. Paolo
diff --git a/libcacard/Makefile b/libcacard/Makefile index 881b222..abb6eea 100644 --- a/libcacard/Makefile +++ b/libcacard/Makefile @@ -3,12 +3,7 @@ libcacard_includedir=$(includedir)/cacard TOOLS += vscclient$(EXESUF) # objects linked into a shared library, built with libtool with -fPIC if required -libcacard-obj-y = $(stub-obj-y) $(libcacard-y) -libcacard-obj-y += util/osdep.o util/cutils.o util/qemu-timer-common.o -libcacard-obj-y += util/error.o util/qemu-error.o -libcacard-obj-$(CONFIG_WIN32) += util/oslib-win32.o util/qemu-thread-win32.o -libcacard-obj-$(CONFIG_POSIX) += util/oslib-posix.o util/qemu-thread-posix.o -libcacard-obj-y += $(filter trace/%, $(util-obj-y)) +libcacard-obj-y = $(libcacard-y) libcacard-lobj-y=$(patsubst %.o,%.lo,$(libcacard-obj-y)) @@ -17,7 +12,7 @@ $(libcacard-obj-y): | $(libcacard-lobj-y) all: libcacard.la libcacard.pc -vscclient$(EXESUF): libcacard/vscclient.o libcacard.la +vscclient$(EXESUF): libcacard/vscclient.o libcacard.la libqemuutil.a libqemustub.a $(call LINK,$^) #########################################################################
Don't include individual objects, just link to archives. Signed-off-by: Fam Zheng <famz@redhat.com> --- libcacard/Makefile | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)