Re: [PATCH] build: use LIBADD, not LDFLAGS, for adding libraries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eric Blake wrote:
> Per automake, LDFLAGS is used early in the line, and LIBADD
> (libraries) or LDADD (programs) is used late.  On platforms like
> cygwin, without lazy linking, this order matters.  Therefore, libtool
> commands, -L, and similar should be in LDFLAGS, but -l should be in
> L*ADD.
>
> * src/Makefile.am (*_LDFLAGS): Move libraries...
> (*_LIBADD): ...to their LIBADD counterpart.
> ---
>
>> > Aargh; sorry for not noticing this sooner, but you copied a bug from
>> > Jim's patch, which in turn Jim copied from existing code.  According to
>> > automake, LDFLAGS is for -L and other flags that must come early in the
>> > command line, but LDADD is for -l and other flags that must come late in
>> Definitely worth fixing.
>
> Well, automake complained when I tried LDADD on libraries, but
> this patch uses LIBADD, and made automake happy.
>
> On preparing this email, I noticed that my editor did some
> space-tab -> tab conversions, I'll split those into a separate patch
> before pushing, once this gets an ACK.
>
>  src/Makefile.am |   79 +++++++++++++++++++++++++++++++-----------------------
>  1 files changed, 45 insertions(+), 34 deletions(-)
>
> diff --git a/src/Makefile.am b/src/Makefile.am
...
> @@ -686,7 +692,8 @@ endif
>  libvirt_driver_secret_la_CFLAGS = \
>  		-I@top_srcdir@/src/conf
>  if WITH_DRIVER_MODULES
> -libvirt_driver_secret_la_LDFLAGS = -module -avoid-version ../gnulib/lib/libgnu.la
> +libvirt_driver_secret_la_LDFLAGS = -module -avoid-version
> +libvirt_driver_secret_la_LDAD = ../gnulib/lib/libgnu.la

Oops.  That should be ..._LDADD

>  endif
>  libvirt_driver_secret_la_SOURCES = $(SECRET_DRIVER_SOURCES)

Other than that, it looks fine.  Thanks.

Did everything build/link with that for you?  (I didn't try.)
If so, I wonder if that part was configured out
or if libgnu is not needed there.

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]