xref: /kernel/linux/linux-5.10/arch/alpha/lib/Makefile (revision 8c2ecf20)
18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0
28c2ecf20Sopenharmony_ci#
38c2ecf20Sopenharmony_ci# Makefile for alpha-specific library files..
48c2ecf20Sopenharmony_ci#
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ciasflags-y := $(KBUILD_CFLAGS)
78c2ecf20Sopenharmony_ciccflags-y := -Werror
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci# Many of these routines have implementations tuned for ev6.
108c2ecf20Sopenharmony_ci# Choose them iff we're targeting ev6 specifically.
118c2ecf20Sopenharmony_ciev6-$(CONFIG_ALPHA_EV6) := ev6-
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci# Several make use of the cttz instruction introduced in ev67.
148c2ecf20Sopenharmony_ciev67-$(CONFIG_ALPHA_EV67) := ev67-
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_cilib-y =	__divqu.o __remqu.o __divlu.o __remlu.o \
178c2ecf20Sopenharmony_ci	udelay.o \
188c2ecf20Sopenharmony_ci	$(ev6-y)memset.o \
198c2ecf20Sopenharmony_ci	$(ev6-y)memcpy.o \
208c2ecf20Sopenharmony_ci	memmove.o \
218c2ecf20Sopenharmony_ci	checksum.o \
228c2ecf20Sopenharmony_ci	csum_partial_copy.o \
238c2ecf20Sopenharmony_ci	$(ev67-y)strlen.o \
248c2ecf20Sopenharmony_ci	stycpy.o \
258c2ecf20Sopenharmony_ci	styncpy.o \
268c2ecf20Sopenharmony_ci	$(ev67-y)strchr.o \
278c2ecf20Sopenharmony_ci	$(ev67-y)strrchr.o \
288c2ecf20Sopenharmony_ci	$(ev6-y)memchr.o \
298c2ecf20Sopenharmony_ci	$(ev6-y)copy_user.o \
308c2ecf20Sopenharmony_ci	$(ev6-y)clear_user.o \
318c2ecf20Sopenharmony_ci	$(ev6-y)csum_ipv6_magic.o \
328c2ecf20Sopenharmony_ci	$(ev6-y)clear_page.o \
338c2ecf20Sopenharmony_ci	$(ev6-y)copy_page.o \
348c2ecf20Sopenharmony_ci	fpreg.o \
358c2ecf20Sopenharmony_ci	callback_srm.o srm_puts.o srm_printk.o \
368c2ecf20Sopenharmony_ci	fls.o
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci# The division routines are built from single source, with different defines.
398c2ecf20Sopenharmony_ciAFLAGS___divqu.o = -DDIV
408c2ecf20Sopenharmony_ciAFLAGS___remqu.o =       -DREM
418c2ecf20Sopenharmony_ciAFLAGS___divlu.o = -DDIV       -DINTSIZE
428c2ecf20Sopenharmony_ciAFLAGS___remlu.o =       -DREM -DINTSIZE
438c2ecf20Sopenharmony_ci
448c2ecf20Sopenharmony_ci$(addprefix $(obj)/,__divqu.o __remqu.o __divlu.o __remlu.o): \
458c2ecf20Sopenharmony_ci						$(src)/$(ev6-y)divide.S FORCE
468c2ecf20Sopenharmony_ci	$(call if_changed_rule,as_o_S)
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ci# There are direct branches between {str*cpy,str*cat} and stx*cpy.
498c2ecf20Sopenharmony_ci# Ensure the branches are within range by merging these objects.
508c2ecf20Sopenharmony_ci
518c2ecf20Sopenharmony_ciLDFLAGS_stycpy.o := -r
528c2ecf20Sopenharmony_ciLDFLAGS_styncpy.o := -r
538c2ecf20Sopenharmony_ci
548c2ecf20Sopenharmony_ci$(obj)/stycpy.o: $(obj)/strcpy.o $(obj)/$(ev67-y)strcat.o \
558c2ecf20Sopenharmony_ci		 $(obj)/$(ev6-y)stxcpy.o FORCE
568c2ecf20Sopenharmony_ci	$(call if_changed,ld)
578c2ecf20Sopenharmony_ci
588c2ecf20Sopenharmony_ci$(obj)/styncpy.o: $(obj)/strncpy.o $(obj)/$(ev67-y)strncat.o \
598c2ecf20Sopenharmony_ci		 $(obj)/$(ev6-y)stxncpy.o FORCE
608c2ecf20Sopenharmony_ci	$(call if_changed,ld)
61