mirror of
git://git.savannah.gnu.org/libtool.git
synced 2024-11-27 06:09:57 +08:00
* ltmain.in: Expand convenience libraries when creating reloadable
objects. * NEWS: Ditto.
This commit is contained in:
parent
c46e183ca1
commit
85c66eecaf
@ -1,3 +1,9 @@
|
||||
1999-05-27 Alexandre Oliva <oliva@dcc.unicamp.br>, Olly Betts <olly@muscat.co.uk>
|
||||
|
||||
* ltmain.in: Expand convenience libraries when creating reloadable
|
||||
objects.
|
||||
* NEWS: Ditto.
|
||||
|
||||
1999-05-27 Alexandre Oliva <oliva@dcc.unicamp.br>
|
||||
|
||||
* NEWS: Mention the two bugfixes below.
|
||||
|
1
NEWS
1
NEWS
@ -17,6 +17,7 @@ New in 1.3b: 1999-??-??; CVS version 1.3a, Libtool team:
|
||||
* Various bugfixes
|
||||
|
||||
New in CVS version 1.3.2a, Libtool team:
|
||||
* Expand convenience libraries when creating reloadable objects.
|
||||
* Do not pass -whole-archive or equivalent to symbol extractor.
|
||||
* Create directory to expand convenience libraries only when needed.
|
||||
|
||||
|
73
ltmain.in
73
ltmain.in
@ -2341,8 +2341,58 @@ EOF
|
||||
# Delete the old objects.
|
||||
$run $rm $obj $libobj
|
||||
|
||||
# Objects from convenience libraries. This assumes
|
||||
# single-version convenience libraries. Whenever we create
|
||||
# different ones for PIC/non-PIC, this we'll have to duplicate
|
||||
# the extraction.
|
||||
reload_conv_objs=
|
||||
gentop=
|
||||
# reload_cmds runs $LD directly, so let us get rid of
|
||||
# -Wl from whole_archive_flag_spec
|
||||
wl=
|
||||
|
||||
if test -n "$convenience"; then
|
||||
if test -n "$whole_archive_flag_spec"; then
|
||||
eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
|
||||
else
|
||||
gentop="$output_objdir/${obj}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
|
||||
# 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"
|
||||
|
||||
$show "${rm}r $xdir"
|
||||
$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 $?
|
||||
|
||||
reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
# Create the old-style object.
|
||||
reload_objs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
|
||||
reload_objs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs"
|
||||
|
||||
output="$obj"
|
||||
eval cmds=\"$reload_cmds\"
|
||||
@ -2355,9 +2405,21 @@ EOF
|
||||
IFS="$save_ifs"
|
||||
|
||||
# Exit if we aren't doing a library object file.
|
||||
test -z "$libobj" && exit 0
|
||||
if test -z "$libobj"; then
|
||||
if test -n "$gentop"; then
|
||||
$show "${rm}r $gentop"
|
||||
$run ${rm}r $gentop
|
||||
fi
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test "$build_libtool_libs" != yes; then
|
||||
if test -n "$gentop"; then
|
||||
$show "${rm}r $gentop"
|
||||
$run ${rm}r $gentop
|
||||
fi
|
||||
|
||||
# Create an invalid libtool object if no PIC, so that we don't
|
||||
# accidentally link it into a program.
|
||||
$show "echo timestamp > $libobj"
|
||||
@ -2367,7 +2429,7 @@ EOF
|
||||
|
||||
if test -n "$pic_flag"; then
|
||||
# Only do commands if we really have different PIC objects.
|
||||
reload_objs="$libobjs"
|
||||
reload_objs="$libobjs $reload_conv_objs"
|
||||
output="$libobj"
|
||||
eval cmds=\"$reload_cmds\"
|
||||
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
|
||||
@ -2385,6 +2447,11 @@ EOF
|
||||
$run $LN_S $obj $libobj || exit $?
|
||||
fi
|
||||
|
||||
if test -n "$gentop"; then
|
||||
$show "${rm}r $gentop"
|
||||
$run ${rm}r $gentop
|
||||
fi
|
||||
|
||||
exit 0
|
||||
;;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user