Makefile (a1ff5a7d78a036d6c2178ee5acd6ba4946243800) Makefile (1ff95eb2bebda50c4c5406caaf201e0fcb24cc8f)
1# SPDX-License-Identifier: GPL-2.0-only
2#
3# Makefile for the RISC-V Linux kernel
4#
5
6ifdef CONFIG_FTRACE
7CFLAGS_REMOVE_ftrace.o = $(CC_FLAGS_FTRACE)
8CFLAGS_REMOVE_patch.o = $(CC_FLAGS_FTRACE)

--- 6 unchanged lines hidden (view full) ---

15ifdef CONFIG_KEXEC_CORE
16AFLAGS_kexec_relocate.o := -mcmodel=medany $(call cc-option,-mno-relax)
17endif
18
19# cmodel=medany and notrace when patching early
20ifdef CONFIG_RISCV_ALTERNATIVE_EARLY
21CFLAGS_alternative.o := -mcmodel=medany
22CFLAGS_cpufeature.o := -mcmodel=medany
1# SPDX-License-Identifier: GPL-2.0-only
2#
3# Makefile for the RISC-V Linux kernel
4#
5
6ifdef CONFIG_FTRACE
7CFLAGS_REMOVE_ftrace.o = $(CC_FLAGS_FTRACE)
8CFLAGS_REMOVE_patch.o = $(CC_FLAGS_FTRACE)

--- 6 unchanged lines hidden (view full) ---

15ifdef CONFIG_KEXEC_CORE
16AFLAGS_kexec_relocate.o := -mcmodel=medany $(call cc-option,-mno-relax)
17endif
18
19# cmodel=medany and notrace when patching early
20ifdef CONFIG_RISCV_ALTERNATIVE_EARLY
21CFLAGS_alternative.o := -mcmodel=medany
22CFLAGS_cpufeature.o := -mcmodel=medany
23CFLAGS_sbi_ecall.o := -mcmodel=medany
23ifdef CONFIG_FTRACE
24CFLAGS_REMOVE_alternative.o = $(CC_FLAGS_FTRACE)
25CFLAGS_REMOVE_cpufeature.o = $(CC_FLAGS_FTRACE)
24ifdef CONFIG_FTRACE
25CFLAGS_REMOVE_alternative.o = $(CC_FLAGS_FTRACE)
26CFLAGS_REMOVE_cpufeature.o = $(CC_FLAGS_FTRACE)
27CFLAGS_REMOVE_sbi_ecall.o = $(CC_FLAGS_FTRACE)
26endif
27ifdef CONFIG_RELOCATABLE
28CFLAGS_alternative.o += -fno-pie
29CFLAGS_cpufeature.o += -fno-pie
28endif
29ifdef CONFIG_RELOCATABLE
30CFLAGS_alternative.o += -fno-pie
31CFLAGS_cpufeature.o += -fno-pie
32CFLAGS_sbi_ecall.o += -fno-pie
30endif
31ifdef CONFIG_KASAN
32KASAN_SANITIZE_alternative.o := n
33KASAN_SANITIZE_cpufeature.o := n
33endif
34ifdef CONFIG_KASAN
35KASAN_SANITIZE_alternative.o := n
36KASAN_SANITIZE_cpufeature.o := n
37KASAN_SANITIZE_sbi_ecall.o := n
34endif
35endif
36
37extra-y += vmlinux.lds
38
39obj-y += head.o
40obj-y += soc.o
41obj-$(CONFIG_RISCV_ALTERNATIVE) += alternative.o

--- 41 unchanged lines hidden (view full) ---

83obj-$(CONFIG_CPU_PM) += suspend_entry.o suspend.o
84obj-$(CONFIG_HIBERNATION) += hibernate.o hibernate-asm.o
85
86obj-$(CONFIG_FUNCTION_TRACER) += mcount.o ftrace.o
87obj-$(CONFIG_DYNAMIC_FTRACE) += mcount-dyn.o
88
89obj-$(CONFIG_PERF_EVENTS) += perf_callchain.o
90obj-$(CONFIG_HAVE_PERF_REGS) += perf_regs.o
38endif
39endif
40
41extra-y += vmlinux.lds
42
43obj-y += head.o
44obj-y += soc.o
45obj-$(CONFIG_RISCV_ALTERNATIVE) += alternative.o

--- 41 unchanged lines hidden (view full) ---

87obj-$(CONFIG_CPU_PM) += suspend_entry.o suspend.o
88obj-$(CONFIG_HIBERNATION) += hibernate.o hibernate-asm.o
89
90obj-$(CONFIG_FUNCTION_TRACER) += mcount.o ftrace.o
91obj-$(CONFIG_DYNAMIC_FTRACE) += mcount-dyn.o
92
93obj-$(CONFIG_PERF_EVENTS) += perf_callchain.o
94obj-$(CONFIG_HAVE_PERF_REGS) += perf_regs.o
91obj-$(CONFIG_RISCV_SBI) += sbi.o
95obj-$(CONFIG_RISCV_SBI) += sbi.o sbi_ecall.o
92ifeq ($(CONFIG_RISCV_SBI), y)
93obj-$(CONFIG_SMP) += sbi-ipi.o
94obj-$(CONFIG_SMP) += cpu_ops_sbi.o
95endif
96obj-$(CONFIG_HOTPLUG_CPU) += cpu-hotplug.o
97obj-$(CONFIG_PARAVIRT) += paravirt.o
98obj-$(CONFIG_KGDB) += kgdb.o
99obj-$(CONFIG_KEXEC_CORE) += kexec_relocate.o crash_save_regs.o machine_kexec.o

--- 16 unchanged lines hidden ---
96ifeq ($(CONFIG_RISCV_SBI), y)
97obj-$(CONFIG_SMP) += sbi-ipi.o
98obj-$(CONFIG_SMP) += cpu_ops_sbi.o
99endif
100obj-$(CONFIG_HOTPLUG_CPU) += cpu-hotplug.o
101obj-$(CONFIG_PARAVIRT) += paravirt.o
102obj-$(CONFIG_KGDB) += kgdb.o
103obj-$(CONFIG_KEXEC_CORE) += kexec_relocate.o crash_save_regs.o machine_kexec.o

--- 16 unchanged lines hidden ---