This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem with -static-libstdc++ on Mac OS X


On 17 June 2015 at 20:43, Simon Wright wrote:
> For reasons connected with https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61027 I want to build GCC with shared libgcc (so cross-library exception handling works) and static libstdc++.
>
> You would think that configuring GCC with --with-boot-ldflags=-static-libstdc++ (or --with-stage1-ldflags=-static-libstdc++ for a cross-compiler) would do the trick; but itâs ignored.
>
> It turns out that on Mac OS X (Mavericks, Darwin 13.4.0) g++ ignores -static-libstdc++ unless you also say -static-libgcc (which is exactly what I need to avoid). Same behaviour on GCC 5.1.0, 4.9.1, 4.8.1, 4.7.0.
>
> GCC 4.9.1 built on Debian wheezy doesnât have this problem (the ld command is something like -Bstatic -lstdc++ -Bdynamic).
>
> Any workrounds?

Apparently not, one of our Darwin experts (CC'd) says:

yes, it doesn't work with current sources - I have a patch to make it
work for linkers without -Bdynamic/Bstatic


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]