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