[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 016/147] configure: generate Meson cross file
From: |
Paolo Bonzini |
Subject: |
[PATCH 016/147] configure: generate Meson cross file |
Date: |
Mon, 10 Aug 2020 19:06:54 +0200 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 45 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/configure b/configure
index ad5bd1a..f38c783 100755
--- a/configure
+++ b/configure
@@ -8582,6 +8582,49 @@ echo "# Automatically generated by configure - do not
modify" > "$iotests_common
echo >> "$iotests_common_env"
echo "export PYTHON='$python'" >> "$iotests_common_env"
+cross="config-meson.cross"
+cross_arg=
+
+if test -n "$cross_prefix"; then
+ echo "# Automatically generated by configure - do not modify" > $cross
+ echo "[binaries]" >> $cross
+ echo "c = '$cc'" >> $cross
+ echo "cpp = '$cxx'" >> $cross
+ echo "ar = '$ar'" >> $cross
+ echo "nm = '$nm'" >> $cross
+ echo "pkgconfig = '$pkg_config_exe'" >> $cross
+ echo "ranlib = '$ranlib'" >> $cross
+ echo "strip = '$strip'" >> $cross
+ echo "windres = '$windres'" >> $cross
+
+ echo "[properties]" >> $cross
+ echo "root = '$prefix'" >> $cross
+
+ echo "[host_machine]" >> $cross
+if test "$mingw32" = "yes" ; then
+ echo "system = 'windows'" >> $cross
+fi
+case "$ARCH" in
+ i386|x86_64)
+ echo "cpu_family = 'x86'" >> $cross
+ ;;
+ ppc64le)
+ echo "cpu_family = 'ppc64'" >> $cross
+ ;;
+ *)
+ echo "cpu_family = '$ARCH'" >> $cross
+ ;;
+esac
+ echo "cpu = '$cpu'" >> $cross
+if test "$bigendian" = "yes" ; then
+ echo "endian = 'big'" >> $cross
+else
+ echo "endian = 'little'" >> $cross
+fi
+
+ cross_arg="--cross-file=$cross"
+fi
+
rm -rf meson-private/ meson-logs/ meson-info/
NINJA=$PWD/ninjatool $meson setup \
--prefix "$prefix" \
@@ -8597,11 +8640,13 @@ NINJA=$PWD/ninjatool $meson setup \
-Ddebug=$(if test "$debug_info" = yes; then echo true; else echo
false; fi) \
-Dwerror=$(if test "$werror" = yes; then echo true; else echo false;
fi) \
-Dstrip=$(if test "$strip_opt" = yes; then echo true; else echo false;
fi) \
+ $cross_arg \
"$PWD" "$source_path"
if test "$?" -ne 0 ; then
error_exit "meson setup failed"
fi
+touch ninjatool.stamp
# Save the configure command line for later reuse.
cat <<EOD >config.status
--
1.8.3.1
- [PATCH 009/147] tests/docker: add test script for static linux-user builds, (continued)
- [PATCH 009/147] tests/docker: add test script for static linux-user builds, Paolo Bonzini, 2020/08/10
- [PATCH 005/147] meson: rename .inc.c files to .inc, Paolo Bonzini, 2020/08/10
- [PATCH 008/147] tests/vm: check for Python YAML parser in the Makefile, Paolo Bonzini, 2020/08/10
- [PATCH 011/147] configure: do not include $(...) variables in config-host.mak, Paolo Bonzini, 2020/08/10
- [PATCH 010/147] nsis: use "make DESTDIR=" instead of "make prefix=", Paolo Bonzini, 2020/08/10
- [PATCH 012/147] configure: expand path variables for meson configure, Paolo Bonzini, 2020/08/10
- [PATCH 014/147] tests/vm: include setuptools, Paolo Bonzini, 2020/08/10
- [PATCH 013/147] configure: prepare CFLAGS/CXXFLAGS/LDFLAGS for Meson, Paolo Bonzini, 2020/08/10
- [PATCH 015/147] configure: integrate Meson in the build system, Paolo Bonzini, 2020/08/10
- [PATCH 017/147] build-sys hack: link with whole .fa archives, Paolo Bonzini, 2020/08/10
- [PATCH 016/147] configure: generate Meson cross file,
Paolo Bonzini <=
- [PATCH 018/147] build-sys: add meson submodule, Paolo Bonzini, 2020/08/10
- [PATCH 019/147] meson: move summary to meson.build, Paolo Bonzini, 2020/08/10
- [PATCH 020/147] meson: enable pie, Paolo Bonzini, 2020/08/10
- [PATCH 021/147] meson: use coverage option, Paolo Bonzini, 2020/08/10
- [PATCH 022/147] meson: add sparse support, Paolo Bonzini, 2020/08/10
- [PATCH 023/147] meson: add testsuite Makefile generator, Paolo Bonzini, 2020/08/10
- [PATCH 025/147] meson: add remaining generated tcg trace helpers, Paolo Bonzini, 2020/08/10
- [PATCH 024/147] libqemuutil, qapi, trace: convert to meson, Paolo Bonzini, 2020/08/10
- [PATCH 026/147] meson: add version.o, Paolo Bonzini, 2020/08/10
- [PATCH 027/147] contrib/libvhost-user: convert to Meson, Paolo Bonzini, 2020/08/10