ce426f
    Backport of the addition of
ce426f
      sysdeps/powerpc/powerpc64/multiarch/strncat-power7.c
ce426f
    from the following:
ce426f
    
ce426f
    commit 9f2f36e5a91c2ce6edba5415e176155eb1008ae1
ce426f
    Author: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
ce426f
    Date:   Tue Dec 23 13:39:23 2014 -0500
ce426f
    
ce426f
        powerpc: Optimized strncat for POWER7/PPC64
ce426f
    
ce426f
        With 3eb38795dbbbd816 (Simplify strncat) the generic algorithms uses
ce426f
        strlen, strnlen, and memcpy.  This is faster than POWER7 current
ce426f
        implementation, especially for unaligned strings (where POWER7 code
ce426f
        uses byte-byte operations).
ce426f
    
ce426f
        This patch removes the assembly implementation and uses a multiarch
ce426f
        specialization based on default algorithm calling optimized POWER7
ce426f
        symbols.
ce426f
    
ce426f
        ChangeLog:
ce426f
            2015-01-13  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
ce426f
    
ce426f
            * sysdeps/powerpc/powerpc64/multiarch/strncat-power7.c: New file.
ce426f
            * sysdeps/powerpc/powerpc64/multiarch/strncat-power7.S: Remove file.
ce426f
            * sysdeps/powerpc/powerpc64/power7/strncat.S: Likewise.
ce426f
    
ce426f
    plus the addition of strncat-power7 to
ce426f
      sysdeps/powerpc/powerpc64/multiarch/Makefile
ce426f
ce426f
diff --git a/sysdeps/powerpc/powerpc64/multiarch/Makefile b/sysdeps/powerpc/powerpc64/multiarch/Makefile
ce426f
index 7ebfc7e..74ae710 100644
ce426f
--- a/sysdeps/powerpc/powerpc64/multiarch/Makefile
ce426f
+++ b/sysdeps/powerpc/powerpc64/multiarch/Makefile
ce426f
@@ -8,6 +8,7 @@ sysdep_routines += memcpy-power7 memcpy-a2 memcpy-power6 memcpy-cell \
ce426f
                   stpcpy-power8 stpcpy-power7 stpcpy-ppc64 \
ce426f
                   strcat-power8 strcat-power7 strcat-ppc64 \
ce426f
                   strcpy-power8 strcpy-power7 strcpy-ppc64 \
ce426f
+                  strncat-power7 \
ce426f
                   rawmemchr-ppc64 strlen-power7 strlen-ppc64 strnlen-power7 \
ce426f
                   strnlen-ppc64 strcasecmp-power7 strcasecmp_l-power7 \
ce426f
                   strncase-power7 strncase_l-power7 strncmp-power7 \
ce426f
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strncat-power7.c b/sysdeps/powerpc/powerpc64/multiarch/strncat-power7.c
ce426f
new file mode 100644
ce426f
index 0000000..39b1aeb
ce426f
--- /dev/null
ce426f
+++ b/sysdeps/powerpc/powerpc64/multiarch/strncat-power7.c
ce426f
@@ -0,0 +1,31 @@
ce426f
+/* Copyright (C) 2015 Free Software Foundation, Inc.
ce426f
+   This file is part of the GNU C Library.
ce426f
+
ce426f
+   The GNU C Library is free software; you can redistribute it and/or
ce426f
+   modify it under the terms of the GNU Lesser General Public
ce426f
+   License as published by the Free Software Foundation; either
ce426f
+   version 2.1 of the License, or (at your option) any later version.
ce426f
+
ce426f
+   The GNU C Library is distributed in the hope that it will be useful,
ce426f
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
ce426f
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
ce426f
+   Lesser General Public License for more details.
ce426f
+
ce426f
+   You should have received a copy of the GNU Lesser General Public
ce426f
+   License along with the GNU C Library; if not, see
ce426f
+   <http://www.gnu.org/licenses/ >.  */
ce426f
+
ce426f
+#include <string.h>
ce426f
+
ce426f
+#define STRNCAT __strncat_power7
ce426f
+
ce426f
+extern __typeof (strncat) __strncat_power7 attribute_hidden;
ce426f
+extern __typeof (strlen) __strlen_power7 attribute_hidden;
ce426f
+extern __typeof (strnlen) __strnlen_power7 attribute_hidden;
ce426f
+extern __typeof (memcpy) __memcpy_power7 attribute_hidden;
ce426f
+
ce426f
+#define strlen    __strlen_power7
ce426f
+#define __strnlen __strnlen_power7
ce426f
+#define memcpy    __memcpy_power7
ce426f
+
ce426f
+#include <string/strncat.c>