xref: /openbmc/linux/arch/powerpc/lib/Makefile (revision b2441318)
1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0
214cf11afSPaul Mackerras#
314cf11afSPaul Mackerras# Makefile for ppc-specific library files..
414cf11afSPaul Mackerras#
514cf11afSPaul Mackerras
6ba55bd74SMichael Ellermansubdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
7ba55bd74SMichael Ellerman
81fbe9cf2SAnton Blanchardccflags-$(CONFIG_PPC64)	:= $(NO_MINIMAL_TOC)
98555a002SAnton Blanchard
109a7841aeSTorsten DuweCFLAGS_REMOVE_code-patching.o = $(CC_FLAGS_FTRACE)
119a7841aeSTorsten DuweCFLAGS_REMOVE_feature-fixups.o = $(CC_FLAGS_FTRACE)
12f1eecf0eSSteven Rostedt
13baa25b57SNicholas Pigginobj-y += string.o alloc.o code-patching.o feature-fixups.o
14baa25b57SNicholas Piggin
15efe0160cSNicholas Pigginobj-$(CONFIG_PPC32)	+= div64.o copy_32.o crtsavres.o
16564ec2f2SMichael Ellerman
17efe0160cSNicholas Piggin# See corresponding test in arch/powerpc/Makefile
18efe0160cSNicholas Piggin# 64-bit linker creates .sfpr on demand for final link (vmlinux),
19efe0160cSNicholas Piggin# so it is only needed for modules, and only for older linkers which
20efe0160cSNicholas Piggin# do not support --save-restore-funcs
21efe0160cSNicholas Pigginifeq ($(call ld-ifversion, -lt, 225000000, y),y)
22efe0160cSNicholas Pigginextra-$(CONFIG_PPC64)	+= crtsavres.o
23efe0160cSNicholas Pigginendif
2440ef8cbcSPaul Mackerras
253448890cSAl Viroobj64-y	+= copypage_64.o copyuser_64.o mem_64.o hweight_64.o \
261dcee55fSMichael Ellerman	   copyuser_power7.o string_64.o copypage_power7.o memcpy_power7.o \
271dcee55fSMichael Ellerman	   memcpy_64.o memcmp_64.o
281dcee55fSMichael Ellerman
291dcee55fSMichael Ellermanobj64-$(CONFIG_SMP)	+= locks.o
301dcee55fSMichael Ellermanobj64-$(CONFIG_ALTIVEC)	+= vmx-helper.o
314ceae137SRavi Bangoriaobj64-$(CONFIG_KPROBES_SANITY_TEST) += test_emulate_step.o
321dcee55fSMichael Ellerman
3368201fbbSMichael Ellermanobj-y			+= checksum_$(BITS).o checksum_wrappers.o
347a332b0cSAnton Blanchard
3531bfdb03SPaul Mackerrasobj-y			+= sstep.o ldstfp.o quad.o
3631bfdb03SPaul Mackerrasobj64-y			+= quad.o
37f78541dcSPaul Mackerras
381088a209SSylvain Munautobj-$(CONFIG_PPC_LIB_RHEAP) += rheap.o
39aaddd3eaSMichael Ellerman
40362e7701SMichael Ellermanobj-$(CONFIG_FTR_FIXUP_SELFTEST) += feature-fixups-test.o
41ef1313deSAnton Blanchard
42f718d426SMatt Brownobj-$(CONFIG_ALTIVEC)	+= xor_vmx.o xor_vmx_glue.o
431fb3f5a7SAnton BlanchardCFLAGS_xor_vmx.o += -maltivec $(call cc-option,-mabi=altivec)
441dcee55fSMichael Ellerman
451dcee55fSMichael Ellermanobj-$(CONFIG_PPC64) += $(obj64-y)
46