Skip to content

Commit 307b105

Browse files
committed
[ATFE] Document impact of COMPILER_RT_EXCLUDE_LIBC_PROVIDED_ARM_AEABI_BUILTINS flag (#431)
(cherry picked from commit 2347362)
1 parent ebbd629 commit 307b105

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

arm-software/embedded/docs/building-from-source.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,23 @@ The same build directory can be used for both native and MinGW toolchains.
149149
## Known limitations
150150
* Depending on the state of the sources, build errors may occur when
151151
the latest revisions of the llvm-project & picolibc repos are used.
152+
* Undefined `__aeabi_mem*` symbols with `-nostdlib`
153+
When the `COMPILER_RT_EXCLUDE_LIBC_PROVIDED_ARM_AEABI_BUILTINS` flag is enabled,
154+
the following ARM AEABI memory builtins are excluded from the ATFE `compiler-rt` build:
155+
```
156+
__aeabi_memcmp
157+
__aeabi_memset
158+
__aeabi_memcpy
159+
__aeabi_memmove
160+
```
161+
This flag `COMPILER_RT_EXCLUDE_LIBC_PROVIDED_ARM_AEABI_BUILTINS` is enabled by default when
162+
using picolibc and newlib as these functions are provided by the C library in both cases.
163+
However, if the toolchain is used with `-nostdlib` and the C library is not linked in, users relying
164+
solely on `compiler-rt` will have undefined symbol errors for these AEABI functions. To prevent the
165+
generation of thse AEABI function calls by the compiler, pass the following option to the compiler:
166+
```
167+
-meabi gnu
168+
```
152169

153170
## Divergences from upstream
154171

0 commit comments

Comments
 (0)