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 16*5352090aSDaniel Axtens# restart_table.o contains functions called in the NMI interrupt path 17*5352090aSDaniel Axtens# which can be in real mode. Disable KASAN. 18*5352090aSDaniel AxtensKASAN_SANITIZE_restart_table.o := n 19f072015cSChristophe Leroy 20f072015cSChristophe Leroyifdef CONFIG_KASAN 21f072015cSChristophe LeroyCFLAGS_code-patching.o += -DDISABLE_BRANCH_PROFILING 22f072015cSChristophe LeroyCFLAGS_feature-fixups.o += -DDISABLE_BRANCH_PROFILING 23f072015cSChristophe Leroyendif 24f072015cSChristophe Leroy 25bba49665SChristophe LeroyCFLAGS_code-patching.o += $(DISABLE_LATENT_ENTROPY_PLUGIN) 26bba49665SChristophe LeroyCFLAGS_feature-fixups.o += $(DISABLE_LATENT_ENTROPY_PLUGIN) 27bba49665SChristophe Leroy 28ff14a9c0SChristophe Leroyobj-y += alloc.o code-patching.o feature-fixups.o pmem.o 29baa25b57SNicholas Piggin 30f30a578dSChristophe Leroyobj-$(CONFIG_CODE_PATCHING_SELFTEST) += test-code-patching.o 31f30a578dSChristophe Leroy 3226deb043SChristophe Leroyifndef CONFIG_KASAN 3326deb043SChristophe Leroyobj-y += string.o memcmp_$(BITS).o 3426deb043SChristophe Leroyobj-$(CONFIG_PPC32) += strlen_32.o 3526deb043SChristophe Leroyendif 3626deb043SChristophe Leroy 3726deb043SChristophe Leroyobj-$(CONFIG_PPC32) += div64.o copy_32.o crtsavres.o 38564ec2f2SMichael Ellerman 397cd01b08SNaveen N. Raoobj-$(CONFIG_FUNCTION_ERROR_INJECTION) += error-inject.o 407cd01b08SNaveen N. Rao 41efe0160cSNicholas Piggin# See corresponding test in arch/powerpc/Makefile 42efe0160cSNicholas Piggin# 64-bit linker creates .sfpr on demand for final link (vmlinux), 43efe0160cSNicholas Piggin# so it is only needed for modules, and only for older linkers which 44efe0160cSNicholas Piggin# do not support --save-restore-funcs 45052c805aSMasahiro Yamadaifeq ($(call ld-ifversion, -lt, 22500, y),y) 46efe0160cSNicholas Pigginextra-$(CONFIG_PPC64) += crtsavres.o 47efe0160cSNicholas Pigginendif 4840ef8cbcSPaul Mackerras 4915a3204dSNicholas Pigginobj-$(CONFIG_PPC_BOOK3S_64) += copyuser_power7.o copypage_power7.o \ 504ebbbaa4SMichael Ellerman memcpy_power7.o restart_table.o 5115a3204dSNicholas Piggin 523448890cSAl Viroobj64-y += copypage_64.o copyuser_64.o mem_64.o hweight_64.o \ 534ebbbaa4SMichael Ellerman memcpy_64.o copy_mc_64.o 541dcee55fSMichael Ellerman 55aa65ff6bSNicholas Pigginifndef CONFIG_PPC_QUEUED_SPINLOCKS 561dcee55fSMichael Ellermanobj64-$(CONFIG_SMP) += locks.o 57aa65ff6bSNicholas Pigginendif 58aa65ff6bSNicholas Piggin 591dcee55fSMichael Ellermanobj64-$(CONFIG_ALTIVEC) += vmx-helper.o 6084022ac1SSandipan Dasobj64-$(CONFIG_KPROBES_SANITY_TEST) += test_emulate_step.o \ 6184022ac1SSandipan Das test_emulate_step_exec_instr.o 621dcee55fSMichael Ellerman 63f36bbf21SChristophe Leroyobj-y += checksum_$(BITS).o checksum_wrappers.o \ 6426deb043SChristophe Leroy string_$(BITS).o 657a332b0cSAnton Blanchard 663e3ebed3SChristophe Leroyobj-y += sstep.o 673e3ebed3SChristophe Leroyobj-$(CONFIG_PPC_FPU) += ldstfp.o 6831bfdb03SPaul Mackerrasobj64-y += quad.o 69f78541dcSPaul Mackerras 701088a209SSylvain Munautobj-$(CONFIG_PPC_LIB_RHEAP) += rheap.o 71aaddd3eaSMichael Ellerman 72362e7701SMichael Ellermanobj-$(CONFIG_FTR_FIXUP_SELFTEST) += feature-fixups-test.o 73ef1313deSAnton Blanchard 74f718d426SMatt Brownobj-$(CONFIG_ALTIVEC) += xor_vmx.o xor_vmx_glue.o 751fb3f5a7SAnton BlanchardCFLAGS_xor_vmx.o += -maltivec $(call cc-option,-mabi=altivec) 7604e85bbfSAlexey Dobriyan# Enable <altivec.h> 7704e85bbfSAlexey DobriyanCFLAGS_xor_vmx.o += -isystem $(shell $(CC) -print-file-name=include) 781dcee55fSMichael Ellerman 791dcee55fSMichael Ellermanobj-$(CONFIG_PPC64) += $(obj64-y) 80