]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltmain.in (old_archive_cmds): Iterate on oldobjs to find out
authorAlexandre Oliva <oliva@dcc.unicamp.br>
Tue, 27 Apr 1999 10:34:45 +0000 (10:34 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Tue, 27 Apr 1999 10:34:45 +0000 (10:34 +0000)
which links to object files we must create.  Do not test for empty
pic_flag to create such links.  Use objext when searching for
object files extracted from convenience library.

ChangeLog
ltmain.in

index 78ffcdc4c8b718cadf2c11cbda9208b383e8f0ac..eb137e03f6ca13d956d8d10ffbcda4ec65cd48cb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 1999-04-27  Alexandre Oliva  <oliva@dcc.unicamp.br>
 
+       * ltmain.in (old_archive_cmds): Iterate on oldobjs to find out
+       which links to object files we must create.  Do not test for empty 
+       pic_flag to create such links.  Use objext when searching for
+       object files extracted from convenience library.
+
        * ltconfig.in (compiler_c_o): Make sure the compiler does not
        create temporaries in the current directory when output should go
        elsewhere.  We must perform locking if it does.
index 4e329af80af2ab5dd9fb5e8069b7fff454904977..8a57a7684378ae1904a932c095118525e1b44bb7 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -105,6 +105,7 @@ show="$echo"
 show_help=
 execute_dlfiles=
 lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
 
 # Parse our command line options once, thoroughly.
 while test $# -gt 0
@@ -2895,7 +2896,7 @@ 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`
+         oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
        done
       fi
 
@@ -2906,15 +2907,13 @@ fi\
        # Ensure that we have .o objects in place incase we decided
        # not to build a shared library, and have fallen back to building
        # static libs even though --disable-static was passed!
-       if test "X$pic_flag" = X; then
-         for obj in $libobjs; do
-           oldobj=`$echo "X$obj" | $Xsed -e "$lo2o"`
-           if test ! -f $oldobj; then
-             $show "${LN_S} $obj $oldobj"
-             $run ${LN_S} $obj $oldobj || exit $?
-           fi
-         done
-       fi
+       for oldobj in $oldobjs; do
+         if test ! -f $oldobj; then
+           obj=`$echo "X$oldobj" | $Xsed -e "$o2lo"`
+           $show "${LN_S} $obj $oldobj"
+           $run ${LN_S} $obj $oldobj || exit $?
+         fi
+       done
 
        eval cmds=\"$old_archive_cmds\"
       fi