From: H.J. Lu Date: Wed, 24 Oct 2001 14:30:22 +0000 (+0000) Subject: * ltmain.sh: Allow link against an archive when building a X-Git-Tag: release-1-4d~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6d8bb2c4bbdef3ab7c49079329bb0f156db7e06;p=thirdparty%2Flibtool.git * ltmain.sh: Allow link against an archive when building a shared library. * libtool.m4 (lt_cv_deplibs_check_method): Always use file_magic for Linux ELF. --- diff --git a/ChangeLog b/ChangeLog index a1291d510..55a29b50b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2001-10-24 H.J. Lu + + * ltmain.sh: Allow link against an archive when building a + shared library. + * libtool.m4 (lt_cv_deplibs_check_method): Always use + file_magic for Linux ELF. + 2001-10-12 Guido Draheim * ltdl.m4: Changed "underscode to underscore". diff --git a/libtool.m4 b/libtool.m4 index 76a970ce0..8fe14b50a 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -1944,6 +1944,7 @@ linux*) # glibc up to 2.1.1 does not perform some relocations on ARM lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; esac + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` ;; diff --git a/ltmain.in b/ltmain.in index 3fa03c956..0db856cd0 100644 --- a/ltmain.in +++ b/ltmain.in @@ -2973,6 +2973,13 @@ EOF *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done + # It is ok to link against an archive when + # building a shared library. + if $AR -t $potlib > /dev/null 2>&1; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ | sed 10q \ | egrep "$file_magic_regex" > /dev/null; then