[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] disable de-duplication of postdeps on Solaris
From: |
Fabian Groffen |
Subject: |
[PATCH] disable de-duplication of postdeps on Solaris |
Date: |
Thu, 26 Jul 2012 19:01:53 +0200 |
User-agent: |
Mutt/1.5.21 (Darwin 11.4.0, VIM - Vi IMproved 7.3) |
Hi,
I tracked down an issue on Solaris/OpenSolaris/OpenIndiana where C++
libraries built by libtool would cause abort/traps when an exception was
being thrown.
The underlying cause is that the C-library was linked before libgcc,
leading to the C-library generating the abort before libgcc could do
what it was supposed to do.
I only observed this problem on x86-based Solaris, not on Sparc. The
reason for this follows from what GCC does to link an object. It
specifies by default -lgcc -lc -lgcc, however on Sparc systems
(unrelated to Solaris) it adds another -lc because libgcc might need the
C-library in turn. [1]
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.
[1] http://gcc.gnu.org/ml/gcc-patches/2002-04/msg00176.html
--
Fabian Groffen
Gentoo on a different level
libtool-2.4.2-solaris-postdeps-no-dedup.patch
Description: Text document
signature.asc
Description: Digital signature
- [PATCH] disable de-duplication of postdeps on Solaris,
Fabian Groffen <=
- Re: [PATCH] disable de-duplication of postdeps on Solaris, Bob Friesenhahn, 2012/07/26
- Re: [PATCH] disable de-duplication of postdeps on Solaris, Bob Friesenhahn, 2012/07/29
- Re: [PATCH] disable de-duplication of postdeps on Solaris, Fabian Groffen, 2012/07/30
- Re: [PATCH] disable de-duplication of postdeps on Solaris, Bob Friesenhahn, 2012/07/30
- Re: [PATCH] disable de-duplication of postdeps on Solaris, Fabian Groffen, 2012/07/30
- Re: [PATCH] disable de-duplication of postdeps on Solaris, Bob Friesenhahn, 2012/07/30
- Re: [PATCH] disable de-duplication of postdeps on Solaris, Fabian Groffen, 2012/07/30
- Re: [PATCH] disable de-duplication of postdeps on Solaris, Bob Friesenhahn, 2012/07/30
- Re: [PATCH] disable de-duplication of postdeps on Solaris, Fabian Groffen, 2012/07/30
- Re: [PATCH] disable de-duplication of postdeps on Solaris, Bob Friesenhahn, 2012/07/30