Commits:
-
9723b888
by Alan Coopersmith at 2023-03-08T14:49:08-08:00
configure: Use LT_INIT from libtool 2 instead of deprecated AC_PROG_LIBTOOL
AC_PROG_LIBTOOL was replaced by LT_INIT in libtool 2 in 2008,
so it's time to rely on it.
Clears autoconf warnings:
configure.ac:13: warning: The macro `AC_PROG_LIBTOOL' is obsolete.
configure.ac:13: You should run autoupdate.
aclocal.m4:3465: AC_PROG_LIBTOOL is expanded from...
configure.ac:13: the top level
libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac,
libtoolize: and rerunning libtoolize and aclocal.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
0c5b1907
by Alan Coopersmith at 2023-03-08T14:50:43-08:00
configure: replace deprecated AC_HELP_STRING with AS_HELP_STRING
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
042a1cf3
by Alan Coopersmith at 2023-12-02T12:26:28-08:00
configure: replace deprecated AC_TRY_COMPILE with AC_COMPILE_IFELSE
Clears autoconf warnings:
configure.ac:127: warning: The macro 'AC_TRY_COMPILE' is obsolete.
configure.ac:127: You should run autoupdate.
./lib/autoconf/general.m4:2845: AC_TRY_COMPILE is expanded from...
configure.ac:127: the top level
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
4fca45a7
by Thomas Devoogdt at 2024-04-05T10:45:15+02:00
src/xshmfence_futex.h: fix build on 32-bit architectures using 64-bit time_t
Fix the following build failure on 32-bit architectures using 64-bit
time_t (e.g. riscv32):
xshmfence_futex.h: In function 'sys_futex':
xshmfence_futex.h:58:24: error: 'SYS_futex' undeclared (first use in this function); did you mean 'sys_futex'?
58 | return syscall(SYS_futex, addr1, op, val1, timeout, addr2, val3);
| ^~~~~~~~~
| sys_futex
Similar to:
https://gitlab.freedesktop.org/mesa/mesa/-/commit/7d87478124061915582412ba410759afe863d679
Fixes:
https://gitlab.com/buildroot.org/buildroot/-/commit/e39ad96136a8c340b3aea6b036024e28f14584f3
Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxshmfence/-/merge_requests/8>
-
3aaf46a2
by Asahi Lina at 2024-10-22T22:28:19+09:00
alloc: Allow disabling memfd usage at runtime with XSHMFENCE_NO_MEMFD=1
For thin VMs used for compatibility reasons, it is desirable to directly
proxy the X11 protocol between an application running in a VM and an X
server running on the host. We can proxy futex wakeups with some watcher
code, but we need the futex memory itself to be shared. This works when
/dev/shm is mounted with virtiofs with DAX, but cannot work for memfds.
Add a XSHMFENCE_NO_MEMFD environment variable that, when set, disables
the memfd codepath and falls back to /dev/shm.
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxshmfence/-/merge_requests/9>
-
89f06474
by Alan Coopersmith at 2024-12-13T18:00:57-08:00
libxshmfence 1.3.3
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
478bf7c2
by Timo Aaltonen at 2025-03-25T15:19:08+02:00
Merge branch 'upstream-unstable' into debian-unstable
-
15907919
by Timo Aaltonen at 2025-03-25T15:25:49+02:00
control, rules: Migrate to debhelper-compat 13.
-
be0e0982
by Timo Aaltonen at 2025-03-25T15:27:30+02:00
control: Migrate to pkgconf.
-
9584d8a6
by Timo Aaltonen at 2025-03-25T15:28:19+02:00
control: Bump policy to 4.7.2
-
41b62347
by Timo Aaltonen at 2025-03-25T15:28:24+02:00
releasing package libxshmfence version 1.3.3-1
8 changed files:
Changes:
configure.ac
... |
... |
@@ -23,19 +23,23 @@ dnl |
23
|
23
|
dnl Process this file with autoconf to create configure.
|
24
|
24
|
|
25
|
25
|
AC_PREREQ([2.60])
|
26
|
|
-AC_INIT([libxshmfence], [1.3.2],
|
|
26
|
+AC_INIT([libxshmfence], [1.3.3],
|
27
|
27
|
[https://gitlab.freedesktop.org/xorg/lib/libxshmfence/-/issues],
|
28
|
28
|
[libxshmfence])
|
29
|
29
|
AC_CONFIG_SRCDIR([Makefile.am])
|
30
|
30
|
AC_CONFIG_HEADERS([config.h])
|
|
31
|
+AC_CONFIG_MACRO_DIRS([m4])
|
31
|
32
|
|
|
33
|
+# Set common system defines for POSIX extensions, such as _GNU_SOURCE
|
|
34
|
+# Must be called before any macros that run the compiler (like LT_INIT
|
|
35
|
+# or XORG_DEFAULT_OPTIONS) to avoid autoconf errors.
|
32
|
36
|
AC_USE_SYSTEM_EXTENSIONS
|
33
|
37
|
|
34
|
38
|
# Initialize Automake
|
35
|
39
|
AM_INIT_AUTOMAKE([foreign dist-xz])
|
36
|
40
|
|
37
|
41
|
# Initialize libtool
|
38
|
|
-AC_PROG_LIBTOOL
|
|
42
|
+LT_INIT
|
39
|
43
|
|
40
|
44
|
# Require xorg-macros: XORG_DEFAULT_OPTIONS, XORG_WITH_LINT
|
41
|
45
|
m4_ifndef([XORG_MACROS_VERSION],
|
... |
... |
@@ -100,7 +104,7 @@ AC_CHECK_DECLS([__NR_memfd_create], [], [], [[#include <asm/unistd.h>]]) |
100
|
104
|
|
101
|
105
|
AC_CHECK_HEADERS([sys/memfd.h], [AC_DEFINE([HAVE_MEMFD_H], 1, [Has sys/memfd.h header])])
|
102
|
106
|
|
103
|
|
-AC_ARG_ENABLE(visibility, AC_HELP_STRING([--enable-visibility], [Enable symbol visibility (default: auto)]),
|
|
107
|
+AC_ARG_ENABLE(visibility, AS_HELP_STRING([--enable-visibility], [Enable symbol visibility (default: auto)]),
|
104
|
108
|
[SYMBOL_VISIBILITY=$enableval],
|
105
|
109
|
[SYMBOL_VISIBILITY=auto])
|
106
|
110
|
|
... |
... |
@@ -120,15 +124,15 @@ if test x$SYMBOL_VISIBILITY != xno; then |
120
|
124
|
fi
|
121
|
125
|
fi
|
122
|
126
|
if test x$have_visibility != xno; then
|
123
|
|
- AC_TRY_COMPILE(
|
124
|
|
- [#include <X11/Xfuncproto.h>
|
|
127
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
|
|
128
|
+ [[#include <X11/Xfuncproto.h>
|
125
|
129
|
extern _X_HIDDEN int hidden_int;
|
126
|
130
|
extern _X_EXPORT int public_int;
|
127
|
131
|
extern _X_HIDDEN int hidden_int_func(void);
|
128
|
|
- extern _X_EXPORT int public_int_func(void);],
|
129
|
|
- [],
|
130
|
|
- have_visibility=yes,
|
131
|
|
- have_visibility=no)
|
|
132
|
+ extern _X_EXPORT int public_int_func(void);]],
|
|
133
|
+ [[]])],
|
|
134
|
+ [have_visibility=yes],
|
|
135
|
+ [have_visibility=no])
|
132
|
136
|
fi
|
133
|
137
|
AC_MSG_RESULT([$have_visibility])
|
134
|
138
|
if test x$have_visibility != xno; then
|
debian/changelog
|
1
|
+libxshmfence (1.3.3-1) unstable; urgency=medium
|
|
2
|
+
|
|
3
|
+ * New upstream release.
|
|
4
|
+ * control, rules: Migrate to debhelper-compat 13.
|
|
5
|
+ * control: Migrate to pkgconf.
|
|
6
|
+ * control: Bump policy to 4.7.2
|
|
7
|
+
|
|
8
|
+ -- Timo Aaltonen <tjaalton@debian.org> Tue, 25 Mar 2025 15:28:20 +0200
|
|
9
|
+
|
1
|
10
|
libxshmfence (1.3.2-1) unstable; urgency=medium
|
2
|
11
|
|
3
|
12
|
[ Timo Aaltonen ]
|
debian/compat
deleted
debian/control
... |
... |
@@ -3,13 +3,12 @@ Section: libs |
3
|
3
|
Priority: optional
|
4
|
4
|
Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
|
5
|
5
|
Build-Depends:
|
6
|
|
- debhelper (>= 9),
|
7
|
|
- dh-autoreconf,
|
|
6
|
+ debhelper-compat (= 13),
|
8
|
7
|
quilt,
|
9
|
8
|
xutils-dev,
|
10
|
9
|
x11proto-dev,
|
11
|
|
- pkg-config,
|
12
|
|
-Standards-Version: 3.9.4
|
|
10
|
+ pkgconf,
|
|
11
|
+Standards-Version: 4.7.2
|
13
|
12
|
Vcs-Git: https://salsa.debian.org/xorg-team/lib/libxshmfence.git
|
14
|
13
|
Vcs-Browser: https://salsa.debian.org/xorg-team/lib/libxshmfence
|
15
|
14
|
Homepage: https://gitlab.freedesktop.org/xorg/lib/libxshmfence
|
debian/not-installed
debian/rules
... |
... |
@@ -10,14 +10,11 @@ SHMDIR = /tmp |
10
|
10
|
endif
|
11
|
11
|
|
12
|
12
|
%:
|
13
|
|
- dh $@ --with quilt,autoreconf --builddirectory=build/ --parallel
|
|
13
|
+ dh $@ --with quilt --builddirectory=build/
|
14
|
14
|
|
15
|
15
|
override_dh_makeshlibs:
|
16
|
16
|
dh_makeshlibs --add-udeb=libxshmfence1-udeb -- -c4
|
17
|
17
|
|
18
|
|
-override_dh_install:
|
19
|
|
- dh_install --fail-missing -X.la
|
20
|
|
-
|
21
|
18
|
override_dh_auto_configure:
|
22
|
19
|
dh_auto_configure -- \
|
23
|
20
|
--disable-silent-rules \
|
src/xshmfence_alloc.c
... |
... |
@@ -69,13 +69,22 @@ int |
69
|
69
|
xshmfence_alloc_shm(void)
|
70
|
70
|
{
|
71
|
71
|
char template[] = SHMDIR "/shmfd-XXXXXX";
|
72
|
|
- int fd;
|
|
72
|
+ int fd = -1;
|
73
|
73
|
#ifndef HAVE_MKOSTEMP
|
74
|
74
|
int flags;
|
75
|
75
|
#endif
|
76
|
76
|
|
77
|
77
|
#if HAVE_MEMFD_CREATE
|
78
|
|
- fd = memfd_create("xshmfence", MFD_CLOEXEC|MFD_ALLOW_SEALING);
|
|
78
|
+ static int disable_memfd = -1;
|
|
79
|
+
|
|
80
|
+ if (disable_memfd == -1) {
|
|
81
|
+ const char *val = getenv("XSHMFENCE_NO_MEMFD");
|
|
82
|
+ disable_memfd = val ? !!atoi(val) : 0;
|
|
83
|
+ }
|
|
84
|
+
|
|
85
|
+ if (disable_memfd <= 0)
|
|
86
|
+ fd = memfd_create("xshmfence", MFD_CLOEXEC|MFD_ALLOW_SEALING);
|
|
87
|
+
|
79
|
88
|
if (fd < 0)
|
80
|
89
|
#endif
|
81
|
90
|
#ifdef SHM_ANON
|
src/xshmfence_futex.h
... |
... |
@@ -53,6 +53,10 @@ static inline int futex_wait(int32_t *addr, int32_t value) { |
53
|
53
|
#include <sys/time.h>
|
54
|
54
|
#include <sys/syscall.h>
|
55
|
55
|
|
|
56
|
+#ifndef SYS_futex
|
|
57
|
+#define SYS_futex SYS_futex_time64
|
|
58
|
+#endif
|
|
59
|
+
|
56
|
60
|
static inline long sys_futex(void *addr1, int op, int val1, struct timespec *timeout, void *addr2, int val3)
|
57
|
61
|
{
|
58
|
62
|
return syscall(SYS_futex, addr1, op, val1, timeout, addr2, val3);
|
|