This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Multiarch optimization for strspn on POWERPC
- From: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- To: libc-alpha at sourceware dot org
- Date: Mon, 31 Mar 2014 08:36:25 -0300
- Subject: Re: [PATCH] Multiarch optimization for strspn on POWERPC
- Authentication-results: sourceware.org; auth=none
- References: <5315CD58 dot 5080002 at linux dot vnet dot ibm dot com> <53163BD1 dot 5000106 at linux dot vnet dot ibm dot com> <53199E07 dot 6040009 at linux dot vnet dot ibm dot com> <531DCEA2 dot 4060305 at linux dot vnet dot ibm dot com> <531DF824 dot 3040302 at linux dot vnet dot ibm dot com> <531F1C0C dot 3030509 at linux dot vnet dot ibm dot com> <532050ED dot 1040402 at linux dot vnet dot ibm dot com> <87bnwpq6pr dot fsf at igel dot home>
On 29-03-2014 14:01, Andreas Schwab wrote:
> Adhemerval Zanella <azanella@linux.vnet.ibm.com> writes:
>
>> I also commit the obvious fix that I didn't see previously:
>>
>> diff --git a/sysdeps/powerpc/powerpc64/multiarch/strspn.c b/sysdeps/powerpc/powerpc64/multiarch/strspn.c
>> index 44945f3..bf8c877 100644
>> --- a/sysdeps/powerpc/powerpc64/multiarch/strspn.c
>> +++ b/sysdeps/powerpc/powerpc64/multiarch/strspn.c
>> @@ -16,7 +16,7 @@
>> License along with the GNU C Library; if not, see
>> <http://www.gnu.org/licenses/>. */
>>
>> -#if defined SHARED && !defined NOT_IN_libc
>> +#ifndef NOT_IN_libc
>> # include <string.h>
>> # include <shlib-compat.h>
>> # include "init-arch.h"
> The static libc generally should only contain the generic version.
That's true only for some symbols that does no play well for static (for instance, memcpy).
strspn can be safely used as ifunc for static build and x86_64 does it as well, and for
other symbols as well.
>
> Andreas.
>