mirror of
git://git.savannah.gnu.org/libtool.git
synced 2025-01-30 14:30:15 +08:00
* ltmain.in (convenience): fixed race condition when more than one
library was linked with the same convenience library by uniquifying the extract directory. It is now named after the new library *and* the old one, and lives in the objdir of the new one.
This commit is contained in:
parent
a517bc7a9f
commit
f97db5092d
@ -1,3 +1,10 @@
|
|||||||
|
1999-04-02 Alexandre Oliva <oliva@dcc.unicamp.br>
|
||||||
|
|
||||||
|
* ltmain.in (convenience): fixed race condition when more than one
|
||||||
|
library was linked with the same convenience library by
|
||||||
|
uniquifying the extract directory. It is now named after the new
|
||||||
|
library *and* the old one, and lives in the objdir of the new one.
|
||||||
|
|
||||||
1999-04-02 Alexandre Oliva <oliva@dcc.unicamp.br>
|
1999-04-02 Alexandre Oliva <oliva@dcc.unicamp.br>
|
||||||
|
|
||||||
* ltmain.in (-L*): do not abort just because a directory specified
|
* ltmain.in (-L*): do not abort just because a directory specified
|
||||||
|
70
ltmain.in
70
ltmain.in
@ -2213,11 +2213,25 @@ EOF
|
|||||||
eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
|
eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
gentop="$output_objdir/${outputname}x"
|
||||||
|
$show "${rm}r $gentop"
|
||||||
|
$run ${rm}r "$gentop"
|
||||||
|
$show "mkdir $gentop"
|
||||||
|
$run mkdir "$gentop"
|
||||||
|
status=$?
|
||||||
|
if test $status -ne 0 && test ! -d "$gentop"; then
|
||||||
|
exit $status
|
||||||
|
fi
|
||||||
|
generated="$generated $gentop"
|
||||||
|
|
||||||
for xlib in $convenience; do
|
for xlib in $convenience; do
|
||||||
# Extract the objects.
|
# Extract the objects.
|
||||||
xdir="$xlib"x
|
case "$xlib" in
|
||||||
generated="$generated $xdir"
|
/* | [A-Za-z]:[/\\]*) xabs="$xlib" ;;
|
||||||
|
*) xabs=`pwd`"/$xlib" ;;
|
||||||
|
esac
|
||||||
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
|
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
|
||||||
|
xdir="$gentop/$xlib"
|
||||||
|
|
||||||
$show "${rm}r $xdir"
|
$show "${rm}r $xdir"
|
||||||
$run ${rm}r "$xdir"
|
$run ${rm}r "$xdir"
|
||||||
@ -2227,8 +2241,8 @@ EOF
|
|||||||
if test $status -ne 0 && test ! -d "$xdir"; then
|
if test $status -ne 0 && test ! -d "$xdir"; then
|
||||||
exit $status
|
exit $status
|
||||||
fi
|
fi
|
||||||
$show "(cd $xdir && $AR x ../$xlib)"
|
$show "(cd $xdir && $AR x $xabs)"
|
||||||
$run eval "(cd \$xdir && $AR x ../\$xlib)" || exit $?
|
$run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
|
||||||
|
|
||||||
libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
|
libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
|
||||||
done
|
done
|
||||||
@ -3493,26 +3507,42 @@ fi\
|
|||||||
addlibs="$old_convenience"
|
addlibs="$old_convenience"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add in members from convenience archives.
|
if test -n "$addlibs"; then
|
||||||
for xlib in $addlibs; do
|
gentop="$output_objdir/${outputname}x"
|
||||||
# Extract the objects.
|
$show "${rm}r $gentop"
|
||||||
xdir="$xlib"x
|
$run ${rm}r "$gentop"
|
||||||
generated="$generated $xdir"
|
$show "mkdir $gentop"
|
||||||
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
|
$run mkdir "$gentop"
|
||||||
|
|
||||||
$show "${rm}r $xdir"
|
|
||||||
$run ${rm}r "$xdir"
|
|
||||||
$show "mkdir $xdir"
|
|
||||||
$run mkdir "$xdir"
|
|
||||||
status=$?
|
status=$?
|
||||||
if test $status -ne 0 && test ! -d "$xdir"; then
|
if test $status -ne 0 && test ! -d "$gentop"; then
|
||||||
exit $status
|
exit $status
|
||||||
fi
|
fi
|
||||||
$show "(cd $xdir && $AR x ../$xlib)"
|
generated="$generated $gentop"
|
||||||
$run eval "(cd \$xdir && $AR x ../\$xlib)" || exit $?
|
|
||||||
|
# Add in members from convenience archives.
|
||||||
|
for xlib in $addlibs; do
|
||||||
|
# Extract the objects.
|
||||||
|
case "$xlib" in
|
||||||
|
/* | [A-Za-z]:[/\\]*) xabs="$xlib" ;;
|
||||||
|
*) xabs=`pwd`"/$xlib" ;;
|
||||||
|
esac
|
||||||
|
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
|
||||||
|
xdir="$gentop/$xlib"
|
||||||
|
|
||||||
oldobjs="$oldobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
|
$show "${rm}r $xdir"
|
||||||
done
|
$run ${rm}r "$xdir"
|
||||||
|
$show "mkdir $xdir"
|
||||||
|
$run mkdir "$xdir"
|
||||||
|
status=$?
|
||||||
|
if test $status -ne 0 && test ! -d "$xdir"; then
|
||||||
|
exit $status
|
||||||
|
fi
|
||||||
|
$show "(cd $xdir && $AR x $xabs)"
|
||||||
|
$run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
|
||||||
|
|
||||||
|
oldobjs="$oldobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
# Do each command in the archive commands.
|
# Do each command in the archive commands.
|
||||||
if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
|
if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
|
||||||
|
Loading…
Reference in New Issue
Block a user