1# 2# Makefile for the linux kernel. 3# 4 5ifdef CONFIG_FUNCTION_TRACER 6 7# Do not trace tracer code 8CFLAGS_REMOVE_ftrace.o = $(CC_FLAGS_FTRACE) 9 10# Do not trace early setup code 11CFLAGS_REMOVE_als.o = $(CC_FLAGS_FTRACE) 12CFLAGS_REMOVE_early.o = $(CC_FLAGS_FTRACE) 13CFLAGS_REMOVE_sclp.o = $(CC_FLAGS_FTRACE) 14 15endif 16 17GCOV_PROFILE_als.o := n 18GCOV_PROFILE_early.o := n 19GCOV_PROFILE_sclp.o := n 20 21KCOV_INSTRUMENT_als.o := n 22KCOV_INSTRUMENT_early.o := n 23KCOV_INSTRUMENT_sclp.o := n 24 25UBSAN_SANITIZE_als.o := n 26UBSAN_SANITIZE_early.o := n 27UBSAN_SANITIZE_sclp.o := n 28 29# 30# Use -march=z900 for sclp.c and als.c to be able to print an error 31# message if the kernel is started on a machine which is too old 32# 33ifneq ($(CC_FLAGS_MARCH),-march=z900) 34CFLAGS_REMOVE_als.o += $(CC_FLAGS_MARCH) 35CFLAGS_als.o += -march=z900 36CFLAGS_REMOVE_sclp.o += $(CC_FLAGS_MARCH) 37CFLAGS_sclp.o += -march=z900 38AFLAGS_REMOVE_head.o += $(CC_FLAGS_MARCH) 39AFLAGS_head.o += -march=z900 40endif 41 42# 43# Passing null pointers is ok for smp code, since we access the lowcore here. 44# 45CFLAGS_smp.o := -Wno-nonnull 46 47# 48# Disable tailcall optimizations for stack / callchain walking functions 49# since this might generate broken code when accessing register 15 and 50# passing its content to other functions. 51# 52CFLAGS_stacktrace.o += -fno-optimize-sibling-calls 53CFLAGS_dumpstack.o += -fno-optimize-sibling-calls 54 55# 56# Pass UTS_MACHINE for user_regset definition 57# 58CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"' 59 60CFLAGS_sysinfo.o += -w 61 62obj-y := traps.o time.o process.o base.o early.o setup.o idle.o vtime.o 63obj-y += processor.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o nmi.o 64obj-y += debug.o irq.o ipl.o dis.o diag.o sclp.o vdso.o als.o 65obj-y += sysinfo.o jump_label.o lgr.o os_info.o machine_kexec.o pgm_check.o 66obj-y += runtime_instr.o cache.o fpu.o dumpstack.o 67obj-y += entry.o reipl.o relocate_kernel.o 68 69extra-y += head.o head64.o vmlinux.lds 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) 79 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_PERF_EVENTS) += perf_event.o perf_cpum_cf.o perf_cpum_sf.o 87obj-$(CONFIG_PERF_EVENTS) += perf_cpum_cf_events.o 88 89obj-$(CONFIG_TRACEPOINTS) += trace.o 90 91# vdso 92obj-y += vdso64/ 93obj-$(CONFIG_COMPAT) += vdso32/ 94