xref: /openbmc/linux/arch/powerpc/lib/Makefile (revision aa65ff6b)
1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0
214cf11afSPaul Mackerras#
314cf11afSPaul Mackerras# Makefile for ppc-specific library files..
414cf11afSPaul Mackerras#
514cf11afSPaul Mackerras
61fbe9cf2SAnton Blanchardccflags-$(CONFIG_PPC64)	:= $(NO_MINIMAL_TOC)
78555a002SAnton Blanchard
89a7841aeSTorsten DuweCFLAGS_REMOVE_code-patching.o = $(CC_FLAGS_FTRACE)
99a7841aeSTorsten DuweCFLAGS_REMOVE_feature-fixups.o = $(CC_FLAGS_FTRACE)
10f1eecf0eSSteven Rostedt
11f072015cSChristophe LeroyKASAN_SANITIZE_code-patching.o := n
12f072015cSChristophe LeroyKASAN_SANITIZE_feature-fixups.o := n
13f072015cSChristophe Leroy
14f072015cSChristophe Leroyifdef CONFIG_KASAN
15f072015cSChristophe LeroyCFLAGS_code-patching.o += -DDISABLE_BRANCH_PROFILING
16f072015cSChristophe LeroyCFLAGS_feature-fixups.o += -DDISABLE_BRANCH_PROFILING
17f072015cSChristophe Leroyendif
18f072015cSChristophe Leroy
19f77f8ff7SJordan Nietheobj-y += alloc.o code-patching.o feature-fixups.o pmem.o inst.o test_code-patching.o
20baa25b57SNicholas Piggin
2126deb043SChristophe Leroyifndef CONFIG_KASAN
2226deb043SChristophe Leroyobj-y	+=	string.o memcmp_$(BITS).o
2326deb043SChristophe Leroyobj-$(CONFIG_PPC32)	+= strlen_32.o
2426deb043SChristophe Leroyendif
2526deb043SChristophe Leroy
2626deb043SChristophe Leroyobj-$(CONFIG_PPC32)	+= div64.o copy_32.o crtsavres.o
27564ec2f2SMichael Ellerman
287cd01b08SNaveen N. Raoobj-$(CONFIG_FUNCTION_ERROR_INJECTION)	+= error-inject.o
297cd01b08SNaveen N. Rao
30efe0160cSNicholas Piggin# See corresponding test in arch/powerpc/Makefile
31efe0160cSNicholas Piggin# 64-bit linker creates .sfpr on demand for final link (vmlinux),
32efe0160cSNicholas Piggin# so it is only needed for modules, and only for older linkers which
33efe0160cSNicholas Piggin# do not support --save-restore-funcs
34efe0160cSNicholas Pigginifeq ($(call ld-ifversion, -lt, 225000000, y),y)
35efe0160cSNicholas Pigginextra-$(CONFIG_PPC64)	+= crtsavres.o
36efe0160cSNicholas Pigginendif
3740ef8cbcSPaul Mackerras
3815a3204dSNicholas Pigginobj-$(CONFIG_PPC_BOOK3S_64) += copyuser_power7.o copypage_power7.o \
3915a3204dSNicholas Piggin			       memcpy_power7.o
4015a3204dSNicholas Piggin
413448890cSAl Viroobj64-y	+= copypage_64.o copyuser_64.o mem_64.o hweight_64.o \
424d4a2738SBalbir Singh	   memcpy_64.o memcpy_mcsafe_64.o
431dcee55fSMichael Ellerman
44*aa65ff6bSNicholas Pigginifndef CONFIG_PPC_QUEUED_SPINLOCKS
451dcee55fSMichael Ellermanobj64-$(CONFIG_SMP)	+= locks.o
46*aa65ff6bSNicholas Pigginendif
47*aa65ff6bSNicholas Piggin
481dcee55fSMichael Ellermanobj64-$(CONFIG_ALTIVEC)	+= vmx-helper.o
4984022ac1SSandipan Dasobj64-$(CONFIG_KPROBES_SANITY_TEST)	+= test_emulate_step.o \
5084022ac1SSandipan Das					   test_emulate_step_exec_instr.o
511dcee55fSMichael Ellerman
52f36bbf21SChristophe Leroyobj-y			+= checksum_$(BITS).o checksum_wrappers.o \
5326deb043SChristophe Leroy			   string_$(BITS).o
547a332b0cSAnton Blanchard
553e3ebed3SChristophe Leroyobj-y			+= sstep.o
563e3ebed3SChristophe Leroyobj-$(CONFIG_PPC_FPU)	+= ldstfp.o
5731bfdb03SPaul Mackerrasobj64-y			+= quad.o
58f78541dcSPaul Mackerras
591088a209SSylvain Munautobj-$(CONFIG_PPC_LIB_RHEAP) += rheap.o
60aaddd3eaSMichael Ellerman
61362e7701SMichael Ellermanobj-$(CONFIG_FTR_FIXUP_SELFTEST) += feature-fixups-test.o
62ef1313deSAnton Blanchard
63f718d426SMatt Brownobj-$(CONFIG_ALTIVEC)	+= xor_vmx.o xor_vmx_glue.o
641fb3f5a7SAnton BlanchardCFLAGS_xor_vmx.o += -maltivec $(call cc-option,-mabi=altivec)
651dcee55fSMichael Ellerman
661dcee55fSMichael Ellermanobj-$(CONFIG_PPC64) += $(obj64-y)
67