[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: match_pattern support for .a files linked in shared libs
From: |
Peter O'Gorman |
Subject: |
Re: match_pattern support for .a files linked in shared libs |
Date: |
Tue, 03 Aug 2004 23:55:00 +0900 |
User-agent: |
Mozilla Thunderbird 0.6 (Macintosh/20040502) |
Jacob Meuser wrote:
The net effect is that using a libname_pic.a never happens, although
it is valid as described in deplibs_check_method.
The patch I sent isn't quite right. I forgot to add the
set dummy $deplibs_check_method
line.
It'll work in 1.5.8 and later :)
Patches applied to branch-1-5 and HEAD.
Thanks,
Peter
--
Peter O'Gorman - http://www.pogma.com
Index: ChangeLog
from Jacob Meuser <address@hidden>
* ltmain.in: Allow some static libraries to be used in generating a
shared library on NetBSD and OpenBSD. match-pattern_regex decides
which are good.
Index: ltmain.in
===================================================================
RCS file: /cvsroot/libtool/libtool/Attic/ltmain.in,v
retrieving revision 1.334.2.37
diff -u -3 -p -u -r1.334.2.37 ltmain.in
--- ltmain.in 30 Jul 2004 14:02:12 -0000 1.334.2.37
+++ ltmain.in 3 Aug 2004 13:27:24 -0000
@@ -2099,7 +2099,22 @@ EOF
fi
case $linkmode in
lib)
- if test "$deplibs_check_method" != pass_all; then
+ valid_a_lib=no
+ case $deplibs_check_method in
+ match_pattern*)
+ set dummy $deplibs_check_method
+ match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+ if eval $echo \"$deplib\" 2>/dev/null \
+ | $SED 10q \
+ | $EGREP "$match_pattern_regex" > /dev/null; then
+ valid_a_lib=yes
+ fi
+ ;;
+ pass_all)
+ valid_a_lib=yes
+ ;;
+ esac
+ if test "$valid_a_lib" != yes; then
$echo
$echo "*** Warning: Trying to link with static lib archive
$deplib."
$echo "*** I have the capability to make that library
automatically link in when"
Index: ChangeLog
from Jacob Meuser <address@hidden>
* ltmain.in: Allow some static libraries to be used in generating a
shared library on NetBSD and OpenBSD. match-pattern_regex decides
which are good.
Index: config/ltmain.in
===================================================================
RCS file: /cvsroot/libtool/libtool/config/ltmain.in,v
retrieving revision 1.1
diff -u -3 -p -u -r1.1 ltmain.in
--- config/ltmain.in 30 Jul 2004 23:02:39 -0000 1.1
+++ config/ltmain.in 3 Aug 2004 14:45:57 -0000
@@ -2412,7 +2412,22 @@ EOF
case " $dlpreconveniencelibs " in
*" $lib "*) ;;
*)
- if test "$deplibs_check_method" != pass_all; then
+ valid_a_lib=no
+ case $deplibs_check_method in
+ match_pattern*)
+ set dummy $deplibs_check_method
+ match_pattern_regex=`expr "$deplibs_check_method" : "$2
\(.*\)"`
+ if eval $echo \"$deplib\" 2>/dev/null \
+ | $SED 10q \
+ | $EGREP "$match_pattern_regex" > /dev/null; then
+ valid_a_lib=yes
+ fi
+ ;;
+ pass_all)
+ valid_a_lib=yes
+ ;;
+ esac
+ if test "$valid_a_lib" != yes; then
$echo
$echo "*** Warning: Trying to link with static lib archive
$deplib."
$echo "*** I have the capability to make that library
automatically link in when"