delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/26/09:56:12

Date: Sun, 26 Oct 1997 16:47:38 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
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: <Pine.SUN.3.91.971026164714.17911F-100000@is>
MIME-Version: 1.0

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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019