1
0
mirror of https://github.com/0xAX/linux-insides.git synced 2024-12-31 10:50:57 +00:00

Update how_kernel_compiled.md

`KBUILD_MODULES` is used to decide whether build modules, while `KBUILD_BUILTIN` is for kernel.
This commit is contained in:
Nan Xiao 2015-10-08 13:21:11 +08:00
parent 47e830ef5a
commit 8b09db1f43

View File

@ -166,7 +166,7 @@ HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-p
HOSTCXXFLAGS = -O2
```
Next we get to the `CC` variable that represents compiler too, so why do we need the `HOST*` variables? `CC` is the target compiler that will be used during kernel compilation, but `HOSTCC` will be used during compilation of the set of the `host` programs (we will see it soon). After this we can see the definition of `KBUILD_MODULES` and `KBUILD_BUILTIN` variables that are used to determine what to compile (kernel, modules or both):
Next we get to the `CC` variable that represents compiler too, so why do we need the `HOST*` variables? `CC` is the target compiler that will be used during kernel compilation, but `HOSTCC` will be used during compilation of the set of the `host` programs (we will see it soon). After this we can see the definition of `KBUILD_MODULES` and `KBUILD_BUILTIN` variables that are used to determine what to compile (modules, kernel, or both):
```Makefile
KBUILD_MODULES :=