xref: /linux/arch/powerpc/purgatory/Makefile (revision ff9a79307f89563da6d841da8b7cc4a0afceb0e2)
1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0
2f072015cSChristophe Leroy
392579713SMasahiro Yamadatargets += trampoline_$(BITS).o purgatory.ro
40d976313SThiago Jung Bauermann
5*20188bacSRicardo Ribalda# When profile-guided optimization is enabled, llvm emits two different
6*20188bacSRicardo Ribalda# overlapping text sections, which is not supported by kexec. Remove profile
7*20188bacSRicardo Ribalda# optimization flags.
8*20188bacSRicardo RibaldaKBUILD_CFLAGS := $(filter-out -fprofile-sample-use=% -fprofile-use=%,$(KBUILD_CFLAGS))
9*20188bacSRicardo Ribalda
100d976313SThiago Jung BauermannLDFLAGS_purgatory.ro := -e purgatory_start -r --no-undefined
110d976313SThiago Jung Bauermann
1219031275SHari Bathini$(obj)/purgatory.ro: $(obj)/trampoline_$(BITS).o FORCE
130d976313SThiago Jung Bauermann		$(call if_changed,ld)
140d976313SThiago Jung Bauermann
1592579713SMasahiro Yamada$(obj)/kexec-purgatory.o: $(obj)/purgatory.ro
160d976313SThiago Jung Bauermann
170d976313SThiago Jung Bauermannobj-y	+= kexec-purgatory.o
18