diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2012-07-18 13:01:19 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2012-07-19 10:19:32 -0700 |
commit | f39df7ff83f8ebf9a0ccd0ef26751cf6a6606f79 (patch) | |
tree | d4dfb6e23ad1e5ca1159d13f461c6c7e71148cb4 | |
parent | 46f85fc22637213e4a97b306f40a64ae09f82f18 (diff) | |
download | glibc-f39df7ff83f8ebf9a0ccd0ef26751cf6a6606f79.tar.gz glibc-f39df7ff83f8ebf9a0ccd0ef26751cf6a6606f79.tar.xz glibc-f39df7ff83f8ebf9a0ccd0ef26751cf6a6606f79.zip |
Support conditional implied directory
-rw-r--r-- | ChangeLog.implies | 9 | ||||
-rwxr-xr-x | configure | 80 | ||||
-rw-r--r-- | configure.in | 78 | ||||
-rw-r--r-- | sysdeps/x86_64/64/Implies-after | 1 | ||||
-rw-r--r-- | sysdeps/x86_64/Implies | 2 | ||||
-rw-r--r-- | sysdeps/x86_64/x32/Implies-after | 1 |
6 files changed, 94 insertions, 77 deletions
diff --git a/ChangeLog.implies b/ChangeLog.implies new file mode 100644 index 0000000000..94350b394a --- /dev/null +++ b/ChangeLog.implies @@ -0,0 +1,9 @@ +2012-07-18 H.J. Lu <hongjiu.lu@intel.com> + + * configure.in (sysnames): Don't look for Implies-before and + Implies-after files. Handle conditional implied directory. + * configure: Regenerated. + * sysdeps/x86_64/Implies: Add $machine:x86_64/64:wordsize-64 and + $machine:x86_64/x32:wordsize-32. + * sysdeps/x86_64/64/Implies-after: Removed. + * sysdeps/x86_64/x32/Implies-after: Likewise. diff --git a/configure b/configure index 1268168699..fab64655a8 100755 --- a/configure +++ b/configure @@ -4276,43 +4276,51 @@ while test $# -gt 0; do test -n "$enable_debug_configure" && echo "DEBUG: name/Implies $xsrcdir$name/Implies" >&2 - for implies_file in Implies Implies-before Implies-after; do - implies_type=`echo $implies_file | sed s/-/_/` - eval ${implies_type}= - if test -f $xsrcdir$name/$implies_file; then - # Collect more names from the `Implies' file (removing comments). - implied_candidate="`sed 's/#.*$//' < $xsrcdir$name/$implies_file`" - for x in $implied_candidate; do - found=no - if test -d $xsrcdir$name_base/$x; then - eval "${implies_type}=\"\$${implies_type} \$name_base/\$x\"" + if test -f $xsrcdir$name/Implies; then + # Collect more names from the `Implies' file (removing comments). + implied_candidate="`sed 's/#.*$//' < $xsrcdir$name/Implies`" + implied= + for x in $implied_candidate; do + case $x in + "\$"*:*:*) + implied_var="`echo $x | sed 's/:.*$//'`" + eval "implied_var=$implied_var" + implied_cond="`echo $x | sed 's/.*:\(.*\):.*$/\1/'`" + test "$implied_var" = "$implied_cond" || continue + x="`echo $x | sed 's/.*://'`" + ;; + esac + found=no + if test -d $xsrcdir$name_base/$x; then + implied="$implied $name_base/$x"; + found=yes + fi + for d in $add_ons_pfx ''; do + try="${d}sysdeps/$x" + case $d in + /*) try_srcdir= ;; + *) try_srcdir=$srcdir/ ;; + esac + test -n "$enable_debug_configure" && + echo "DEBUG: $name implied $x try($d) {$try_srcdir}$try" >&2 + if test $try != $xsrcdir$name_base/$x && test -d $try_srcdir$try; + then + implied="$implied $try" found=yes - fi - for d in $add_ons_pfx ''; do - try="${d}sysdeps/$x" - case $d in - /*) try_srcdir= ;; - *) try_srcdir=$srcdir/ ;; + case "$sysnames_add_ons" in + *" $d "*) ;; + *|'') sysnames_add_ons="$sysnames_add_ons $d" ;; esac - test -n "$enable_debug_configure" && - echo "DEBUG: $name $implies_file $x try($d) {$try_srcdir}$try" >&2 - if test $try != $xsrcdir$name_base/$x && test -d $try_srcdir$try; - then - eval "${implies_type}=\"\$${implies_type} \$try\"" - found=yes - case "$sysnames_add_ons" in - *" $d "*) ;; - *|'') sysnames_add_ons="$sysnames_add_ons $d" ;; - esac - fi - done - if test $found = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $name/$implies_file specifies nonexistent $x" >&5 -$as_echo "$as_me: WARNING: $name/$implies_file specifies nonexistent $x" >&2;} fi done - fi - done + if test $found = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $name/Implies specifies nonexistent $x" >&5 +$as_echo "$as_me: WARNING: $name/Implies specifies nonexistent $x" >&2;} + fi + done + else + implied= + fi # Add NAME to the list of names. names="$names $name" @@ -4320,10 +4328,6 @@ $as_echo "$as_me: WARNING: $name/$implies_file specifies nonexistent $x" >&2;} # Find the parent of NAME, using the empty string if it has none. parent="`echo $name | sed -n -e 's=/[^/]*$==' -e '/sysdeps$/q' -e p`" - test -n "$enable_debug_configure" && - echo "DEBUG: $name Implies='$Implies' rest='$*' parent='$parent' \ -Implies_before='$Implies_after' Implies_after='$Implies_after'" >&2 - # Add the names implied by NAME, and NAME's parent (if it has one), to # the list of names to be processed (the argument list). We prepend the # implied names to the list and append the parent. We want implied @@ -4331,7 +4335,7 @@ Implies_before='$Implies_after' Implies_after='$Implies_after'" >&2 # 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 $Implies $* $Implies_before $parent $Implies_after`" + sysnames="`echo $implied $* $parent`" test -n "$sysnames" && set $sysnames done diff --git a/configure.in b/configure.in index 6b6dde5a83..4ff5802e3e 100644 --- a/configure.in +++ b/configure.in @@ -769,42 +769,50 @@ while test $# -gt 0; do test -n "$enable_debug_configure" && echo "[DEBUG]: name/Implies $xsrcdir$name/Implies" >&2 - for implies_file in Implies Implies-before Implies-after; do - implies_type=`echo $implies_file | sed s/-/_/` - eval ${implies_type}= - if test -f $xsrcdir$name/$implies_file; then - # Collect more names from the `Implies' file (removing comments). - implied_candidate="`sed 's/#.*$//' < $xsrcdir$name/$implies_file`" - for x in $implied_candidate; do - found=no - if test -d $xsrcdir$name_base/$x; then - eval "${implies_type}=\"\$${implies_type} \$name_base/\$x\"" + if test -f $xsrcdir$name/Implies; then + # Collect more names from the `Implies' file (removing comments). + implied_candidate="`sed 's/#.*$//' < $xsrcdir$name/Implies`" + implied= + for x in $implied_candidate; do + case $x in + "\$"*:*:*) + implied_var="`echo $x | sed 's/:.*$//'`" + eval "implied_var=$implied_var" + implied_cond="`echo $x | sed 's/.*:\(.*\):.*$/\1/'`" + test "$implied_var" = "$implied_cond" || continue + x="`echo $x | sed 's/.*://'`" + ;; + esac + found=no + if test -d $xsrcdir$name_base/$x; then + implied="$implied $name_base/$x"; + found=yes + fi + for d in $add_ons_pfx ''; do + try="${d}sysdeps/$x" + case $d in + /*) try_srcdir= ;; + *) try_srcdir=$srcdir/ ;; + esac + test -n "$enable_debug_configure" && + echo "[DEBUG]: $name implied $x try($d) {$try_srcdir}$try" >&2 + if test $try != $xsrcdir$name_base/$x && test -d $try_srcdir$try; + then + implied="$implied $try" found=yes - fi - for d in $add_ons_pfx ''; do - try="${d}sysdeps/$x" - case $d in - /*) try_srcdir= ;; - *) try_srcdir=$srcdir/ ;; + case "$sysnames_add_ons" in + *" $d "*) ;; + *|'') sysnames_add_ons="$sysnames_add_ons $d" ;; esac - test -n "$enable_debug_configure" && - echo "[DEBUG]: $name $implies_file $x try($d) {$try_srcdir}$try" >&2 - if test $try != $xsrcdir$name_base/$x && test -d $try_srcdir$try; - then - eval "${implies_type}=\"\$${implies_type} \$try\"" - found=yes - case "$sysnames_add_ons" in - *" $d "*) ;; - *|'') sysnames_add_ons="$sysnames_add_ons $d" ;; - esac - fi - done - if test $found = no; then - AC_MSG_WARN($name/$implies_file specifies nonexistent $x) fi done - fi - done + if test $found = no; then + AC_MSG_WARN($name/Implies specifies nonexistent $x) + fi + done + else + implied= + fi # Add NAME to the list of names. names="$names $name" @@ -814,10 +822,6 @@ changequote(,)dnl parent="`echo $name | sed -n -e 's=/[^/]*$==' -e '/sysdeps$/q' -e p`" changequote([,])dnl - test -n "$enable_debug_configure" && - echo "[DEBUG]: $name Implies='$Implies' rest='$*' parent='$parent' \ -Implies_before='$Implies_after' Implies_after='$Implies_after'" >&2 - # Add the names implied by NAME, and NAME's parent (if it has one), to # the list of names to be processed (the argument list). We prepend the # implied names to the list and append the parent. We want implied @@ -825,7 +829,7 @@ Implies_before='$Implies_after' Implies_after='$Implies_after'" >&2 # 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 $Implies $* $Implies_before $parent $Implies_after`" + sysnames="`echo $implied $* $parent`" test -n "$sysnames" && set $sysnames done diff --git a/sysdeps/x86_64/64/Implies-after b/sysdeps/x86_64/64/Implies-after deleted file mode 100644 index a8cae95f9d..0000000000 --- a/sysdeps/x86_64/64/Implies-after +++ /dev/null @@ -1 +0,0 @@ -wordsize-64 diff --git a/sysdeps/x86_64/Implies b/sysdeps/x86_64/Implies index 811c19a8f2..8b4daaec77 100644 --- a/sysdeps/x86_64/Implies +++ b/sysdeps/x86_64/Implies @@ -1,4 +1,6 @@ x86 +$machine:x86_64/64:wordsize-64 +$machine:x86_64/x32:wordsize-32 ieee754/ldbl-96 ieee754/dbl-64/wordsize-64 ieee754/dbl-64 diff --git a/sysdeps/x86_64/x32/Implies-after b/sysdeps/x86_64/x32/Implies-after deleted file mode 100644 index 39a34c5f57..0000000000 --- a/sysdeps/x86_64/x32/Implies-after +++ /dev/null @@ -1 +0,0 @@ -wordsize-32 |