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