Skip to content

Commit 0cf8282

Browse files
committed
[ATFE] Add note on header resolution issues when bypassing multilib with --sysroot. (#458)
(cherry picked from commit f806db0)
1 parent 307b105 commit 0cf8282

File tree

1 file changed

+4
-18
lines changed

1 file changed

+4
-18
lines changed

arm-software/embedded/README.md

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

145-
It's possible that `clang` will choose a set of libraries that are not the ones
146-
you want to use. In this case you can bypass the multilib system by providing a
147-
`--sysroot` option specifying the directory containing the `include` and `lib`
148-
directories of the libraries you want to use. For example:
149-
150-
```
151-
$ clang \
152-
--sysroot=<install-dir>/ATfE-<revision>/lib/clang-runtimes/arm-none-eabi/armv6m_soft_nofp \
153-
--target=armv6m-none-eabi \
154-
-mfpu=none \
155-
-fno-exceptions \
156-
-fno-rtti \
157-
-nostartfiles \
158-
-lcrt0-semihost \
159-
-lsemihost \
160-
-T picolibc.ld \
161-
-o example example.c
162-
```
145+
> [!WARNING]
146+
> `--sysroot` is not a substitute for multilib selection.
147+
> The `--sysroot` option cannot be used to override multilib logic
148+
> or manually select an arbitrary library variant.
163149
164150
The FPU selection can be skipped, but it is not recommended to as the defaults
165151
are different to GCC ones.

0 commit comments

Comments
 (0)