[PATCH xserver 02/10] meson: Add PIO access support for FreeBSD and NetBSD on Alpha.

Eric Anholt eric at anholt.net
Tue Aug 7 23:23:11 UTC 2018


Signed-off-by: Eric Anholt <eric at anholt.net>
---
 hw/xfree86/os-support/meson.build | 11 ++++++++++-
 include/meson.build               |  3 ---
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/hw/xfree86/os-support/meson.build b/hw/xfree86/os-support/meson.build
index 512bc8c1f951..49b138ed2dab 100644
--- a/hw/xfree86/os-support/meson.build
+++ b/hw/xfree86/os-support/meson.build
@@ -11,6 +11,9 @@ hdrs_xorg_os_support = [
     'xf86_OSproc.h'
 ]
 
+os_dep = []
+os_c_args = []
+
 if get_option('pciaccess')
     srcs_xorg_os_support += 'bus/Pci.c'
     if host_machine.system() != 'linux' and host_machine.system() != 'solaris'
@@ -108,6 +111,11 @@ elif host_machine.system().endswith('bsd')
         srcs_xorg_os_support += 'shared/ioperm_noop.c'
     elif host_machine.cpu_family() == 'alpha'
         srcs_xorg_os_support += 'bsd/alpha_video.c'
+        if host_machine.system() == 'freebsd'
+            os_dep += cc.find_library('io')
+        elif host_machine.system() == 'netbsd'
+            os_c_args += '-DUSE_ALPHA_PIO'
+        endif
     endif
 
     if host_machine.system() == 'freebsd'
@@ -145,8 +153,9 @@ xorg_os_support = static_library('xorg_os_support',
         common_dep,
         dbus_dep,
         libdrm_dep,
+        os_dep,
     ],
-    c_args: xorg_c_args,
+    c_args: xorg_c_args + os_c_args,
 )
 
 install_data(hdrs_xorg_os_support, install_dir: xorgsdkdir)
diff --git a/include/meson.build b/include/meson.build
index 678555692f6d..3548ac3c9b46 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -52,7 +52,6 @@ conf_data.set('_GNU_SOURCE', '1')
 # ifdef for openbsd?
 conf_data.set('HAS_APERTURE_DRV', host_machine.system() == 'openbsd')
 
-# XXX: USE_ALPHA_PIO and other bsd bits
 # XXX: FALLBACK_INPUT_DRIVER
 # XXX: BUNDLE_ID_PREFIX
 # XXX: HAVE_LIBDISPATCH
@@ -344,9 +343,7 @@ if host_machine.system() == 'freebsd' or host_machine.system() == 'dragonflybsd'
     if host_machine.cpu_family() == 'x86' or host_machine.cpu_family() == 'x86_64'
         xorg_data.set('USE_DEV_IO', true)
     endif
-    # XXX: Add link to libio on alpha
 elif host_machine.system() == 'netbsd'
-    # XXX: USE_ALPHA_PIO
     # XXX: Add link to libi386
     if host_machine.cpu_family() == 'x86' or host_machine.cpu_family() == 'x86_64'
         xorg_data.set('USE_I386_IOPL', true)
-- 
2.18.0



More information about the xorg-devel mailing list