<div><div><div dir="auto">I think that will break the ABI backward compatibility. </div></div></div><div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 24, 2020 at 15:16 Eric Blake <<a href="mailto:eblake@redhat.com" target="_blank">eblake@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">On 3/24/20 1:54 PM, Richard W.M. Jones wrote:<br>
> On Tue, Mar 24, 2020 at 01:43:52PM -0500, Eric Blake wrote:<br>
>> On 3/21/20 7:06 AM, Richard W.M. Jones wrote:<br>
>>> Eric:<br>
>>><br>
>>> Yifan Gu has posted a few patches for mingw support.  My comments<br>
>>> below.<br>
>>><br>
>>> <a href="https://github.com/gyf304/nbdkit/commit/a37c4ca6546dfc4e96e305af97b62e5a9d6174ca" rel="noreferrer" target="_blank">https://github.com/gyf304/nbdkit/commit/a37c4ca6546dfc4e96e305af97b62e5a9d6174ca</a><br>
>>><br>
>>> * I think the SHARED_LDFLAGS idea is good.  I pushed a slightly<br>
>>>    different take on the idea here:<br>
>>>    <a href="https://github.com/libguestfs/nbdkit/commit/1d634009ab8e43592065ec469df6312400525cc8" rel="noreferrer" target="_blank">https://github.com/libguestfs/nbdkit/commit/1d634009ab8e43592065ec469df6312400525cc8</a><br>
>>>    It's slightly different from what Yifan posted above, because I<br>
>>>    replaced -module -avoid-version -shared with $(SHARED_LDFLAGS),<br>
>>>    adding -no-undefined additionally on mingw.<br>
>><br>
>> Why are we trying to avoid -no-undefined on other platforms?<br>
> <br>
> Isn't it because we rely on it, since our plugins need symbols that<br>
> are undefined at link time such as nbdkit_*?<br>
<br>
Yes, at the moment they do, but do they need to? We could ship libnbdkit <br>
which provides just the symbols that plugins can link against, and then <br>
link our binary nbdkit against that same library, rather than expecting <br>
our plugins to compile undefined until loaded by our binary.  In other <br>
words, if the fix is by separating our public functions into a shared <br>
library for mingw to compile plugins without undefined symbols, why not <br>
do the same for all platforms?<br>
<br>
-- <br>
Eric Blake, Principal Software Engineer<br>
Red Hat, Inc.           +1-919-301-3226<br>
Virtualization:  <a href="http://qemu.org" rel="noreferrer" target="_blank">qemu.org</a> | <a href="http://libvirt.org" rel="noreferrer" target="_blank">libvirt.org</a><br>
<br>
</blockquote></div></div>
</div>