On Fri, May 25, 2012 at 10:06:12AM -0600, Eric Blake wrote: > Libtool supports linking directly against .o files on some platforms > (such as Linux), which happens to be the only place where we are > actually doing that (for the dtrace-generated probes.o files). However, > it raises a big stink about the non-portability, even though we don't > attempt it on platforms where it would actually fail: > > CCLD libvirt_driver_qemu.la > > *** Warning: Linking the shared library libvirt_driver_qemu.la against > the non-libtool > *** objects libvirt_qemu_probes.o is not portable! > > This shuts libtool up by creating a proper .lo file that matches > what libtool normally expects. > > * src/Makefile.am (%_probes.lo): New rule. > (libvirt_probes.stp, libvirt_qemu_probes.stp): Simplify into... > (%_probes.stp): ...shorter rule. > (CLEANFILES): Clean new .lo files. > (libvirt_la_BUILT_LIBADD, libvirt_driver_qemu_la_LIBADD) > (libvirt_lxc_LDADD, virt_aa_helper_LDADD): Link against .lo file. > * tests/Makefile.am (PROBES_O, qemu_LDADDS): Likewise. > --- > > I got tired enough of the warning to figure out how to shut it up; > libtool was rather particular about parsing the first two lines of > comments embedded in the .lo file before declaring it to have correct > syntax. > > However, I got stumped by the next round of warnings: > > CCLD qemuxml2xmltest > > *** Warning: Linking the executable qemuxml2xmltest against the loadable module > *** libvirt_driver_qemu.so is not portable! > > Anyone have a clue on that one? Would a convenience library be the key? Hmm, perhaps if we built libvirt_driver_qemu_impl.la and then make both libvirt_driver_qemu.so and qemuxml2xmltest link to that convenience library, it'd be happy. > > src/Makefile.am | 28 ++++++++++++++++++---------- > tests/Makefile.am | 4 ++-- > 2 files changed, 20 insertions(+), 12 deletions(-) ACK Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list