xserver: Branch 'master' - 5 commits
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Apr 9 11:24:52 UTC 2021
include/meson.build | 260 ++++++++++++++++++++++++++--------------------------
os/meson.build | 26 +++--
test/meson.build | 5 -
3 files changed, 151 insertions(+), 140 deletions(-)
New commits:
commit d231ce2d9ce9644e77e8dbe8c5a23eeb11e85b55
Author: Povilas Kanapickas <povilas at radix.lt>
Date: Wed Apr 7 22:16:43 2021 +0300
meson: Disable LTO for tests
`-flto=auto` together with `-Wl,-wrap` causes link errors at least in
certain compilers (e.g. GCC 10.2.0). Since this is reoccurring issue
(internet search shows similar problems with GCC 4.6 a decade ago) let's
disable LTO for tests even if it's disabled elsewhere.
Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1116
Signed-off-by: Povilas Kanapickas <povilas at radix.lt>
diff --git a/test/meson.build b/test/meson.build
index f1ab2576a..91ea15723 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -144,7 +144,10 @@ if build_xorg
unit_defines += ['-DRES_TESTS']
endif
+ unit_c_args = unit_defines
if meson.get_compiler('c').has_link_argument('-Wl,-wrap')
+ # LTO breaks with -Wl,-wrap on certain configurations
+ unit_c_args += ['-fno-lto']
unit_sources += [
'xi1/protocol-xchangedevicecontrol.c',
'xi2/protocol-common.c',
@@ -178,7 +181,7 @@ if build_xorg
unit = executable('tests',
unit_sources,
- c_args: unit_defines,
+ c_args: unit_c_args,
dependencies: [pixman_dep, randrproto_dep, inputproto_dep],
include_directories: unit_includes,
link_args: ldwraps,
commit 68c2cfadd6d31f0787bc35dbafe32d7dfd638e27
Author: Povilas Kanapickas <povilas at radix.lt>
Date: Mon Apr 5 16:24:47 2021 +0300
meson: Make sure defines are either set to 1 or not defined
This will make the behavior of meson consistent with autotools. The
configuration macros are exposed to public headers so any inconsistency
is likely to break code for anyone who's not careful to use #ifdef
instead of #if.
Signed-off-by: Povilas Kanapickas <povilas at radix.lt>
diff --git a/include/meson.build b/include/meson.build
index e41d2f6cf..b92796f31 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -14,7 +14,7 @@ conf_data.set('_DIX_CONFIG_H_', '1')
conf_data.set('HAVE_TYPEOF', cc.compiles('''
int foo(int bar) { typeof(bar) baz = 1; return baz; }
''',
- name: 'typeof()'))
+ name: 'typeof()') ? '1' : false)
conf_data.set('MONOTONIC_CLOCK', cc.has_function('clock_gettime') and
cc.compiles('''
@@ -25,9 +25,9 @@ cc.compiles('''
#error CLOCK_MONOTONIC not defined
#endif
''',
- name: 'CLOCK_MONOTONIC'))
+ name: 'CLOCK_MONOTONIC') ? '1' : false)
-conf_data.set('XSERVER_DTRACE', with_dtrace)
+conf_data.set('XSERVER_DTRACE', with_dtrace ? '1' : false)
if host_machine.endian() == 'little'
conf_data.set('X_BYTE_ORDER', 'X_LITTLE_ENDIAN')
@@ -46,7 +46,7 @@ conf_data.set('_GNU_SOURCE', '1')
# autoconf checks for /dev/xf86 here, but the test should be based on
# the target, not the build system. Could we get rid of this and just
# ifdef for openbsd?
-conf_data.set('HAS_APERTURE_DRV', host_machine.system() == 'openbsd')
+conf_data.set('HAS_APERTURE_DRV', host_machine.system() == 'openbsd' ? '1' : false)
if get_option('input_thread') == 'false'
enable_input_thread = false
@@ -78,30 +78,30 @@ elif cc.compiles('''
conf_data.set('HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID', 1)
endif
-conf_data.set('HAVE_LIBBSD', libbsd_dep.found())
+conf_data.set('HAVE_LIBBSD', libbsd_dep.found() ? '1' : false)
# Note: this symbol is used by libXtrans.
-conf_data.set('HAVE_SYSTEMD_DAEMON', libsystemd_daemon_dep.found())
-conf_data.set('CONFIG_UDEV', build_udev)
-conf_data.set('CONFIG_UDEV_KMS', build_udev_kms)
-conf_data.set('HAVE_DBUS', build_dbus)
-conf_data.set('CONFIG_HAL', build_hal)
-conf_data.set('SYSTEMD_LOGIND', build_systemd_logind)
-conf_data.set('NEED_DBUS', build_systemd_logind or build_hal)
-conf_data.set('CONFIG_WSCONS', host_machine.system() == 'openbsd')
-
-conf_data.set('HAVE_XSHMFENCE', xshmfence_dep.found())
-conf_data.set('WITH_LIBDRM', libdrm_required)
+conf_data.set('HAVE_SYSTEMD_DAEMON', libsystemd_daemon_dep.found() ? '1' : false)
+conf_data.set('CONFIG_UDEV', build_udev ? '1' : false)
+conf_data.set('CONFIG_UDEV_KMS', build_udev_kms ? '1' : false)
+conf_data.set('HAVE_DBUS', build_dbus ? '1' : false)
+conf_data.set('CONFIG_HAL', build_hal ? '1' : false)
+conf_data.set('SYSTEMD_LOGIND', build_systemd_logind ? '1' : false)
+conf_data.set('NEED_DBUS', build_systemd_logind or build_hal ? '1' : false)
+conf_data.set('CONFIG_WSCONS', host_machine.system() == 'openbsd' ? '1' : false)
+
+conf_data.set('HAVE_XSHMFENCE', xshmfence_dep.found() ? '1' : false)
+conf_data.set('WITH_LIBDRM', libdrm_required ? '1' : false)
conf_data.set('GLAMOR_HAS_EGL_QUERY_DMABUF',
- epoxy_dep.found() and epoxy_dep.version().version_compare('>= 1.4.4'))
+ epoxy_dep.found() and epoxy_dep.version().version_compare('>= 1.4.4') ? '1' : false)
conf_data.set('GLAMOR_HAS_EGL_QUERY_DRIVER',
- epoxy_dep.found() and epoxy_dep.version().version_compare('>= 1.5.4'))
-conf_data.set('GLXEXT', build_glx)
-conf_data.set('GLAMOR', build_glamor)
-conf_data.set('GLAMOR_HAS_GBM', gbm_dep.found())
+ epoxy_dep.found() and epoxy_dep.version().version_compare('>= 1.5.4') ? '1' : false)
+conf_data.set('GLXEXT', build_glx ? '1' : false)
+conf_data.set('GLAMOR', build_glamor ? '1' : false)
+conf_data.set('GLAMOR_HAS_GBM', gbm_dep.found() ? '1' : false)
conf_data.set('GLAMOR_HAS_GBM_LINEAR',
- build_glamor and gbm_dep.found() and gbm_dep.version().version_compare('>= 10.6'))
+ build_glamor and gbm_dep.found() and gbm_dep.version().version_compare('>= 10.6') ? '1' : false)
conf_data.set('GBM_BO_WITH_MODIFIERS',
- build_glamor and gbm_dep.found() and gbm_dep.version().version_compare('>= 17.1'))
+ build_glamor and gbm_dep.found() and gbm_dep.version().version_compare('>= 17.1') ? '1' : false)
conf_data.set_quoted('SERVER_MISC_CONFIG_PATH', serverconfigdir)
conf_data.set_quoted('PROJECTROOT', get_option('prefix'))
@@ -111,59 +111,59 @@ conf_data.set_quoted('COMPILEDDEFAULTFONTPATH', default_font_path)
conf_data.set('XORG_VERSION_CURRENT', release)
-conf_data.set('HASXDMAUTH', has_xdm_auth)
-conf_data.set('SECURE_RPC', get_option('secure-rpc'))
-
-conf_data.set('HAVE_DLFCN_H', cc.has_header('dlfcn.h'))
-conf_data.set('HAVE_EXECINFO_H', cc.has_header('execinfo.h'))
-conf_data.set('HAVE_FCNTL_H', cc.has_header('fcntl.h'))
-conf_data.set('HAVE_FNMATCH_H', cc.has_header('fnmatch.h'))
-conf_data.set('HAVE_LINUX_AGPGART_H', cc.has_header('linux/agpgart.h'))
-conf_data.set('HAVE_STDLIB_H', cc.has_header('stdlib.h'))
-conf_data.set('HAVE_STRING_H', cc.has_header('string.h'))
-conf_data.set('HAVE_STRINGS_H', cc.has_header('strings.h'))
-conf_data.set('HAVE_SYS_AGPGART_H', cc.has_header('sys/agpgart.h'))
-conf_data.set('HAVE_SYS_AGPIO_H', cc.has_header('sys/agpio.h'))
-conf_data.set('HAVE_SYS_UTSNAME_H', cc.has_header('sys/utsname.h'))
-conf_data.set('HAVE_SYS_SYSMACROS_H', cc.has_header('sys/sysmacros.h'))
-conf_data.set('HAVE_UNISTD_H', cc.has_header('unistd.h'))
-
-conf_data.set('HAVE_ARC4RANDOM_BUF', cc.has_function('arc4random_buf', dependencies: libbsd_dep))
-conf_data.set('HAVE_BACKTRACE', cc.has_function('backtrace'))
-conf_data.set('HAVE_CBRT', cc.has_function('cbrt'))
-conf_data.set('HAVE_EPOLL_CREATE1', cc.has_function('epoll_create1'))
-conf_data.set('HAVE_GETUID', cc.has_function('getuid'))
-conf_data.set('HAVE_GETEUID', cc.has_function('geteuid'))
-conf_data.set('HAVE_ISASTREAM', cc.has_function('isastream'))
-conf_data.set('HAVE_ISSETUGID', cc.has_function('issetugid'))
-conf_data.set('HAVE_GETIFADDRS', cc.has_function('getifaddrs'))
-conf_data.set('HAVE_GETPEEREID', cc.has_function('getpeereid'))
-conf_data.set('HAVE_GETPEERUCRED', cc.has_function('getpeerucred'))
-conf_data.set('HAVE_GETPROGNAME', cc.has_function('getprogname'))
-conf_data.set('HAVE_GETZONEID', cc.has_function('getzoneid'))
-conf_data.set('HAVE_MEMFD_CREATE', cc.has_function('memfd_create'))
-conf_data.set('HAVE_MKOSTEMP', cc.has_function('mkostemp'))
-conf_data.set('HAVE_MMAP', cc.has_function('mmap'))
-conf_data.set('HAVE_POLL', cc.has_function('poll'))
-conf_data.set('HAVE_POLLSET_CREATE', cc.has_function('pollset_create'))
-conf_data.set('HAVE_POSIX_FALLOCATE', cc.has_function('posix_fallocate'))
-conf_data.set('HAVE_PORT_CREATE', cc.has_function('port_create'))
-conf_data.set('HAVE_REALLOCARRAY', cc.has_function('reallocarray', dependencies: libbsd_dep))
-conf_data.set('HAVE_SETEUID', cc.has_function('seteuid'))
-conf_data.set('HAVE_SETITIMER', cc.has_function('setitimer'))
-conf_data.set('HAVE_SHMCTL64', cc.has_function('shmctl64'))
-conf_data.set('HAVE_SIGACTION', cc.has_function('sigaction'))
-conf_data.set('HAVE_SIGPROCMASK', cc.has_function('sigprocmask'))
-conf_data.set('HAVE_STRCASECMP', cc.has_function('strcasecmp'))
-conf_data.set('HAVE_STRCASESTR', cc.has_function('strcasestr'))
-conf_data.set('HAVE_STRLCAT', cc.has_function('strlcat', dependencies: libbsd_dep))
-conf_data.set('HAVE_STRLCPY', cc.has_function('strlcpy', dependencies: libbsd_dep))
-conf_data.set('HAVE_STRNCASECMP', cc.has_function('strncasecmp'))
-conf_data.set('HAVE_STRNDUP', cc.has_function('strndup') and cc.has_header_symbol('string.h', 'strndup'))
-conf_data.set('HAVE_TIMINGSAFE_MEMCMP', cc.has_function('timingsafe_memcmp'))
-conf_data.set('HAVE_VASPRINTF', cc.has_function('vasprintf'))
-conf_data.set('HAVE_VSNPRINTF', cc.has_function('vsnprintf'))
-conf_data.set('HAVE_WALKCONTEXT', cc.has_function('walkcontext'))
+conf_data.set('HASXDMAUTH', has_xdm_auth ? '1' : false)
+conf_data.set('SECURE_RPC', get_option('secure-rpc') ? '1' : false)
+
+conf_data.set('HAVE_DLFCN_H', cc.has_header('dlfcn.h') ? '1' : false)
+conf_data.set('HAVE_EXECINFO_H', cc.has_header('execinfo.h') ? '1' : false)
+conf_data.set('HAVE_FCNTL_H', cc.has_header('fcntl.h') ? '1' : false)
+conf_data.set('HAVE_FNMATCH_H', cc.has_header('fnmatch.h') ? '1' : false)
+conf_data.set('HAVE_LINUX_AGPGART_H', cc.has_header('linux/agpgart.h') ? '1' : false)
+conf_data.set('HAVE_STDLIB_H', cc.has_header('stdlib.h') ? '1' : false)
+conf_data.set('HAVE_STRING_H', cc.has_header('string.h') ? '1' : false)
+conf_data.set('HAVE_STRINGS_H', cc.has_header('strings.h') ? '1' : false)
+conf_data.set('HAVE_SYS_AGPGART_H', cc.has_header('sys/agpgart.h') ? '1' : false)
+conf_data.set('HAVE_SYS_AGPIO_H', cc.has_header('sys/agpio.h') ? '1' : false)
+conf_data.set('HAVE_SYS_UTSNAME_H', cc.has_header('sys/utsname.h') ? '1' : false)
+conf_data.set('HAVE_SYS_SYSMACROS_H', cc.has_header('sys/sysmacros.h') ? '1' : false)
+conf_data.set('HAVE_UNISTD_H', cc.has_header('unistd.h') ? '1' : false)
+
+conf_data.set('HAVE_ARC4RANDOM_BUF', cc.has_function('arc4random_buf', dependencies: libbsd_dep) ? '1' : false)
+conf_data.set('HAVE_BACKTRACE', cc.has_function('backtrace') ? '1' : false)
+conf_data.set('HAVE_CBRT', cc.has_function('cbrt') ? '1' : false)
+conf_data.set('HAVE_EPOLL_CREATE1', cc.has_function('epoll_create1') ? '1' : false)
+conf_data.set('HAVE_GETUID', cc.has_function('getuid') ? '1' : false)
+conf_data.set('HAVE_GETEUID', cc.has_function('geteuid') ? '1' : false)
+conf_data.set('HAVE_ISASTREAM', cc.has_function('isastream') ? '1' : false)
+conf_data.set('HAVE_ISSETUGID', cc.has_function('issetugid') ? '1' : false)
+conf_data.set('HAVE_GETIFADDRS', cc.has_function('getifaddrs') ? '1' : false)
+conf_data.set('HAVE_GETPEEREID', cc.has_function('getpeereid') ? '1' : false)
+conf_data.set('HAVE_GETPEERUCRED', cc.has_function('getpeerucred') ? '1' : false)
+conf_data.set('HAVE_GETPROGNAME', cc.has_function('getprogname') ? '1' : false)
+conf_data.set('HAVE_GETZONEID', cc.has_function('getzoneid') ? '1' : false)
+conf_data.set('HAVE_MEMFD_CREATE', cc.has_function('memfd_create') ? '1' : false)
+conf_data.set('HAVE_MKOSTEMP', cc.has_function('mkostemp') ? '1' : false)
+conf_data.set('HAVE_MMAP', cc.has_function('mmap') ? '1' : false)
+conf_data.set('HAVE_POLL', cc.has_function('poll') ? '1' : false)
+conf_data.set('HAVE_POLLSET_CREATE', cc.has_function('pollset_create') ? '1' : false)
+conf_data.set('HAVE_POSIX_FALLOCATE', cc.has_function('posix_fallocate') ? '1' : false)
+conf_data.set('HAVE_PORT_CREATE', cc.has_function('port_create') ? '1' : false)
+conf_data.set('HAVE_REALLOCARRAY', cc.has_function('reallocarray', dependencies: libbsd_dep) ? '1' : false)
+conf_data.set('HAVE_SETEUID', cc.has_function('seteuid') ? '1' : false)
+conf_data.set('HAVE_SETITIMER', cc.has_function('setitimer') ? '1' : false)
+conf_data.set('HAVE_SHMCTL64', cc.has_function('shmctl64') ? '1' : false)
+conf_data.set('HAVE_SIGACTION', cc.has_function('sigaction') ? '1' : false)
+conf_data.set('HAVE_SIGPROCMASK', cc.has_function('sigprocmask') ? '1' : false)
+conf_data.set('HAVE_STRCASECMP', cc.has_function('strcasecmp') ? '1' : false)
+conf_data.set('HAVE_STRCASESTR', cc.has_function('strcasestr') ? '1' : false)
+conf_data.set('HAVE_STRLCAT', cc.has_function('strlcat', dependencies: libbsd_dep) ? '1' : false)
+conf_data.set('HAVE_STRLCPY', cc.has_function('strlcpy', dependencies: libbsd_dep) ? '1' : false)
+conf_data.set('HAVE_STRNCASECMP', cc.has_function('strncasecmp') ? '1' : false)
+conf_data.set('HAVE_STRNDUP', cc.has_function('strndup') and cc.has_header_symbol('string.h', 'strndup') ? '1' : false)
+conf_data.set('HAVE_TIMINGSAFE_MEMCMP', cc.has_function('timingsafe_memcmp') ? '1' : false)
+conf_data.set('HAVE_VASPRINTF', cc.has_function('vasprintf') ? '1' : false)
+conf_data.set('HAVE_VSNPRINTF', cc.has_function('vsnprintf') ? '1' : false)
+conf_data.set('HAVE_WALKCONTEXT', cc.has_function('walkcontext') ? '1' : false)
conf_data.set('BUSFAULT', conf_data.get('HAVE_SIGACTION'))
@@ -186,56 +186,56 @@ if not conf_data.get('HAVE_GETPEEREID') and not conf_data.get('HAVE_GETPEERUCRED
endif
conf_data.set('TCPCONN', '1')
-conf_data.set('UNIXCONN', host_machine.system() != 'windows')
-conf_data.set('IPv6', build_ipv6)
+conf_data.set('UNIXCONN', host_machine.system() != 'windows' ? '1' : false)
+conf_data.set('IPv6', build_ipv6 ? '1' : false)
conf_data.set('BIGREQS', '1')
conf_data.set('COMPOSITE', '1')
conf_data.set('DAMAGE', '1')
conf_data.set('DBE', '1')
-conf_data.set('DGA', build_dga)
-conf_data.set('DPMSExtension', build_dpms)
-conf_data.set('DRI2', build_dri2)
-conf_data.set('DRI3', build_dri3)
+conf_data.set('DGA', build_dga ? '1' : false)
+conf_data.set('DPMSExtension', build_dpms ? '1' : false)
+conf_data.set('DRI2', build_dri2 ? '1' : false)
+conf_data.set('DRI3', build_dri3 ? '1' : false)
if build_glx
conf_data.set_quoted('DRI_DRIVER_PATH', dri_dep.get_pkgconfig_variable('dridriverdir'))
endif
-conf_data.set('HAS_SHM', build_mitshm)
-conf_data.set('MITSHM', build_mitshm)
-conf_data.set('PANORAMIX', build_xinerama)
+conf_data.set('HAS_SHM', build_mitshm ? '1' : false)
+conf_data.set('MITSHM', build_mitshm ? '1' : false)
+conf_data.set('PANORAMIX', build_xinerama ? '1' : false)
conf_data.set('PRESENT', '1')
conf_data.set('RANDR', '1')
-conf_data.set('RES', build_res)
+conf_data.set('RES', build_res ? '1' : false)
conf_data.set('RENDER', '1')
-conf_data.set('SCREENSAVER', build_screensaver)
+conf_data.set('SCREENSAVER', build_screensaver ? '1' : false)
conf_data.set('SHAPE', '1')
-conf_data.set('XACE', build_xace)
+conf_data.set('XACE', build_xace ? '1' : false)
conf_data.set('XCMISC', '1')
-conf_data.set('XCSECURITY', build_xsecurity)
-conf_data.set('XDMCP', xdmcp_dep.found())
-conf_data.set('XF86BIGFONT', build_xf86bigfont)
-conf_data.set('XF86DRI', build_dri1)
+conf_data.set('XCSECURITY', build_xsecurity ? '1' : false)
+conf_data.set('XDMCP', xdmcp_dep.found() ? '1' : false)
+conf_data.set('XF86BIGFONT', build_xf86bigfont ? '1' : false)
+conf_data.set('XF86DRI', build_dri1 ? '1' : false)
conf_data.set('XF86VIDMODE', 1)
conf_data.set('XFIXES', '1')
-conf_data.set('XFreeXDGA', build_dga)
-conf_data.set('XINERAMA', build_xinerama)
+conf_data.set('XFreeXDGA', build_dga ? '1' : false)
+conf_data.set('XINERAMA', build_xinerama ? '1' : false)
conf_data.set('XINPUT', '1')
conf_data.set('XRECORD', '1')
-conf_data.set('XSELINUX', build_xselinux)
+conf_data.set('XSELINUX', build_xselinux ? '1' : false)
conf_data.set('XSYNC', '1')
conf_data.set('XTEST', '1')
-conf_data.set('XV', build_xv)
-conf_data.set('XvExtension', build_xv)
-conf_data.set('XvMCExtension', build_xvmc)
+conf_data.set('XV', build_xv ? '1' : false)
+conf_data.set('XvExtension', build_xv ? '1' : false)
+conf_data.set('XvMCExtension', build_xvmc ? '1' : false)
conf_data.set('HAVE_SHA1_IN_' + sha1.to_upper(), '1', description: 'Use @0@ SHA1 functions'.format(sha1))
conf_data.set('HAVE_LIBUNWIND', get_option('libunwind'))
-conf_data.set('HAVE_APM', build_apm or build_acpi)
-conf_data.set('HAVE_ACPI', build_acpi)
+conf_data.set('HAVE_APM', (build_apm or build_acpi) ? '1' : false)
+conf_data.set('HAVE_ACPI', build_acpi ? '1' : false)
enable_debugging = get_option('buildtype') == 'debug'
-conf_data.set('DEBUG', enable_debugging)
+conf_data.set('DEBUG', enable_debugging ? '1' : false)
conf_data.set_quoted('XVENDORNAME', get_option('vendor_name'))
conf_data.set_quoted('XVENDORNAMESHORT', get_option('vendor_name_short'))
@@ -244,7 +244,7 @@ conf_data.set_quoted('BUILDERADDR', get_option('builder_addr'))
conf_data.set_quoted('BUILDERSTRING', get_option('builder_string'))
if build_rootless
- conf_data.set('ROOTLESS', build_rootless)
+ conf_data.set('ROOTLESS', build_rootless ? '1' : false)
conf_data.set('ROOTLESS_WORKAROUND', 1)
conf_data.set('ROOTLESS_SAFEALPHA', 1)
endif
@@ -294,19 +294,19 @@ if host_machine.system() == 'darwin'
csrg_based = true
endif
-conf_data.set('SVR4', cc.compiles(defines_svr4))
+conf_data.set('SVR4', cc.compiles(defines_svr4) ? '1' : false)
conf_data.set_quoted('XKB_DFLT_RULES', get_option('xkb_default_rules'))
-conf_data.set('XORGSERVER', build_xorg)
+conf_data.set('XORGSERVER', build_xorg ? '1' : false)
conf_data.set_quoted('XCONFIGFILE', 'xorg.conf')
conf_data.set_quoted('__XSERVERNAME__', 'Xorg')
-conf_data.set('WITH_VGAHW', build_vgahw)
-conf_data.set('CSRG_BASED', csrg_based)
-conf_data.set('PCCONS_SUPPORT', supports_pccons)
-conf_data.set('PCVT_SUPPORT', supports_pcvt)
-conf_data.set('SYSCONS_SUPPORT', supports_syscons)
-conf_data.set('WSCONS_SUPPORT', supports_wscons)
-conf_data.set('XSERVER_LIBPCIACCESS', get_option('pciaccess'))
-conf_data.set('XSERVER_PLATFORM_BUS', build_udev_kms)
+conf_data.set('WITH_VGAHW', build_vgahw ? '1' : false)
+conf_data.set('CSRG_BASED', csrg_based ? '1' : false)
+conf_data.set('PCCONS_SUPPORT', supports_pccons ? '1' : false)
+conf_data.set('PCVT_SUPPORT', supports_pcvt ? '1' : false)
+conf_data.set('SYSCONS_SUPPORT', supports_syscons ? '1' : false)
+conf_data.set('WSCONS_SUPPORT', supports_wscons ? '1' : false)
+conf_data.set('XSERVER_LIBPCIACCESS', get_option('pciaccess') ? '1' : false)
+conf_data.set('XSERVER_PLATFORM_BUS', build_udev_kms ? '1' : false)
configure_file(output : 'dix-config.h',
configuration : conf_data)
@@ -354,28 +354,29 @@ xorg_data.set_quoted('DEFAULT_LOGPREFIX', 'Xorg.')
xorg_data.set_quoted('DEFAULT_MODULE_PATH', join_paths(get_option('prefix'), module_dir))
xorg_data.set_quoted('DEFAULT_LIBRARY_PATH', join_paths(get_option('prefix'), get_option('libdir')))
xorg_data.set_quoted('__XSERVERNAME__', 'Xorg')
-xorg_data.set('XSERVER_LIBPCIACCESS', get_option('pciaccess'))
+xorg_data.set('XSERVER_LIBPCIACCESS', get_option('pciaccess') ? '1' : false)
xorg_data.set_quoted('PCI_TXT_IDS_PATH', '')
-xorg_data.set('XSERVER_PLATFORM_BUS', build_udev_kms)
-xorg_data.set('WSCONS_SUPPORT', host_machine.system() == 'netbsd' or host_machine.system() == 'openbsd')
-xorg_data.set('HAVE_STROPTS_H', cc.has_header('stropts.h'))
-xorg_data.set('HAVE_SYS_KD_H', cc.has_header('sys/kd.h'))
-xorg_data.set('HAVE_SYS_VT_H', cc.has_header('sys/vt.h'))
+xorg_data.set('XSERVER_PLATFORM_BUS', build_udev_kms ? '1' : false)
+xorg_data.set('WSCONS_SUPPORT',
+ host_machine.system() == 'netbsd' or host_machine.system() == 'openbsd' ? '1' : false)
+xorg_data.set('HAVE_STROPTS_H', cc.has_header('stropts.h') ? '1' : false)
+xorg_data.set('HAVE_SYS_KD_H', cc.has_header('sys/kd.h') ? '1' : false)
+xorg_data.set('HAVE_SYS_VT_H', cc.has_header('sys/vt.h') ? '1' : false)
if host_machine.system() == 'freebsd' or host_machine.system() == 'dragonfly'
if host_machine.cpu_family() == 'x86' or host_machine.cpu_family() == 'x86_64'
- xorg_data.set('USE_DEV_IO', true)
+ xorg_data.set('USE_DEV_IO', '1')
endif
elif host_machine.system() == 'netbsd'
if host_machine.cpu_family() == 'x86' or host_machine.cpu_family() == 'x86_64'
- xorg_data.set('USE_I386_IOPL', true)
+ xorg_data.set('USE_I386_IOPL', '1')
endif
elif host_machine.system() == 'openbsd'
if host_machine.cpu_family() == 'x86'
- xorg_data.set('USE_I386_IOPL', true)
+ xorg_data.set('USE_I386_IOPL', '1')
endif
if host_machine.cpu_family() == 'x86_64'
- xorg_data.set('USE_AMD64_IOPL', true)
+ xorg_data.set('USE_AMD64_IOPL', '1')
endif
endif
@@ -385,9 +386,12 @@ configure_file(output : 'xorg-config.h',
xwin_data = configuration_data()
xwin_data.set_quoted('DEFAULT_LOGDIR', log_dir)
-xwin_data.set('HAS_WINSOCK', host_machine.system() == 'windows', description: 'Use Windows sockets')
-xwin_data.set('HAS_DEVWINDOWS', host_machine.system() == 'cygwin', description: 'Has /dev/windows for signaling new win32 messages')
-xwin_data.set('RELOCATE_PROJECTROOT', host_machine.system() == 'windows', description: 'Make paths relative to the xserver installation location')
+xwin_data.set('HAS_WINSOCK', host_machine.system() == 'windows' ? '1' : false,
+ description: 'Use Windows sockets')
+xwin_data.set('HAS_DEVWINDOWS', host_machine.system() == 'cygwin' ? '1' : false,
+ description: 'Has /dev/windows for signaling new win32 messages')
+xwin_data.set('RELOCATE_PROJECTROOT', host_machine.system() == 'windows' ? '1' : false,
+ description: 'Make paths relative to the xserver installation location')
# XXX: these three are all the same as DEBUG so we should just change to that
xwin_data.set10('CYGDEBUG', enable_debugging)
xwin_data.set10('CYGWINDOWING_DEBUG',enable_debugging)
@@ -398,8 +402,8 @@ configure_file(output : 'xwin-config.h',
configuration : xwin_data)
xwayland_data = configuration_data()
-xwayland_data.set('XWL_HAS_GLAMOR', build_glamor and (gbm_dep.found() or build_eglstream))
-xwayland_data.set('XWL_HAS_EGLSTREAM', build_eglstream)
+xwayland_data.set('XWL_HAS_GLAMOR', build_glamor and (gbm_dep.found() or build_eglstream) ? '1' : false)
+xwayland_data.set('XWL_HAS_EGLSTREAM', build_eglstream ? '1' : false)
configure_file(output : 'xwayland-config.h',
input : 'xwayland-config.h.meson.in',
diff --git a/os/meson.build b/os/meson.build
index 6594cee02..e1d2b697f 100644
--- a/os/meson.build
+++ b/os/meson.build
@@ -19,34 +19,34 @@ srcs_os = [
'log.c',
]
-# Wrapper code for missing C library functions
+# Wrapper code for missing C library functions. Note that conf_data contains either '1' or false.
srcs_libc = []
-if not conf_data.get('HAVE_REALLOCARRAY')
+if conf_data.get('HAVE_REALLOCARRAY') == false
srcs_libc += 'reallocarray.c'
endif
-if not conf_data.get('HAVE_STRCASECMP')
+if conf_data.get('HAVE_STRCASECMP') == false
srcs_libc += 'strcasecmp.c'
endif
-if not conf_data.get('HAVE_STRCASESTR')
+if conf_data.get('HAVE_STRCASESTR') == false
srcs_libc += 'strcasestr.c'
endif
-if not conf_data.get('HAVE_STRLCAT')
+if conf_data.get('HAVE_STRLCAT') == false
srcs_libc += 'strlcat.c'
endif
-if not conf_data.get('HAVE_STRLCPY')
+if conf_data.get('HAVE_STRLCPY') == false
srcs_libc += 'strlcpy.c'
endif
-if not conf_data.get('HAVE_STRNDUP')
+if conf_data.get('HAVE_STRNDUP') == false
srcs_libc += 'strndup.c'
endif
-if not conf_data.get('HAVE_TIMINGSAFE_MEMCMP')
+if conf_data.get('HAVE_TIMINGSAFE_MEMCMP') == false
srcs_libc += 'timingsafe_memcmp.c'
endif
-if not conf_data.get('HAVE_POLL')
+if conf_data.get('HAVE_POLL') == false
srcs_os += 'xserver_poll.c'
endif
-if conf_data.get('BUSFAULT')
+if conf_data.get('BUSFAULT') != false
srcs_os += 'busfault.c'
endif
commit faff5bbdf5dec53101a9d8f624f45262016154c1
Author: Povilas Kanapickas <povilas at radix.lt>
Date: Mon Apr 5 16:24:46 2021 +0300
meson: Sync the name of INPUTTHREAD conf macro with autotools build
The rest of dix code uses INPUTTHREAD, so having a different name in
meson configuration was an oversight.
Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/936
Signed-off-by: Povilas Kanapickas <povilas at radix.lt>
diff --git a/include/meson.build b/include/meson.build
index def96d103..e41d2f6cf 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -60,7 +60,7 @@ else
enable_input_thread = false
endif
endif
-conf_data.set('HAVE_INPUTTHREAD', enable_input_thread)
+conf_data.set('INPUTTHREAD', enable_input_thread ? '1' : false)
if cc.compiles('''
#define _GNU_SOURCE 1
commit b25795462f4754ec2e3c677a41dea33ed1be79da
Author: Povilas Kanapickas <povilas at radix.lt>
Date: Mon Apr 5 16:24:48 2021 +0300
meson: Add missing pthread dependency for libxserver_os library
Signed-off-by: Povilas Kanapickas <povilas at radix.lt>
diff --git a/os/meson.build b/os/meson.build
index 4f1099fc9..6594cee02 100644
--- a/os/meson.build
+++ b/os/meson.build
@@ -87,6 +87,10 @@ if srcs_libc.length() > 0
)
endif
+if enable_input_thread
+ os_dep += cc.find_library('pthread')
+endif
+
libxserver_os = static_library('libxserver_os',
srcs_os,
include_directories: inc,
commit 9582ef4efc72afa9f84b6469b5f81ce5dd8eb15d
Author: Povilas Kanapickas <povilas at radix.lt>
Date: Mon Apr 5 16:24:45 2021 +0300
meson: Fix typo in libxserver_os dependencies for openbsd
This has not been tested, but os_deps is not used anywhere in the file,
so it's likely this was a typo.
Signed-off-by: Povilas Kanapickas <povilas at radix.lt>
diff --git a/os/meson.build b/os/meson.build
index 337306bcd..4f1099fc9 100644
--- a/os/meson.build
+++ b/os/meson.build
@@ -72,7 +72,7 @@ if get_option('xres')
# Only the XRes extension cares about the client ID.
os_c_args += '-DCLIENTIDS'
if host_machine.system() == 'openbsd'
- os_deps += cc.find_library('kvm')
+ os_dep += cc.find_library('kvm')
endif
endif
More information about the xorg-commit
mailing list