mirror of
https://github.com/mborgerson/xemu.git
synced 2025-12-01 16:10:01 +00:00
Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging
* x86: re-enable rng seeding via SetupData * x86: reinitialize RNG seed on system reboot and after kernel load * qboot: rebuild based on latest commit * watchdog: remove -watchdog option * update Meson to 0.61.5, move more configure tests # -----BEGIN PGP SIGNATURE----- # # iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmM4kiAUHHBib256aW5p # QHJlZGhhdC5jb20ACgkQv/vSX3jHroNfbgf+IHhIHVxtBVWqayVRkwpQC+oAFV/V # 4bvJI90rHmTNPA36n1ocUmQmXyNVTQFW/t7mlln5BhOwNzxnQycVe2idfMa6ntkb # hHpe2NbICF9Crzb9BkK4wnaBLwEWA/X3WlnCqPYtxlxEhjmxu+HPtF7vm12OTkOV # JevH3EN1gMiAfMo+gcRBlrwb5kntLm3nGZTCd218Ope22PoU6MVvxb9ivieJG8kD # xDUGPQNU0mB9pypwLYZAqmu34xJ8Stly9UuJ1M2iQoawIs7W2Qy7svpOrsKZ3W/7 # D7J18QLAjI7Hq6rUWPgK5ugnUvVMdaTXM7MZSuIDIxRJuj5YryIsHRPybQ== # =HEmX # -----END PGP SIGNATURE----- # gpg: Signature made Sat 01 Oct 2022 15:16:48 EDT # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * tag 'for-upstream' of https://gitlab.com/bonzini/qemu: x86: re-initialize RNG seed when selecting kernel target/i386/kvm: fix kvmclock_current_nsec: Assertion `time.tsc_timestamp <= migration_tsc' failed configure, meson: move linker flag detection to meson configure, meson: move C++ compiler detection to meson.build meson: multiple names can be passed to dependency() meson: require 0.61.3 meson: -display dbus and CFI are incompatible ui: fix path to dbus-display1.h watchdog: remove -watchdog option configure: do not invoke as/ld directly for pc-bios/optionrom qboot: rebuild based on latest commit x86: re-enable rng seeding via SetupData x86: reinitialize RNG seed on system reboot x86: use typedef for SetupData struct x86: return modified setup_data only if read as memory, not as file Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
97
configure
vendored
97
configure
vendored
@ -75,7 +75,6 @@ fi
|
||||
TMPB="qemu-conf"
|
||||
TMPC="${TMPDIR1}/${TMPB}.c"
|
||||
TMPO="${TMPDIR1}/${TMPB}.o"
|
||||
TMPCXX="${TMPDIR1}/${TMPB}.cxx"
|
||||
TMPM="${TMPDIR1}/${TMPB}.m"
|
||||
TMPE="${TMPDIR1}/${TMPB}.exe"
|
||||
|
||||
@ -158,10 +157,6 @@ do_cc() {
|
||||
do_compiler_werror "$cc" $CPU_CFLAGS "$@"
|
||||
}
|
||||
|
||||
do_cxx() {
|
||||
do_compiler_werror "$cxx" $CPU_CFLAGS "$@"
|
||||
}
|
||||
|
||||
do_objc() {
|
||||
do_compiler_werror "$objcc" $CPU_CFLAGS "$@"
|
||||
}
|
||||
@ -171,24 +166,6 @@ add_to() {
|
||||
eval $1=\${$1:+\"\$$1 \"}\$2
|
||||
}
|
||||
|
||||
update_cxxflags() {
|
||||
# Set QEMU_CXXFLAGS from QEMU_CFLAGS by filtering out those
|
||||
# options which some versions of GCC's C++ compiler complain about
|
||||
# because they only make sense for C programs.
|
||||
QEMU_CXXFLAGS="-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS"
|
||||
CONFIGURE_CXXFLAGS=$(echo "$CONFIGURE_CFLAGS" | sed s/-std=gnu11/-std=gnu++11/)
|
||||
for arg in $QEMU_CFLAGS; do
|
||||
case $arg in
|
||||
-Wstrict-prototypes|-Wmissing-prototypes|-Wnested-externs|\
|
||||
-Wold-style-declaration|-Wold-style-definition|-Wredundant-decls)
|
||||
;;
|
||||
*)
|
||||
QEMU_CXXFLAGS=${QEMU_CXXFLAGS:+$QEMU_CXXFLAGS }$arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
compile_object() {
|
||||
local_cflags="$1"
|
||||
do_cc $CFLAGS $EXTRA_CFLAGS $CONFIGURE_CFLAGS $QEMU_CFLAGS $local_cflags -c -o $TMPO $TMPC
|
||||
@ -1101,7 +1078,7 @@ fi
|
||||
python="$python -B"
|
||||
|
||||
if test -z "$meson"; then
|
||||
if test "$explicit_python" = no && has meson && version_ge "$(meson --version)" 0.59.3; then
|
||||
if test "$explicit_python" = no && has meson && version_ge "$(meson --version)" 0.61.5; then
|
||||
meson=meson
|
||||
elif test "$git_submodules_action" != 'ignore' ; then
|
||||
meson=git
|
||||
@ -1353,12 +1330,10 @@ EOF
|
||||
if test "$static" = "yes"; then
|
||||
if test "$pie" != "no" && compile_prog "-Werror -fPIE -DPIE" "-static-pie"; then
|
||||
CONFIGURE_CFLAGS="-fPIE -DPIE $CONFIGURE_CFLAGS"
|
||||
QEMU_LDFLAGS="-static-pie $QEMU_LDFLAGS"
|
||||
pie="yes"
|
||||
elif test "$pie" = "yes"; then
|
||||
error_exit "-static-pie not available due to missing toolchain support"
|
||||
else
|
||||
QEMU_LDFLAGS="-static $QEMU_LDFLAGS"
|
||||
pie="no"
|
||||
fi
|
||||
elif test "$pie" = "no"; then
|
||||
@ -1380,12 +1355,6 @@ else
|
||||
pie="no"
|
||||
fi
|
||||
|
||||
# Detect support for PT_GNU_RELRO + DT_BIND_NOW.
|
||||
# The combination is known as "full relro", because .got.plt is read-only too.
|
||||
if compile_prog "" "-Wl,-z,relro -Wl,-z,now" ; then
|
||||
QEMU_LDFLAGS="-Wl,-z,relro -Wl,-z,now $QEMU_LDFLAGS"
|
||||
fi
|
||||
|
||||
##########################################
|
||||
# __sync_fetch_and_and requires at least -march=i486. Many toolchains
|
||||
# use i686 as default anyway, but for those that don't, an explicit
|
||||
@ -2243,14 +2212,6 @@ if test "$have_ubsan" = "yes"; then
|
||||
fi
|
||||
|
||||
##########################################
|
||||
|
||||
# Exclude --warn-common with TSan to suppress warnings from the TSan libraries.
|
||||
if test "$solaris" = "no" && test "$tsan" = "no"; then
|
||||
if $ld --version 2>/dev/null | grep "GNU ld" >/dev/null 2>/dev/null ; then
|
||||
QEMU_LDFLAGS="-Wl,--warn-common $QEMU_LDFLAGS"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Guest agent Windows MSI package
|
||||
|
||||
if test "$QEMU_GA_MANUFACTURER" = ""; then
|
||||
@ -2298,23 +2259,11 @@ probe_target_compiler i386-softmmu
|
||||
if test -n "$target_cc" &&
|
||||
test "$targetos" != "darwin" && test "$targetos" != "sunos" && \
|
||||
test "$targetos" != "haiku" && test "$softmmu" = yes ; then
|
||||
# Different host OS linkers have different ideas about the name of the ELF
|
||||
# emulation. Linux and OpenBSD/amd64 use 'elf_i386'; FreeBSD uses the _fbsd
|
||||
# variant; OpenBSD/i386 uses the _obsd variant; and Windows uses i386pe.
|
||||
for emu in elf_i386 elf_i386_fbsd elf_i386_obsd i386pe; do
|
||||
if "$target_ld" -verbose 2>&1 | grep -q "^[[:space:]]*${emu}[[:space:]]*$"; then
|
||||
ld_i386_emulation="$emu"
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -n "$ld_i386_emulation"; then
|
||||
roms="pc-bios/optionrom"
|
||||
config_mak=pc-bios/optionrom/config.mak
|
||||
echo "# Automatically generated by configure - do not modify" > $config_mak
|
||||
echo "TOPSRC_DIR=$source_path" >> $config_mak
|
||||
echo "LD_I386_EMULATION=$ld_i386_emulation" >> $config_mak
|
||||
write_target_makefile >> $config_mak
|
||||
fi
|
||||
roms="pc-bios/optionrom"
|
||||
config_mak=pc-bios/optionrom/config.mak
|
||||
echo "# Automatically generated by configure - do not modify" > $config_mak
|
||||
echo "TOPSRC_DIR=$source_path" >> $config_mak
|
||||
write_target_makefile >> $config_mak
|
||||
fi
|
||||
|
||||
probe_target_compiler ppc-softmmu
|
||||
@ -2352,38 +2301,6 @@ 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
|
||||
cat > $TMPC <<EOF
|
||||
int c_function(void);
|
||||
int main(void) { return c_function(); }
|
||||
EOF
|
||||
|
||||
compile_object
|
||||
|
||||
cat > $TMPCXX <<EOF
|
||||
extern "C" {
|
||||
int c_function(void);
|
||||
}
|
||||
int c_function(void) { return 42; }
|
||||
EOF
|
||||
|
||||
update_cxxflags
|
||||
|
||||
if do_cxx $CXXFLAGS $EXTRA_CXXFLAGS $CONFIGURE_CXXFLAGS $QEMU_CXXFLAGS -o $TMPE $TMPCXX $TMPO $QEMU_LDFLAGS; then
|
||||
# C++ compiler $cxx works ok with C compiler $cc
|
||||
:
|
||||
else
|
||||
echo "C++ compiler $cxx does not work with C compiler $cc"
|
||||
echo "Disabling C++ specific optional code"
|
||||
cxx=
|
||||
fi
|
||||
else
|
||||
echo "No C++ compiler available; disabling C++ specific optional code"
|
||||
cxx=
|
||||
fi
|
||||
|
||||
if ! (GIT="$git" "$source_path/scripts/git-submodule.sh" "$git_submodules_action" "$git_submodules"); then
|
||||
exit 1
|
||||
fi
|
||||
@ -2464,7 +2381,6 @@ echo "MESON=$meson" >> $config_host_mak
|
||||
echo "NINJA=$ninja" >> $config_host_mak
|
||||
echo "CC=$cc" >> $config_host_mak
|
||||
echo "QEMU_CFLAGS=$QEMU_CFLAGS" >> $config_host_mak
|
||||
echo "QEMU_CXXFLAGS=$QEMU_CXXFLAGS" >> $config_host_mak
|
||||
echo "QEMU_OBJCFLAGS=$QEMU_OBJCFLAGS" >> $config_host_mak
|
||||
echo "GLIB_CFLAGS=$glib_cflags" >> $config_host_mak
|
||||
echo "GLIB_LIBS=$glib_libs" >> $config_host_mak
|
||||
@ -2655,7 +2571,6 @@ if test "$skip_meson" = no; then
|
||||
echo "${a}-softmmu = '$c'" >> $cross
|
||||
done
|
||||
|
||||
test -z "$cxx" && echo "link_language = 'c'" >> $cross
|
||||
echo "[built-in options]" >> $cross
|
||||
echo "c_args = [$(meson_quote $CFLAGS $EXTRA_CFLAGS)]" >> $cross
|
||||
echo "cpp_args = [$(meson_quote $CXXFLAGS $EXTRA_CXXFLAGS)]" >> $cross
|
||||
|
||||
Reference in New Issue
Block a user