From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw1-x1132.google.com (mail-yw1-x1132.google.com [IPv6:2607:f8b0:4864:20::1132]) by sourceware.org (Postfix) with ESMTPS id CA77C3858CD1 for ; Wed, 22 May 2024 14:37:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CA77C3858CD1 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CA77C3858CD1 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1132 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716388668; cv=none; b=c21VhMm/in3s1viB/mH/1aAfCYnsyHZt3577yLuGbue7qydHvW19CddGIorVFkuj4eDaJfMKKd/Idx7MRfSHok4FjoMvaSoGIyHZPeQBVwP27bRx8R2uByzRyNMk45dVSCAxuTZopCIflUZdo9dygi6DvQlY0AUeUR8kiAeM5nI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716388668; c=relaxed/simple; bh=Ct+VAVZmaOR1sONzkYPffl3eRBh95FY26c13WhWTWKE=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=pK9XF3WcCFE6KJ4xKkkgHIwlUaSIafwfy3jsAHilDbC8wTQ4Lsp+dWZZmq9AHv0EHyyw8HBQjASDb/qgJS7gbXhX4T6iTWKNeJl7T1uafpbgRlRChXkC3836g9S8RjCTz/K8KS0hfy+QpPTYmRAl/+ew2DtMtUmkrWijh8S81Wg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-61ae4743d36so50575477b3.2 for ; Wed, 22 May 2024 07:37:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716388666; x=1716993466; darn=sourceware.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=HtEyMi1RYMnwNr4Kl6ljeh2a/INBLXtLikmdFt/WGEk=; b=Wdj17iXvURxHtHCUaXcxRZIb2YUFnXTG5W+V8WiL0IiMTF/VOkIDv+L8Ihvb5OxzOY DYwqOdsA3xt359UeOk+p8Zxyp6cTGgUt6CJ2RQw5C09u2OYDR+KzES4lblVskjYvW6ub g/dXgkT3ph8C8kvd9B10PHB4YdU78F2/SDIMRFhJoTv8DF2Dyz419gaFIJTr3RfjeueT OwehLHKw/0p6lv8nTop1zciKI6LIyUb0p+SAFS0YvMuVYEuWu7KMOGqdHdZuGdkAH8gz RInOd/Tl1OfvNjSHhazYF66R2hSRm+0efszTSPKlNi8lT1QGhTmYeRp2AOf7Tbg/DcOU fk5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716388666; x=1716993466; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HtEyMi1RYMnwNr4Kl6ljeh2a/INBLXtLikmdFt/WGEk=; b=VAo+1bYNZlVbEdb7vPaStoJFTiMuMIN+4CNBPFczZvM/pev/RCfBXQ9lIxpEtdCIXm CWldlqZEhY8fuufEfytRRlTr9JQ1P0wgJHH5JfsUU+8MtG6A8kMXukZi8DgT2Up4hi/H voibIvsfX8sCqVCP4Ju4RycH2snEEqD14dQGXOK1Pho2nAKGdKL2AZUGr2Qf2/rQK39X 8CnExXzn7MITngtPS/6EeXorsWRdpfNNT5c6Be94aK83xho2t9KXPd8qR0B4aWuAEZ7C 84HC+q3PY627UpR0Pg68FUDIoROgaO6llaYcV7nwCRS+aXx9LnCSYoNT7XTm/w2Qk4Lm 9BtQ== X-Gm-Message-State: AOJu0YzjCDTFb0LrtUurvBvWXrSdidL5b8SlMfkhT3hrMOgxkeudx0ZJ jbageXdi0hmvnsBd8GBbcIihOgAJKRCGT78+bLP7H/KfpAOoJZTUKIivEAEFVEQQ9ZKtIHENhRq iWgxo0Qknvl3ON7GJBAICGc1NXKQ= X-Google-Smtp-Source: AGHT+IF4RiuL9hnNjUn/Z/3ng34y24Esfp/rmAuiwmGM93P0Y0nrYoKnp2Jo8Pb0+oh2+EwMvoIQxyGvb0t3V9wHuS8= X-Received: by 2002:a0d:db08:0:b0:615:c96:1a8f with SMTP id 00721157ae682-627e46b1df7mr24009657b3.17.1716388665990; Wed, 22 May 2024 07:37:45 -0700 (PDT) MIME-Version: 1.0 References: <20240522143223.1187907-1-adhemerval.zanella@linaro.org> In-Reply-To: <20240522143223.1187907-1-adhemerval.zanella@linaro.org> From: "H.J. Lu" Date: Wed, 22 May 2024 07:37:10 -0700 Message-ID: Subject: Re: [PATCH] powerpc: Remove duplicate strchrnul and strncasecmp_l libc.a (BZ 31786) To: Adhemerval Zanella Cc: libc-alpha@sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3019.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, May 22, 2024 at 7:32=E2=80=AFAM Adhemerval Zanella wrote: > > 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. > --- > .../powerpc/powerpc64/multiarch/strchrnul-power7.S | 3 +++ > .../powerpc/powerpc64/multiarch/strchrnul-ppc64.c | 14 +++++++++++++- > .../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/sys= deps/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/sysd= eps/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 > . */ > > -#include > +#include > + > +#if IS_IN (libc) > +# define STRCHRNUL __strchrnul_ppc > +extern __typeof (strchrnul) __strchrnul_ppc attribute_hidden; > + > +# include > +# 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/sy= sdeps/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) > > -- > 2.43.0 > LGTM. Reviewed-by: H.J. Lu Thanks. --=20 H.J.