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 165352090aSDaniel Axtens# restart_table.o contains functions called in the NMI interrupt path 175352090aSDaniel Axtens# which can be in real mode. Disable KASAN. 185352090aSDaniel AxtensKASAN_SANITIZE_restart_table.o := n 192fb857bcSRohan McLureKCSAN_SANITIZE_code-patching.o := n 202fb857bcSRohan McLureKCSAN_SANITIZE_feature-fixups.o := n 21f072015cSChristophe Leroy 22f072015cSChristophe Leroyifdef CONFIG_KASAN 23f072015cSChristophe LeroyCFLAGS_code-patching.o += -DDISABLE_BRANCH_PROFILING 24f072015cSChristophe LeroyCFLAGS_feature-fixups.o += -DDISABLE_BRANCH_PROFILING 25f072015cSChristophe Leroyendif 26f072015cSChristophe Leroy 27bba49665SChristophe LeroyCFLAGS_code-patching.o += $(DISABLE_LATENT_ENTROPY_PLUGIN) 28bba49665SChristophe LeroyCFLAGS_feature-fixups.o += $(DISABLE_LATENT_ENTROPY_PLUGIN) 29bba49665SChristophe Leroy 30fabdb27dSMichael Ellermanobj-y += code-patching.o feature-fixups.o pmem.o 31baa25b57SNicholas Piggin 32f30a578dSChristophe Leroyobj-$(CONFIG_CODE_PATCHING_SELFTEST) += test-code-patching.o 33f30a578dSChristophe Leroy 3426deb043SChristophe Leroyifndef CONFIG_KASAN 3526deb043SChristophe Leroyobj-y += string.o memcmp_$(BITS).o 3626deb043SChristophe Leroyobj-$(CONFIG_PPC32) += strlen_32.o 3726deb043SChristophe Leroyendif 3826deb043SChristophe Leroy 3926deb043SChristophe Leroyobj-$(CONFIG_PPC32) += div64.o copy_32.o crtsavres.o 40564ec2f2SMichael Ellerman 417cd01b08SNaveen N. Raoobj-$(CONFIG_FUNCTION_ERROR_INJECTION) += error-inject.o 427cd01b08SNaveen N. Rao 43efe0160cSNicholas Piggin# See corresponding test in arch/powerpc/Makefile 44efe0160cSNicholas Piggin# 64-bit linker creates .sfpr on demand for final link (vmlinux), 45efe0160cSNicholas Piggin# so it is only needed for modules, and only for older linkers which 46efe0160cSNicholas Piggin# do not support --save-restore-funcs 4754a11654SMasahiro Yamadaifndef CONFIG_LD_IS_BFD 48f7aac5feSMasahiro Yamadaalways-$(CONFIG_PPC64) += crtsavres.o 49efe0160cSNicholas Pigginendif 5040ef8cbcSPaul Mackerras 5115a3204dSNicholas Pigginobj-$(CONFIG_PPC_BOOK3S_64) += copyuser_power7.o copypage_power7.o \ 524ebbbaa4SMichael Ellerman memcpy_power7.o restart_table.o 5315a3204dSNicholas Piggin 543448890cSAl Viroobj64-y += copypage_64.o copyuser_64.o mem_64.o hweight_64.o \ 554ebbbaa4SMichael Ellerman memcpy_64.o copy_mc_64.o 561dcee55fSMichael Ellerman 579f61521cSNicholas Pigginifdef CONFIG_PPC_QUEUED_SPINLOCKS 589f61521cSNicholas Pigginobj-$(CONFIG_SMP) += qspinlock.o 599f61521cSNicholas Pigginelse 601dcee55fSMichael Ellermanobj64-$(CONFIG_SMP) += locks.o 61aa65ff6bSNicholas Pigginendif 62aa65ff6bSNicholas Piggin 631dcee55fSMichael Ellermanobj64-$(CONFIG_ALTIVEC) += vmx-helper.o 6484022ac1SSandipan Dasobj64-$(CONFIG_KPROBES_SANITY_TEST) += test_emulate_step.o \ 6584022ac1SSandipan Das test_emulate_step_exec_instr.o 661dcee55fSMichael Ellerman 67f36bbf21SChristophe Leroyobj-y += checksum_$(BITS).o checksum_wrappers.o \ 6826deb043SChristophe Leroy string_$(BITS).o 697a332b0cSAnton Blanchard 703e3ebed3SChristophe Leroyobj-y += sstep.o 713e3ebed3SChristophe Leroyobj-$(CONFIG_PPC_FPU) += ldstfp.o 7231bfdb03SPaul Mackerrasobj64-y += quad.o 73f78541dcSPaul Mackerras 741088a209SSylvain Munautobj-$(CONFIG_PPC_LIB_RHEAP) += rheap.o 75aaddd3eaSMichael Ellerman 76362e7701SMichael Ellermanobj-$(CONFIG_FTR_FIXUP_SELFTEST) += feature-fixups-test.o 77ef1313deSAnton Blanchard 78f718d426SMatt Brownobj-$(CONFIG_ALTIVEC) += xor_vmx.o xor_vmx_glue.o 79653d5150SNathan ChancellorCFLAGS_xor_vmx.o += -mhard-float -maltivec $(call cc-option,-mabi=altivec) 8004e85bbfSAlexey Dobriyan# Enable <altivec.h> 8104e85bbfSAlexey DobriyanCFLAGS_xor_vmx.o += -isystem $(shell $(CC) -print-file-name=include) 821dcee55fSMichael Ellerman 831dcee55fSMichael Ellermanobj-$(CONFIG_PPC64) += $(obj64-y) 84