summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorPaolo Bonzini2020-09-21 10:49:50 +0200
committerPaolo Bonzini2020-10-03 14:18:56 +0200
commitb6c7cfd490510a395ea36747f4a8682c6b1fc26f (patch)
tree750113426ae693a9135138ec8f84fa60ed9be6f6 /meson.build
parentdefault-configs: remove default-configs/devices for user-mode targets (diff)
downloadqemu-b6c7cfd490510a395ea36747f4a8682c6b1fc26f.tar.gz
qemu-b6c7cfd490510a395ea36747f4a8682c6b1fc26f.tar.xz
qemu-b6c7cfd490510a395ea36747f4a8682c6b1fc26f.zip
configure: move OpenBSD W^X test to meson
The TCG option is now passed through to Meson. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build8
1 files changed, 7 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 743a6504a7..60ecd03fbd 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 = []
@@ -1247,7 +1253,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'])]