about summary refs log tree commit diff
path: root/configure.ac
diff options
context:
space:
mode:
authorRichard Earnshaw <Richard.Earnshaw@arm.com>2020-12-21 15:03:03 +0000
committerRichard Earnshaw <rearnsha@arm.com>2020-12-21 15:25:25 +0000
commit3378408987189772eec7bc62fc9923a6f01dc63c (patch)
tree91852b072e2b766bfc63ab738424c70d3ee92d3d /configure.ac
parentd552058570ea2c00fb88b4621be3285cda03033f (diff)
downloadglibc-3378408987189772eec7bc62fc9923a6f01dc63c.tar.gz
glibc-3378408987189772eec7bc62fc9923a6f01dc63c.tar.xz
glibc-3378408987189772eec7bc62fc9923a6f01dc63c.zip
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.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac15
1 files changed, 15 insertions, 0 deletions
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]),