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