linux-stable/Documentation/kbuild
Masahiro Yamada 3216484550 kbuild: use obj-y instead extra-y for objects placed at the head
The objects placed at the head of vmlinux need special treatments:

 - arch/$(SRCARCH)/Makefile adds them to head-y in order to place
   them before other archives in the linker command line.

 - arch/$(SRCARCH)/kernel/Makefile adds them to extra-y instead of
   obj-y to avoid them going into built-in.a.

This commit gets rid of the latter.

Create vmlinux.a to collect all the objects that are unconditionally
linked to vmlinux. The objects listed in head-y are moved to the head
of vmlinux.a by using 'ar m'.

With this, arch/$(SRCARCH)/kernel/Makefile can consistently use obj-y
for builtin objects.

There is no *.o that is directly linked to vmlinux. Drop unneeded code
in scripts/clang-tools/gen_compile_commands.py.

$(AR) mPi needs 'T' to workaround the llvm-ar bug. The fix was suggested
by Nathan Chancellor [1].

[1]: https://lore.kernel.org/llvm/YyjjT5gQ2hGMH0ni@dev-arch.thelio-3990X/

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
2022-10-02 18:04:05 +09:00
..
gcc-plugins.rst gcc-plugins: Remove cyc_complexity 2021-10-21 08:41:47 -07:00
headers_install.rst
index.rst
issues.rst
kbuild.rst kbuild: Add environment variables for userprogs flags 2022-02-14 10:37:32 +09:00
kconfig-language.rst asm goto: eradicate CC_HAS_ASM_GOTO 2022-08-21 10:06:28 -07:00
kconfig-macro-language.rst
Kconfig.recursion-issue-01
Kconfig.recursion-issue-02 docs: use the lore redirector everywhere 2021-10-12 13:58:19 -06:00
kconfig.rst kconfig: change defconfig_list option to environment variable 2021-04-14 15:22:48 +09:00
Kconfig.select-break
llvm.rst Documentation/llvm: Update Supported Arch table 2022-06-20 08:21:29 +09:00
makefiles.rst kbuild: use obj-y instead extra-y for objects placed at the head 2022-10-02 18:04:05 +09:00
modules.rst
reproducible-builds.rst randstruct: Move seed generation into scripts/basic/ 2022-05-08 01:33:07 -07:00