GNU Linux-libre 5.10.217-gnu1
[releases.git] / arch / powerpc / purgatory / Makefile
1 # SPDX-License-Identifier: GPL-2.0
2
3 KASAN_SANITIZE := n
4
5 targets += trampoline_$(BITS).o purgatory.ro kexec-purgatory.c
6
7 # When profile-guided optimization is enabled, llvm emits two different
8 # overlapping text sections, which is not supported by kexec. Remove profile
9 # optimization flags.
10 KBUILD_CFLAGS := $(filter-out -fprofile-sample-use=% -fprofile-use=%,$(KBUILD_CFLAGS))
11
12 LDFLAGS_purgatory.ro := -e purgatory_start -r --no-undefined
13
14 $(obj)/purgatory.ro: $(obj)/trampoline_$(BITS).o FORCE
15                 $(call if_changed,ld)
16
17 quiet_cmd_bin2c = BIN2C   $@
18       cmd_bin2c = $(objtree)/scripts/bin2c kexec_purgatory < $< > $@
19
20 $(obj)/kexec-purgatory.c: $(obj)/purgatory.ro FORCE
21         $(call if_changed,bin2c)
22
23 obj-y   += kexec-purgatory.o