[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 013/143] configure: generate Meson cross file
From: |
Paolo Bonzini |
Subject: |
[PATCH 013/143] configure: generate Meson cross file |
Date: |
Thu, 6 Aug 2020 21:14:09 +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 f2822b7..13db149 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 $python $meson setup \
--prefix "$prefix" \
@@ -8597,11 +8640,13 @@ NINJA=$PWD/ninjatool $python $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 004/143] trace: switch position of headers to what Meson requires, (continued)
[PATCH 011/143] configure: prepare CFLAGS/CXXFLAGS/LDFLAGS for Meson, Paolo Bonzini, 2020/08/06
[PATCH 013/143] configure: generate Meson cross file,
Paolo Bonzini <=
[PATCH 014/143] build-sys hack: link with whole .fa archives, Paolo Bonzini, 2020/08/06
[PATCH 015/143] build-sys: add meson submodule, Paolo Bonzini, 2020/08/06
[PATCH 016/143] meson: move summary to meson.build, Paolo Bonzini, 2020/08/06
[PATCH 012/143] configure: integrate Meson in the build system, Paolo Bonzini, 2020/08/06
[PATCH 017/143] meson: enable pie, Paolo Bonzini, 2020/08/06
[PATCH 018/143] meson: use coverage option, Paolo Bonzini, 2020/08/06
[PATCH 020/143] meson: add testsuite Makefile generator, Paolo Bonzini, 2020/08/06