diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 54eead1f94e..3c92b7eff2a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +1999-12-18 Mark Mitchell + + * crtstuff.c (__do_global_ctors_aux): Do not call __cxa_finalize + in a main program. + Sat Dec 18 20:42:43 1999 Richard Henderson * cccp.c (main): Define __STDC_VERSION__ as necessary. diff --git a/gcc/crtstuff.c b/gcc/crtstuff.c index 53dae7cddc2..c0a6ae02ffd 100644 --- a/gcc/crtstuff.c +++ b/gcc/crtstuff.c @@ -172,8 +172,10 @@ __do_global_dtors_aux (void) if (completed) return; - if (__dso_handle && __cxa_finalize) +#ifdef CRTSTUFFS_O + if (__cxa_finalize) __cxa_finalize (__dso_handle); +#endif while (*p) {