diff options
| author | Philipp Stephani | 2021-04-12 09:15:59 +0200 |
|---|---|---|
| committer | Philipp Stephani | 2021-04-12 09:15:59 +0200 |
| commit | 17d20bb3cbb233ed0d94c3f1f9f3db768f526223 (patch) | |
| tree | 551316e110c9443c5f96ec58c5cf0ab598cf311a /lib-src | |
| parent | c45bfd3c4abbfa585c9199f4866b6b8046945117 (diff) | |
| download | emacs-17d20bb3cbb233ed0d94c3f1f9f3db768f526223.tar.gz emacs-17d20bb3cbb233ed0d94c3f1f9f3db768f526223.zip | |
Generate Seccomp filters only if we have the necessary constants.
If we're missing SECCOMP_SET_MODE_FILTER, the seccomp-filter build
fails. Reuse the existing HAVE_SECCOMP configuration variable, which
checks for these macros.
* configure.ac (HAVE_SECCOMP): Substitute in Makefile.in.
* lib-src/Makefile.in (HAVE_SECCOMP): New variable.
(SECCOMP_FILTER): Define only if HAVE_SECCOMP.
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/Makefile.in | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in index 091f4fb0199..923d0cf5e72 100644 --- a/lib-src/Makefile.in +++ b/lib-src/Makefile.in | |||
| @@ -189,11 +189,13 @@ LIB_WSOCK32=@LIB_WSOCK32@ | |||
| 189 | ## Extra libraries for etags | 189 | ## Extra libraries for etags |
| 190 | LIBS_ETAGS = $(LIB_CLOCK_GETTIME) $(LIB_GETRANDOM) | 190 | LIBS_ETAGS = $(LIB_CLOCK_GETTIME) $(LIB_GETRANDOM) |
| 191 | 191 | ||
| 192 | HAVE_SECCOMP=@HAVE_SECCOMP@ | ||
| 192 | HAVE_LIBSECCOMP=@HAVE_LIBSECCOMP@ | 193 | HAVE_LIBSECCOMP=@HAVE_LIBSECCOMP@ |
| 193 | LIBSECCOMP_LIBS=@LIBSECCOMP_LIBS@ | 194 | LIBSECCOMP_LIBS=@LIBSECCOMP_LIBS@ |
| 194 | LIBSECCOMP_CFLAGS=@LIBSECCOMP_CFLAGS@ | 195 | LIBSECCOMP_CFLAGS=@LIBSECCOMP_CFLAGS@ |
| 195 | 196 | ||
| 196 | # Currently, we can only generate seccomp filter files for x86-64. | 197 | # Currently, we can only generate seccomp filter files for x86-64. |
| 198 | ifeq ($(HAVE_SECCOMP),yes) | ||
| 197 | ifeq ($(HAVE_LIBSECCOMP),yes) | 199 | ifeq ($(HAVE_LIBSECCOMP),yes) |
| 198 | ifeq ($(shell uname -m),x86_64) | 200 | ifeq ($(shell uname -m),x86_64) |
| 199 | # We require SECCOMP_RET_KILL_PROCESS, which is only available in | 201 | # We require SECCOMP_RET_KILL_PROCESS, which is only available in |
| @@ -205,6 +207,7 @@ SECCOMP_FILTER=1 | |||
| 205 | endif | 207 | endif |
| 206 | endif | 208 | endif |
| 207 | endif | 209 | endif |
| 210 | endif | ||
| 208 | 211 | ||
| 209 | ifeq ($(SECCOMP_FILTER),1) | 212 | ifeq ($(SECCOMP_FILTER),1) |
| 210 | DONT_INSTALL += seccomp-filter$(EXEEXT) | 213 | DONT_INSTALL += seccomp-filter$(EXEEXT) |