[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fix dummy module being included even when not needed
From: |
Eric Blake |
Subject: |
Re: [PATCH] Fix dummy module being included even when not needed |
Date: |
Fri, 08 Nov 2013 08:34:11 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 |
On 11/08/2013 08:11 AM, Eric Blake wrote:
>> # Add the dummy module, to make sure the library will be non-empty.
>> - if test -z "$have_lib_SOURCES"; then
>> + if test -n "$have_lib_SOURCES"; then
>> if func_acceptable "dummy"; then
>> func_append modules " dummy"
>
> Huh? The existing code seems correct - if there were no other
> lib_SOURCES (the variable is empty), then we need to add dummy so that
> we have at least one lib source. Your patch would change it so that if
> there are lib_SOURCES, then we also include dummy. I think I need a bit
> more context why your patch would be correct.
For example, compare './gnulib-tool --test stdbool' behavior before and
after your patch. Before, I see:
rm -f libgnu.a
ar cru libgnu.a dummy.o
ranlib libgnu.a
which is GOOD, because some versions of 'ar' choke if you don't specify
at least one .o file. But with your patch, I see only:
rm -f libgnu.a
ar cru libgnu.a
ranlib libgnu.a
which works with GNU ar, but is not very nice to other platforms.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature