fix: fix build with clang-16

Replace `-fsanitize=memtag` with `-fstanitize=memtag-stack` because
`-fsanitize=memtag` implies `-fsanitize=memtag-global`, which is only
supported on Android targets (see
https://developer.arm.com/documentation/101754/0622/armclang-Reference/armclang-Command-line-Options/-fsanitize---fno-sanitize).

Remove `noreturn` qualifier from function pointer type. It is not
accepted on function pointers from clang-16 onwards (see
https://releases.llvm.org/16.0.0/tools/clang/docs/ReleaseNotes.html#bug-fixes-to-attribute-support).

Change-Id: I47cd04c662b3b2956d584b32f13d29dd7a57c3e6
Signed-off-by: Karl Meakin <karl.meakin@arm.com>
diff --git a/build/toolchain/embedded.gni b/build/toolchain/embedded.gni
index a94747a..3a931aa 100644
--- a/build/toolchain/embedded.gni
+++ b/build/toolchain/embedded.gni
@@ -325,7 +325,7 @@
       extra_defines += " -DENABLE_MTE=${toolchain_args.enable_mte}"
       if (toolchain_args.enable_mte == "1") {
         extra_cflags += "+memtag"
-        extra_cflags += " -fsanitize=memtag"
+        extra_cflags += " -fsanitize=memtag-stack"
       }
     }
   }
@@ -335,8 +335,7 @@
   aarch64_common_toolchain("${target_name}") {
     forward_variables_from(invoker, "*")
     target = "aarch64-none-eabi"
-    tool_prefix = "aarch64-linux-gnu-"  # TODO: this isn't right for bare metal
-                                        # but it works.
+    tool_prefix = "aarch64-linux-gnu-"
     platform_name = target_name
   }
 }
diff --git a/docs/getting_started/prerequisites.rst b/docs/getting_started/prerequisites.rst
index 5fd04ac..2b1f3f4 100644
--- a/docs/getting_started/prerequisites.rst
+++ b/docs/getting_started/prerequisites.rst
@@ -17,13 +17,13 @@
 
 .. code:: shell
 
-   https://github.com/llvm/llvm-project/releases/download/llvmorg-15.0.6/clang+llvm-15.0.6-x86_64-linux-gnu-ubuntu-18.04.tar.xz
+   https://github.com/llvm/llvm-project/releases/download/llvmorg-16.0.4/clang+llvm-16.0.4-x86_64-linux-gnu-ubuntu-22.04.tar.xz
 
 - For a AArch64 Ubuntu host,
 
 .. code:: shell
 
-   https://github.com/llvm/llvm-project/releases/download/llvmorg-15.0.6/clang+llvm-15.0.6-aarch64-linux-gnu.tar.xz
+   https://github.com/llvm/llvm-project/releases/download/llvmorg-16.0.4/clang+llvm-16.0.4-aarch64-linux-gnu.tar.xz
 
 .. note::
 
@@ -39,7 +39,7 @@
 
 .. code:: shell
 
-   PATH=<toolchain_dir>/clang+llvm-15.0.6-x86_64-linux-gnu-ubuntu-18.04/bin:$PATH
+   PATH=<toolchain_dir>/clang+llvm-16.0.4-x86_64-linux-gnu-ubuntu-22.04/bin:$PATH
 
 Dependencies
 ------------
@@ -101,4 +101,3 @@
 .. _Sphinx: http://www.sphinx-doc.org/en/master/
 .. _Poetry: https://python-poetry.org/docs/
 .. _pip: https://pip.pypa.io/en/stable/
-
diff --git a/test/inc/test/hftest_impl.h b/test/inc/test/hftest_impl.h
index 6dc3c41..39e4c70 100644
--- a/test/inc/test/hftest_impl.h
+++ b/test/inc/test/hftest_impl.h
@@ -147,7 +147,7 @@
 /* Context for tests. */
 struct hftest_context {
 	uint32_t failures;
-	noreturn void (*abort)(void);
+	void (*abort)(void);
 
 	/* These are used in primary VMs. */
 	const struct fdt *fdt;