aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure97
1 files changed, 6 insertions, 91 deletions
diff --git a/configure b/configure
index dc53e4df03..78e7982b44 100755
--- a/configure
+++ b/configure
@@ -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