summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorPaolo Bonzini2022-05-27 17:35:54 +0200
committerAlex Bennée2022-06-01 16:47:43 +0200
commit9ffed42614585026834fd63cdf586b78b1f72c66 (patch)
treefb93ac0aa5ae291d09f79bb8b633d1b49fafd2c9 /configure
parentconfigure: move symlink configuration earlier (diff)
downloadqemu-9ffed42614585026834fd63cdf586b78b1f72c66.tar.gz
qemu-9ffed42614585026834fd63cdf586b78b1f72c66.tar.xz
qemu-9ffed42614585026834fd63cdf586b78b1f72c66.zip
configure: enable cross-compilation of s390-ccw
While container-based cross compilers are not supported, this already makes it possible to build s390-ccw on any machine that has s390x GCC and binutils installed. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20220517092616.1272238-14-pbonzini@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Acked-by: Thomas Huth <thuth@redhat.com> Message-Id: <20220527153603.887929-25-alex.bennee@linaro.org>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure18
1 files changed, 13 insertions, 5 deletions
diff --git a/configure b/configure
index aa17b0fa55..f509bce304 100755
--- a/configure
+++ b/configure
@@ -2231,24 +2231,32 @@ if { test "$cpu" = "i386" || test "$cpu" = "x86_64"; } && \
done
fi
-# Only build s390-ccw bios if we're on s390x and the compiler has -march=z900
-# or -march=z10 (which is the lowest architecture level that Clang supports)
-if test "$cpu" = "s390x" ; then
+# Only build s390-ccw bios if the compiler has -march=z900 or -march=z10
+# (which is the lowest architecture level that Clang supports)
+probe_target_compiler s390x
+if test -n "$target_cc" && test "$softmmu" = yes; then
write_c_skeleton
- compile_prog "-march=z900" ""
+ do_compiler "$target_cc" $target_cc_cflags -march=z900 -o $TMPO -c $TMPC
has_z900=$?
- if [ $has_z900 = 0 ] || compile_object "-march=z10 -msoft-float -Werror"; then
+ if [ $has_z900 = 0 ] || do_compiler "$target_cc" $target_cc_cflags -march=z10 -msoft-float -Werror -o $TMPO -c $TMPC; then
if [ $has_z900 != 0 ]; then
echo "WARNING: Your compiler does not support the z900!"
echo " The s390-ccw bios will only work with guest CPUs >= z10."
fi
roms="$roms s390-ccw"
+ config_mak=pc-bios/s390-ccw/config-host.mak
+ echo "# Automatically generated by configure - do not modify" > $config_mak
+ echo "SRC_PATH=$source_path/pc-bios/s390-ccw" >> $config_mak
+ write_target_makefile >> $config_mak
# SLOF is required for building the s390-ccw firmware on s390x,
# since it is using the libnet code from SLOF for network booting.
git_submodules="${git_submodules} roms/SLOF"
fi
fi
+#######################################
+# generate config-host.mak
+
# Check that the C++ compiler exists and works with the C compiler.
# All the QEMU_CXXFLAGS are based on QEMU_CFLAGS. Keep this at the end to don't miss any other that could be added.
if has $cxx; then