The symptoms are that for some inputs, my C++ program gets stuck after a `throw' and before the corresponding `catch', with CPU running. With an appropriate DYLD_LIBRARY_PATH, the problem disappears.
The problem comes IMHO from libgcc/config/t-slibgcc-darwin (lines 29-35) where libgcc_s.10.5.dylib is _not_ built. Therefore it remains absent from $(objdir)/gcc. However, in the `specs' located in this directory, it is referenced from within the `*libgcc:' target (see also lines 400 and 405 of gcc/config/darwin.h). Consequently, libstdc++.6.dylib contains a dependency towards /usr/lib/libgcc_s.10.5.dylib (see line 577 of libstdc++-v3/src/Makefile.in, /usr/lib is a default directory), and this dependency remains in my C++ executable (dynamically linked). The symptoms follow (see explanations under the description of the option `-shared-libgcc' of GCC). I modified libgcc/config/t-slibgcc-darwin in order to build libgcc_s.10.5.dylib in all cases and everything is now perfect. Perhaps a better solution would be to remove the -lgcc_s.10.5 from the build of libstdc++.6.dylib. Hope this helps. I grabbed the 4.5-20100506 snapshot and found no change in this area. All the above lines and files are from the 4.5.0 distribution. -- Summary: libstdc++ (dylib) is built with an erroneous dependency towards /usr/lib Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: bootstrap AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: Denis dot Excoffier at airbus dot com GCC build triplet: powerpc-apple-darwin9.8.0 GCC host triplet: powerpc-apple-darwin9.8.0 GCC target triplet: powerpc-apple-darwin9.8.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44107