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

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

 



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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux