diff options
author | 2021-10-13 21:27:59 +0000 | |
---|---|---|
committer | 2021-10-13 23:27:59 +0200 | |
commit | 2164412bb54087b1c540893acf5384ef9bf03f1d (patch) | |
tree | e56e687b9e9f782e9f2e1bb69bb77494c9e79d9a /configure.ac | |
parent | cleanup: move overlayfs code in separate module (diff) | |
download | firejail-2164412bb54087b1c540893acf5384ef9bf03f1d.tar.gz firejail-2164412bb54087b1c540893acf5384ef9bf03f1d.tar.zst firejail-2164412bb54087b1c540893acf5384ef9bf03f1d.zip |
build: allow building with sanitizer (#4594)
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 5fde6d402..fc5823143 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -45,6 +45,15 @@ AS_IF([test "x$enable_analyzer" = "xyes"], [ | |||
45 | EXTRA_CFLAGS="$EXTRA_CFLAGS -fanalyzer -Wno-analyzer-malloc-leak" | 45 | EXTRA_CFLAGS="$EXTRA_CFLAGS -fanalyzer -Wno-analyzer-malloc-leak" |
46 | ]) | 46 | ]) |
47 | 47 | ||
48 | AC_ARG_ENABLE([sanitizer], | ||
49 | AS_HELP_STRING([--enable-sanitizer=@<:@address | memory | undefined@:>@], [enable a compiler-based sanitizer (debug)]), [], [enable_sanitizer=no]) | ||
50 | AS_IF([test "x$enable_sanitizer" != "xno" ], | ||
51 | [AX_CHECK_COMPILE_FLAG([-fsanitize=$enable_sanitizer], [ | ||
52 | EXTRA_CFLAGS="$EXTRA_CFLAGS -fsanitize=$enable_sanitizer -fno-omit-frame-pointer" | ||
53 | EXTRA_LDFLAGS="$EXTRA_LDFLAGS -fsanitize=$enable_sanitizer" | ||
54 | ], [AC_MSG_ERROR([sanitizer not supported: $enable_sanitizer])] | ||
55 | )]) | ||
56 | |||
48 | HAVE_APPARMOR="" | 57 | HAVE_APPARMOR="" |
49 | AC_ARG_ENABLE([apparmor], | 58 | AC_ARG_ENABLE([apparmor], |
50 | AS_HELP_STRING([--enable-apparmor], [enable apparmor])) | 59 | AS_HELP_STRING([--enable-apparmor], [enable apparmor])) |