From 3378408987189772eec7bc62fc9923a6f01dc63c Mon Sep 17 00:00:00 2001 From: Richard Earnshaw Date: Mon, 21 Dec 2020 15:03:03 +0000 Subject: config: Allow memory tagging to be enabled when configuring glibc This patch adds the configuration machinery to allow memory tagging to be enabled from the command line via the configure option --enable-memory-tagging. The current default is off, though in time we may change that once the API is more stable. --- configure.ac | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 93e68fb696..43cfac9d48 100644 --- a/configure.ac +++ b/configure.ac @@ -311,6 +311,21 @@ AC_ARG_ENABLE([experimental-malloc], [experimental_malloc=yes]) AC_SUBST(experimental_malloc) +AC_ARG_ENABLE([memory-tagging], + AC_HELP_STRING([--enable-memory-tagging], + [enable memory tagging if supported by the architecture @<:@default=no@:>@]), + [memory_tagging=$enableval], + [memory_tagging=no]) +if test "$memory_tagging" = yes; then + # Only enable this on architectures that support it. + case $host_cpu in + aarch64) + AC_DEFINE(USE_MTAG) + ;; + esac +fi +AC_SUBST(memory_tagging) + AC_ARG_ENABLE([crypt], AC_HELP_STRING([--disable-crypt], [do not build nor install the passphrase hashing library, libcrypt]), -- cgit 1.4.1