1fa96b57cSHuacai Chen# SPDX-License-Identifier: GPL-2.0 2fa96b57cSHuacai Chen# 3fa96b57cSHuacai Chen# Makefile for the Linux/LoongArch kernel. 4fa96b57cSHuacai Chen# 5fa96b57cSHuacai Chen 632164845SMasahiro Yamadaextra-y := vmlinux.lds 7fa96b57cSHuacai Chen 832164845SMasahiro Yamadaobj-y += head.o cpu-probe.o cacheinfo.o env.o setup.o entry.o genex.o \ 9fa96b57cSHuacai Chen traps.o irq.o idle.o process.o dma.o mem.o io.o reset.o switch.o \ 1061a6fcccSHuacai Chen elf.o syscall.o signal.o time.o topology.o inst.o ptrace.o vdso.o \ 1141596803SHuacai Chen alternative.o unwind.o 12fa96b57cSHuacai Chen 13fa96b57cSHuacai Chenobj-$(CONFIG_ACPI) += acpi.o 14fa96b57cSHuacai Chenobj-$(CONFIG_EFI) += efi.o 15fa96b57cSHuacai Chen 162b3bd32eSHuacai Chenobj-$(CONFIG_CPU_HAS_FPU) += fpu.o kfpu.o 17fa96b57cSHuacai Chen 18bd3c5798SQi Huobj-$(CONFIG_CPU_HAS_LBT) += lbt.o 19bd3c5798SQi Hu 2041596803SHuacai Chenobj-$(CONFIG_ARCH_STRICT_ALIGN) += unaligned.o 2141596803SHuacai Chen 22*c718a0baSBibo MaoCFLAGS_module.o += $(call cc-option,-Wno-override-init,) 23*c718a0baSBibo MaoCFLAGS_syscall.o += $(call cc-option,-Wno-override-init,) 24*c718a0baSBibo MaoCFLAGS_perf_event.o += $(call cc-option,-Wno-override-init,) 25*c718a0baSBibo Mao 26dbe3ba30SQing Zhangifdef CONFIG_FUNCTION_TRACER 274733f09dSQing Zhang ifndef CONFIG_DYNAMIC_FTRACE 28dbe3ba30SQing Zhang obj-y += mcount.o ftrace.o 29dbe3ba30SQing Zhang CFLAGS_REMOVE_ftrace.o = $(CC_FLAGS_FTRACE) 304733f09dSQing Zhang else 314733f09dSQing Zhang obj-y += mcount_dyn.o ftrace_dyn.o 324733f09dSQing Zhang CFLAGS_REMOVE_ftrace_dyn.o = $(CC_FLAGS_FTRACE) 334733f09dSQing Zhang endif 34dbe3ba30SQing Zhang CFLAGS_REMOVE_inst.o = $(CC_FLAGS_FTRACE) 35dbe3ba30SQing Zhang CFLAGS_REMOVE_time.o = $(CC_FLAGS_FTRACE) 36dbe3ba30SQing Zhang CFLAGS_REMOVE_perf_event.o = $(CC_FLAGS_FTRACE) 377b0a0964SHaoran Jiang CFLAGS_REMOVE_rethook.o = $(CC_FLAGS_FTRACE) 387b0a0964SHaoran Jiang CFLAGS_REMOVE_rethook_trampoline.o = $(CC_FLAGS_FTRACE) 39dbe3ba30SQing Zhangendif 40dbe3ba30SQing Zhang 415aa4ac64SQing ZhangKASAN_SANITIZE_efi.o := n 425aa4ac64SQing ZhangKASAN_SANITIZE_cpu-probe.o := n 435aa4ac64SQing ZhangKASAN_SANITIZE_traps.o := n 445aa4ac64SQing ZhangKASAN_SANITIZE_smp.o := n 455aa4ac64SQing ZhangKASAN_SANITIZE_vdso.o := n 465aa4ac64SQing Zhang 47fa96b57cSHuacai Chenobj-$(CONFIG_MODULES) += module.o module-sections.o 4893a4fa62SQing Zhangobj-$(CONFIG_STACKTRACE) += stacktrace.o 49fa96b57cSHuacai Chen 50fa96b57cSHuacai Chenobj-$(CONFIG_PROC_FS) += proc.o 51fa96b57cSHuacai Chen 5246859ac8SHuacai Chenobj-$(CONFIG_SMP) += smp.o 5346859ac8SHuacai Chen 54d4b6f156SHuacai Chenobj-$(CONFIG_NUMA) += numa.o 55d4b6f156SHuacai Chen 56dea2df3cSHuacai Chenobj-$(CONFIG_MAGIC_SYSRQ) += sysrq.o 57dea2df3cSHuacai Chen 58d8da19fbSYouling Tangobj-$(CONFIG_RELOCATABLE) += relocate.o 59d8da19fbSYouling Tang 604a03b2acSYouling Tangobj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o 614e62d1d8SYouling Tangobj-$(CONFIG_CRASH_DUMP) += crash_dump.o 624a03b2acSYouling Tang 6349232773SQing Zhangobj-$(CONFIG_UNWINDER_GUESS) += unwind_guess.o 6449aef111SQing Zhangobj-$(CONFIG_UNWINDER_PROLOGUE) += unwind_prologue.o 6549232773SQing Zhang 66b37042b2SHuacai Chenobj-$(CONFIG_PERF_EVENTS) += perf_event.o perf_regs.o 67edffa33cSQing Zhangobj-$(CONFIG_HAVE_HW_BREAKPOINT) += hw_breakpoint.o 68b37042b2SHuacai Chen 69e14dd076SQing Zhangobj-$(CONFIG_KGDB) += kgdb.o 707b0a0964SHaoran Jiangobj-$(CONFIG_KPROBES) += kprobes.o 717b0a0964SHaoran Jiangobj-$(CONFIG_RETHOOK) += rethook.o rethook_trampoline.o 7219bc6cb6STiezhu Yangobj-$(CONFIG_UPROBES) += uprobes.o 736d4cc40fSTiezhu Yang 74f02644e3SYouling Tangobj-$(CONFIG_JUMP_LABEL) += jump_label.o 75f02644e3SYouling Tang 76fa96b57cSHuacai ChenCPPFLAGS_vmlinux.lds := $(KBUILD_CFLAGS) 77