All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] configure: Save PKG_CONFIG_LIBDIR and WINDRES in config.status
@ 2018-09-04  7:02 Thomas Huth
  2018-09-04 10:35 ` Peter Maydell
  2018-09-04 10:43 ` Daniel P. Berrangé
  0 siblings, 2 replies; 6+ messages in thread
From: Thomas Huth @ 2018-09-04  7:02 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Weil, qemu-trivial

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

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

end of thread, other threads:[~2018-09-04 12:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-04  7:02 [Qemu-devel] [PATCH] configure: Save PKG_CONFIG_LIBDIR and WINDRES in config.status Thomas Huth
2018-09-04 10:35 ` 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

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.