From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:56232) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4YAa-0007kl-Ar for qemu-devel@nongnu.org; Fri, 16 Sep 2011 09:09:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R4YAU-0001Gh-G2 for qemu-devel@nongnu.org; Fri, 16 Sep 2011 09:09:28 -0400 Received: from mail-gx0-f173.google.com ([209.85.161.173]:57721) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4YAU-0001GV-Cv for qemu-devel@nongnu.org; Fri, 16 Sep 2011 09:09:22 -0400 Received: by gxk26 with SMTP id 26so4641510gxk.4 for ; Fri, 16 Sep 2011 06:09:21 -0700 (PDT) Message-ID: <4E734A7D.6020708@codemonkey.ws> Date: Fri, 16 Sep 2011 08:09:17 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1315765553-7086-1-git-send-email-weil@mail.berlios.de> In-Reply-To: <1315765553-7086-1-git-send-email-weil@mail.berlios.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] pkg-config: Add a pkg-config script for cross compilations List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: peter.maydell@linaro.org, qemu-devel@nongnu.org On 09/11/2011 01:25 PM, Stefan Weil wrote: > This script can be used for cross compilations. > I use it on Debian / Ubuntu to provide a cross pkg-config > for MinGW (32 and 64 bit), ARM, MIPS and PowerPC. > > v2: Improvements as suggested by Peter Maydell. > Thanks for the review. > > Signed-off-by: Stefan Weil Please post patches as top-level posts and not as replies. Regards, Anthony Liguori > --- > scripts/cross-pkg-config | 28 ++++++++++++++++++++++++++++ > 1 files changed, 28 insertions(+), 0 deletions(-) > create mode 100755 scripts/cross-pkg-config > > diff --git a/scripts/cross-pkg-config b/scripts/cross-pkg-config > new file mode 100755 > index 0000000..8d7fe17 > --- /dev/null > +++ b/scripts/cross-pkg-config > @@ -0,0 +1,28 @@ > +#!/bin/sh -e > + > +# pkg-config for cross compilations > + > +# Copyright (C) 2011 Stefan Weil > + > +# This work is licensed under the terms of the GNU GPL, version 2 or later. > +# See the file COPYING in the top-level directory. > + > +# This script provides a cross pkg-config for QEMU cross compilations. > +# It will use the standard pkg-config with special options for the > +# cross environment which is assumed to be in /usr/{cross-prefix}. > + > +# Installation (Debian and similar distributions): > +# Simply copy or link it to /usr/bin/{cross-prefix}-pkg-config. > + > +# Examples (Debian, Ubuntu): > +# /usr/bin/amd64-mingw32msvc-pkg-config > +# /usr/bin/i586-mingw32msvc-pkg-config > +# /usr/bin/arm-linux-gnueabi-pkg-config > +# /usr/bin/mipsel-linux-gnu-pkg-config > + > +basename=`basename "$0"` > +prefix="/usr/${basename%-pkg-config}" > +export PKG_CONFIG_LIBDIR="$prefix/lib/pkgconfig" > +exec pkg-config --define-variable=prefix="$prefix" "$@" > + > +# end