fix libstdcxx to not use two different unwinders

Jack Howarth howarth at bromo.med.uc.edu
Fri Apr 12 08:00:56 PDT 2013


   I have uploaded packaging on https://trac.macports.org/ticket/38758 to eliminate the
eh crashes in libstdc++ caused by the current static linkage of libgcc_eh in libstdcxx.
Under faster c++ weak symbol coalescing introduced in darwin10, a static linkage of libgcc_eh
will result in the forbidden usage of two different unwinders. The crash in the test.cc
test case from https://trac.macports.org/ticket/38732 exposed the problem. The
only fix available is to stop using the non-standard static linkage of libgcc for
libstdc++ but to instead add the libgcc*dylib files to the libstdcxx subport.
   The current Portfile.diff and skip-libffi-install.patch for the proposed gcc48
packaging update at https://trac.macports.org/ticket/38758 eliminates the crash in the
test.cc test case from https://trac.macports.org/ticket/38732...

% g++-mp-4.8 -std=c++11 test.cc
% ./a.out
doing the test
success, result is 1

I have also uploaded packaging for a gcc47 update that deprecates the libstdcxx subport
out of that package while adding the required changes to support the move of the
libgcc*dylib files into the libstdcxx subport. This involves simply replacing those files
in the gcc47 (as with the gcc48 package) with symlinks to their location in the
libstdcxx package at ${prefix}/lib. This package update is posted in the ticket at...

https://trac.macports.org/ticket/38774

and also contains the required backport of the appropriate nanosleep c++11 fix from
gcc trunk. The same changes need to be applied to updates for the other older gcc4x
packages.


More information about the macports-dev mailing list