1 # SPDX-License-Identifier: GPL-2.0
3 # Makefile for ppc-specific library files..
6 ccflags-
$(CONFIG_PPC64
) := $(NO_MINIMAL_TOC
)
8 CFLAGS_REMOVE_code-patching.o
= $(CC_FLAGS_FTRACE
)
9 CFLAGS_REMOVE_feature-fixups.o
= $(CC_FLAGS_FTRACE
)
11 KASAN_SANITIZE_code-patching.o
:= n
12 KASAN_SANITIZE_feature-fixups.o
:= n
15 CFLAGS_code-patching.o
+= -DDISABLE_BRANCH_PROFILING
16 CFLAGS_feature-fixups.o
+= -DDISABLE_BRANCH_PROFILING
19 obj-y
+= alloc.o code-patching.o feature-fixups.o pmem.o
22 obj-y
+= string.o memcmp_
$(BITS
).o
23 obj-
$(CONFIG_PPC32
) += strlen_32.o
26 obj-
$(CONFIG_PPC32
) += div64.o copy_32.o crtsavres.o
28 obj-
$(CONFIG_FUNCTION_ERROR_INJECTION
) += error-inject.o
30 # See corresponding test in arch/powerpc/Makefile
31 # 64-bit linker creates .sfpr on demand for final link (vmlinux),
32 # so it is only needed for modules, and only for older linkers which
33 # do not support --save-restore-funcs
34 ifeq ($(call ld-ifversion
, -lt
, 225000000, y
),y
)
35 extra-
$(CONFIG_PPC64
) += crtsavres.o
38 obj-
$(CONFIG_PPC_BOOK3S_64
) += copyuser_power7.o copypage_power7.o \
41 obj64-y
+= copypage_64.o copyuser_64.o mem_64.o hweight_64.o \
42 memcpy_64.o memcpy_mcsafe_64.o
44 obj64-
$(CONFIG_SMP
) += locks.o
45 obj64-
$(CONFIG_ALTIVEC
) += vmx-helper.o
46 obj64-
$(CONFIG_KPROBES_SANITY_TEST
) += test_emulate_step.o \
47 test_emulate_step_exec_instr.o
49 obj-y
+= checksum_
$(BITS
).o checksum_wrappers.o \
53 obj-
$(CONFIG_PPC_FPU
) += ldstfp.o
56 obj-
$(CONFIG_PPC_LIB_RHEAP
) += rheap.o
58 obj-
$(CONFIG_FTR_FIXUP_SELFTEST
) += feature-fixups-test.o
60 obj-
$(CONFIG_ALTIVEC
) += xor_vmx.o xor_vmx_glue.o
61 CFLAGS_xor_vmx.o
+= -maltivec
$(call cc-option
,-mabi
=altivec
)
63 obj-
$(CONFIG_PPC64
) += $(obj64-y
)