8ae002
Index: glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/powerpc/elision-conf.c
8ae002
===================================================================
8ae002
--- glibc-2.17-c758a686.orig/nptl/sysdeps/unix/sysv/linux/powerpc/elision-conf.c
8ae002
+++ glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/powerpc/elision-conf.c
8ae002
@@ -61,7 +61,14 @@ elision_init (int argc __attribute__ ((u
8ae002
 {
8ae002
 #ifdef ENABLE_LOCK_ELISION
8ae002
   int elision_available = (GLRO (dl_hwcap2) & PPC_FEATURE2_HAS_HTM) ? 1 : 0;
8ae002
-  __pthread_force_elision = __libc_enable_secure ? 0 : elision_available;
8ae002
+  if (!__libc_enable_secure && elision_available)
8ae002
+    {
8ae002
+      __pthread_force_elision = GLRO(dl_elision_enabled);
8ae002
+    }
8ae002
+  else
8ae002
+    {
8ae002
+      __pthread_force_elision = 0;
8ae002
+    }
8ae002
 #endif
8ae002
 }
8ae002
 
8ae002
Index: glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/multiarch/strstr.c
8ae002
===================================================================
8ae002
--- glibc-2.17-c758a686.orig/sysdeps/powerpc/powerpc64/multiarch/strstr.c
8ae002
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/multiarch/strstr.c
8ae002
@@ -17,7 +17,10 @@
8ae002
    <http://www.gnu.org/licenses/>.  */
8ae002
 
8ae002
 /* Define multiple versions only for definition in libc.  */
8ae002
-#if IS_IN (libc)
8ae002
+/* RHEL 7-specific: Define multiple versions only for the definition in
8ae002
+   libc.  Don't define multiple versions for strstr in static library
8ae002
+   since we need strstr before initialization has happened.  */
8ae002
+#if defined SHARED && IS_IN (libc)
8ae002
 # include <string.h>
8ae002
 # include <shlib-compat.h>
8ae002
 # include "init-arch.h"
8ae002
@@ -31,4 +34,6 @@ libc_ifunc (strstr,
8ae002
             (hwcap & PPC_FEATURE_HAS_VSX)
8ae002
             ? __strstr_power7
8ae002
             : __strstr_ppc);
8ae002
+#else
8ae002
+#include "string/strstr.c"
8ae002
 #endif