libtool-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] disable de-duplication of postdeps on Solaris


From: Bob Friesenhahn
Subject: Re: [PATCH] disable de-duplication of postdeps on Solaris
Date: Sun, 29 Jul 2012 16:14:12 -0500 (CDT)
User-agent: Alpine 2.01 (GSO 1266 2009-07-14)

On Thu, 26 Jul 2012, Fabian Groffen wrote:

Libtool apparently figures out what libs to link to by watching what the
compiler does.  It applies duplicate elimination on the result of that
(don't know why) causing -lgcc_s -lc -lgcc_s to be turned into -lc
-lgcc_s.  As result, the library aborts on Solaris when it throws an
exception because -lc comes before -lgcc_s.  On Sparc, the result is
-lgcc_s -lc, probably because both were double.

I'm not sure this can be properly fixed by making sure -lgcc_s -lc
remains, since GCC purposely emits the same library multiple times, so I
decided to just disable the duplicate elimination for Solaris.

Unfortunately, this fix is not working for me (not fixing issue I already encountered). I do see libtool's exceptions test pass (for a 32-bit build) , but it does not work for my own C++ application as a 64-bit build. It seems that GCC itself is causing the harm (or is just plain not working). With no specific request for any of these libraries, this is the list of libraries that GCC 4.7.1 is passing to collect2 while building my C++ test application:

-lstdc++ -lm -lc -lgomp -lgcc_s -lgcc -lpthread -lc -lgcc_s -lgcc

I tried running collect2 manually with different permutations but was unable to find one which gets C++ exceptions working.

The Sun/Oracle compiler has never had a problem with C++ exceptions.

Bob
--
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/



reply via email to

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