From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: richard.henderson@linaro.org
Subject: [PATCH 10/12] configure: move OpenBSD W^X test to meson
Date: Wed, 23 Sep 2020 05:11:29 -0400 [thread overview]
Message-ID: <20200923091131.1591563-11-pbonzini@redhat.com> (raw)
In-Reply-To: <20200923091131.1591563-1-pbonzini@redhat.com>
The TCG option is now passed through to Meson.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 15 ---------------
meson.build | 8 +++++++-
2 files changed, 7 insertions(+), 16 deletions(-)
diff --git a/configure b/configure
index 6e60de3e07..fb450858ff 100755
--- a/configure
+++ b/configure
@@ -1598,10 +1598,6 @@ if [ "$ARCH" = "unknown" ]; then
linux_user="no"
fi
-if [ "$bsd_user" = "no" -a "$linux_user" = "no" -a "$softmmu" = "no" ] ; then
- tcg="disabled"
-fi
-
default_target_list=""
deprecated_targets_list=ppc64abi32-linux-user,tilegx-linux-user,lm32-softmmu,unicore32-softmmu
deprecated_features=""
@@ -6062,17 +6058,6 @@ if test "$mingw32" = "yes" ; then
done
fi
-# Disable OpenBSD W^X if available
-if test "$tcg" = "enabled" && test "$targetos" = "OpenBSD"; then
- cat > $TMPC <<EOF
- int main(void) { return 0; }
-EOF
- wx_ldflags="-Wl,-z,wxneeded"
- if compile_prog "" "$wx_ldflags"; then
- QEMU_LDFLAGS="$QEMU_LDFLAGS $wx_ldflags"
- fi
-fi
-
qemu_confdir="$sysconfdir/$qemu_suffix"
qemu_moddir="$libdir/$qemu_suffix"
qemu_datadir="$datadir/$qemu_suffix"
diff --git a/meson.build b/meson.build
index d25ead3ad5..c66bc19e07 100644
--- a/meson.build
+++ b/meson.build
@@ -124,6 +124,7 @@ socket = []
version_res = []
coref = []
iokit = []
+emulator_link_args = []
cocoa = not_found
hvf = not_found
if targetos == 'windows'
@@ -146,6 +147,11 @@ elif targetos == 'haiku'
socket = [cc.find_library('posix_error_mapper'),
cc.find_library('network'),
cc.find_library('bsd')]
+elif targetos == 'openbsd'
+ if not get_option('tcg').disabled() and target_dirs.length() > 0
+ # Disable OpenBSD W^X if available
+ emulator_link_args = cc.get_supported_link_arguments('-Wl,-z,wxneeded')
+ endif
endif
accelerators = []
@@ -1231,7 +1237,7 @@ foreach target : target_dirs
c_args = ['-DNEED_CPU_H',
'-DCONFIG_TARGET="@0@-config-target.h"'.format(target),
'-DCONFIG_DEVICES="@0@-config-devices.h"'.format(target)]
- link_args = []
+ link_args = emulator_link_args
config_target += config_host
target_inc = [include_directories('target' / config_target['TARGET_BASE_ARCH'])]
--
2.26.2
next prev parent reply other threads:[~2020-09-23 9:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-23 9:11 [PATCH 00/12] Move target configuration to Meson Paolo Bonzini
2020-09-23 9:11 ` [PATCH 01/12] default-configs: move files to default-configs/devices/ Paolo Bonzini
2020-09-23 9:11 ` [PATCH 02/12] configure: convert accelerator variables to meson options Paolo Bonzini
2020-09-23 9:11 ` [PATCH 03/12] configure: rewrite accelerator defaults as tests Paolo Bonzini
2020-09-23 9:11 ` [PATCH 04/12] configure: move accelerator logic to meson Paolo Bonzini
2020-09-23 9:11 ` [PATCH 05/12] configure: remove dead variable Paolo Bonzini
2020-09-23 9:11 ` [PATCH 06/12] configure: compute derivatives of target name in meson Paolo Bonzini
2020-09-23 9:11 ` [PATCH 07/12] configure: remove useless config-target.mak symbols Paolo Bonzini
2020-09-23 9:11 ` [PATCH 08/12] configure: remove target configuration Paolo Bonzini
2020-09-23 9:11 ` [PATCH 09/12] default-configs: remove default-configs/devices for user-mode targets Paolo Bonzini
2020-09-23 9:11 ` Paolo Bonzini [this message]
2020-09-23 9:11 ` [PATCH 11/12] default-configs: use TARGET_ARCH key Paolo Bonzini
2020-09-23 9:11 ` [PATCH 12/12] default-configs: remove redundant keys Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200923091131.1591563-11-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).