• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# SPDX-License-Identifier: GPL-2.0
2#
3# Makefile for ppc-specific library files..
4#
5
6ccflags-$(CONFIG_PPC64)	:= $(NO_MINIMAL_TOC)
7
8CFLAGS_code-patching.o += -fno-stack-protector
9CFLAGS_feature-fixups.o += -fno-stack-protector
10
11CFLAGS_REMOVE_code-patching.o = $(CC_FLAGS_FTRACE)
12CFLAGS_REMOVE_feature-fixups.o = $(CC_FLAGS_FTRACE)
13
14KASAN_SANITIZE_code-patching.o := n
15KASAN_SANITIZE_feature-fixups.o := n
16
17ifdef CONFIG_KASAN
18CFLAGS_code-patching.o += -DDISABLE_BRANCH_PROFILING
19CFLAGS_feature-fixups.o += -DDISABLE_BRANCH_PROFILING
20endif
21
22CFLAGS_code-patching.o += $(DISABLE_LATENT_ENTROPY_PLUGIN)
23CFLAGS_feature-fixups.o += $(DISABLE_LATENT_ENTROPY_PLUGIN)
24
25obj-y += alloc.o code-patching.o feature-fixups.o pmem.o inst.o test_code-patching.o
26
27ifndef CONFIG_KASAN
28obj-y	+=	string.o memcmp_$(BITS).o
29obj-$(CONFIG_PPC32)	+= strlen_32.o
30endif
31
32obj-$(CONFIG_PPC32)	+= div64.o copy_32.o crtsavres.o
33
34obj-$(CONFIG_FUNCTION_ERROR_INJECTION)	+= error-inject.o
35
36# See corresponding test in arch/powerpc/Makefile
37# 64-bit linker creates .sfpr on demand for final link (vmlinux),
38# so it is only needed for modules, and only for older linkers which
39# do not support --save-restore-funcs
40ifeq ($(call ld-ifversion, -lt, 225000000, y),y)
41extra-$(CONFIG_PPC64)	+= crtsavres.o
42endif
43
44obj-$(CONFIG_PPC_BOOK3S_64) += copyuser_power7.o copypage_power7.o \
45			       memcpy_power7.o
46
47obj64-y	+= copypage_64.o copyuser_64.o mem_64.o hweight_64.o \
48	   memcpy_64.o copy_mc_64.o
49
50ifndef CONFIG_PPC_QUEUED_SPINLOCKS
51obj64-$(CONFIG_SMP)	+= locks.o
52endif
53
54obj64-$(CONFIG_ALTIVEC)	+= vmx-helper.o
55obj64-$(CONFIG_KPROBES_SANITY_TEST)	+= test_emulate_step.o \
56					   test_emulate_step_exec_instr.o
57
58obj-y			+= checksum_$(BITS).o checksum_wrappers.o \
59			   string_$(BITS).o
60
61obj-y			+= sstep.o
62obj-$(CONFIG_PPC_FPU)	+= ldstfp.o
63obj64-y			+= quad.o
64
65obj-$(CONFIG_PPC_LIB_RHEAP) += rheap.o
66
67obj-$(CONFIG_FTR_FIXUP_SELFTEST) += feature-fixups-test.o
68
69obj-$(CONFIG_ALTIVEC)	+= xor_vmx.o xor_vmx_glue.o
70CFLAGS_xor_vmx.o += -maltivec $(call cc-option,-mabi=altivec)
71
72obj-$(CONFIG_PPC64) += $(obj64-y)
73