On Tue, Mar 28, 2017 at 07:00:34PM +0000, Xu, Anthony wrote: > > >>> ./trace.o, ./qapi/trace.o and ./util/trace.o are added into > > >>> libqemuutil.a to avoid recursive dependencies between > > >>> libqemuutil.a and libqemutrace.a. > > >> Why would libqemutrace.a depend on libqemuutil.a? > > > Each trace.c calls trace_event_register_group to register events, > > > trace_event_register_group is defined in trace/control.c , which > > > is linked into libqemuutil.a. > > > > Ah: > > > > util-obj-$(CONFIG_TRACE_SIMPLE) += simple.o > > util-obj-$(CONFIG_TRACE_FTRACE) += ftrace.o > > util-obj-y += control.o > > util-obj-y += qmp.o > > > > With the introduction of libqemutrace.a, I believe these should be moved > > into libqemutrace.a. > > Agreed, > But it doesn't solve infinite recursion issue. register_module_init is > needed by libqemutrace.a, which is defined util/module.c. > > it is hard to remove libqemutrace.a dependency on libqemuutil.a. > > Removing libqemuutil.a dependency on libqemutrace.a is feasible. > Just like what I did in this patch, include all util related trace.o > to libqemuutila. > > The other simple way is to include all trace.o into libqemuutil.a
Yeah, I'd suggest doing that - i don't see any benefit in having them in a separate libqemutrace.a Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :|