xref: /openbmc/linux/arch/powerpc/lib/Makefile (revision 3e3ebed3)
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
1926deb043SChristophe Leroyobj-y += alloc.o code-patching.o feature-fixups.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 \
422676b89eSChristophe Leroy	   memcpy_64.o pmem.o
431dcee55fSMichael Ellerman
441dcee55fSMichael Ellermanobj64-$(CONFIG_SMP)	+= locks.o
451dcee55fSMichael Ellermanobj64-$(CONFIG_ALTIVEC)	+= vmx-helper.o
4684022ac1SSandipan Dasobj64-$(CONFIG_KPROBES_SANITY_TEST)	+= test_emulate_step.o \
4784022ac1SSandipan Das					   test_emulate_step_exec_instr.o
481dcee55fSMichael Ellerman
49f36bbf21SChristophe Leroyobj-y			+= checksum_$(BITS).o checksum_wrappers.o \
5026deb043SChristophe Leroy			   string_$(BITS).o
517a332b0cSAnton Blanchard
523e3ebed3SChristophe Leroyobj-y			+= sstep.o
533e3ebed3SChristophe Leroyobj-$(CONFIG_PPC_FPU)	+= ldstfp.o
5431bfdb03SPaul Mackerrasobj64-y			+= quad.o
55f78541dcSPaul Mackerras
561088a209SSylvain Munautobj-$(CONFIG_PPC_LIB_RHEAP) += rheap.o
57aaddd3eaSMichael Ellerman
58362e7701SMichael Ellermanobj-$(CONFIG_FTR_FIXUP_SELFTEST) += feature-fixups-test.o
59ef1313deSAnton Blanchard
60f718d426SMatt Brownobj-$(CONFIG_ALTIVEC)	+= xor_vmx.o xor_vmx_glue.o
611fb3f5a7SAnton BlanchardCFLAGS_xor_vmx.o += -maltivec $(call cc-option,-mabi=altivec)
621dcee55fSMichael Ellerman
631dcee55fSMichael Ellermanobj-$(CONFIG_PPC64) += $(obj64-y)
64