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 8f5668260SChristophe LeroyCFLAGS_code-patching.o += -fno-stack-protector 9f5668260SChristophe LeroyCFLAGS_feature-fixups.o += -fno-stack-protector 10f5668260SChristophe Leroy 119a7841aeSTorsten DuweCFLAGS_REMOVE_code-patching.o = $(CC_FLAGS_FTRACE) 129a7841aeSTorsten DuweCFLAGS_REMOVE_feature-fixups.o = $(CC_FLAGS_FTRACE) 13f1eecf0eSSteven Rostedt 14f072015cSChristophe LeroyKASAN_SANITIZE_code-patching.o := n 15f072015cSChristophe LeroyKASAN_SANITIZE_feature-fixups.o := n 16f072015cSChristophe Leroy 17f072015cSChristophe Leroyifdef CONFIG_KASAN 18f072015cSChristophe LeroyCFLAGS_code-patching.o += -DDISABLE_BRANCH_PROFILING 19f072015cSChristophe LeroyCFLAGS_feature-fixups.o += -DDISABLE_BRANCH_PROFILING 20f072015cSChristophe Leroyendif 21f072015cSChristophe Leroy 22*bba49665SChristophe LeroyCFLAGS_code-patching.o += $(DISABLE_LATENT_ENTROPY_PLUGIN) 23*bba49665SChristophe LeroyCFLAGS_feature-fixups.o += $(DISABLE_LATENT_ENTROPY_PLUGIN) 24*bba49665SChristophe Leroy 25ff14a9c0SChristophe Leroyobj-y += alloc.o code-patching.o feature-fixups.o pmem.o 26baa25b57SNicholas Piggin 27f30a578dSChristophe Leroyobj-$(CONFIG_CODE_PATCHING_SELFTEST) += test-code-patching.o 28f30a578dSChristophe Leroy 2926deb043SChristophe Leroyifndef CONFIG_KASAN 3026deb043SChristophe Leroyobj-y += string.o memcmp_$(BITS).o 3126deb043SChristophe Leroyobj-$(CONFIG_PPC32) += strlen_32.o 3226deb043SChristophe Leroyendif 3326deb043SChristophe Leroy 3426deb043SChristophe Leroyobj-$(CONFIG_PPC32) += div64.o copy_32.o crtsavres.o 35564ec2f2SMichael Ellerman 367cd01b08SNaveen N. Raoobj-$(CONFIG_FUNCTION_ERROR_INJECTION) += error-inject.o 377cd01b08SNaveen N. Rao 38efe0160cSNicholas Piggin# See corresponding test in arch/powerpc/Makefile 39efe0160cSNicholas Piggin# 64-bit linker creates .sfpr on demand for final link (vmlinux), 40efe0160cSNicholas Piggin# so it is only needed for modules, and only for older linkers which 41efe0160cSNicholas Piggin# do not support --save-restore-funcs 42052c805aSMasahiro Yamadaifeq ($(call ld-ifversion, -lt, 22500, y),y) 43efe0160cSNicholas Pigginextra-$(CONFIG_PPC64) += crtsavres.o 44efe0160cSNicholas Pigginendif 4540ef8cbcSPaul Mackerras 4615a3204dSNicholas Pigginobj-$(CONFIG_PPC_BOOK3S_64) += copyuser_power7.o copypage_power7.o \ 474ebbbaa4SMichael Ellerman memcpy_power7.o restart_table.o 4815a3204dSNicholas Piggin 493448890cSAl Viroobj64-y += copypage_64.o copyuser_64.o mem_64.o hweight_64.o \ 504ebbbaa4SMichael Ellerman memcpy_64.o copy_mc_64.o 511dcee55fSMichael Ellerman 52aa65ff6bSNicholas Pigginifndef CONFIG_PPC_QUEUED_SPINLOCKS 531dcee55fSMichael Ellermanobj64-$(CONFIG_SMP) += locks.o 54aa65ff6bSNicholas Pigginendif 55aa65ff6bSNicholas Piggin 561dcee55fSMichael Ellermanobj64-$(CONFIG_ALTIVEC) += vmx-helper.o 5784022ac1SSandipan Dasobj64-$(CONFIG_KPROBES_SANITY_TEST) += test_emulate_step.o \ 5884022ac1SSandipan Das test_emulate_step_exec_instr.o 591dcee55fSMichael Ellerman 60f36bbf21SChristophe Leroyobj-y += checksum_$(BITS).o checksum_wrappers.o \ 6126deb043SChristophe Leroy string_$(BITS).o 627a332b0cSAnton Blanchard 633e3ebed3SChristophe Leroyobj-y += sstep.o 643e3ebed3SChristophe Leroyobj-$(CONFIG_PPC_FPU) += ldstfp.o 6531bfdb03SPaul Mackerrasobj64-y += quad.o 66f78541dcSPaul Mackerras 671088a209SSylvain Munautobj-$(CONFIG_PPC_LIB_RHEAP) += rheap.o 68aaddd3eaSMichael Ellerman 69362e7701SMichael Ellermanobj-$(CONFIG_FTR_FIXUP_SELFTEST) += feature-fixups-test.o 70ef1313deSAnton Blanchard 71f718d426SMatt Brownobj-$(CONFIG_ALTIVEC) += xor_vmx.o xor_vmx_glue.o 721fb3f5a7SAnton BlanchardCFLAGS_xor_vmx.o += -maltivec $(call cc-option,-mabi=altivec) 7304e85bbfSAlexey Dobriyan# Enable <altivec.h> 7404e85bbfSAlexey DobriyanCFLAGS_xor_vmx.o += -isystem $(shell $(CC) -print-file-name=include) 751dcee55fSMichael Ellerman 761dcee55fSMichael Ellermanobj-$(CONFIG_PPC64) += $(obj64-y) 77