qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] pkg-config: Add a pkg-config script for cross compilations
@ 2011-09-11 15:55 Stefan Weil
  2011-09-11 17:31 ` Peter Maydell
  2011-09-11 18:25 ` [Qemu-devel] [PATCH] " Paolo Bonzini
  0 siblings, 2 replies; 7+ messages in thread
From: Stefan Weil @ 2011-09-11 15:55 UTC (permalink / raw)
  To: qemu-devel

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.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
 scripts/cross-pkg-config |   22 ++++++++++++++++++++++
 1 files changed, 22 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..a5f839b
--- /dev/null
+++ b/scripts/cross-pkg-config
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# 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/`echo $basename|sed s/-pkg-config//`
+PKG_CONFIG_LIBDIR=$prefix/lib/pkgconfig
+export PKG_CONFIG_LIBDIR
+exec pkg-config --define-variable=prefix=$prefix $@
+
+# end
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-09-16 13:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-11 15:55 [Qemu-devel] [PATCH] pkg-config: Add a pkg-config script for cross compilations Stefan Weil
2011-09-11 17:31 ` Peter Maydell
2011-09-11 18:25   ` [Qemu-devel] [PATCH v2] " Stefan Weil
2011-09-16 13:09     ` Anthony Liguori
2011-09-11 18:25 ` [Qemu-devel] [PATCH] " Paolo Bonzini
2011-09-11 18:47   ` Stefan Weil
2011-09-12  6:25     ` Paolo Bonzini

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).