aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorPhilipp Stephani2022-07-15 17:56:02 +0200
committerPhilipp Stephani2022-07-15 17:56:02 +0200
commitdb259d8fd369e6036df782d5fe51723a68220074 (patch)
tree7b411f9e7976c7dcbb7dbf1d1a6a4e5d1de0deb6 /lib-src
parent6a057155521229ab4621a81180fa238e498d7cf8 (diff)
downloademacs-db259d8fd369e6036df782d5fe51723a68220074.tar.gz
emacs-db259d8fd369e6036df782d5fe51723a68220074.zip
Build Seccomp filter only if we have a 64-bit userspace (Bug#56549)
* configure.ac (SIZEOF_LONG): New variable. * lib-src/Makefile.in (SIZEOF_LONG): New variable; added conditional.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/Makefile.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in
index 338ba0d5767..92487edce73 100644
--- a/lib-src/Makefile.in
+++ b/lib-src/Makefile.in
@@ -196,11 +196,13 @@ HAVE_SECCOMP=@HAVE_SECCOMP@
196HAVE_LIBSECCOMP=@HAVE_LIBSECCOMP@ 196HAVE_LIBSECCOMP=@HAVE_LIBSECCOMP@
197LIBSECCOMP_LIBS=@LIBSECCOMP_LIBS@ 197LIBSECCOMP_LIBS=@LIBSECCOMP_LIBS@
198LIBSECCOMP_CFLAGS=@LIBSECCOMP_CFLAGS@ 198LIBSECCOMP_CFLAGS=@LIBSECCOMP_CFLAGS@
199SIZEOF_LONG=@SIZEOF_LONG@
199 200
200# Currently, we can only generate seccomp filter files for x86-64. 201# Currently, we can only generate seccomp filter files for x86-64.
201ifeq ($(HAVE_SECCOMP),yes) 202ifeq ($(HAVE_SECCOMP),yes)
202ifeq ($(HAVE_LIBSECCOMP),yes) 203ifeq ($(HAVE_LIBSECCOMP),yes)
203ifeq ($(shell uname -m),x86_64) 204ifeq ($(shell uname -m),x86_64)
205ifeq ($(SIZEOF_LONG),8)
204# We require SECCOMP_RET_KILL_PROCESS, which is only available in 206# We require SECCOMP_RET_KILL_PROCESS, which is only available in
205# Linux 4.14 and later. 207# Linux 4.14 and later.
206ifeq ($(shell { echo 4.14; uname -r | cut -d . -f 1-2; } | \ 208ifeq ($(shell { echo 4.14; uname -r | cut -d . -f 1-2; } | \
@@ -211,6 +213,7 @@ endif
211endif 213endif
212endif 214endif
213endif 215endif
216endif
214 217
215ifeq ($(SECCOMP_FILTER),1) 218ifeq ($(SECCOMP_FILTER),1)
216DONT_INSTALL += seccomp-filter$(EXEEXT) 219DONT_INSTALL += seccomp-filter$(EXEEXT)