qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: John Snow <jsnow@redhat.com>, qemu-devel <qemu-devel@nongnu.org>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] issue: linking 64bit glib when building for cpu=i386
Date: Fri, 22 Aug 2014 09:28:05 +0100	[thread overview]
Message-ID: <CAFEAcA8mK8q73BBnLV=+GF=_HVw9_tpYWOeVLOnEmntevfLSSQ@mail.gmail.com> (raw)
In-Reply-To: <20140822082008.GA8447@redhat.com>

On 22 August 2014 09:20, Daniel P. Berrange <berrange@redhat.com> wrote:
> Distros will install pkg-config .pc files for non-native architectures
> in a different location normally. The supported / recommended way to
> tell pkg-config to look in these alternative dirs is to set the env
> variable  PKG_CONFIG_LIBDIR. This replaces the built-in default search
> directory that looks for native.
>
> So on a Fedora / RHELL system, to make pkg-config use 32-bit libs you
> want to set
>
>    PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig
>
> which replaces the default location of /usr/lib64/pkgconfig. This is
> the same thing you'd need to do to build QEMU for say, mingw32 where
> you must set something like
>
>    PKG_CONFIG_LIBDIR=/usr/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig/

Yes, but this should be done by the i686-w64-mingw32-pkg-config
wrapper IMHO. (That's how I have my mingw setup configured,
anyway.)

> Note, i say PKG_CONFIG_LIBDIR here, *not* PKG_CONFIG_PATH. The latter
> variable adds the default search path - you want to stop it looking in
> the default search path completely because it is the wrong arch, so
> must use PKG_CONFIG_LIBDIR

Interestingly, Debian's cross-compile pkg-config wrapper
(aarch64-linux-gnu-pkg-config etc) sets PKG_CONFIG_PATH,
not PKG_CONFIG_LIBDIR. Maybe that's a bug, but it works...

thanks
-- PMM

  reply	other threads:[~2014-08-22  8:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <53F55173.6070704@redhat.com>
     [not found] ` <20140821090328.GA32580@stefanha-thinkpad.redhat.com>
2014-08-22  0:10   ` [Qemu-devel] issue: linking 64bit glib when building for cpu=i386 John Snow
2014-08-22  7:40     ` Markus Armbruster
2014-08-22  7:50     ` Peter Maydell
2014-08-22  8:20     ` Daniel P. Berrange
2014-08-22  8:28       ` Peter Maydell [this message]
2014-08-22  8:34         ` Daniel P. Berrange
2014-08-22  8:46           ` Peter Maydell
2014-08-22  9:05       ` Stefan Hajnoczi
2014-09-23 18:52         ` John Snow
2014-09-23 20:20           ` Peter Maydell

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='CAFEAcA8mK8q73BBnLV=+GF=_HVw9_tpYWOeVLOnEmntevfLSSQ@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=berrange@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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).