Blame SOURCES/glibc-rh1385004-2.patch

147e83
From c86e89a09d187da3aca1ee7ff9bfee4957fe70ff Mon Sep 17 00:00:00 2001
147e83
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
147e83
Date: Tue, 28 Jul 2015 15:34:25 -0300
147e83
Subject: [PATCH] powerpc: Fix strstr/power7 build
147e83
147e83
This patch fixes the strstr build with --disable-multi-arch option.
147e83
The optimization calls the __strstr_ppc symbol, which always build
147e83
for multiarch config but not if it is disable.  This patch fixes it
147e83
by adding the default C implementation object with the expected
147e83
symbol name.
147e83
147e83
	* sysdeps/powerpc/powerpc64/power7/Makefile [$(subdir) = string]
147e83
	(sysdep_routines): Add strstr-ppc64.
147e83
	* sysdeps/powerpc/powerpc64/power7/strstr-ppc64.c: New file.
147e83
147e83
(cherry picked from commit 357bb400f1b25e48e265fd55b5996328d2a8c142)
147e83
---
147e83
 ChangeLog                                       |  6 ++++++
147e83
 sysdeps/powerpc/powerpc64/power7/Makefile       |  1 +
147e83
 sysdeps/powerpc/powerpc64/power7/strstr-ppc64.c | 27 +++++++++++++++++++++++++
147e83
 3 files changed, 34 insertions(+)
147e83
 create mode 100644 sysdeps/powerpc/powerpc64/power7/strstr-ppc64.c
147e83
147e83
diff --git a/ChangeLog b/ChangeLog
147e83
index 8e98192..d70df5c 100644
147e83
diff --git a/sysdeps/powerpc/powerpc64/power7/Makefile b/sysdeps/powerpc/powerpc64/power7/Makefile
147e83
index 40aacfa..89a2296 100644
147e83
--- a/sysdeps/powerpc/powerpc64/power7/Makefile
147e83
+++ b/sysdeps/powerpc/powerpc64/power7/Makefile
147e83
@@ -5,6 +5,7 @@ CFLAGS-rtld.c += -mno-vsx
147e83
 endif
147e83
 
147e83
 ifeq ($(subdir),string)
147e83
+sysdep_routines += strstr-ppc64
147e83
 CFLAGS-strncase.c += -funroll-loops
147e83
 CFLAGS-strncase_l.c += -funroll-loops
147e83
 endif
147e83
diff --git a/sysdeps/powerpc/powerpc64/power7/strstr-ppc64.c b/sysdeps/powerpc/powerpc64/power7/strstr-ppc64.c
147e83
new file mode 100644
147e83
index 0000000..bbab92d
147e83
--- /dev/null
147e83
+++ b/sysdeps/powerpc/powerpc64/power7/strstr-ppc64.c
147e83
@@ -0,0 +1,27 @@
147e83
+/* Optimized strstr implementation for PowerPC64/POWER7.
147e83
+   Copyright (C) 2015 Free Software Foundation, Inc.
147e83
+   This file is part of the GNU C Library.
147e83
+
147e83
+   The GNU C Library is free software; you can redistribute it and/or
147e83
+   modify it under the terms of the GNU Lesser General Public
147e83
+   License as published by the Free Software Foundation; either
147e83
+   version 2.1 of the License, or (at your option) any later version.
147e83
+
147e83
+   The GNU C Library is distributed in the hope that it will be useful,
147e83
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
147e83
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
147e83
+   Lesser General Public License for more details.
147e83
+
147e83
+   You should have received a copy of the GNU Lesser General Public
147e83
+   License along with the GNU C Library; if not, see
147e83
+   <http://www.gnu.org/licenses/>.  */
147e83
+
147e83
+#include <string.h>
147e83
+
147e83
+#define STRSTR __strstr_ppc
147e83
+#undef libc_hidden_builtin_def
147e83
+#define libc_hidden_builtin_def(__name)
147e83
+
147e83
+extern __typeof (strstr) __strstr_ppc attribute_hidden;
147e83
+
147e83
+#include <string/strstr.c>
147e83
-- 
147e83
2.1.0
147e83