Skip to content

Commit f806db0

Browse files
authored
[ATFE] Add note on header resolution issues when bypassing multilib with --sysroot. (#458)
1 parent 2bce241 commit f806db0

File tree

1 file changed

+3
-23
lines changed

1 file changed

+3
-23
lines changed

arm-software/embedded/README.md

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -143,30 +143,10 @@ To display the directory selected by the multilib system, add the flag
143143
To display all available multilibs run `clang` with the flag `-print-multi-lib`
144144
and a target triple like `--target=aarch64-none-elf` or `--target=arm-none-eabi`.
145145

146-
It's possible that `clang` will choose a set of libraries that are not the ones
147-
you want to use. In this case you can bypass the multilib system by providing a
148-
`--sysroot` option specifying the directory containing the `include` and `lib`
149-
directories of the libraries you want to use. For example:
150-
151-
```
152-
$ clang \
153-
--sysroot=<install-dir>/ATfE-<revision>/lib/clang-runtimes/arm-none-eabi/armv6m_soft_nofp \
154-
--target=armv6m-none-eabi \
155-
-mfpu=none \
156-
-fno-exceptions \
157-
-fno-rtti \
158-
-nostartfiles \
159-
-lcrt0-semihost \
160-
-lsemihost \
161-
-T picolibc.ld \
162-
-o example example.c
163-
```
164-
165146
> [!WARNING]
166-
> The naming convention for the library variant directories is an
167-
> implementation detail that can change between releases without notice,
168-
> thus it is best not to depend on specific library variant names in your
169-
> project build scripts.
147+
> `--sysroot` is not a substitute for multilib selection
148+
> The `--sysroot` option cannot be used to override multilib logic
149+
> or manually select an arbitrary library variant.
170150
171151
The FPU selection can be skipped, but it is not recommended to as the defaults
172152
are different to GCC ones.

0 commit comments

Comments
 (0)