blob: 3c29c9009bbf2c0a830d32a4fdf353ecb8a34b60 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001# SPDX-License-Identifier: GPL-2.0
Paul Mackerras14cf11a2005-09-26 16:04:21 +10002#
3# Makefile for ppc-specific library files..
4#
5
Michael Ellermanba55bd72009-06-09 20:48:51 +00006subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
7
Anton Blanchard1fbe9cf2012-11-26 17:41:08 +00008ccflags-$(CONFIG_PPC64) := $(NO_MINIMAL_TOC)
Anton Blanchard8555a002006-06-10 20:23:54 +10009
Torsten Duwe9a7841a2016-03-03 15:26:58 +110010CFLAGS_REMOVE_code-patching.o = $(CC_FLAGS_FTRACE)
11CFLAGS_REMOVE_feature-fixups.o = $(CC_FLAGS_FTRACE)
Steven Rostedtf1eecf02008-11-26 15:54:46 -050012
Nicholas Pigginbaa25b52017-05-12 01:56:49 +100013obj-y += string.o alloc.o code-patching.o feature-fixups.o
14
Nicholas Pigginefe01602017-05-12 01:56:52 +100015obj-$(CONFIG_PPC32) += div64.o copy_32.o crtsavres.o
Michael Ellerman564ec2f2014-12-22 15:14:24 +110016
Nicholas Pigginefe01602017-05-12 01:56:52 +100017# See corresponding test in arch/powerpc/Makefile
18# 64-bit linker creates .sfpr on demand for final link (vmlinux),
19# so it is only needed for modules, and only for older linkers which
20# do not support --save-restore-funcs
21ifeq ($(call ld-ifversion, -lt, 225000000, y),y)
22extra-$(CONFIG_PPC64) += crtsavres.o
23endif
Paul Mackerras40ef8cb2005-10-10 22:50:37 +100024
Al Viro34488902017-03-21 16:35:08 -040025obj64-y += copypage_64.o copyuser_64.o mem_64.o hweight_64.o \
Michael Ellerman1dcee552014-12-22 15:18:43 +110026 copyuser_power7.o string_64.o copypage_power7.o memcpy_power7.o \
Oliver O'Halloran32ce3862017-10-19 18:13:54 +110027 memcpy_64.o memcmp_64.o pmem.o
Michael Ellerman1dcee552014-12-22 15:18:43 +110028
29obj64-$(CONFIG_SMP) += locks.o
30obj64-$(CONFIG_ALTIVEC) += vmx-helper.o
Ravi Bangoria4ceae132017-02-14 14:46:43 +053031obj64-$(CONFIG_KPROBES_SANITY_TEST) += test_emulate_step.o
Michael Ellerman1dcee552014-12-22 15:18:43 +110032
Michael Ellerman68201fb2016-08-11 16:03:14 +100033obj-y += checksum_$(BITS).o checksum_wrappers.o
Anton Blanchard7a332b02013-09-23 12:04:51 +100034
Paul Mackerras31bfdb02017-08-30 14:12:40 +100035obj-y += sstep.o ldstfp.o quad.o
36obj64-y += quad.o
Paul Mackerrasf78541dc2005-10-28 22:53:37 +100037
Sylvain Munaut1088a202007-09-16 20:53:25 +100038obj-$(CONFIG_PPC_LIB_RHEAP) += rheap.o
Michael Ellermanaaddd3e2008-06-24 11:32:21 +100039
Michael Ellerman362e7702008-06-24 11:33:03 +100040obj-$(CONFIG_FTR_FIXUP_SELFTEST) += feature-fixups-test.o
Anton Blanchardef1313d2013-10-14 21:03:58 +110041
Matt Brownf718d422017-05-24 09:45:59 +100042obj-$(CONFIG_ALTIVEC) += xor_vmx.o xor_vmx_glue.o
Anton Blanchard1fb3f5a2015-05-26 08:53:26 +100043CFLAGS_xor_vmx.o += -maltivec $(call cc-option,-mabi=altivec)
Michael Ellerman1dcee552014-12-22 15:18:43 +110044
45obj-$(CONFIG_PPC64) += $(obj64-y)