On 3/24/20 1:54 PM, Richard W.M. Jones wrote:
On Tue, Mar 24, 2020 at 01:43:52PM -0500, Eric Blake wrote:
On 3/21/20 7:06 AM, Richard W.M. Jones wrote:
Eric:
Yifan Gu has posted a few patches for mingw support. My comments
below.
https://github.com/gyf304/nbdkit/commit/a37c4ca6546dfc4e96e305af97b62e5a9d6174ca
* I think the SHARED_LDFLAGS idea is good. I pushed a slightly
different take on the idea here:
https://github.com/libguestfs/nbdkit/commit/1d634009ab8e43592065ec469df6312400525cc8
It's slightly different from what Yifan posted above, because I
replaced -module -avoid-version -shared with $(SHARED_LDFLAGS),
adding -no-undefined additionally on mingw.
Why are we trying to avoid -no-undefined on other platforms?
Isn't it because we rely on it, since our plugins need symbols that
are undefined at link time such as nbdkit_*?
Yes, at the moment they do, but do they need to? We could ship libnbdkit
which provides just the symbols that plugins can link against, and then
link our binary nbdkit against that same library, rather than expecting
our plugins to compile undefined until loaded by our binary. In other
words, if the fix is by separating our public functions into a shared
library for mingw to compile plugins without undefined symbols, why not
do the same for all platforms?
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
_______________________________________________
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs