Skip to content

Commit faa7bdd

Browse files
committed
kbuild: fix the document to use extra-y for vmlinux.lds
The difference between "always" and "extra-y" is that the targets listed in $(always) are always built, whereas the ones in $(extra-y) are built only when KBUILD_BUILTIN is set. So, "make modules" does not build the targets in $(extra-y). vmlinux.lds is only needed for linking vmlinux. So, adding it to extra-y is more correct. In fact, arch/x86/kernel/Makefile does this. Fix the example code. Signed-off-by: Masahiro Yamada <[email protected]>
1 parent c8fb7d7 commit faa7bdd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Documentation/kbuild/makefiles.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1269,12 +1269,12 @@ When kbuild executes, the following steps are followed (roughly):
12691269
Example::
12701270

12711271
#arch/x86/kernel/Makefile
1272-
always := vmlinux.lds
1272+
extra-y := vmlinux.lds
12731273

12741274
#Makefile
12751275
export CPPFLAGS_vmlinux.lds += -P -C -U$(ARCH)
12761276

1277-
The assignment to $(always) is used to tell kbuild to build the
1277+
The assignment to extra-y is used to tell kbuild to build the
12781278
target vmlinux.lds.
12791279
The assignment to $(CPPFLAGS_vmlinux.lds) tells kbuild to use the
12801280
specified options when building the target vmlinux.lds.

0 commit comments

Comments
 (0)