This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: PATCH: Move sysdeps/x86_64/Implies to sysdeps/x86_64/64
On Sun, Apr 8, 2012 at 7:44 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> 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:
>
This change seems to work correctly:
diff --git a/configure.in b/configure.in
index d8c55b1..088194a 100644
--- a/configure.in
+++ b/configure.in
@@ -766,7 +766,7 @@ while test $# -gt 0; do
*) xsrcdir=$srcdir/ ;;
esac
test -n "$enable_debug_configure" &&
- echo "[DEBUG]: name/Implies $xsrcdir$name/Implies" >&2
+ echo "[DEBUG]: $name/Implies $xsrcdir$name/Implies" >&2
if test -f $xsrcdir$name/Implies; then
# Collect more names from the `Implies' file (removing comments).
@@ -819,7 +819,23 @@ changequote([,])dnl
# configuration components; this ensures that for sysv4, unix/common
# (implied by unix/sysv/sysv4) comes before unix/sysv (in ostry (here $*)
# after sysv4).
- sysnames="`echo $implied $* $parent`"
+ if test $machine != $base_machine; then
+ case $name in
+ */$machine)
+ case $parent in
+ */$base_machine)
+ sysnames="`echo $parent $* $implied`"
+ ;;
+ *)
+ sysnames="`echo $implied $* $parent`"
+ ;;
+ esac
+ ;;
+ *)
+ sysnames="`echo $implied $* $parent`"
+ ;;
+ esac
+ fi
test -n "$sysnames" && set $sysnames
done
Now the search order 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/x86_64 sysdeps/ieee754/ldbl-96
sysdeps/ieee754/dbl-64/wordsize-64 sysdeps/ieee754/dbl-64
sysdeps/ieee754/flt-32 sysdeps/x86_64/fpu/multiarch sysdeps/x86_64/fpu
sysdeps/x86_64/multiarch nptl/sysdeps/x86_64 sysdeps/wordsize-64
sysdeps/ieee754 sysdeps/generic
That is sysdeps/wordsize-64 comes after all */x86_64 directories.
--
H.J.