Makefile 2.7 KB

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