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

Re: [libvirt] [PATCH] build: fix up some compiler flags



On Fri, May 14, 2010 at 04:58:14PM -0600, Eric Blake wrote:
> Matthias noted that the line:
> virt_aa_helper_LDFLAGS = $(WARN_CFLAGS)
> looks inconsistent, so I did an audit.
> 
> Currently, the set of compiler warning flags passed to gcc as $CC are
> equally permitted as the set of linker flags passed to gcc as $LD, so
> there was no problem with that usage.  But if we ever get in a
> situation where $CC and $LD treat particular flags differently, using
> the right variable form will make it easier.
> 
> In the process, I spotted a couple of typos that were omitting useful
> flags, as well as specifying a -l under the wrong variable.
> 
> * acinclude.m4 (LIBVIRT_COMPILE_WARNINGS): Define WARN_LDFLAGS as
> an alias for WARN_CFLAGS.
> * tools/Makefile.am (virsh_LDFLAGS): Use more canonical spelling.
> * proxy/Makefile.am (libvirt_proxy_LDFLAGS): Likewise. Move
> library...
> (libvirt_proxy_LDADD): ...here.
> * src/Makefile.am (virt_aa_helper_LDFLAGS): Use more canonical
> spelling of WARN_LDFLAGS.
> (libvirt_parthelper_LDFLAGS, libvirt_lxc_LDFLAGS): Likewise.  Use
> correct spelling of COVERAGE_LDFLAGS.
> Reported by Matthias Bolte.
> ---
>  acinclude.m4      |    3 ++-
>  proxy/Makefile.am |    4 ++--
>  src/Makefile.am   |    6 +++---
>  tools/Makefile.am |    4 ++--
>  4 files changed, 9 insertions(+), 8 deletions(-)
> 
> diff --git a/acinclude.m4 b/acinclude.m4
> index 7fa2d67..f048879 100644
> --- a/acinclude.m4
> +++ b/acinclude.m4
> @@ -78,7 +78,8 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
>      AC_MSG_RESULT($complCFLAGS)
> 
>      WARN_CFLAGS="$COMPILER_FLAGS $complCFLAGS"
> -    AC_SUBST(WARN_CFLAGS)
> +    AC_SUBST([WARN_CFLAGS])
> +    AC_SUBST([WARN_LDFLAGS])

Where is WARN_LDFLAGS actually defined ? This looks like it
is just setting it to empty string ?


Daniel
-- 
|: Red Hat, Engineering, London    -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org        -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|


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