1# SPDX-License-Identifier: GPL-2.0 2# 3# Makefile for the linux kernel. 4# 5 6ifdef CONFIG_FUNCTION_TRACER 7 8# Do not trace tracer code 9CFLAGS_REMOVE_ftrace.o = $(CC_FLAGS_FTRACE) 10 11# Do not trace early setup code 12CFLAGS_REMOVE_als.o = $(CC_FLAGS_FTRACE) 13CFLAGS_REMOVE_early.o = $(CC_FLAGS_FTRACE) 14 15endif 16 17GCOV_PROFILE_als.o := n 18GCOV_PROFILE_early.o := n 19 20KCOV_INSTRUMENT_als.o := n 21KCOV_INSTRUMENT_early.o := n 22 23UBSAN_SANITIZE_als.o := n 24UBSAN_SANITIZE_early.o := n 25 26# 27# Use -march=z900 for als.c to be able to print an error 28# message if the kernel is started on a machine which is too old 29# 30ifneq ($(CC_FLAGS_MARCH),-march=z900) 31CFLAGS_REMOVE_als.o += $(CC_FLAGS_MARCH) 32CFLAGS_REMOVE_als.o += $(CC_FLAGS_EXPOLINE) 33CFLAGS_als.o += -march=z900 34AFLAGS_REMOVE_head.o += $(CC_FLAGS_MARCH) 35AFLAGS_head.o += -march=z900 36endif 37 38CFLAGS_als.o += -D__NO_FORTIFY 39 40# 41# Passing null pointers is ok for smp code, since we access the lowcore here. 42# 43CFLAGS_smp.o := -Wno-nonnull 44 45# 46# Disable tailcall optimizations for stack / callchain walking functions 47# since this might generate broken code when accessing register 15 and 48# passing its content to other functions. 49# 50CFLAGS_stacktrace.o += -fno-optimize-sibling-calls 51CFLAGS_dumpstack.o += -fno-optimize-sibling-calls 52 53# 54# Pass UTS_MACHINE for user_regset definition 55# 56CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"' 57 58obj-y := traps.o time.o process.o base.o early.o setup.o idle.o vtime.o 59obj-y += processor.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o nmi.o 60obj-y += debug.o irq.o ipl.o dis.o diag.o vdso.o als.o 61obj-y += sysinfo.o jump_label.o lgr.o os_info.o machine_kexec.o pgm_check.o 62obj-y += runtime_instr.o cache.o fpu.o dumpstack.o guarded_storage.o sthyi.o 63obj-y += entry.o reipl.o relocate_kernel.o kdebugfs.o alternative.o 64obj-y += nospec-branch.o 65 66extra-y += head.o head64.o vmlinux.lds 67 68obj-$(CONFIG_SYSFS) += nospec-sysfs.o 69CFLAGS_REMOVE_nospec-branch.o += $(CC_FLAGS_EXPOLINE) 70 71obj-$(CONFIG_MODULES) += module.o 72obj-$(CONFIG_SMP) += smp.o 73obj-$(CONFIG_SCHED_TOPOLOGY) += topology.o 74obj-$(CONFIG_HIBERNATION) += suspend.o swsusp.o 75obj-$(CONFIG_AUDIT) += audit.o 76compat-obj-$(CONFIG_AUDIT) += compat_audit.o 77obj-$(CONFIG_COMPAT) += compat_linux.o compat_signal.o 78obj-$(CONFIG_COMPAT) += compat_wrapper.o $(compat-obj-y) 79obj-$(CONFIG_EARLY_PRINTK) += early_printk.o 80obj-$(CONFIG_STACKTRACE) += stacktrace.o 81obj-$(CONFIG_KPROBES) += kprobes.o 82obj-$(CONFIG_FUNCTION_TRACER) += mcount.o ftrace.o 83obj-$(CONFIG_CRASH_DUMP) += crash_dump.o 84obj-$(CONFIG_UPROBES) += uprobes.o 85 86obj-$(CONFIG_KEXEC_FILE) += machine_kexec_file.o kexec_image.o 87obj-$(CONFIG_KEXEC_FILE) += kexec_elf.o 88 89obj-$(CONFIG_PERF_EVENTS) += perf_event.o perf_cpum_cf.o perf_cpum_sf.o 90obj-$(CONFIG_PERF_EVENTS) += perf_cpum_cf_events.o perf_regs.o 91 92obj-$(CONFIG_TRACEPOINTS) += trace.o 93 94# vdso 95obj-y += vdso64/ 96obj-$(CONFIG_COMPAT) += vdso32/ 97