Don't define __strpbrk_sse42 in static library
authorH.J. Lu <hongjiu.lu@intel.com>
Wed, 24 Mar 2010 19:16:24 +0000 (12:16 -0700)
committerUlrich Drepper <drepper@redhat.com>
Wed, 24 Mar 2010 19:16:24 +0000 (12:16 -0700)
ChangeLog
sysdeps/x86_64/multiarch/strpbrk-c.c

index 88177a4..004c6bf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-03-24  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * sysdeps/x86_64/multiarch/strpbrk-c.c: Define only if SHARED
+       is defined.
+
 2010-03-22  H.J. Lu  <hongjiu.lu@intel.com>
 
        * string/test-memcmp.c (check_result): New function.
index c58dcb5..bbf5c49 100644 (file)
@@ -1,4 +1,8 @@
-#define USE_AS_STRPBRK
-#define STRCSPN_SSE2 __strpbrk_sse2
-#define STRCSPN_SSE42 __strpbrk_sse42
-#include "strcspn-c.c"
+/* Don't define multiple versions for strpbrk in static library since we
+   need strpbrk before the initialization happened.  */
+#ifdef SHARED
+# define USE_AS_STRPBRK
+# define STRCSPN_SSE2 __strpbrk_sse2
+# define STRCSPN_SSE42 __strpbrk_sse42
+# include "strcspn-c.c"
+#endif