]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
alpha: Package string routines together
authorRichard Henderson <rth@twiddle.net>
Fri, 23 Jun 2017 21:20:00 +0000 (14:20 -0700)
committerMatt Turner <mattst88@gmail.com>
Tue, 29 Aug 2017 19:01:46 +0000 (12:01 -0700)
There are direct branches between {str*cpy,str*cat} and stx*cpy.
Ensure the branches are within range by merging these objects.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Matt Turner <mattst88@gmail.com>
arch/alpha/lib/Makefile

index 7083434dd2419b7b3ef6ef8e74c204522d4a3257..a8081596036457af2149b37d356c64f2f1e7acc6 100644 (file)
@@ -20,12 +20,8 @@ lib-y =      __divqu.o __remqu.o __divlu.o __remlu.o \
        checksum.o \
        csum_partial_copy.o \
        $(ev67-y)strlen.o \
-       $(ev67-y)strcat.o \
-       strcpy.o \
-       $(ev67-y)strncat.o \
-       strncpy.o \
-       $(ev6-y)stxcpy.o \
-       $(ev6-y)stxncpy.o \
+       stycpy.o \
+       styncpy.o \
        $(ev67-y)strchr.o \
        $(ev67-y)strrchr.o \
        $(ev6-y)memchr.o \
@@ -49,3 +45,17 @@ AFLAGS___remlu.o =       -DREM -DINTSIZE
 $(addprefix $(obj)/,__divqu.o __remqu.o __divlu.o __remlu.o): \
                                                $(src)/$(ev6-y)divide.S FORCE
        $(call if_changed_rule,as_o_S)
+
+# There are direct branches between {str*cpy,str*cat} and stx*cpy.
+# Ensure the branches are within range by merging these objects.
+
+LDFLAGS_stycpy.o := -r
+LDFLAGS_styncpy.o := -r
+
+$(obj)/stycpy.o: $(obj)/strcpy.o $(obj)/$(ev67-y)strcat.o \
+                $(obj)/$(ev6-y)stxcpy.o FORCE
+       $(call if_changed,ld)
+
+$(obj)/styncpy.o: $(obj)/strncpy.o $(obj)/$(ev67-y)strncat.o \
+                $(obj)/$(ev6-y)stxncpy.o FORCE
+       $(call if_changed,ld)