public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Adhemerval Zanella <azanella@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc] powerpc: Remove duplicate strchrnul and strncasecmp_l libc.a (BZ 31786)
Date: Thu, 23 May 2024 12:36:47 +0000 (GMT)	[thread overview]
Message-ID: <20240523123647.4925B384DD3E@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5fededd8251b9f5ccd7f893123417205447b95f1

commit 5fededd8251b9f5ccd7f893123417205447b95f1
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Wed May 22 11:32:04 2024 -0300

    powerpc: Remove duplicate strchrnul and strncasecmp_l libc.a (BZ 31786)
    
    For powerpc64 the generic version provides a weak definition of
    strchrnul, which are already provided by the ifunc resolver.  The
    powerpc32 version is slight different, where for static case there
    is no iFUNC support.
    
    The strncasecmp_l is provided ifunc resolver.
    
    Checked on powerpc-linux-gnu-power4 and powerpc64-linux-gnu.
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>

Diff:
---
 sysdeps/powerpc/powerpc64/multiarch/strchrnul-power7.S  |  3 +++
 sysdeps/powerpc/powerpc64/multiarch/strchrnul-ppc64.c   | 14 +++++++++++++-
 sysdeps/powerpc/powerpc64/multiarch/strncase_l-power7.c |  3 +++
 3 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/sysdeps/powerpc/powerpc64/multiarch/strchrnul-power7.S b/sysdeps/powerpc/powerpc64/multiarch/strchrnul-power7.S
index 384edce8b9..fc784c2856 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strchrnul-power7.S
+++ b/sysdeps/powerpc/powerpc64/multiarch/strchrnul-power7.S
@@ -18,6 +18,9 @@
 
 #define STRCHRNUL __strchrnul_power7
 
+#undef weak_alias
+#define weak_alias(a,b)
+
 #undef libc_hidden_builtin_def
 #define libc_hidden_builtin_def(name)
 
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strchrnul-ppc64.c b/sysdeps/powerpc/powerpc64/multiarch/strchrnul-ppc64.c
index 8e42504efe..7127972250 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strchrnul-ppc64.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/strchrnul-ppc64.c
@@ -16,4 +16,16 @@
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
-#include <sysdeps/powerpc/powerpc32/power4/multiarch/strchrnul-ppc32.c>
+#include <string.h>
+
+#if IS_IN (libc)
+# define STRCHRNUL  __strchrnul_ppc
+extern __typeof (strchrnul) __strchrnul_ppc attribute_hidden;
+
+# include <string/strchrnul.c>
+# undef __strchrnul
+weak_alias (__strchrnul_ppc, __strchrnul)
+# ifdef SHARED
+__hidden_ver1 (__strchrnul_ppc, __GI___strchrnul, __strchrnul_ppc);
+# endif
+#endif
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strncase_l-power7.c b/sysdeps/powerpc/powerpc64/multiarch/strncase_l-power7.c
index 1587079580..664ce44345 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strncase_l-power7.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/strncase_l-power7.c
@@ -19,6 +19,9 @@
 
 #define __strncasecmp_l __strncasecmp_l_power7
 
+#undef weak_alias
+#define weak_alias(a,b)
+
 #undef libc_hidden_def
 #define libc_hidden_def(name)

                 reply	other threads:[~2024-05-23 12:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240523123647.4925B384DD3E@sourceware.org \
    --to=azanella@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).