[PATCH] x86_64: Fix missing wcsncat function definition without multiarch (x86-64-v4)

Sam James sam@gentoo.org
Fri Dec 13 04:23:10 GMT 2024


Sunil Pandey <skpgkp2@gmail.com> writes:

> On Tue, May 7, 2024 at 11:59 AM Sunil Pandey <skpgkp2@gmail.com> wrote:
>
>  On Tue, May 7, 2024 at 11:27 AM Gabi Falk <gabifalk@gmx.com> wrote:
>
>  This code expects the WCSCAT preprocessor macro to be predefined in case
>  the evex implementation of the function should be defined with a name
>  different from __wcsncat_evex.  However, when glibc is built for
>  x86-64-v4 without multiarch support, sysdeps/x86_64/wcsncat.S defines
>  WCSNCAT variable instead of WCSCAT to build it as wcsncat.  Rename the
>  variable to WCSNCAT, as it is actually a better naming choice for the
>  variable in this case.
>
>  Reported-by: Kenton Groombridge
>  Link: https://bugs.gentoo.org/921945
>  Fixes: 64b8b6516b ("x86: Add evex optimized functions for the wchar_t strcpy family")
>  Signed-off-by: Gabi Falk <gabifalk@gmx.com>
>  ---
>   sysdeps/x86_64/multiarch/wcsncat-evex.S | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
>  diff --git a/sysdeps/x86_64/multiarch/wcsncat-evex.S b/sysdeps/x86_64/multiarch/wcsncat-evex.S
>  index 392215950a..10bfb0a531 100644
>  --- a/sysdeps/x86_64/multiarch/wcsncat-evex.S
>  +++ b/sysdeps/x86_64/multiarch/wcsncat-evex.S
>  @@ -1,9 +1,9 @@
>  -#ifndef WCSCAT
>  -# define WCSCAT        __wcsncat_evex
>  +#ifndef WCSNCAT
>  +# define WCSNCAT       __wcsncat_evex
>   #endif
>
>   #define USE_AS_WCSCPY
>   #define USE_AS_STRCAT
>
>  -#define STRNCAT        WCSCAT
>  +#define STRNCAT        WCSNCAT
>   #include "strncat-evex.S"
>  --
>  gabi
>
>  LGTM
>  Reviewed-by: Sunil K Pandey <skpgkp2@gmail.com>
>
>  --Sunil 
>
> I would like to backport this patch to release branches.
> Any comments or objections?

Please do. I should've even proposed that myself - I'm sorry for letting
that slip.

>
> --Sunil

cheers,
sam


More information about the Libc-alpha mailing list