[Top][All Lists]

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

Re: libtool, Solaris, Sun Studio compiler

From: Ralf Wildenhues
Subject: Re: libtool, Solaris, Sun Studio compiler
Date: Wed, 16 Mar 2005 19:07:23 +0100
User-agent: Mutt/1.4.1i

Hi Пухальский,

Please consider quoting text you reply to.  Like this it is not visible
at all which part you answer to.  Thank you.

* Пухальский Юрий Андреевич wrote on Mon, Mar 14, 2005 at 12:13:20PM CET:
> > This looks like the compiler frontend reorders the options, not
> > libtool. Is there an option we can pass to /opt/SUNWspro/bin/CC to
> > keep it from reordering?
> I've got the answer for Sunforum: 
> (http://forum.sun.com/thread.jspa?threadID=23354)
> Do not use -Qoption to pass -z options to ld. The driver knows that
> all -z options should be passed to the linker in order. Just write 
>  -z allextract test/.libs/libbar.a -z defaultextract 
> and you should get the right behavior.
> I don't know what else we could do (but I know little about Solaris).
> I think libtool should be updated taking this into account.

Thanks.  Looking at this in more detail, it seems to me that we fixed
this in
for branch-2-0 and HEAD.

Could you please try the backported patch below and report back?  

On the other hand: For how long have the Sun compiler drivers understood `-z'
without problems?  Maybe we can just set
with them and get rid of the cruft in all branches?

Anyone else that uses Sun Studio?


2004-03-14  Albert Chin-A-Young  <address@hidden>
        * libtool.m4: When linking convenience libraries on Solaris
        with the Sun C++ compiler, pass convenience libraries through
        to the linker with -Qoption between allextract/defaultextract.
        The Sun C++ compiler bundles -Qoption arguments so
        convenience libraries are linked with defaultextract

Index: libtool.m4
RCS file: /cvsroot/libtool/libtool/Attic/libtool.m4,v
retrieving revision 1.314.2.70
diff -u -r1.314.2.70 libtool.m4
--- libtool.m4  14 Mar 2005 11:12:05 -0000      1.314.2.70
+++ libtool.m4  16 Mar 2005 18:12:35 -0000
@@ -3422,9 +3422,13 @@
            # The C++ compiler is used as linker so we must use $wl
            # flag to pass the commands to the underlying system
-           # linker.
+           # linker. We must also pass each convience library through
+           # to the system linker between allextract/defaultextract.
+           # The C++ compiler will combine linker options so we
+           # cannot just pass the convience library names through
+           # without $wl.
            # Supported since Solaris 2.6 (maybe 2.5.1?)
-           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z 
${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z 
${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && 
new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` 
${wl}-z ${wl}defaultextract'
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes

reply via email to

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