Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | # |
| 3 | # Makefile for the linux kernel. |
| 4 | # |
| 5 | |
Heiko Carstens | 5d360a7 | 2008-12-25 13:38:56 +0100 | [diff] [blame] | 6 | ifdef CONFIG_FUNCTION_TRACER |
Heiko Carstens | 82897ed | 2016-12-07 10:38:36 +0100 | [diff] [blame] | 7 | |
| 8 | # Do not trace tracer code |
Heiko Carstens | 971a9ca | 2018-05-04 13:22:12 +0200 | [diff] [blame] | 9 | CFLAGS_REMOVE_ftrace.o = $(CC_FLAGS_FTRACE) |
Heiko Carstens | 82897ed | 2016-12-07 10:38:36 +0100 | [diff] [blame] | 10 | |
| 11 | # Do not trace early setup code |
Heiko Carstens | 971a9ca | 2018-05-04 13:22:12 +0200 | [diff] [blame] | 12 | CFLAGS_REMOVE_early.o = $(CC_FLAGS_FTRACE) |
Heiko Carstens | 82897ed | 2016-12-07 10:38:36 +0100 | [diff] [blame] | 13 | |
| 14 | endif |
| 15 | |
Heiko Carstens | 971a9ca | 2018-05-04 13:22:12 +0200 | [diff] [blame] | 16 | GCOV_PROFILE_early.o := n |
Heiko Carstens | 971a9ca | 2018-05-04 13:22:12 +0200 | [diff] [blame] | 17 | KCOV_INSTRUMENT_early.o := n |
Heiko Carstens | 971a9ca | 2018-05-04 13:22:12 +0200 | [diff] [blame] | 18 | UBSAN_SANITIZE_early.o := n |
Vasily Gorbik | ac1256f | 2017-11-20 12:15:10 +0100 | [diff] [blame] | 19 | KASAN_SANITIZE_ipl.o := n |
| 20 | KASAN_SANITIZE_machine_kexec.o := n |
Vasily Gorbik | 0a9b409 | 2017-11-17 13:10:33 +0100 | [diff] [blame] | 21 | |
Heiko Carstens | 82897ed | 2016-12-07 10:38:36 +0100 | [diff] [blame] | 22 | # |
Heiko Carstens | 98c7b38 | 2008-03-05 12:37:09 +0100 | [diff] [blame] | 23 | # Passing null pointers is ok for smp code, since we access the lowcore here. |
| 24 | # |
Heiko Carstens | 82897ed | 2016-12-07 10:38:36 +0100 | [diff] [blame] | 25 | CFLAGS_smp.o := -Wno-nonnull |
Heiko Carstens | 98c7b38 | 2008-03-05 12:37:09 +0100 | [diff] [blame] | 26 | |
Martin Schwidefsky | 63506c4 | 2008-07-14 09:58:54 +0200 | [diff] [blame] | 27 | # |
Heiko Carstens | 1bca09f | 2013-03-14 13:44:25 +0100 | [diff] [blame] | 28 | # Disable tailcall optimizations for stack / callchain walking functions |
| 29 | # since this might generate broken code when accessing register 15 and |
| 30 | # passing its content to other functions. |
| 31 | # |
| 32 | CFLAGS_stacktrace.o += -fno-optimize-sibling-calls |
| 33 | CFLAGS_dumpstack.o += -fno-optimize-sibling-calls |
Martin Schwidefsky | 78c98f9 | 2019-01-28 08:33:08 +0100 | [diff] [blame] | 34 | CFLAGS_unwind_bc.o += -fno-optimize-sibling-calls |
Heiko Carstens | 1bca09f | 2013-03-14 13:44:25 +0100 | [diff] [blame] | 35 | |
Martin Schwidefsky | b5f87f1 | 2014-10-01 10:57:57 +0200 | [diff] [blame] | 36 | obj-y := traps.o time.o process.o base.o early.o setup.o idle.o vtime.o |
Sven Schnelle | 56e62a7 | 2020-11-21 11:14:56 +0100 | [diff] [blame] | 37 | obj-y += processor.o syscall.o ptrace.o signal.o cpcmd.o ebcdic.o nmi.o |
Vasily Gorbik | 2e83e0e | 2019-08-11 20:55:18 +0200 | [diff] [blame] | 38 | obj-y += debug.o irq.o ipl.o dis.o diag.o vdso.o |
Heiko Carstens | 6f8daa2 | 2021-04-07 21:06:41 +0200 | [diff] [blame] | 39 | obj-y += sysinfo.o lgr.o os_info.o machine_kexec.o |
QingFeng Hao | b7c92f1 | 2017-09-29 12:41:50 +0200 | [diff] [blame] | 40 | obj-y += runtime_instr.o cache.o fpu.o dumpstack.o guarded_storage.o sthyi.o |
Heiko Carstens | 049a2c2 | 2017-11-14 15:20:24 +0100 | [diff] [blame] | 41 | obj-y += entry.o reipl.o relocate_kernel.o kdebugfs.o alternative.o |
Martin Schwidefsky | 78c98f9 | 2019-01-28 08:33:08 +0100 | [diff] [blame] | 42 | obj-y += nospec-branch.o ipl_vmparm.o machine_kexec_reloc.o unwind_bc.o |
Peter Zijlstra | 1614b2b | 2021-11-29 14:28:41 +0000 | [diff] [blame] | 43 | obj-y += smp.o text_amode31.o stacktrace.o |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 44 | |
Vasily Gorbik | 8282cd6 | 2018-06-12 15:11:40 +0200 | [diff] [blame] | 45 | extra-y += head64.o vmlinux.lds |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 46 | |
Martin Schwidefsky | 4253b0e | 2018-04-24 08:23:54 +0200 | [diff] [blame] | 47 | obj-$(CONFIG_SYSFS) += nospec-sysfs.o |
Martin Schwidefsky | b2e2f43 | 2018-03-23 17:09:39 +0100 | [diff] [blame] | 48 | CFLAGS_REMOVE_nospec-branch.o += $(CC_FLAGS_EXPOLINE) |
Martin Schwidefsky | f19fbd5 | 2018-01-26 12:46:47 +0100 | [diff] [blame] | 49 | |
Al Viro | 711f5df | 2016-01-12 13:30:03 -0500 | [diff] [blame] | 50 | obj-$(CONFIG_MODULES) += module.o |
Heiko Carstens | 9236b4d | 2015-12-28 13:20:43 +0100 | [diff] [blame] | 51 | obj-$(CONFIG_SCHED_TOPOLOGY) += topology.o |
Alexander Gordeev | b450eeb | 2020-08-04 20:35:50 +0200 | [diff] [blame] | 52 | obj-$(CONFIG_NUMA) += numa.o |
Al Viro | c080379 | 2006-08-31 19:02:42 -0400 | [diff] [blame] | 53 | obj-$(CONFIG_AUDIT) += audit.o |
| 54 | compat-obj-$(CONFIG_AUDIT) += compat_audit.o |
Heiko Carstens | fa2a062 | 2014-03-06 11:24:41 +0100 | [diff] [blame] | 55 | obj-$(CONFIG_COMPAT) += compat_linux.o compat_signal.o |
Arnd Bergmann | 9085608 | 2019-01-16 14:15:23 +0100 | [diff] [blame] | 56 | obj-$(CONFIG_COMPAT) += $(compat-obj-y) |
Heiko Carstens | 89175cf | 2017-01-11 09:14:52 +0100 | [diff] [blame] | 57 | obj-$(CONFIG_EARLY_PRINTK) += early_printk.o |
Michael Grundy | 4ba069b | 2006-09-20 15:58:39 +0200 | [diff] [blame] | 58 | obj-$(CONFIG_KPROBES) += kprobes.o |
Heiko Carstens | b61e1f3 | 2020-09-18 10:26:19 +0200 | [diff] [blame] | 59 | obj-$(CONFIG_KPROBES) += kprobes_insn_page.o |
Heiko Carstens | 53255c9 | 2014-10-07 15:45:10 +0200 | [diff] [blame] | 60 | obj-$(CONFIG_FUNCTION_TRACER) += mcount.o ftrace.o |
Michael Holzheu | 60a0c68 | 2011-10-30 15:16:40 +0100 | [diff] [blame] | 61 | obj-$(CONFIG_CRASH_DUMP) += crash_dump.o |
Jan Willeke | 2a0a5b2 | 2014-09-22 16:39:06 +0200 | [diff] [blame] | 62 | obj-$(CONFIG_UPROBES) += uprobes.o |
Masahiro Yamada | e9666d1 | 2018-12-31 00:14:15 +0900 | [diff] [blame] | 63 | obj-$(CONFIG_JUMP_LABEL) += jump_label.o |
Heiko Carstens | 305e4f1 | 2012-09-14 12:57:39 +0200 | [diff] [blame] | 64 | |
Philipp Rudo | e49bb0a | 2017-08-30 14:03:38 +0200 | [diff] [blame] | 65 | obj-$(CONFIG_KEXEC_FILE) += machine_kexec_file.o kexec_image.o |
Philipp Rudo | 8be0188 | 2017-09-11 15:15:29 +0200 | [diff] [blame] | 66 | obj-$(CONFIG_KEXEC_FILE) += kexec_elf.o |
Philipp Rudo | 7140688 | 2017-06-19 10:45:33 +0200 | [diff] [blame] | 67 | |
Nayna Jain | 9e2b4be | 2020-03-08 20:57:51 -0400 | [diff] [blame] | 68 | obj-$(CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT) += ima_arch.o |
Philipp Rudo | 268a784 | 2019-03-26 15:45:53 +0100 | [diff] [blame] | 69 | |
Hendrik Brueckner | 7f5ac1a | 2018-10-25 17:26:34 +0200 | [diff] [blame] | 70 | obj-$(CONFIG_PERF_EVENTS) += perf_event.o perf_cpum_cf_common.o |
| 71 | obj-$(CONFIG_PERF_EVENTS) += perf_cpum_cf.o perf_cpum_sf.o |
Heiko Carstens | c33eff6 | 2015-06-06 12:44:25 +0200 | [diff] [blame] | 72 | obj-$(CONFIG_PERF_EVENTS) += perf_cpum_cf_events.o perf_regs.o |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 73 | |
Martin Schwidefsky | b5a6b71 | 2015-08-21 16:05:32 +0200 | [diff] [blame] | 74 | obj-$(CONFIG_TRACEPOINTS) += trace.o |
Vasily Gorbik | ecdc5d8 | 2019-10-23 13:56:36 +0200 | [diff] [blame] | 75 | obj-$(findstring y, $(CONFIG_PROTECTED_VIRTUALIZATION_GUEST) $(CONFIG_PGSTE)) += uv.o |
Martin Schwidefsky | b5a6b71 | 2015-08-21 16:05:32 +0200 | [diff] [blame] | 76 | |
Martin Schwidefsky | b020632 | 2008-12-25 13:38:36 +0100 | [diff] [blame] | 77 | # vdso |
Heiko Carstens | 5a79859a | 2015-02-12 13:08:27 +0100 | [diff] [blame] | 78 | obj-y += vdso64/ |
Sven Schnelle | 779df22 | 2021-06-25 14:50:08 +0200 | [diff] [blame] | 79 | obj-$(CONFIG_COMPAT) += vdso32/ |