aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2021-11-19 17:16:57 +0100
committerRichard Henderson <richard.henderson@linaro.org>2021-11-19 17:16:57 +0100
commit8627edfb3f1fca24a96a0954148885c3241c10f8 (patch)
treeba41aa3263969de04f1a95a0a307e78cfecb91c5 /meson.build
parentd434a47905641433e16ef65356d17090fd6fdcb1 (diff)
parentfdc6e168181d06391711171b7c409b34f2981ced (diff)
Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging
Bugfixes for 6.2. # gpg: Signature made Fri 19 Nov 2021 10:33:29 AM CET # 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] * tag 'for-upstream' of https://gitlab.com/bonzini/qemu: chardev/wctable: don't free the instance in wctablet_chr_finalize meson.build: Support ncurses on MacOS and OpenBSD docs: Spell QEMU all caps qtest/am53c974-test: add test for reset before transfer esp: ensure that async_len is reset to 0 during esp_hard_reset() nvmm: Fix support for stable version meson: fix botched compile check conversions Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build33
1 files changed, 20 insertions, 13 deletions
diff --git a/meson.build b/meson.build
index e2d38a43e6..96de1a6ef9 100644
--- a/meson.build
+++ b/meson.build
@@ -329,9 +329,7 @@ if not get_option('hax').disabled()
endif
endif
if targetos == 'netbsd'
- if cc.has_header_symbol('nvmm.h', 'nvmm_cpu_stop', required: get_option('nvmm'))
- nvmm = cc.find_library('nvmm', required: get_option('nvmm'))
- endif
+ nvmm = cc.find_library('nvmm', required: get_option('nvmm'))
if nvmm.found()
accelerators += 'CONFIG_NVMM'
endif
@@ -681,6 +679,9 @@ iconv = not_found
curses = not_found
if have_system and not get_option('curses').disabled()
curses_test = '''
+ #if defined(__APPLE__) || defined(__OpenBSD__)
+ #define _XOPEN_SOURCE_EXTENDED 1
+ #endif
#include <locale.h>
#include <curses.h>
#include <wchar.h>
@@ -704,7 +705,7 @@ if have_system and not get_option('curses').disabled()
endif
endforeach
msg = get_option('curses').enabled() ? 'curses library not found' : ''
- curses_compile_args = ['-DNCURSES_WIDECHAR']
+ curses_compile_args = ['-DNCURSES_WIDECHAR=1']
if curses.found()
if cc.links(curses_test, args: curses_compile_args, dependencies: [curses])
curses = declare_dependency(compile_args: curses_compile_args, dependencies: [curses])
@@ -1553,8 +1554,6 @@ config_host_data.set('CONFIG_INOTIFY',
cc.has_header_symbol('sys/inotify.h', 'inotify_init'))
config_host_data.set('CONFIG_INOTIFY1',
cc.has_header_symbol('sys/inotify.h', 'inotify_init1'))
-config_host_data.set('CONFIG_IOVEC',
- cc.has_header_symbol('sys/uio.h', 'struct iovec'))
config_host_data.set('CONFIG_MACHINE_BSWAP_H',
cc.has_header_symbol('machine/bswap.h', 'bswap32',
prefix: '''#include <sys/endian.h>
@@ -1567,8 +1566,6 @@ config_host_data.set('CONFIG_SYSMACROS',
cc.has_header_symbol('sys/sysmacros.h', 'makedev'))
config_host_data.set('HAVE_OPTRESET',
cc.has_header_symbol('getopt.h', 'optreset'))
-config_host_data.set('HAVE_UTMPX',
- cc.has_header_symbol('utmpx.h', 'struct utmpx'))
config_host_data.set('HAVE_IPPROTO_MPTCP',
cc.has_header_symbol('netinet/in.h', 'IPPROTO_MPTCP'))
@@ -1580,6 +1577,14 @@ config_host_data.set('HAVE_STRUCT_STAT_ST_ATIM',
cc.has_member('struct stat', 'st_atim',
prefix: '#include <sys/stat.h>'))
+# has_type
+config_host_data.set('CONFIG_IOVEC',
+ cc.has_type('struct iovec',
+ prefix: '#include <sys/uio.h>'))
+config_host_data.set('HAVE_UTMPX',
+ cc.has_type('struct utmpx',
+ prefix: '#include <utmpx.h>'))
+
config_host_data.set('CONFIG_EVENTFD', cc.links('''
#include <sys/eventfd.h>
int main(void) { return eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC); }'''))
@@ -1621,7 +1626,7 @@ config_host_data.set('CONFIG_POSIX_MADVISE', cc.links(gnu_source_prefix + '''
#include <stddef.h>
int main(void) { return posix_madvise(NULL, 0, POSIX_MADV_DONTNEED); }'''))
-config_host_data.set('CONFIG_PTHREAD_SETNAME_NP_W_TID', cc.links('''
+config_host_data.set('CONFIG_PTHREAD_SETNAME_NP_W_TID', cc.links(gnu_source_prefix + '''
#include <pthread.h>
static void *f(void *p) { return NULL; }
@@ -1632,7 +1637,7 @@ config_host_data.set('CONFIG_PTHREAD_SETNAME_NP_W_TID', cc.links('''
pthread_setname_np(thread, "QEMU");
return 0;
}''', dependencies: threads))
-config_host_data.set('CONFIG_PTHREAD_SETNAME_NP_WO_TID', cc.links('''
+config_host_data.set('CONFIG_PTHREAD_SETNAME_NP_WO_TID', cc.links(gnu_source_prefix + '''
#include <pthread.h>
static void *f(void *p) { pthread_setname_np("QEMU"); return NULL; }
@@ -1668,8 +1673,10 @@ config_host_data.set('HAVE_MLOCKALL', cc.links(gnu_source_prefix + '''
have_l2tpv3 = false
if not get_option('l2tpv3').disabled() and have_system
- have_l2tpv3 = (cc.has_header_symbol('sys/socket.h', 'struct mmsghdr')
- and cc.has_header('linux/ip.h'))
+ have_l2tpv3 = cc.has_type('struct mmsghdr',
+ prefix: gnu_source_prefix + '''
+ #include <sys/socket.h>
+ #include <linux/ip.h>''')
endif
config_host_data.set('CONFIG_L2TPV3', have_l2tpv3)
@@ -1695,7 +1702,7 @@ config_host_data.set('CONFIG_NETMAP', have_netmap)
# xfs headers will not try to redefine structs from linux headers
# if this macro is set.
config_host_data.set('HAVE_FSXATTR', cc.links('''
- #include <linux/fs.h>'
+ #include <linux/fs.h>
struct fsxattr foo;
int main(void) {
return 0;