http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44107
Iain Sandoe <iains at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |4.6.1 --- Comment #8 from Iain Sandoe <iains at gcc dot gnu.org> 2011-03-20 09:27:15 UTC --- (In reply to comment #7) > 1) In no configuration the bootstrap fails (as long as you take care of > PR45381 > and PR47016). PR45381 has been fixed in trunk and on the branch - I guess it will be fixed in the release (I think there's another RC coming). As already commented in PR47016, this is a tool problem, not a gcc bug (but, since I doubt any tool fixes will be forthcoming for darwin < 11, we will endeavor to solve it somehow ;-) - patches welcome... ) > 2) Indeed, the DYLD_LIBRARY_PATH that makes things to work properly is > DYLD_LIBRARY_PATH=$(prefix)/lib If everything is linked correctly with proper rpaths, and the products are installed - there should be no need for a DYLD_LIBRARY_PATH - it should only be necessary for uninstalled testing. > 3) I have built with the patch attached in #4 (together with the addition > included in #5), it seems > to work properly now (see configuration 'y' below). > > 4) I have now 3 configurations (all with 4.6.0 RC 20110314) > - 4.6.x: built with my modification (the change in t-slibgcc-darwin) > - 4.6.y: built with the 2 patches from yesterday > - 4.6.z: no change from the distribution > I have also built the Xerces-C library 3 times, xerces-c-3.1.1x, > xerces-c-3.1.1y and > xerces-c3.1.1.z. > The libxerces-c-3.1.dylib contains (iaw otool -L) a dependency towards > /usr/lib/libgcc_s.1.dylib > in the cases 'y' and 'z'. The libxerces-c-3.1.dylib contains a dependency > towards /usr/lib/libSystem.B.dylib in the three configurations. My C++ program > links with this library. > > The sets 'x' and 'y' work properly. Hm, configuration 'x' is actually generically incorrect - it will _only_ work providing you don't link with any library that is already linked with the unwinder in /usr/lib/libgcc_s.1.dylib. This is because there can only be _one_ unwinder - the whole program must use the same one. Some stand-alone programs are unaffected (including the gcc test-suite), but - anything that uses stuff from gcc together with system frameworks is almost certainly doomed... set 'y' is correct (IMO) - and if the products are installed should work without a DYLD_LIBRARY_PATH - assuming that everything has its correct paths... The set 'z' does not work (stuck between > throw and catch, CPU running). that, to me, confirms that the bug is in our emitting unwind that is incompatible with the darwin 9 unwinder (a known issue, but without a specific bug - it has been treated as part of PR41991 to date). I don't know when (or if) the patch will make it into gcc - but surely not for 4.6.0 it's too intrusive and the time has gone - for now, a local patch is required - although it might be that fink/macports would decide to apply this too. hint: "DYLD_PRINT_LIBRARIES=1 ./myexe " is really useful for making sure that the libraries you think should be used actually are ;-) thanks for testing!!