All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org
Cc: Stefan Weil <sw@weilnetz.de>, qemu-trivial@nongnu.org
Subject: [Qemu-devel] [PATCH] configure: Save PKG_CONFIG_LIBDIR and WINDRES in config.status
Date: Tue,  4 Sep 2018 09:02:18 +0200	[thread overview]
Message-ID: <1536044538-22507-1-git-send-email-thuth@redhat.com> (raw)

When cross-compiling QEMU for a target that significantly differs from
the host, the current information in config.status is not enough to
properly re-create the configuration. For example when I try to test
my build with the mingw32 cross-compiler, I regularly get this error
after the build system tried to re-create the configuration with the
config.status file:

ERROR: sizeof(size_t) doesn't match GLIB_SIZEOF_SIZE_T.
       You probably need to set PKG_CONFIG_LIBDIR
       to point to the right pkg-config files for your
       build target

A similar problem exists for the "windres" tool, where you have to
set the WINDRES variable in case it has a different name.
So let's fix these issues by storing the configuration for these
variables in the config.status file, too.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 configure | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/configure b/configure
index 58862d2..4d8888f 100755
--- a/configure
+++ b/configure
@@ -7534,6 +7534,12 @@ cat <<EOD >config.status
 # Compiler output produced by configure, useful for debugging
 # configure, is in config.log if it exists.
 EOD
+if [ -n "$PKG_CONFIG_LIBDIR" ]; then
+    echo "export PKG_CONFIG_LIBDIR=\"$PKG_CONFIG_LIBDIR\"" >>config.status
+fi
+if [ -n "$WINDRES" ]; then
+    echo "export WINDRES=\"$WINDRES\"" >>config.status
+fi
 printf "exec" >>config.status
 printf " '%s'" "$0" "$@" >>config.status
 echo ' "$@"' >>config.status
-- 
1.8.3.1

             reply	other threads:[~2018-09-04  7:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-04  7:02 Thomas Huth [this message]
2018-09-04 10:35 ` [Qemu-devel] [PATCH] configure: Save PKG_CONFIG_LIBDIR and WINDRES in config.status Peter Maydell
2018-09-04 10:53   ` Thomas Huth
2018-09-04 12:12     ` Peter Maydell
2018-09-04 10:43 ` Daniel P. Berrangé
2018-09-04 10:58   ` Thomas Huth

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=1536044538-22507-1-git-send-email-thuth@redhat.com \
    --to=thuth@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=sw@weilnetz.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.