Date: Sun, 26 Oct 1997 16:47:38 +0200 (IST) From: Eli Zaretskii To: andrewc AT rosemail DOT rose DOT hp DOT com cc: wallace AT ami1 DOT md DOT essd DOT northgrum DOT com, djgpp AT delorie DOT com Subject: Re: compiling C++ with -a switch In-Reply-To: <199710241603.AA225099039@typhoon.rose.hp.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Fri, 24 Oct 1997, Andrew Crabtree wrote: > But what do you mean > by 'lie to the configuration', DJs libc does have an atexit? Yes, of course it does. But GCC 2.7.2.1 (that's the only GCC sources I have) deliberately do NOT define HAVE_ATEXIT, because doing so would cause libgcc use its own mechanism to call the global destructors, which is incompatible with DJGPP. So the way this is implemented in GCC 2.7.2.1, DJGPP must deliberately tell GCC we don't have `atexit' in order to have our own destructor-calling mechanism. I think that HAVE_ATEXIT should be only used to tell whether we have or don't have the `atexit' function. If GCC needs the configuration to tell it whether libgcc should or shouldn't call the destructors, there should be a separate mechanism to say that, which doesn't involve HAVE_ATEXIT, because an implementation can have `atexit' but still not want to use the libgcc's destructor-calling machinery.