@@ -31,6 +31,10 @@ You will need:
3131 * The ``qemu-arm `` user mode emulator.
3232 * An ``arm-linux-gnueabihf `` sysroot.
3333
34+ .. note ::
35+ An existing sysroot is required because some of the builtins include C library
36+ headers and a sysroot is the easiest way to get those.
37+
3438In this example we will be using ``ninja `` as the build tool.
3539
3640See https://compiler-rt.llvm.org/ for information about the dependencies
@@ -238,7 +242,7 @@ but more difficult. The main problems are:
238242
239243* There is not a ``qemu-arm `` user-mode emulator for bare-metal systems.
240244 ``qemu-system-arm `` can be used but this is significantly more difficult
241- to setup.
245+ to setup. This document does not explain how to do this.
242246* The targets to compile compiler-rt have the suffix ``-none-eabi ``. This uses
243247 the BareMetal driver in clang and by default will not find the libraries
244248 needed to pass the cmake compiler check.
@@ -252,6 +256,12 @@ into a binary and execute the tests correctly but it will not catch if the
252256builtins use instructions that are supported on Armv7-A but not Armv6-M,
253257Armv7-M and Armv7E-M.
254258
259+ This requires a second ``arm-none-eabi `` toolchain for building the builtins.
260+ Using a bare-metal toolchain ensures that the target and C library details are
261+ specific to bare-metal instead of using Linux settings. This means that some
262+ tests may behave differently compared to real hardware, but at least the content
263+ of the builtins library is correct.
264+
255265Below is an example that builds the builtins for Armv7-M, but runs the tests
256266as Armv7-A. It is presented in full, but is very similar to the earlier
257267command for Armv7-A build and test::
0 commit comments