This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] add support for GCC 9 attribute copy
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Martin Sebor <msebor at gmail dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 9 Nov 2018 18:24:49 +0000
- Subject: Re: [PATCH] add support for GCC 9 attribute copy
- References: <c36d3219-c54b-962d-645b-04f5db4df6d4@gmail.com>
On Fri, 9 Nov 2018, Martin Sebor wrote:
> include/ChangeLog:
We have one ChangeLog at top-level, so the reference should be to
include/libc-symbols.h.
> diff --git a/sysdeps/x86_64/multiarch/memchr.c b/sysdeps/x86_64/multiarch/memchr.c
> index 016f578..ce2e69c 100644
> --- a/sysdeps/x86_64/multiarch/memchr.c
> +++ b/sysdeps/x86_64/multiarch/memchr.c
> @@ -30,6 +30,6 @@ libc_ifunc_redirected (__redirect_memchr, memchr, IFUNC_SELECTOR ());
> strong_alias (memchr, __memchr)
> # ifdef SHARED
> __hidden_ver1 (memchr, __GI_memchr, __redirect_memchr)
> - __attribute__((visibility ("hidden")));
> +__attribute__((visibility ("hidden"))) __attribute_copy__ (memchr);
Should not lose the indentation here.
> diff --git a/sysdeps/x86_64/multiarch/memset.c b/sysdeps/x86_64/multiarch/memset.c
> index 064841d..87246dd 100644
> --- a/sysdeps/x86_64/multiarch/memset.c
> +++ b/sysdeps/x86_64/multiarch/memset.c
> @@ -30,6 +30,6 @@ libc_ifunc_redirected (__redirect_memset, memset, IFUNC_SELECTOR ());
>
> # ifdef SHARED
> __hidden_ver1 (memset, __GI_memset, __redirect_memset)
> - __attribute__ ((visibility ("hidden")));
> + __attribute__ ((visibility ("hidden"))) __attribute_copy__ (memset);
Should only have one space not two before __attribute_copy__.
> diff --git a/sysdeps/x86_64/multiarch/strcpy.c b/sysdeps/x86_64/multiarch/strcpy.c
> index 12e0e3f..838d916 100644
> --- a/sysdeps/x86_64/multiarch/strcpy.c
> +++ b/sysdeps/x86_64/multiarch/strcpy.c
> @@ -30,6 +30,6 @@ libc_ifunc_redirected (__redirect_strcpy, strcpy, IFUNC_SELECTOR ());
>
> # ifdef SHARED
> __hidden_ver1 (strcpy, __GI_strcpy, __redirect_strcpy)
> - __attribute__ ((visibility ("hidden")));
> + __attribute__ ((visibility ("hidden"))) __attribute_copy__ (strcpy);
Likewise.
> diff --git a/sysdeps/x86_64/multiarch/strlen.c b/sysdeps/x86_64/multiarch/strlen.c
> index 1758d22..0860083 100644
> --- a/sysdeps/x86_64/multiarch/strlen.c
> +++ b/sysdeps/x86_64/multiarch/strlen.c
> @@ -29,6 +29,6 @@
> libc_ifunc_redirected (__redirect_strlen, strlen, IFUNC_SELECTOR ());
> # ifdef SHARED
> __hidden_ver1 (strlen, __GI_strlen, __redirect_strlen)
> - __attribute__((visibility ("hidden")));
> + __attribute__((visibility ("hidden"))) __attribute_copy__ (strlen);
Likewise.
> diff --git a/sysdeps/x86_64/multiarch/strncpy.c b/sysdeps/x86_64/multiarch/strncpy.c
> index 3c3de8b..3201f0f 100644
> --- a/sysdeps/x86_64/multiarch/strncpy.c
> +++ b/sysdeps/x86_64/multiarch/strncpy.c
> @@ -30,6 +30,6 @@ libc_ifunc_redirected (__redirect_strncpy, strncpy, IFUNC_SELECTOR ());
>
> # ifdef SHARED
> __hidden_ver1 (strncpy, __GI_strncpy, __redirect_strncpy)
> - __attribute__ ((visibility ("hidden")));
> + __attribute__ ((visibility ("hidden"))) __attribute_copy__ (strncpy);
Likewise.
> diff --git a/sysdeps/x86_64/multiarch/strspn.c b/sysdeps/x86_64/multiarch/strspn.c
> index 56ab4d9..8b80bdc 100644
> --- a/sysdeps/x86_64/multiarch/strspn.c
> +++ b/sysdeps/x86_64/multiarch/strspn.c
> @@ -30,6 +30,6 @@ libc_ifunc_redirected (__redirect_strspn, strspn, IFUNC_SELECTOR ());
>
> # ifdef SHARED
> __hidden_ver1 (strspn, __GI_strspn, __redirect_strspn)
> - __attribute__ ((visibility ("hidden")));
> + __attribute__ ((visibility ("hidden"))) __attribute_copy__ (strspn);
Likewise.
OK with those fixes.
--
Joseph S. Myers
joseph@codesourcery.com