libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: match_pattern support for .a files linked in shared libs


From: Jacob Meuser
Subject: Re: match_pattern support for .a files linked in shared libs
Date: Mon, 2 Aug 2004 18:29:39 -0701
User-agent: Mutt/1.4.2i

On Sat, Jul 31, 2004 at 09:10:19PM +0900, Peter O'Gorman wrote:
> Albert Chin wrote:
> 
> >On Fri, Jul 30, 2004 at 10:21:53AM -0701, Jacob Meuser wrote:
> >
> >>When libtool is given a .a to link into a shared library, if
> >>deplibs_check_method != pass_all, it doesn't link.  However,
> >>both NetBSD and OpenBSD allow shared libs to be built with
> >>certain .a files, as per match_pattern.
> >>
> >>Here is a patch against branch-1-5.
> >>
> >>I ripped the match-pattern_regex from another part of libtool.
> [snip]
> >${SED} -> $SED
> >${EGREP} -> $EGREP
> >
> >And, you need to fix the indentation after the 'if' statement.
> >
> 
> Well, first I think we ought to see if this patch is the correct way to 
> solve the problem. I'm not entirely sure it is, but am willing to be 
> persuaded otherwise. First, as far as I know, the match_pattern set by 
> freebsd and openbsd should be allowing the libs into shared libraries as it 
> stands, is this correct?

Well, it correctly defines a matching pattern for allowed libs.  The
problem is, it's not used when it could be.  This affects net and open
bsd (I don't think there are any others using match_pattern), not freebsd.

 Perhaps the match_pattern code a little later in 
> ltmain.in needs fixing rather than adding a whole new section?

The later section finds libs if given -l$name.  This patch affects the
addition of .a files on the command line to $deplibs.

And the later section uses

  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`

which will never catch the .a archives that are allowed, which are
of the form ${libname}_pic.a.  The selection of potential_libs could
probably be fixed as well.  I'm not sure what the best way to do
that is.

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.

-- 
<address@hidden>

Attachment: patch-ltmain_in-1-5
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]