1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0 21da177e4SLinus Torvalds# 31da177e4SLinus Torvalds# Makefile for alpha-specific library files.. 41da177e4SLinus Torvalds# 51da177e4SLinus Torvalds 68a362cd6Smatt mooneyasflags-y := $(KBUILD_CFLAGS) 78a362cd6Smatt mooneyccflags-y := -Werror 81da177e4SLinus Torvalds 91da177e4SLinus Torvalds# Many of these routines have implementations tuned for ev6. 101da177e4SLinus Torvalds# Choose them iff we're targeting ev6 specifically. 111da177e4SLinus Torvaldsev6-$(CONFIG_ALPHA_EV6) := ev6- 121da177e4SLinus Torvalds 131da177e4SLinus Torvalds# Several make use of the cttz instruction introduced in ev67. 141da177e4SLinus Torvaldsev67-$(CONFIG_ALPHA_EV67) := ev67- 151da177e4SLinus Torvalds 161da177e4SLinus Torvaldslib-y = __divqu.o __remqu.o __divlu.o __remlu.o \ 171da177e4SLinus Torvalds udelay.o \ 181da177e4SLinus Torvalds $(ev6-y)memset.o \ 191da177e4SLinus Torvalds $(ev6-y)memcpy.o \ 201da177e4SLinus Torvalds memmove.o \ 211da177e4SLinus Torvalds checksum.o \ 221da177e4SLinus Torvalds csum_partial_copy.o \ 231da177e4SLinus Torvalds $(ev67-y)strlen.o \ 244758ce82SRichard Henderson stycpy.o \ 254758ce82SRichard Henderson styncpy.o \ 261da177e4SLinus Torvalds $(ev67-y)strchr.o \ 271da177e4SLinus Torvalds $(ev67-y)strrchr.o \ 281da177e4SLinus Torvalds $(ev6-y)memchr.o \ 291da177e4SLinus Torvalds $(ev6-y)copy_user.o \ 301da177e4SLinus Torvalds $(ev6-y)clear_user.o \ 311da177e4SLinus Torvalds $(ev6-y)csum_ipv6_magic.o \ 321da177e4SLinus Torvalds $(ev6-y)clear_page.o \ 331da177e4SLinus Torvalds $(ev6-y)copy_page.o \ 341da177e4SLinus Torvalds fpreg.o \ 3574fd1b68SRichard Henderson callback_srm.o srm_puts.o srm_printk.o \ 3674fd1b68SRichard Henderson fls.o 371da177e4SLinus Torvalds 381da177e4SLinus Torvaldslib-$(CONFIG_SMP) += dec_and_lock.o 391da177e4SLinus Torvalds 401da177e4SLinus Torvalds# The division routines are built from single source, with different defines. 411da177e4SLinus TorvaldsAFLAGS___divqu.o = -DDIV 421da177e4SLinus TorvaldsAFLAGS___remqu.o = -DREM 431da177e4SLinus TorvaldsAFLAGS___divlu.o = -DDIV -DINTSIZE 441da177e4SLinus TorvaldsAFLAGS___remlu.o = -DREM -DINTSIZE 451da177e4SLinus Torvalds 46e19a4e3fSMasahiro Yamada$(addprefix $(obj)/,__divqu.o __remqu.o __divlu.o __remlu.o): \ 473eec0291SMasahiro Yamada $(src)/$(ev6-y)divide.S FORCE 483eec0291SMasahiro Yamada $(call if_changed_rule,as_o_S) 494758ce82SRichard Henderson 504758ce82SRichard Henderson# There are direct branches between {str*cpy,str*cat} and stx*cpy. 514758ce82SRichard Henderson# Ensure the branches are within range by merging these objects. 524758ce82SRichard Henderson 534758ce82SRichard HendersonLDFLAGS_stycpy.o := -r 544758ce82SRichard HendersonLDFLAGS_styncpy.o := -r 554758ce82SRichard Henderson 564758ce82SRichard Henderson$(obj)/stycpy.o: $(obj)/strcpy.o $(obj)/$(ev67-y)strcat.o \ 574758ce82SRichard Henderson $(obj)/$(ev6-y)stxcpy.o FORCE 584758ce82SRichard Henderson $(call if_changed,ld) 594758ce82SRichard Henderson 604758ce82SRichard Henderson$(obj)/styncpy.o: $(obj)/strncpy.o $(obj)/$(ev67-y)strncat.o \ 614758ce82SRichard Henderson $(obj)/$(ev6-y)stxncpy.o FORCE 624758ce82SRichard Henderson $(call if_changed,ld) 63