xref: /openbmc/linux/arch/powerpc/purgatory/Makefile (revision 9134211f)
1# SPDX-License-Identifier: GPL-2.0
2
3KASAN_SANITIZE := n
4KCSAN_SANITIZE := n
5
6targets += trampoline_$(BITS).o purgatory.ro
7
8# When profile-guided optimization is enabled, llvm emits two different
9# overlapping text sections, which is not supported by kexec. Remove profile
10# optimization flags.
11KBUILD_CFLAGS := $(filter-out -fprofile-sample-use=% -fprofile-use=%,$(KBUILD_CFLAGS))
12
13LDFLAGS_purgatory.ro := -e purgatory_start -r --no-undefined
14
15$(obj)/purgatory.ro: $(obj)/trampoline_$(BITS).o FORCE
16		$(call if_changed,ld)
17
18$(obj)/kexec-purgatory.o: $(obj)/purgatory.ro
19
20obj-y	+= kexec-purgatory.o
21