qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] issue: linking 64bit glib when building for cpu=i386


From: Peter Maydell
Subject: Re: [Qemu-devel] issue: linking 64bit glib when building for cpu=i386
Date: Fri, 22 Aug 2014 09:28:05 +0100

On 22 August 2014 09:20, Daniel P. Berrange <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]