qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Michael Tokarev <mjt@tls.msk.ru>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] build: expose and use GLIB_LIBS and GLIB_CFLAGS
Date: Thu, 08 May 2014 16:47:49 +0200	[thread overview]
Message-ID: <536B9915.1000804@redhat.com> (raw)
In-Reply-To: <1399559986-2503-1-git-send-email-mjt@msgid.tls.msk.ru>

Il 08/05/2014 16:39, Michael Tokarev ha scritto:
> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
> ---
>  configure |   12 +++++-------
>  1 file changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/configure b/configure
> index 25d59f9..49b840b 100755
> --- a/configure
> +++ b/configure
> @@ -2619,9 +2619,6 @@ for i in $glib_modules; do
>      if $pkg_config --atleast-version=$glib_req_ver $i; then
>          glib_cflags=`$pkg_config --cflags $i`
>          glib_libs=`$pkg_config --libs $i`
> -        CFLAGS="$glib_cflags $CFLAGS"
> -        LIBS="$glib_libs $LIBS"
> -        libs_qga="$glib_libs $libs_qga"
>      else
>          error_exit "glib-$glib_req_ver $i is required to compile QEMU"
>      fi
> @@ -4081,7 +4078,7 @@ echo "Host C compiler   $host_cc"
>  echo "C++ compiler      $cxx"
>  echo "Objective-C compiler $objcc"
>  echo "ARFLAGS           $ARFLAGS"
> -echo "CFLAGS            $CFLAGS"
> +echo "CFLAGS            $CFLAGS $GLIB_CFLAGS"
>  echo "QEMU_CFLAGS       $QEMU_CFLAGS"
>  echo "LDFLAGS           $LDFLAGS"
>  echo "make              $make"
> @@ -4431,6 +4428,7 @@ if test "$bluez" = "yes" ; then
>    echo "BLUEZ_CFLAGS=$bluez_cflags" >> $config_host_mak
>  fi
>  echo "GLIB_CFLAGS=$glib_cflags" >> $config_host_mak
> +echo "GLIB_LIBS=$glib_libs" >> $config_host_mak
>  if test "$gtk" = "yes" ; then
>    echo "CONFIG_GTK=y" >> $config_host_mak
>    echo "CONFIG_GTKABI=$gtkabi" >> $config_host_mak
> @@ -4736,7 +4734,7 @@ echo "OBJCOPY=$objcopy" >> $config_host_mak
>  echo "LD=$ld" >> $config_host_mak
>  echo "WINDRES=$windres" >> $config_host_mak
>  echo "LIBTOOL=$libtool" >> $config_host_mak
> -echo "CFLAGS=$CFLAGS" >> $config_host_mak
> +echo "CFLAGS=$CFLAGS \$(GLIB_CFLAGS)" >> $config_host_mak
>  echo "CFLAGS_NOPIE=$CFLAGS_NOPIE" >> $config_host_mak
>  echo "QEMU_CFLAGS=$QEMU_CFLAGS" >> $config_host_mak
>  echo "QEMU_INCLUDES=$QEMU_INCLUDES" >> $config_host_mak
> @@ -4753,12 +4751,12 @@ fi
>  echo "LDFLAGS=$LDFLAGS" >> $config_host_mak
>  echo "LDFLAGS_NOPIE=$LDFLAGS_NOPIE" >> $config_host_mak
>  echo "LIBTOOLFLAGS=$LIBTOOLFLAGS" >> $config_host_mak
> -echo "LIBS+=$LIBS" >> $config_host_mak
> +echo "LIBS+=$LIBS \$(GLIB_LIBS)" >> $config_host_mak
>  echo "LIBS_TOOLS+=$libs_tools" >> $config_host_mak
>  echo "EXESUF=$EXESUF" >> $config_host_mak
>  echo "DSOSUF=$DSOSUF" >> $config_host_mak
>  echo "LDFLAGS_SHARED=$LDFLAGS_SHARED" >> $config_host_mak
> -echo "LIBS_QGA+=$libs_qga" >> $config_host_mak
> +echo "LIBS_QGA+=$libs_qga \$(GLIB_LIBS)" >> $config_host_mak
>  echo "POD2MAN=$POD2MAN" >> $config_host_mak
>  echo "TRANSLATE_OPT_CFLAGS=$TRANSLATE_OPT_CFLAGS" >> $config_host_mak
>  if test "$gcov" = "yes" ; then
>

Hmm... not sure what's the benefit. :)

As discussed on IRC, you could dust off the idea of introducing 
LIBS_QEMU (and perhaps ZLIB_CFLAGS/ZLIB_LIBS too), so that $LIBS becomes 
the common part of all binaries.  Glib would end up there, together with 
other system libraries like Solaris's -lresolv and -lnsl (see 
solarisnetlibs).

Paolo

      reply	other threads:[~2014-05-08 14:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-08 14:39 [Qemu-devel] [PATCH] build: expose and use GLIB_LIBS and GLIB_CFLAGS Michael Tokarev
2014-05-08 14:47 ` Paolo Bonzini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=536B9915.1000804@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=mjt@tls.msk.ru \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).