x11/modular-xorg-server: Work around kern/58149 on NetBSD/aarch64 9.* and 10.0 See also http://mail-index.netbsd.org/netbsd-users/2024/04/12/msg030915.htmldiff -r1.141 -r1.142 pkgsrc/x11/modular-xorg-server/Makefile
(pho)
@@ -1,17 +1,18 @@ | @@ -1,17 +1,18 @@ | |||
1 | # $NetBSD: Makefile,v 1.141 2023/12/13 07:45:07 wiz Exp $ | 1 | # $NetBSD: Makefile,v 1.142 2024/04/14 09:15:14 pho Exp $ | |
2 | 2 | |||
3 | DISTNAME= xorg-server-${XORG_VERSION} | 3 | DISTNAME= xorg-server-${XORG_VERSION} | |
4 | PKGNAME= modular-${DISTNAME} | 4 | PKGNAME= modular-${DISTNAME} | |
5 | PKGREVISION= 1 | |||
5 | 6 | |||
6 | MAINTAINER= pkgsrc-users@NetBSD.org | 7 | MAINTAINER= pkgsrc-users@NetBSD.org | |
7 | COMMENT= Modular X11 server from modular X.org | 8 | COMMENT= Modular X11 server from modular X.org | |
8 | 9 | |||
9 | SPECIAL_PERMS+= bin/Xorg ${SETUID_ROOT_PERMS} | 10 | SPECIAL_PERMS+= bin/Xorg ${SETUID_ROOT_PERMS} | |
10 | 11 | |||
11 | NOT_FOR_PLATFORM= Darwin-*-* | 12 | NOT_FOR_PLATFORM= Darwin-*-* | |
12 | 13 | |||
13 | .include "Makefile.common" | 14 | .include "Makefile.common" | |
14 | 15 | |||
15 | CONFIGURE_ARGS+= --enable-xorg | 16 | CONFIGURE_ARGS+= --enable-xorg | |
16 | CONFIGURE_ARGS+= --disable-xephyr | 17 | CONFIGURE_ARGS+= --disable-xephyr | |
17 | CONFIGURE_ARGS+= --disable-kdrive | 18 | CONFIGURE_ARGS+= --disable-kdrive |
# $NetBSD: hacks.mk,v 1.1 2024/04/14 09:15:14 pho Exp $
.if !defined(MODULAR_XORG_SERVER_HACKS_MK)
MODULAR_XORG_SERVER_HACKS_MK= defined
### [Tue Apr 9 13:40:46 JST 2024 : pho]
###
### With "smart scheduler" enabled, Xserver sets up an itimer to
### periodically receive SIGALRM from the kernel while the server is doing
### a socket I/O and processing commands from X clients. When the signal
### arrives while Xserver is in pixman_composite_src_8888_8888_asm_neon()
### or any similar functions from libpixman, the process fails to return
### from the signal handler and exits with status code 22 (EINVAL) due to
### kern/58149. These functions misalign SP while doing some SIMD stuff,
### thereby trigger the kernel bug.
###
### Disabling itimer can avoid the problem but there might be a performance
### regression.
###
.if ${MACHINE_PLATFORM:MNetBSD-9.*-aarch64} || \
${MACHINE_PLATFORM:MNetBSD-10.0-aarch64}
PKG_HACKS+= smart-scheduler-workaround
CONFIGURE_ENV+= ac_cv_func_setitimer=no
.endif
.endif # MODULAR_XORG_SERVER_HACKS_MK