about summary refs log tree commit diff
path: root/sysdeps/powerpc/powerpc32
diff options
context:
space:
mode:
authorAdhemerval Zanella <azanella@linux.vnet.ibm.com>2015-02-25 16:22:10 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.com>2015-04-15 16:01:48 -0300
commitfb78612a963cfe1299b33b1c60a0c24a206276c3 (patch)
tree00f5737b3f31ddc237f52ac9c00bccdd8674af4d /sysdeps/powerpc/powerpc32
parenta8b6a3a6c1be265750c33766ba1f4151ae29749d (diff)
downloadglibc-fb78612a963cfe1299b33b1c60a0c24a206276c3.tar.gz
glibc-fb78612a963cfe1299b33b1c60a0c24a206276c3.tar.xz
glibc-fb78612a963cfe1299b33b1c60a0c24a206276c3.zip
powerpc: Fix __wcschr static build
This patch fix the static build for strftime, which uses __wcschr.
Current powerpc32 implementation defines the __wcschr be an alias to
__wcschr_ppc32 and current implementation misses the correct alias for
static build.

It also changes the default wcschr.c logic so a IFUNC implementation
should just define WCSCHR and undefine the required alias/internal
definitions.
Diffstat (limited to 'sysdeps/powerpc/powerpc32')
-rw-r--r--sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-ppc32.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-ppc32.c b/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-ppc32.c
index df586a61f2..3b2ab3a2d3 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-ppc32.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-ppc32.c
@@ -18,16 +18,26 @@
 #include <wchar.h>
 
 #if IS_IN (libc)
+# undef libc_hidden_weak
+# define libc_hidden_weak(name)
+
+# undef weak_alias
+# undef libc_hidden_def
+
 # ifdef SHARED
-#   undef libc_hidden_def
-#   define libc_hidden_def(name)  \
+#  define libc_hidden_def(name)  \
     __hidden_ver1 (__wcschr_ppc, __GI_wcschr, __wcschr_ppc); \
     strong_alias (__wcschr_ppc, __wcschr_ppc_1); \
     __hidden_ver1 (__wcschr_ppc_1, __GI___wcschr, __wcschr_ppc_1);
-# endif
-# define WCSCHR  __wcschr_ppc
+#  define weak_alias(name,alias)
+# else
+#  define weak_alias(name, alias) \
+    _weak_alias(__wcschr_ppc, __wcschr)
+#  define libc_hidden_def(name)
+# endif /* SHARED  */
 #endif
 
 extern __typeof (wcschr) __wcschr_ppc;
 
+#define WCSCHR  __wcschr_ppc
 #include <wcsmbs/wcschr.c>