linux/arch/microblaze
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
..
boot kbuild: unify cmd_copy and cmd_shipped 2022-02-14 10:37:32 +09:00
configs microblaze: Remove noMMU code 2020-11-26 16:39:35 +01:00
include - The usual batches of cleanups from Baoquan He, Muchun Song, Miaohe 2022-08-05 16:32:45 -07:00
kernel kbuild: use obj-y instead extra-y for objects placed at the head 2022-10-02 18:04:05 +09:00
lib microblaze: fix typos in comments 2022-05-02 08:36:10 +02:00
mm microblaze/mm: enable ARCH_HAS_VM_GET_PAGE_PROT 2022-07-17 17:14:38 -07:00
pci microblaze/PCI: Remove pci_phys_mem_access_prot() dead code 2022-01-24 13:11:34 +01:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig asm-generic: updates for 6.0 2022-08-05 10:07:23 -07:00
Kconfig.debug tracing: Refactor TRACE_IRQFLAGS_SUPPORT in Kconfig 2021-08-16 11:37:21 -04:00
Kconfig.platform docs: kbuild: convert docs to ReST and rename to *.rst 2019-06-14 14:21:21 -06:00
Makefile microblaze: use built-in function to get CPU_{MAJOR,MINOR,REV} 2022-01-08 18:28:21 +09:00