linux/arch/m68k/coldfire/Makefile
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

49 lines
1.6 KiB
Makefile

# SPDX-License-Identifier: GPL-2.0
#
# Makefile for the m68knommu kernel.
#
#
# If you want to play with the HW breakpoints then you will
# need to add define this, which will give you a stack backtrace
# on the console port whenever a DBG interrupt occurs. You have to
# set up you HW breakpoints to trigger a DBG interrupt:
#
# ccflags-y := -DTRAP_DBG_INTERRUPT
# asflags-y := -DTRAP_DBG_INTERRUPT
#
asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1
obj-$(CONFIG_COLDFIRE) += cache.o clk.o device.o entry.o vectors.o
obj-$(CONFIG_M5206) += m5206.o intc.o reset.o
obj-$(CONFIG_M5206e) += m5206.o intc.o reset.o
obj-$(CONFIG_M520x) += m520x.o intc-simr.o reset.o
obj-$(CONFIG_M523x) += m523x.o dma_timer.o intc-2.o reset.o
obj-$(CONFIG_M5249) += m5249.o intc.o intc-5249.o reset.o
obj-$(CONFIG_M525x) += m525x.o intc.o intc-525x.o reset.o
obj-$(CONFIG_M527x) += m527x.o intc-2.o reset.o
obj-$(CONFIG_M5272) += m5272.o intc-5272.o
obj-$(CONFIG_M528x) += m528x.o intc-2.o reset.o
obj-$(CONFIG_M5307) += m5307.o intc.o reset.o
obj-$(CONFIG_M53xx) += m53xx.o intc-simr.o reset.o
obj-$(CONFIG_M5407) += m5407.o intc.o reset.o
obj-$(CONFIG_M54xx) += m54xx.o intc-2.o
obj-$(CONFIG_M5441x) += m5441x.o intc-simr.o reset.o
obj-$(CONFIG_COLDFIRE_PIT_TIMER) += pit.o
obj-$(CONFIG_COLDFIRE_TIMERS) += timers.o
obj-$(CONFIG_COLDFIRE_SLTIMERS) += sltimers.o
obj-$(CONFIG_NETtel) += nettel.o
obj-$(CONFIG_CLEOPATRA) += nettel.o
obj-$(CONFIG_FIREBEE) += firebee.o
obj-$(CONFIG_MCF8390) += mcf8390.o
obj-$(CONFIG_AMCORE) += amcore.o
obj-$(CONFIG_STMARK2) += stmark2.o
obj-$(CONFIG_PCI) += pci.o
obj-y += gpio.o
obj-y += head.o