Skip to content

Commit 9e50aa4

Browse files
authored
[ATFE] Document manual application of patches. (arm#202)
1 parent 7f035c3 commit 9e50aa4

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,17 @@ ninja llvm-toolchain
9696
```
9797

9898
To make it easy to get started, the above command checks out and patches the picolibc Git repo automatically.
99-
If you prefer you can check out and patch the repos manually and use those.
99+
If you prefer you can check out and patch the repos manually and use those, see commands below.
100100
Note, the patching of the llvm-project fork is not done automatically. See [Divergences from upstream](#Divergences-from-upstream)
101-
If you check out repos manually then it is your responsibility to ensure that the correct revisions are checked out - see `versions.json` to identify these.
101+
If you check out repos manually then it is your responsibility to ensure that the correct revisions are checked out - see `versions.json` to identify these - and to apply the necessary patches from the [patches](patches) folder.
102102

103103
```
104104
export CC=clang
105105
export CXX=clang++
106106
mkdir repos
107107
git -C repos clone https://github.com/picolibc/picolibc.git
108108
git -C repos/picolibc am -k "$PWD"/patches/picolibc/*.patch
109+
git -C arm-toolchain am -k "$PWD"/patches/llvm-project/*.patch
109110
mkdir build
110111
cd build
111112
cmake .. -GNinja -DFETCHCONTENT_SOURCE_DIR_PICOLIBC=../repos/picolibc
@@ -162,17 +163,21 @@ The same build directory can be used for both native and MinGW toolchains.
162163

163164
## Divergences from upstream
164165

165-
See [patches](https://github.com/arm/arm-toolchain/-/blob/arm-software/embedded/patches)
166-
directory for the current set of differences from upstream.
166+
See the [patches](patches) directory for the current set of differences from upstream.
167167

168168
The patches for llvm-project are split between two folders, llvm-project and
169169
llvm-project-perf. The former are generally required for building and
170170
successfully running all tests. The patches in llvm-project-perf are optional,
171171
and designed to improve performance in certain circumstances.
172172

173-
If not already applied, these must be done so manually before building, e.g.:
173+
Similarly, there are patches available for both Picolibc and Newlib. The Picolibc
174+
patches are essential for building and successfully running all picolibc tests. The
175+
Newlib patches are required to enable exceptions and RTTI builds of libcxx with newlib.
176+
177+
If not already applied, these must be done so manually before building, like below:
174178
```
175179
git -C arm-toolchain am -k "$PWD"/patches/llvm-project/*.patch
180+
git -C repos/picolibc am -k "$PWD"/patches/picolibc/*.patch
176181
```
177182

178183
## Building individual library variants

0 commit comments

Comments
 (0)