1 # SPDX-License-Identifier: GPL-2.0
3 # linux/arch/arm/lib/Makefile
5 # Copyright (C) 1995-2000 Russell King
8 lib-y := changebit.o csumipv6.o csumpartial.o \
9 csumpartialcopy.o csumpartialcopyuser.o clearbit.o \
10 delay.o delay-loop.o findbit.o memchr.o \
13 testchangebit.o testclearbit.o testsetbit.o \
14 ashldi3.o ashrdi3.o lshrdi3.o muldi3.o \
15 ucmpdi2.o lib1funcs.o div64.o \
16 io-readsb.o io-writesb.o io-readsl.o io-writesl.o \
17 call_with_stack.o bswapsdi2.o
19 mmu-y := clear_user.o copy_page.o getuser.o putuser.o \
20 copy_from_user.o copy_to_user.o
22 ifdef CONFIG_CC_IS_CLANG
23 lib-y += backtrace-clang.o
28 # Choose optimised implementations for Raspberry Pi
29 ifeq ($(CONFIG_BCM2835_FAST_MEMCPY),y)
30 CFLAGS_uaccess_with_memcpy.o += -DCOPY_FROM_USER_THRESHOLD=1600
31 CFLAGS_uaccess_with_memcpy.o += -DCOPY_TO_USER_THRESHOLD=672
32 obj-$(CONFIG_MODULES) += exports_rpi.o
33 lib-y += memcpy_rpi.o memmove_rpi.o memset_rpi.o memcmp_rpi.o
35 lib-y += memcpy.o memmove.o memset.o
38 # using lib_ here won't override already available weak symbols
39 obj-$(CONFIG_UACCESS_WITH_MEMCPY) += uaccess_with_memcpy.o
41 lib-$(CONFIG_MMU) += $(mmu-y)
43 ifeq ($(CONFIG_CPU_32v3),y)
44 lib-y += io-readsw-armv3.o io-writesw-armv3.o
46 lib-y += io-readsw-armv4.o io-writesw-armv4.o
49 ifeq ($(CONFIG_ARCH_RPC),y)
50 AFLAGS_delay-loop.o += -march=armv4
53 $(obj)/csumpartialcopy.o: $(obj)/csumpartialcopygeneric.S
54 $(obj)/csumpartialcopyuser.o: $(obj)/csumpartialcopygeneric.S
56 ifeq ($(CONFIG_KERNEL_MODE_NEON),y)
57 NEON_FLAGS := -march=armv7-a -mfloat-abi=softfp -mfpu=neon
58 CFLAGS_xor-neon.o += $(NEON_FLAGS)
59 obj-$(CONFIG_XOR_BLOCKS) += xor-neon.o