PATCH: Move sysdeps/x86_64/Implies to sysdeps/x86_64/64

H.J. Lu hjl.tools@gmail.com
Sun Apr 8 14:45:00 GMT 2012


On Sat, Apr 7, 2012 at 8:19 AM, Joseph S. Myers <joseph@codesourcery.com> wrote:
> On Fri, 6 Apr 2012, H.J. Lu wrote:
>
>> For x86-64, with Implies-after, the search order can only be
>>
>> ieee754/ldbl-96
>> ieee754/dbl-64/wordsize-64
>> ieee754/dbl-64
>> ieee754/flt-32
>> wordsize-64
>>
>> not
>>
>> wordsize-64
>> ieee754/ldbl-96
>> ieee754/dbl-64/wordsize-64
>> ieee754/dbl-64
>> ieee754/flt-32
>
> Thanks for giving a concrete different in orders.  The next question is:
> why does that difference matter for x32?  (If it doesn't, you need to give
> an example of a case where the order *does* matter and you can't get the
> order you want.)

It does matter for both x32 and x86-64.  I created hjl/order branch and
moved wordsize-64 to sysdeps/x86_64/64/Implies:

http://sourceware.org/git/?p=glibc.git;a=commit;h=66446deaf4c8828ed49ccfd359c2027484f25507

Now the search order for x86-64 becomes:

nptl/sysdeps/unix/sysv/linux/x86_64 sysdeps/unix/sysv/linux/x86_64
sysdeps/unix/sysv/linux/wordsize-64 nptl/sysdeps/unix/sysv/linux
nptl/sysdeps/pthread sysdeps/pthread sysdeps/unix/sysv/linux
sysdeps/gnu sysdeps/unix/common sysdeps/unix/mman sysdeps/unix/inet
nptl/sysdeps/unix/sysv sysdeps/unix/sysv sysdeps/unix/x86_64
nptl/sysdeps/unix sysdeps/unix sysdeps/posix sysdeps/x86_64/64
sysdeps/wordsize-64 sysdeps/x86_64/fpu/multiarch sysdeps/x86_64/fpu
sysdeps/x86_64/multiarch nptl/sysdeps/x86_64 sysdeps/x86_64
sysdeps/ieee754/ldbl-96 sysdeps/ieee754/dbl-64/wordsize-64
sysdeps/ieee754/dbl-64 sysdeps/ieee754/flt-32 sysdeps/ieee754
sysdeps/generic

Please note that sysdeps/wordsize-64 is searched before
sysdeps/x86_64.  We have

./bits/wordsize.h
./sysdeps/unix/sysv/linux/sparc/bits/wordsize.h
./sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h
./sysdeps/x86_64/bits/wordsize.h
./sysdeps/s390/s390-64/bits/wordsize.h
./sysdeps/s390/s390-32/bits/wordsize.h
./sysdeps/sparc/sparc32/bits/wordsize.h
./sysdeps/sparc/sparc64/bits/wordsize.h
./sysdeps/powerpc/powerpc64/bits/wordsize.h
./sysdeps/powerpc/powerpc32/bits/wordsize.h
./sysdeps/wordsize-32/bits/wordsize.h
./sysdeps/wordsize-64/bits/wordsize.h

./sysdeps/wordsize-64/bits/wordsize.h is used instead of
./sysdeps/x86_64/bits/wordsize.h.  I need a way to place
sysdeps/x86_64 before sysdeps/wordsize-64 in search
order when wordsize-64 is in sysdeps/x86_64/64/Implies.

> My guess is that "wordsize-64" is being used for more than one thing, and
> should actually be split up; some files may be for "64-bit operations are
> efficient", some for "long and long long are both 64-bit", some for
> "dirent64 is the same as dirent".  If we can distinguish the various ways
> "wordsize-64" is used, then x32 could use a different subset of the new
> directories from pure 64-bit.

That will help x32, which has files like

[hjl@gnu-6 glibc-x32]$ cat sysdeps/unix/sysv/linux/x86_64/x32/scandir64.c
#include <sysdeps/wordsize-64/scandir64.c>
[hjl@gnu-6 glibc-x32]$

Thanks.

-- 
H.J.



More information about the Libc-alpha mailing list