This is the mail archive of the gcc-patches@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: __cxa_atexit for Darwin



On Mar 15, 2006, at 9:23 PM, Geoffrey Keating wrote:



Darwin has had __cxa_atexit since 10.4, but it wasn't being used by default because we didn't have __dso_handle being defined by the linker. Unfortunately it also turned out to be a little buggy. This patch makes it enabled and useful by default, and supplies it even on pre-10.4 systems which don't have it. On those earlier systems it isn't as good as a real system __cxa_atexit but still better than the previous behaviour I hope.

It passes a bootstrap and testrun, but I wouldn't be surprised if
there turns out to be a bug or two in it, so look for follow-up
patches.

This requires cctools-590.36, which I've just uploaded to
gcc.gnu.org.

This breaks bootstrap (and testing) on Mac OS X 10.3.9:
/Users/pinskia/src/gcc/local/gcc/objdir/gcc/gcj -B/Users/pinskia/src/gcc/local/gcc/objdir/powerpc-apple-darwin7.9.0/ libjava/ -B/Users/pinskia/src/gcc/local/gcc/objdir/gcc/ -g -O2 -o .libs/grmiregistry --main=gnu.java.rmi.registry.RegistryImpl -shared-libgcc -L/Users/pinskia/src/gcc/local/gcc/objdir/powerpc-apple-darwin7.9.0/ libjava -L/Users/pinskia/src/gcc/local/gcc/objdir/powerpc-apple-darwin7.9.0/ libjava/.libs ./.libs/libgcj.dylib -L/Users/pinskia/src/gcc/local/gcc/objdir/powerpc-apple-darwin7.9.0/ libstdc++-v3/src -L/Users/pinskia/src/gcc/local/gcc/objdir/powerpc-apple-darwin7.9.0/ libstdc++-v3/src/.libs -lpthread -ldl
/usr/bin/ld: Undefined symbols:
___cxa_finalize
collect2: ld returned 1 exit status



Even though __cxa_finalize is weak, it must exist in the library which you are linking against.

-- Pinski


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