[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 005/132] configure: generate Meson cross file
From: |
Paolo Bonzini |
Subject: |
[PATCH 005/132] configure: generate Meson cross file |
Date: |
Thu, 12 Dec 2019 13:50:49 +0100 |
From: Marc-André Lureau <address@hidden>
Signed-off-by: Marc-André Lureau <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
configure | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/configure b/configure
index 3e3eb3d..2f3e231 100755
--- a/configure
+++ b/configure
@@ -7852,6 +7852,46 @@ 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
+ ;;
+ *)
+ 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-info meson-logs
NINJA=$PWD/ninjatool $python $meson setup \
--prefix "$prefix" \
@@ -7865,6 +7905,7 @@ NINJA=$PWD/ninjatool $python $meson setup \
--localstatedir "$local_statedir" \
$(test "$strip_opt" = yes && echo --strip) \
--buildtype $(if test "$debug" = yes; then echo debug; else echo
debugoptimized; fi) \
+ $cross_arg \
"$PWD" "$source_path"
if test "$?" -ne 0 ; then
--
1.8.3.1
- [RFC PATCH v3 000/132] Proof of concept for Meson integration, Paolo Bonzini, 2019/12/12
- [PATCH 001/132] build-sys hack: ensure target directory is there, Paolo Bonzini, 2019/12/12
- [PATCH 002/132] configure: do not include $(...) variables in config-host.mak, Paolo Bonzini, 2019/12/12
- [PATCH 003/132] configure: expand path variables for meson configure, Paolo Bonzini, 2019/12/12
- [PATCH 005/132] configure: generate Meson cross file,
Paolo Bonzini <=
- [PATCH 006/132] build-sys: add meson submodule, Paolo Bonzini, 2019/12/12
- [PATCH 007/132] meson: enable pie, Paolo Bonzini, 2019/12/12
- [PATCH 008/132] meson: use coverage option, Paolo Bonzini, 2019/12/12
- [PATCH 010/132] meson: add remaining generated tcg trace helpers, Paolo Bonzini, 2019/12/12
- [PATCH 004/132] configure: integrate Meson in the build system, Paolo Bonzini, 2019/12/12
- [PATCH 011/132] meson: add version.o, Paolo Bonzini, 2019/12/12
- [PATCH 013/132] contrib/vhost-user-blk: convert to Meson, Paolo Bonzini, 2019/12/12
- [PATCH 012/132] contrib/libvhost-user: convert to Meson, Paolo Bonzini, 2019/12/12
- [PATCH 014/132] contrib/vhost-user-scsi: convert to Meson, Paolo Bonzini, 2019/12/12
- [PATCH 015/132] contrib/rdmacm-mux: convert to Meson, Paolo Bonzini, 2019/12/12