This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Add sysdeps/x86/i686
On Fri, Jan 11, 2013 at 2:26 PM, Roland McGrath <roland@hack.frob.com> wrote:
>> I checked my changes into hjl/x86 branch:
>>
>> [hjl@gnu-6 glibc]$ ls sysdeps/x86/i686/multiarch
>> ifunc-defines.sym strcasestr-c.c strspn-c.c Versions
>> init-arch.c strcasestr-nonascii.c strstr.c wcscpy-c.c
>> init-arch.h strcspn-c.c strstr-c.c wmemcmp-c.c
>> Makefile strncat-c.c test-multiarch.c
>> sched_cpucount.c strncpy-c.c varshift.c
>> strcasestr.c strpbrk-c.c varshift.h
>> [hjl@gnu-6 glibc]$
>>
>> There are no checking for __x86_64__. The same sources are
>> used for both i686 and x86-64.
>
> That's not true. 8bcd3c29 has #ifdef's in hp-timing.c.
There are #ifdef under sysdeps/x86:
bits/link.h:#ifndef __x86_64__
bits/mathdef.h:# if defined __x86_64__ || (defined __FLT_EVAL_METHOD__
&& __FLT_EVAL_METHOD__ == 0)
bits/setjmp.h:# elif defined __x86_64__
bits/string.h:#if !defined __x86_64__ && (defined __i486__ || defined
__pentium__ \
bits/wordsize.h:#if defined __x86_64__ && !defined __ILP32__
bits/wordsize.h:#ifdef __x86_64__
fpu/bits/fenv.h:#ifdef __x86_64__
fpu/bits/mathinline.h:# ifdef __x86_64__
fpu/bits/mathinline.h:#ifndef __x86_64__
fpu/bits/mathinline.h:#endif /* !__x86_64__ */
It is normal when you share the same source for ia32
and x86-64.
> Please post fresh patches for review (and update this or some branch to
> match what you post).
>
My patches are:
1. A patch to share cacheinfo.c and hp-timing.[ch]:
http://sourceware.org/git/?p=glibc.git;a=patch;h=8bcd3c29ee108e72cc7a0b01efbcdc45ee8b91c9
2. A patch to share multi-arch files in C:
http://sourceware.org/git/?p=glibc.git;a=patch;h=5aff58049a0421cc531cfb3c452463d34528fe01
This patch has
#ifndef __x86_64__
# define __strcasestr_sse2 __strcasestr_ia32
#endif
3. A patch to rename xxx_ia32/xxx_sse2 to xxx_generic:
http://sourceware.org/git/?p=glibc.git;a=patch;h=ae5b491bc523ad440184c4ba6bcfa15b35fe11c8
This patch removes __x86_64__ check in
sysdeps/x86/i686/multiarch
With those changes, we only need to update one
place for both ia32 and x86-64 when sources are in
C.
--
H.J.