[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 17/34] configure: move Windows flags detection to meson
From: |
Paolo Bonzini |
Subject: |
[PATCH v2 17/34] configure: move Windows flags detection to meson |
Date: |
Sat, 23 Apr 2022 14:51:34 +0200 |
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
v1->v2: fix get_option('optimization') comparison to use a string
configure | 20 --------------------
meson.build | 8 ++++++++
2 files changed, 8 insertions(+), 20 deletions(-)
diff --git a/configure b/configure
index 0b236fda59..a6ba59cf6f 100755
--- a/configure
+++ b/configure
@@ -224,10 +224,6 @@ glob() {
eval test -z '"${1#'"$2"'}"'
}
-ld_has() {
- $ld --help 2>/dev/null | grep ".$1" >/dev/null 2>&1
-}
-
if printf %s\\n "$source_path" "$PWD" | grep -q "[[:space:]:]";
then
error_exit "main directory cannot contain spaces nor colons"
@@ -2088,22 +2084,6 @@ if test "$solaris" = "no" && test "$tsan" = "no"; then
fi
fi
-# Use ASLR, no-SEH and DEP if available
-if test "$mingw32" = "yes" ; then
- flags="--no-seh --nxcompat"
-
- # Disable ASLR for debug builds to allow debugging with gdb
- if test "$debug" = "no" ; then
- flags="--dynamicbase $flags"
- fi
-
- for flag in $flags; do
- if ld_has $flag ; then
- QEMU_LDFLAGS="-Wl,$flag $QEMU_LDFLAGS"
- fi
- done
-fi
-
# Guest agent Windows MSI package
if test "$QEMU_GA_MANUFACTURER" = ""; then
diff --git a/meson.build b/meson.build
index 1a9549d90c..d569c6e944 100644
--- a/meson.build
+++ b/meson.build
@@ -182,6 +182,14 @@ qemu_cxxflags = config_host['QEMU_CXXFLAGS'].split()
qemu_objcflags = config_host['QEMU_OBJCFLAGS'].split()
qemu_ldflags = config_host['QEMU_LDFLAGS'].split()
+if targetos == 'windows'
+ qemu_ldflags += cc.get_supported_link_arguments('-Wl,--no-seh',
'-Wl,--nxcompat')
+ # Disable ASLR for debug builds to allow debugging with gdb
+ if get_option('optimization') == '0'
+ qemu_ldflags += cc.get_supported_link_arguments('-Wl,--dynamicbase')
+ endif
+endif
+
if get_option('gprof')
qemu_cflags += ['-p']
qemu_cxxflags += ['-p']
--
2.35.1
- [PATCH v2 28/34] configure: simplify vhost-net-{user, vdpa} configuration, (continued)
- [PATCH v2 28/34] configure: simplify vhost-net-{user, vdpa} configuration, Paolo Bonzini, 2022/04/23
- [PATCH v2 30/34] build: move vhost-scsi configuration to Kconfig, Paolo Bonzini, 2022/04/23
- [PATCH v2 31/34] build: move vhost-user-fs configuration to Kconfig, Paolo Bonzini, 2022/04/23
- [PATCH v2 32/34] meson: create have_vhost_* variables, Paolo Bonzini, 2022/04/23
- [PATCH v2 22/34] meson, configure: move --interp-prefix to meson, Paolo Bonzini, 2022/04/23
- [PATCH v2 34/34] configure, meson: move vhost options to Meson, Paolo Bonzini, 2022/04/23
- [PATCH v2 19/34] meson, configure: move --tls-priority to meson, Paolo Bonzini, 2022/04/23
- [PATCH v2 20/34] meson, configure: move bdrv whitelists to meson, Paolo Bonzini, 2022/04/23
- [PATCH v2 25/34] meson: pass more options directly as -D, Paolo Bonzini, 2022/04/23
- [PATCH v2 26/34] configure: omit options with default values from meson command line, Paolo Bonzini, 2022/04/23
- [PATCH v2 17/34] configure: move Windows flags detection to meson,
Paolo Bonzini <=
- [PATCH v2 33/34] meson: use have_vhost_* variables to pick sources, Paolo Bonzini, 2022/04/23