xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Paul Durrant <Paul.Durrant@citrix.com>,
	'Stefano Stabellini' <sstabellini@kernel.org>
Cc: Anthony Perard <anthony.perard@citrix.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"kraxel@redhat.com" <kraxel@redhat.com>
Subject: Re: [PATCH 2/2] configure: use pkg-config for obtaining xen version
Date: Fri, 24 Mar 2017 19:43:18 +0100	[thread overview]
Message-ID: <0426b870-b23c-85f6-160c-f5df8db753d0@suse.com> (raw)
In-Reply-To: <1bd386167cff4ef9a281139afb9308dc@AMSPEX02CL03.citrite.net>

On 24/03/17 17:42, Paul Durrant wrote:
>> -----Original Message-----
> [snip]
>>>> That's a change in behaviour that I, and probably others, have long been
>> used to. What we really want, presumably, is to have pkg-config just look
>> under tools/pkgconfig when querying for the version of xencontrol. Could
>> that not be done by simply setting PKG_CONFIG_LIBDIR in QEMU's configure
>> script, or would it still mean picking up installed libraries before ones just
>> built?
>>>
>>> I guess this would break qemu's configure badly as it wouldn't find all
>>> the other library informations it is looking for via pkg-config.
>>
>> Aah, wait, you mean just for the Xen query?
>>
>> This might complicate things for my qemu stubdom plans...
>>
> 
> How about this patch to QEMU configure?
> 
> diff --git a/configure b/configure
> index fdf47e4..6ef5980 100755
> --- a/configure
> +++ b/configure
> @@ -1974,6 +1974,10 @@ fi
>  ##########################################
>  # xen probe
> 
> +xen_query_pkg_config() {
> +    PKG_CONFIG_LIBDIR= ${pkg_config_exe} "$@"
> +}
> +
>  if test "$xen" != "no" ; then
>    xen_libs="-lxenstore -lxenctrl -lxenguest"
>    xen_stable_libs="-lxenforeignmemory -lxengnttab -lxenevtchn"
> @@ -1997,9 +2001,9 @@ EOF
>      xen=no
> 
>    # Xen version via pkg-config (Xen 4.9.0 and newer)
> -  elif $pkg_config --exists xencontrol ; then
> +  elif xen_query_pkg_config --exists xencontrol; then
>      xen_ctrl_version="$(printf '%d%02d%02d' \
> -      $($pkg_config --modversion xencontrol | sed 's/\./ /g') )"
> +      $(xen_query_pkg_config --modversion xencontrol | sed 's/\./ /g') )"
>      xen=yes
> 
>    elif
> @@ -2216,8 +2220,8 @@ EOF
>      if test $xen_ctrl_version -ge 40900 ; then
>        xen_pc="xencontrol xenstore xenguest xenforeignmemory xengnttab xenevtchn"
>        xen_pc="$xen_pc xendevicemodel"
> -      xen_libs="$($pkg_config --libs $xen_pc)"
> -      QEMU_CFLAGS="$QEMU_CFLAGS $($pkg_config --cflags $xen_pc)"
> +      xen_libs="$(xen_query_pkg_config --libs $xen_pc)"
> +      QEMU_CFLAGS="$QEMU_CFLAGS $(xen_query_pkg_config --cflags $xen_pc)"
>      elif test $xen_ctrl_version -ge 40701 ; then
>        libs_softmmu="$xen_stable_libs $libs_softmmu"
>      fi
> 
> This appears to DTRT for me when switching between versions of Xen.

But not for someone trying to build qemu outside of Xen trying to use
the properly installed pkg-config files of Xen. They wouldn't be
found any more.

You are breaking a feature for the majority of users just to make
live easier for a handful of developers unwilling to change their
workflow.


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

      reply	other threads:[~2017-03-24 18:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-16 14:19 [PATCH 0/2] xen: use pkg-config for configure Juergen Gross
2017-03-16 14:19 ` [PATCH 1/2] xen: use 5 digit xen versions Juergen Gross
2017-03-16 20:19   ` Stefano Stabellini
2017-03-16 14:19 ` [PATCH 2/2] configure: use pkg-config for obtaining xen version Juergen Gross
2017-03-16 20:20   ` Stefano Stabellini
2017-03-17  4:49     ` Juergen Gross
2017-03-17 18:33       ` Stefano Stabellini
2017-03-21  5:34         ` Juergen Gross
2017-03-21 18:54           ` Stefano Stabellini
2017-03-22  5:02             ` Juergen Gross
2017-03-22 18:21               ` Stefano Stabellini
2017-03-24 15:12                 ` Paul Durrant
2017-03-24 15:24                   ` Paul Durrant
2017-03-24 15:34                   ` Juergen Gross
2017-03-24 15:44                     ` Paul Durrant
2017-03-24 15:51                       ` Juergen Gross
2017-03-24 15:54                         ` Juergen Gross
2017-03-24 15:56                           ` Paul Durrant
2017-03-24 16:42                           ` Paul Durrant
2017-03-24 18:43                             ` Juergen Gross [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=0426b870-b23c-85f6-160c-f5df8db753d0@suse.com \
    --to=jgross@suse.com \
    --cc=Paul.Durrant@citrix.com \
    --cc=anthony.perard@citrix.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.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).