@@ -56,7 +56,7 @@ libclang
56
56
********
57
57
58
58
``libclang `` (part of LLVM) is used by ``bindgen `` to understand the C code
59
- in the kernel, which means you will need a recent LLVM installed; like when
59
+ in the kernel, which means you will need an LLVM installed; like when
60
60
you compile the kernel with ``CC=clang `` or ``LLVM=1 ``.
61
61
62
62
Your Linux distribution is likely to have a suitable one available, so it is
@@ -66,20 +66,19 @@ There are also some binaries for several systems and architectures uploaded at:
66
66
67
67
https://releases.llvm.org/download.html
68
68
69
- For Debian-based distributions, you can also fetch them from:
70
-
71
- https://apt.llvm.org
72
-
73
69
Otherwise, building LLVM takes quite a while, but it is not a complex process:
74
70
75
71
https://llvm.org/docs/GettingStarted.html#getting-the-source-code-and-building-llvm
76
72
73
+ See Documentation/kbuild/llvm.rst for more information and further ways
74
+ to fetch pre-built releases and distribution packages.
75
+
77
76
78
77
bindgen
79
78
*******
80
79
81
80
The bindings to the C side of the kernel are generated at build time using
82
- the ``bindgen `` tool. A recent version should work, e.g. ``0.56.0 ``.
81
+ the ``bindgen `` tool. The version we currently support is ``0.56.0 ``.
83
82
84
83
Install it via (this will build the tool from source)::
85
84
@@ -184,14 +183,14 @@ And enable some sample modules either as built-in or as loadable.
184
183
Building
185
184
--------
186
185
187
- Building a kernel with Clang or a complete LLVM toolchain is the best supported
188
- setup at the moment. That is::
186
+ Building a kernel with a complete LLVM toolchain is the best supported setup
187
+ at the moment. That is::
189
188
190
- make ARCH=... CROSS_COMPILE=... CC=clang -j...
189
+ make LLVM=1
191
190
192
- or ::
191
+ For architectures that do not support a full LLVM toolchain, use ::
193
192
194
- make ARCH=... CROSS_COMPILE=... LLVM=1 -j...
193
+ make CC=clang
195
194
196
195
Using GCC also works for some configurations, but it is *very * experimental at
197
196
the moment.
@@ -209,7 +208,7 @@ is your toolchain doesn't support Rust's new v0 mangling scheme yet. There are
209
208
a few ways out:
210
209
211
210
- If you don't mind building your own tools, we provide the following fork
212
- with the support cherry-picked from GCC on top of very recent releases :
211
+ with the support cherry-picked from GCC:
213
212
214
213
https://github.com/Rust-for-Linux/binutils-gdb/releases/tag/gdb-10.1-release-rust
215
214
https://github.com/Rust-for-Linux/binutils-gdb/releases/tag/binutils-2_35_1-rust
0 commit comments