bug-libtool
[Top][All Lists]
Advanced

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

Re: [2.2.7a] (patch) runtime-linking and soname-equivalent together on A


From: Ralf Wildenhues
Subject: Re: [2.2.7a] (patch) runtime-linking and soname-equivalent together on AIX
Date: Tue, 9 Dec 2008 06:51:11 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

* Michael Haubenwallner wrote on Mon, Dec 08, 2008 at 11:19:41PM CET:
> On Mon, 2008-12-08 at 08:10 +0100, Ralf Wildenhues wrote:
> 
> > > + _LT_TAGVAR(lt_prog_compiler_shared_as_static, $1)='${wl}-bstatic'
> > > + _LT_TAGVAR(lt_prog_compiler_shared_as_shared, $1)='${wl}-bdynamic'
> > 
> > What is the semantic difference between these switches and this proposal
> > <http://thread.gmane.org/gmane.comp.gnu.libtool.patches/6727/focus=6730>?
> > If the difference is too small, we should apply the other patch first
> > and adjust your patch accordingly, no?
> 
> Haven't seen this thread before. Agreed, it is related, but it depends
> on how the per-deplib-flags would interfere with -static-libtool-libs
> and -static, as - unlike other platforms - the '-bstatic' flag allows
> (and is necessary when not -static) to statically link a shared-only
> library.

Yes, that is definitely different in semantics than what the above
thread tries to achieve.

> So the search for a statically-linkable library would need to know that
> shared-only libraries can match too when '$shared_as_static' is set.

Yep.

> > > + test "$#" -lt 1 || shift
> > 
> > What is this line for?  The '-lt 1' looks wrong, maybe -le, or
> >   test $# -gt 1 && shift
> 
> Good catch - strange, why didn't hit me that?

That's a good sign that the test suite exposure isn't good enough
for this yet.

> > > +       # AIX can link 'shared objects' statically:
> > > +       test "$use_static_libs" != no &&
> > > +         test "$use_static_libs" != all &&
> > > +         test -n "$link_shared_as_static_flag" &&
> 
> > (several instances).  Also, the logic seems quite redundant, with
> > several repetitions.
> 
> Yes, but how best to reduce the redundant tests? New function, some
> variable?

Dunno, really.  Would need to look at the code in detail first.

> > > +#ifdef RTLD_MEMBER
> > > +  if (filename && strchr(filename, '(') && strchr(filename, ')'))
> > 
> > Sure you don't want to start looking for the closing parenthesis _after_
> > the position of the opening one?
> 
> Have thought on that and not found worth the effort, because setting
> RTLD_MEMBER does not require but allow for loading an archive member.
> Eventually, we could set RTLD_MEMBER even unconditionally on AIX.
> And when the name is wrong, let dlopen complain.

OK.

> > > + cmds="${cmds}"'~test "x${allow_undefined}" = "xno" || undefs=`dump -Tv 
> > > ${output_objdir}/${soname} | $SED -n '"'"'s/.* EXTref  *\.\.  *\([[^ 
> > > ]]*\) *$/ \${wl}-u\1/p'"'"' | \$NL2SP`'
> > 
> > We shouldn't use 'dump' unadorned like this.  No idea whether there are
> > cross compiling setups where $host is AIX but $build is not, but for
> > them, this should be factorized.
> 
> Have thought on that, but then found 'dump' being used to find the
> aix_libpath already, and left it alone.

The best would be to fix the other instance of naked 'dump', too.

> > > --- a/tests/lt_dladvise.at
> > > +++ b/tests/lt_dladvise.at
> > > @@ -318,8 +318,9 @@ dlpreloadable='preload'
> > >  # are reporting not able to accept the global hint to lt_dlopenadvise(). 
> > >    #
> > >  # 
> > > ------------------------------------------------------------------------- 
> > > #
> > >  
> > > -case $host_os in
> > > -cygwin* | mingw* | cegcc*)
> > > +eval `$LIBTOOL --config | grep '^allow_undefined_flag=`
> > > +case $host_os:$allow_undefined_flag in
> > > +cygwin* | mingw* | cegcc* | *:unsupported)
> > >    # These hosts do not support linking without -no-undefined
> > >    CPPFLAGS="$CPPFLAGS -DHAVE_UNDEFINED_SYMBOLS=0"
> > >    ;;
> > 
> > Doesn't this fix a bug already?  If yes, then this can be applied as a
> > separate patch.
> 
> Maybe yes - just haven't found another platform (any more?) that
> actually configures to allow_undefined_flag=unsupported.
> Why don't cygwin/mingw/cegcc do so?

But they do!  Here's a chance to simplify.  :-)

BTW, please post patches to the libtool-patches list.  Thanks.

Cheers,
Ralf




reply via email to

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