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