gbl-ctors.h: Lose HAVE_ATEXIT.
authorJason Merrill <jason@yorick.cygnus.com>
Wed, 15 Sep 1999 21:41:16 +0000 (21:41 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 15 Sep 1999 21:41:16 +0000 (17:41 -0400)
* gbl-ctors.h: Lose HAVE_ATEXIT.  Don't define ON_EXIT.
* libgcc2.c: Lose obsolete defn of WEAK_ALIAS.
(__bb_init_func, __bb_init_prg): Use atexit instead of ON_EXIT.
(__do_global_dtors): Likewise.  Don't mess with _exit_dummy_decl.
(atexit, exit): Simplify.
* tm.texi: Document NEED_ATEXIT and ON_EXIT.  Remove HAVE_ATEXIT.
* config/lots: Remove defns of HAVE_ATEXIT.

From-SVN: r29439

75 files changed:
gcc/ChangeLog
gcc/config/alpha/alpha.h
gcc/config/arc/arc.h
gcc/config/arm/coff.h
gcc/config/arm/linux-elf.h
gcc/config/arm/linux-telf.h
gcc/config/arm/riscix.h
gcc/config/arm/riscix1-1.h
gcc/config/arm/tcoff.h
gcc/config/arm/telf.h
gcc/config/arm/thumb.h
gcc/config/arm/tpe.h
gcc/config/arm/unknown-elf.h
gcc/config/c4x/c4x.h
gcc/config/clipper/clix.h
gcc/config/elfos.h
gcc/config/gnu.h
gcc/config/i386/386bsd.h
gcc/config/i386/cygwin.h
gcc/config/i386/djgpp.h
gcc/config/i386/freebsd.h
gcc/config/i386/i386-interix.h
gcc/config/i386/linux.h
gcc/config/i386/osfrose.h
gcc/config/i386/sco.h
gcc/config/i386/sco5.h
gcc/config/i386/scodbx.h
gcc/config/i386/seq-sysv3.h
gcc/config/i386/seq2-sysv3.h
gcc/config/i386/win-nt.h
gcc/config/i386/win32.h
gcc/config/i860/fx2800.h
gcc/config/i860/paragon.h
gcc/config/interix.h
gcc/config/linux-aout.h
gcc/config/linux.h
gcc/config/lynx-ng.h
gcc/config/lynx.h
gcc/config/m68k/3b1.h
gcc/config/m68k/a-ux.h
gcc/config/m68k/apollo68.h
gcc/config/m68k/dpx2.h
gcc/config/m68k/hp320.h
gcc/config/m68k/mot3300.h
gcc/config/m88k/sysv3.h
gcc/config/mips/iris4.h
gcc/config/mips/linux.h
gcc/config/mips/netbsd.h
gcc/config/mips/osfrose.h
gcc/config/mips/sni-svr4.h
gcc/config/mips/svr4-4.h
gcc/config/mips/svr4-5.h
gcc/config/mips/ultrix.h
gcc/config/netbsd.h
gcc/config/nextstep.h
gcc/config/ns32k/pc532-min.h
gcc/config/openbsd.h
gcc/config/pa/pa.h
gcc/config/psos.h
gcc/config/ptx4.h
gcc/config/rs6000/mach.h
gcc/config/rs6000/rs6000.h
gcc/config/rs6000/xm-beos.h
gcc/config/sh/sh.h
gcc/config/sparc/linux-aout.h
gcc/config/sparc/linux.h
gcc/config/sparc/linux64.h
gcc/config/sparc/sunos4.h
gcc/config/svr4.h
gcc/config/vax/ultrix.h
gcc/config/vax/vms.h
gcc/config/xm-linux.h
gcc/gbl-ctors.h
gcc/libgcc2.c
gcc/tm.texi

index da8c5cb196bf285e244f17a13aedc8a7d7e57813..b92675be7063288d16628a261df6a19a963035fe 100644 (file)
@@ -1,3 +1,13 @@
+Wed Sep 15 14:39:35 1999  Jason Merrill  <jason@yorick.cygnus.com>
+
+       * gbl-ctors.h: Lose HAVE_ATEXIT.  Don't define ON_EXIT.
+       * libgcc2.c: Lose obsolete defn of WEAK_ALIAS.
+       (__bb_init_func, __bb_init_prg): Use atexit instead of ON_EXIT.
+       (__do_global_dtors): Likewise.  Don't mess with _exit_dummy_decl.
+       (atexit, exit): Simplify.
+       * tm.texi: Document NEED_ATEXIT and ON_EXIT.  Remove HAVE_ATEXIT.
+       * config/lots: Remove defns of HAVE_ATEXIT.
+
 Wed Sep 15 10:25:12 1999  Mark Mitchell  <mark@codesourcery.com>
 
        * calls.c (precompute_arguments): Fix typo in comment.
index db9dec936d0204b1a42d84db674e49d92916dc59..98eb40e3c5ae6c37c5f75091c43c3ec6869c9960 100644 (file)
@@ -1752,10 +1752,6 @@ do {                                                                     \
    few bits. */
 #define SHIFT_COUNT_TRUNCATED 1
 
-/* Use atexit for static constructors/destructors, instead of defining
-   our own exit function.  */
-#define HAVE_ATEXIT
-
 /* The EV4 is dual issue; EV5/EV6 are quad issue.  */
 #define ISSUE_RATE  (alpha_cpu == PROCESSOR_EV4 ? 2 : 4)
 
index 8135198e312f1808496268141c30734d9990b19a..afdaa15f59b2a8c89f34d618243ab40373f18f19 100644 (file)
@@ -1609,12 +1609,6 @@ extern void arc_set_default_type_attributes ();
 #define SET_DEFAULT_TYPE_ATTRIBUTES(TYPE) \
 arc_set_default_type_attributes (TYPE)
 
-/* Define this if the target system supports the function
-   atexit from the ANSI C standard.  If this is not defined,
-   and INIT_SECTION_ASM_OP is not defined, a default
-   exit function will be provided to support C++.  */
-#define HAVE_ATEXIT
-
 /* alloca should avoid clobbering the old register save area.  */
 /* ??? Not defined in tm.texi.  */
 #define SETJMP_VIA_SAVE_AREA
index 87f969eddeb3bd4396b3033a578568082acd015c..8d8f5605b65540b43e2d50905391602f1d03da6a 100644 (file)
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler,
    for ARM with COFF obj format.
-   Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
    Contributed by Doug Evans (dje@cygnus.com).
    
 This file is part of GNU CC.
@@ -208,14 +208,6 @@ dtors_section ()                                                   \
 #undef DO_GLOBAL_CTORS_BODY
 #undef DO_GLOBAL_DTORS_BODY
 
-/* If you don't define HAVE_ATEXIT, and the object file format/OS/whatever 
-   does not support constructors/destructors, then gcc implements destructors
-   by defining its own exit function, which calls the destructors.  This gcc
-   exit function overrides the C library's exit function, and this can cause
-   all kinds of havoc if the C library has a non-trivial exit function.  You
-   really don't want to use the exit function in libgcc2.c.  */
-#define HAVE_ATEXIT
-
 /* The ARM development system defines __main.  */
 #define NAME__MAIN  "__gccmain"
 #define SYMBOL__MAIN __gccmain
index f7bd3b29fa2ff5998b5d12ab13d7361b13e26185..39054902ba34c5fe0bf61702e351f294cda9800a 100644 (file)
@@ -25,9 +25,6 @@ Boston, MA 02111-1307, USA.  */
 /* Do not assume anything about header files.  */
 #define NO_IMPLICIT_EXTERN_C
 
-/* We have libgcc2.  */
-#define HAVE_ATEXIT
-
 #ifndef SUBTARGET_DEFAULT_APCS26
 /* Default is to use APCS-32 mode.  */
 # define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_SHORT_BYTE)
index b6aca0b57b4c2bda0891d4fdcec9ef1dd2fb0f89..8be385295c321c6b22c08cf8c4786d657973b519 100644 (file)
@@ -19,9 +19,6 @@ along with this program; see the file COPYING.  If not, write to
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-/* We have libgcc2.  */
-#define HAVE_ATEXIT
-
 #define SUBTARGET_EXTRA_ASM_SPEC       \
        " %{fPIC:-k} %{fpic:-k}"
 
index fad0293337a6121e305864faadc3f5fccd0ac6a1..37bd1fe313cc1a851aee058dbc847999b75ce8d5 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler.  ARM RISCiX version.
-   Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1993, 1994, 1995, 1997, 1999 Free Software Foundation, Inc.
    Contributed by Richard Earnshaw (rwe11@cl.cam.ac.uk), based on original
              work by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
              and Martin Simmons (@harleqn.co.uk).
@@ -95,12 +95,6 @@ Boston, MA 02111-1307, USA.  */
 /* Unsigned chars produces much better code than signed.  */
 #define DEFAULT_SIGNED_CHAR  0
 
-/* Define this if the target system supports the function atexit from the
-   ANSI C standard.  If this is not defined, and INIT_SECTION_ASM_OP is not
-   defined, a default exit function will be provided to support C++.  
-   The man page only describes on_exit, but atexit is also there.  */
-#define HAVE_ATEXIT 1
-
 /* Some systems use __main in a way incompatible with its use in gcc, in these
    cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to
    give the same symbol without quotes for an alternative entry point.  You
index e896a1eb033b388e17fdca0cc39851bda2989402..568df54e828eb4018ddec4af072ac4728d3abe39 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler.  ARM RISCiX 1.1x version.
-   Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1993, 1995, 1997, 1999 Free Software Foundation, Inc.
    Contributed by Richard Earnshaw (rwe11@cl.cam.ac.uk), based on original
              work by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
              and Martin Simmons (@harleqn.co.uk).
@@ -62,12 +62,15 @@ Boston, MA 02111-1307, USA.  */
 #define DEFAULT_SIGNED_CHAR  1
 #endif
 
-/* Define this if the target system supports the function atexit form the
-   ANSI C standard.  If this is not defined, and INIT_SECTION_ASM_OP is not
+/* Define this if the target system lacks the function atexit from the
+   ANSI C standard.  If this is defined, and ON_EXIT is not
    defined, a default exit function will be provided to support C++.  
    The man page only describes on_exit, but atexit is also there.  
-   This seems to be missing in early versions. */
-/*#define HAVE_ATEXIT 1 */
+   This seems to be missing in early versions.
+
+   FIXME Should we define ON_EXIT here?  */
+#define NEED_ATEXIT
+
 /* Some systems use __main in a way incompatible with its use in gcc, in these
    cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to
    give the same symbol without quotes for an alternative entry point.  You
index ece0ea4d045c42ec3ab223b845b95a610ef2284a..5f14c1e32830b8a9ec83b1a6a6ae7182d57102f5 100644 (file)
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler,
    for Thumb with COFF obj format.
-   Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1999 Free Software Foundation, Inc.
    Derived from arm/coff.h originally by Doug Evans (dje@cygnus.com).
    
 This file is part of GNU CC.
@@ -183,10 +183,6 @@ do {                                               \
 #undef DO_GLOBAL_CTORS_BODY
 #undef DO_GLOBAL_DTORS_BODY
 
-/* The ARM development system has atexit and doesn't have _exit,
-   so define this for now.  */
-#define HAVE_ATEXIT
-
 /* The ARM development system defines __main.  */
 #define NAME__MAIN "__gccmain"
 #define SYMBOL__MAIN __gccmain
index 14527ceef424e4c3a357ddc37c4ba192d1170e2e..1f7bbb7c3b68909eed265b2305878377fa52f20d 100644 (file)
@@ -299,10 +299,6 @@ dtors_section ()                                           \
     }                                          \
   while (0)
 
-/* The ARM development system has atexit and doesn't have _exit,
-   so define this for now.  */
-#define HAVE_ATEXIT
-
 /* The ARM development system defines __main.  */
 #define NAME__MAIN "__gccmain"
 #define SYMBOL__MAIN __gccmain
index 65d6d4ba9cc5276d371753ba173f578a8575b856..9c30a30d639e1540205eab49a98d05fd7145d783 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler, for ARM/Thumb.
-   Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
    The basis of this contribution was generated by
                Richard Earnshaw, Advanced RISC Machines Ltd
 
@@ -1277,8 +1277,6 @@ extern int making_const_table;
 
 #define NO_DOLLAR_IN_LABEL 1
 
-#define HAVE_ATEXIT
-
 /* The literal pool needs to reside in the text area due to the
    limited PC addressing range: */
 #define MACHINE_DEPENDENT_REORG(INSN) thumb_reorg ((INSN))
index 50e33a078bf55b08edb92d8254c31cf645ab0de4..4432105568b50c807c59fb312e9cd409ec687cc6 100644 (file)
@@ -214,10 +214,6 @@ do {                                               \
 #undef DO_GLOBAL_CTORS_BODY
 #undef DO_GLOBAL_DTORS_BODY
 
-/* The ARM development system has atexit and doesn't have _exit,
-   so define this for now.  */
-#define HAVE_ATEXIT
-
 /* The ARM development system defines __main.  */
 #define NAME__MAIN "__gccmain"
 #define SYMBOL__MAIN __gccmain
index 6402c4e697fb57dd10b9d89b6a067004f6334b67..9e3389050a94fc3ef31209b7c9f8fc121c932f0d 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions for non-Linux based ARM systems using ELF
-   Copyright (C) 1998 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999 Free Software Foundation, Inc.
    Contributed by Catherine Moore <clm@cygnus.com>
 
 This file is part of GNU CC.
@@ -24,14 +24,6 @@ Boston, MA 02111-1307, USA.  */
 #define TARGET_VERSION fputs (" (ARM/ELF non-Linux)", stderr);
 #endif
 
-/* If you don't define HAVE_ATEXIT, and the object file format/OS/whatever 
-   does not support constructors/destructors, then gcc implements destructors
-   by defining its own exit function, which calls the destructors.  This gcc
-   exit function overrides the C library's exit function, and this can cause
-   all kinds of havoc if the C library has a non-trivial exit function.  You
-   really don't want to use the exit function in libgcc2.c.  */
-#define HAVE_ATEXIT
-
 /* Default to using APCS-32 and software floating point.  */
 #ifndef TARGET_DEFAULT
 #define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32)
index 46e2d054e10508b2cbf748dd4401f631e9ebcea1..81a5f1d99ffdbfda4330b3eb9df06914ebf5837e 100644 (file)
@@ -8,7 +8,7 @@
 
    GNU CC is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 1, or (at your option)
+   the Free Software Foundation; either version 2, or (at your option)
    any later version.
 
    GNU CC is distributed in the hope that it will be useful,
@@ -1894,9 +1894,6 @@ do {                                                              \
     (*--p) ();                                                 \
 } while (0)
 
-/* The TI tooling uses atexit.  */
-#define        HAVE_ATEXIT
-
 #undef EXTRA_SECTIONS
 #define EXTRA_SECTIONS in_const, in_init, in_fini, in_ctors, in_dtors
 
index c36e4de46a02b38888f910f7044284fbcc66c8f8..43aeadb7e2189e5552eb7c8dc8f34d3ca6897b57 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler.  Clipper/Clix version.
-   Copyright (C) 1988, 1993, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1988, 1993, 1996, 1997, 1999 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -33,9 +33,6 @@ Boston, MA 02111-1307, USA.  */
 
 #define TARGET_MEM_FUNCTIONS
 
-#undef HAVE_ATEXIT
-#define HAVE_ATEXIT
-
 #define ASM_OUTPUT_ASCII(FILE,PTR,LEN)                 \
 do {                                                   \
   unsigned char *s;                                    \
index 3438a8d486d125fd6e919019bcf607f2d871b715..a23805e8a848674afacec39717c09b4bc554ce0c 100644 (file)
@@ -20,9 +20,6 @@ along with GNU CC; see the file COPYING.  If not, write to
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-/* For the sake of libgcc2.c, indicate target supports atexit.  */
-#define HAVE_ATEXIT
-
 #undef  ENDFILE_SPEC
 #define ENDFILE_SPEC "crtend.o%s"
 
index d1691646e5aaec0a603c876602882a60b0890d26..1f4b93ac0367cadd222eaf890b2a27db56dd7c5a 100644 (file)
 #undef STANDARD_INCLUDE_DIR
 #define STANDARD_INCLUDE_DIR "/include"
 
-
-/* We have atexit.  */
-#define HAVE_ATEXIT
-
 /* Implicit library calls should use memcpy, not bcopy, etc.  */
 #define TARGET_MEM_FUNCTIONS
 
index 7962321325c93ae52ac47c8eed822bd89a4217ff..c4e350da37ac0057c1b10e8269a8b05858565831 100644 (file)
 #undef WCHAR_TYPE_SIZE
 #define WCHAR_TYPE_SIZE 16
 
-/* 386BSD does have atexit.  */
-
-#define HAVE_ATEXIT
-
 /* Redefine this to use %eax instead of %edx.  */
 #undef FUNCTION_PROFILER
 #define FUNCTION_PROFILER(FILE, LABELNO)  \
index 023f4b0221bbcb3ac3099545957a5a9c547ab857..20dc576524d140e632a4a7d0c8dc606b6932bbb0 100644 (file)
@@ -127,8 +127,6 @@ Boston, MA 02111-1307, USA. */
 #define WCHAR_TYPE_SIZE 16
 #define WCHAR_TYPE "short unsigned int"
 
-#define HAVE_ATEXIT 1
-
 \f
 /* Enable parsing of #pragma pack(push,<n>) and #pragma pack(pop).  */
 #define HANDLE_PRAGMA_PACK_PUSH_POP 1
index 4ddd90faf589022e4c03d1b1784e68787657d4b6..38d8e22d5bf474bc765e43b135275276024d789a 100644 (file)
@@ -167,10 +167,6 @@ dtor_section ()                                                    \
 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
   asm_output_aligned_bss ((FILE), (DECL), (NAME), (SIZE), (ALIGN))
 
-/* djgpp has atexit ().  */
-#undef HAVE_ATEXIT
-#define HAVE_ATEXIT
-
 /* djgpp automatically calls its own version of __main, so don't define one
    in libgcc, nor call one in main().  */
 #define HAS_INIT_SECTION
index 884000b23f1d61647a2e0e702a8333268a62febe..40ca25e0f94d88dcc992a57aae4a238b27366031 100644 (file)
@@ -57,8 +57,6 @@ Boston, MA 02111-1307, USA.  */
 #undef WCHAR_TYPE_SIZE
 #define WCHAR_TYPE_SIZE BITS_PER_WORD
 
-#define HAVE_ATEXIT
-
 /* Override the default comment-starter of "/".  */
 
 #undef ASM_COMMENT_START
index 1b5a6232c47ff5e4d27544d8dc7e6568124f7bab..30017be1a503213abdc525486c551138d2affac3 100644 (file)
@@ -57,9 +57,6 @@ Boston, MA 02111-1307, USA.  */
 
 #define ASM_LOAD_ADDR(loc, reg)   "     leal " #loc "," #reg "\n"
 
-/* For the sake of libgcc2.c, indicate target supports atexit.  */
-#define HAVE_ATEXIT
-
 /* cpp handles __STDC__ */
 #undef CPP_PREDEFINES
 #define CPP_PREDEFINES " \
index 7b368f8e5fb84f24028a8cd2ec26a036161cb713..d208d297f966eb053bb2f1338f3c49658f22dee1 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions for Intel 386 running Linux-based GNU systems with ELF format.
-   Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
    Contributed by Eric Youngdale.
    Modified for stabs-in-ELF by H.J. Lu.
 
index f75fe1f46c038d46908f1f2ccdf51eb4f17f488a..fbe8d31007fd8ddcc5b51f1b8a77cd800b9d18af 100644 (file)
@@ -850,10 +850,6 @@ while (0)
 #define REAL_NM_FILE_NAME      "/usr/ccs/gcc/bfd-nm"
 #define REAL_STRIP_FILE_NAME   "/usr/ccs/bin/strip"
 
-/* Use atexit for static constructors/destructors, instead of defining
-   our own exit function.  */
-#define HAVE_ATEXIT
-
 /* Define this macro meaning that gcc should find the library 'libgcc.a'
    by hand, rather than passing the argument '-lgcc' to tell the linker
    to do the search */
index 55af64128a10ae1bc7d48b764fb0767f264ccae9..dae2de365448000cf7b858ae627cc577ec77dcc8 100644 (file)
@@ -71,10 +71,6 @@ Boston, MA 02111-1307, USA.  */
  "%{!fsigned-char:-D__CHAR_UNSIGNED__ -D_CHAR_UNSIGNED}"
 #endif
 
-/* Use atexit for static destructors, instead of defining
-   our own exit function.  */
-#define HAVE_ATEXIT
-
 /* Specify the size_t type.  */
 #define SIZE_TYPE "unsigned int"
 
index 3aae13d613e80e0a294d60e958537eedfcca370a..9bd348e797e507e363df4d2295da2f4787e5ef36 100644 (file)
@@ -940,7 +940,6 @@ compiler at the end of the day. Onward we go ...
 
 #if defined(CRT_BEGIN) || defined(CRT_END) || defined(IN_LIBGCC2)
 # undef OBJECT_FORMAT_ELF
-# undef HAVE_ATEXIT
 # undef INIT_SECTION_ASM_OP
 # undef FINI_SECTION_ASM_OP
 # undef CTORS_SECTION_ASM_OP
@@ -952,7 +951,6 @@ compiler at the end of the day. Onward we go ...
 
 # if defined (_SCO_ELF)
 #  define OBJECT_FORMAT_ELF
-#  define HAVE_ATEXIT 1
 #  define INIT_SECTION_ASM_OP INIT_SECTION_ASM_OP_ELF
 #  define FINI_SECTION_ASM_OP FINI_SECTION_ASM_OP_ELF
 #  define DTORS_SECTION_ASM_OP DTORS_SECTION_ASM_OP_ELF
index d7d03f86326bbb5b22761b2e44a93aec82faa022..e8fed08f303f20de542339a85b4a5bdd1a64800e 100644 (file)
@@ -66,10 +66,6 @@ Boston, MA 02111-1307, USA.  */
  "%{!fsigned-char:-D__CHAR_UNSIGNED__ -D_CHAR_UNSIGNED}"
 #endif
 
-/* Use atexit for static destructors, instead of defining
-   our own exit function.  */
-#define HAVE_ATEXIT
-
 /* caller has to pop the extra argument passed to functions that return
    structures. */
 
index 9e8388d47d741663b78bcd39e096fc9c8591b3dd..4b07db029e7e2af208ce6cd1b7e60d6a5183a84a 100644 (file)
@@ -40,3 +40,6 @@
 /* Assembler pseudo-op for uninitialized shared local variables (.shbss). */
 #undef  SHARED_BSS_SECTION_ASM_OP
 #define SHARED_BSS_SECTION_ASM_OP ".section .shbss, \"bs\""
+
+/* seq2-sysv3.h used to define HAVE_ATEXIT, so I assume ptx1 needs this...  */
+#define NEED_ATEXIT
index 763c5f0adcc346d8f8c3a1374dd92c694b18f5a8..dd43af707a042adb8ce3451ed396d7b7653a99f2 100644 (file)
@@ -4,5 +4,4 @@
 
 /* Use atexit for static destructors, instead of defining
    our own exit function.  */
-#define HAVE_ATEXIT
-
+#undef NEED_ATEXIT
index 262c3afee275ed4def6f674043df19e447f059f1..a2d2359464bf614b6ed220ec9d5c71436a447b1b 100644 (file)
@@ -41,7 +41,6 @@ Boston, MA 02111-1307, USA. */
 #define WCHAR_TYPE "short unsigned int"
 #undef LONG_DOUBLE_TYPE_SIZE
 #define LONG_DOUBLE_TYPE_SIZE 64
-#define HAVE_ATEXIT 1
 
 #undef EXTRA_SECTIONS
 #define EXTRA_SECTIONS in_ctor, in_dtor
index b97a5c8d3838b5ef1223b5306f621c54587549bf..68ad31fee72f19a17f20cd25a9e470cfcca062ad 100644 (file)
@@ -2,7 +2,7 @@
    hosting on Windows NT 3.x, using a Unix style C library and tools,
    as distinct from winnt.h, which is used to build GCC for use with a
    windows style library and tool set and uses the Microsoft tools.
-   Copyright (C) 1995-1998 Free Software Foundation, Inc.
+   Copyright (C) 1995-1999 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -97,7 +97,6 @@ Boston, MA 02111-1307, USA. */
    so take that from libgcc2.c */
 
 #define NEED_ATEXIT 1
-#define HAVE_ATEXIT 1     
 
 #undef EXTRA_SECTIONS
 #define EXTRA_SECTIONS in_ctor, in_dtor
index 50014eac71d61138c349bdf9e0108df5fb95ca5d..0510f6227eec8a2ab8c48e52777cd9a9212f28cc 100644 (file)
@@ -38,7 +38,7 @@ Boston, MA 02111-1307, USA.  */
 /* atexit is not present prior to Concentrix 2.2. Uncomment the following
    if you're on 2.1 or older. */
  
-/* #undef HAVE_ATEXIT */
+/* #define NEED_ATEXIT */
 
 #define I860_STRICT_ABI_PROLOGUES
 
index ba09af3941b63a5a4245dbe43390b86428f85386..d44505c348deb090eaf3396380929088c66a3357 100644 (file)
@@ -1,5 +1,5 @@
 /* Target definitions for GNU compiler for Intel 80860 running OSF/1AD
-   Copyright (C) 1991, 1996 Free Software Foundation, Inc.
+   Copyright (C) 1991, 1996, 1999 Free Software Foundation, Inc.
    Based upon original work of Ron Guilmette (rfg@monkeys.com).
    Contributed by Andy Pfiffer (andyp@ssd.intel.com).
    Partially inspired by
@@ -23,9 +23,6 @@ along with GNU CC; see the file COPYING.  If not, write to
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-/* For the sake of libgcc2.c, indicate target supports atexit.  */
-#define HAVE_ATEXIT
-
 #undef TARGET_SWITCHES
 #define TARGET_SWITCHES  \
   { {"xp", 1, "Generate code which uses the FPU"},              \
index 9cef8b35bf79b48fec9652cf975c246f08504e09..054ce7d948746661a945dbe1dda6735a52e50a95 100644 (file)
@@ -102,6 +102,3 @@ for windows/multi thread */
 #define WCHAR_UNSIGNED 1
 #define WCHAR_TYPE "short unsigned int"
 #define WCHAR_TYPE_SIZE 16
-
-/* For the sake of libgcc2.c, indicate target supports atexit.  */
-#define HAVE_ATEXIT
index ca8a39d50700f12aba8e796e8459a733e5890d5e..199ea5429865bfb9c2e22c4eab499f12539105a5 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions for Linux-based GNU systems.
-   Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1997, 1999 Free Software Foundation, Inc.
    Contributed by H.J. Lu (hjl@nynexst.com)
 
 This file is part of GNU CC.
@@ -22,9 +22,6 @@ Boston, MA 02111-1307, USA.  */
 /* Don't assume anything about the header files. */
 #define NO_IMPLICIT_EXTERN_C
 
-#undef HAVE_ATEXIT
-#define HAVE_ATEXIT
-
 /* GNU/Linux uses ctype from glibc.a. I am not sure how complete it is.
    For now, we play safe. It may change later. */
 
index ae0ec4a62588692ac6e59ee1cd64affe0c134d62..286f0925098d4fbbd0b8549a582645fe761ad0d2 100644 (file)
@@ -23,9 +23,6 @@ Boston, MA 02111-1307, USA.  */
 /* Don't assume anything about the header files. */
 #define NO_IMPLICIT_EXTERN_C
 
-#undef HAVE_ATEXIT
-#define HAVE_ATEXIT
-
 /* GNU/Linux uses ctype from glibc.a. I am not sure how complete it is.
    For now, we play safe. It may change later. */
 
index a3a9c3799d41e6cfa4fca19eb07c0af5e33a23b4..3ae07e1d6014adfb3793d16055d1ede165c929d3 100644 (file)
@@ -1,5 +1,5 @@
 /* Target independent definitions for LynxOS, using Lynx's old as and ld.
-   Copyright (C) 1993 Free Software Foundation, Inc.
+   Copyright (C) 1993, 1999 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -98,10 +98,6 @@ Boston, MA 02111-1307, USA.  */
   if (TARGET_SYSTEM_V && TARGET_THREADS)                       \
     warning ("-msystem-v and -mthreads are incompatible"); }
 
-/* Define this so that C++ destructors will use atexit.  */
-
-#define HAVE_ATEXIT
-
 /* This is defined only so that we can find the assembler.  Everything else
    is in /bin.  */
 
index 62c790b6bfb52f9812eb84a346ae81a84d6141ad..beac4491919808bc40ec7b541f86e191719df1fd 100644 (file)
@@ -1,5 +1,5 @@
 /* Target independent definitions for LynxOS.
-   Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
+   Copyright (C) 1993, 1994, 1995, 1996, 1999 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -122,11 +122,6 @@ do {                                                               \
     warning ("-msystem-v and -mthreads are incompatible");     \
 } while (0)
 
-/* Define this so that C++ destructors will use atexit, since LynxOS
-   calls exit after main returns.  */
-
-#define HAVE_ATEXIT
-
 /* Since init.o et al put all sorts of stuff into the init section,
    we can't use the standard init section support in crtbegin.o. */
 
index 2b6611ae814fc23e62386d5f8b6a07713b42a42a..e93b748d4b147055013668ac5e612952327f7b18 100644 (file)
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler.
    AT&T UNIX PC version (pc7300, 3b1)
-   Copyright (C) 1987, 1993, 1996 Free Software Foundation, Inc.
+   Copyright (C) 1987, 1993, 1996, 1999 Free Software Foundation, Inc.
    Contributed by Alex Crain (alex@umbc3.umd.edu).
 
 This file is part of GNU CC.
@@ -99,7 +99,7 @@ output_file_directive ((FILE), main_input_filename)
 
 /* The 3b1 does not have `atexit'.  */
 
-#undef HAVE_ATEXIT
+#define NEED_ATEXIT
 
 /* Override parts of m68k.h to fit the SGS-3b1 assembler.  */
 
index 1b85ce4404668d782364ae71592bd910c7ce5469..b0770fc53930190cdf8745496f10f2ef9f735abf 100644 (file)
@@ -67,7 +67,7 @@ crt2.o%s "
 #define NO_SYS_SIGLIST
 
 /* We provide atexit(), A/UX does not have it */
-#define HAVE_ATEXIT
+#define NEED_ATEXIT
 
 /* Generate calls to memcpy, memcmp and memset, as opposed to bcopy, bcmp,
    and bzero */
index 8eed141dc84a519650ae346a3e81abea3711d7fe..1f75fb3bfe55b396834bf3801827baef64da07ec 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler.  Apollo 680X0 version.
-   Copyright (C) 1989, 1992, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1989, 1992, 1996, 1997, 1999 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -116,12 +116,9 @@ Boston, MA 02111-1307, USA.  */
 #undef DBX_DEBUGGING_INFO
 #undef SDB_DEBUGGING_INFO
 
-/* We have atexit(2).  So C++ can use it for global destructors.  */
-
-#if 0 /* troy@cbme.unsw.edu.au says people are still using sr10.2
-        and it does not support atexit.  */
-#define HAVE_ATEXIT
-#endif
+/* troy@cbme.unsw.edu.au says people are still using sr10.2
+   and it does not support atexit.  */
+#define NEED_ATEXIT
 
 /* Every structure or union's size must be a multiple of 2 bytes.  */
 
index b3779743532176f1bbd9280720b420702c672f36..5068e9777158cbb29d285da79f823bd9544c77e0 100644 (file)
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler.  
    Bull DPX/2 200 and 300 systems (m68k, SysVr3).
-   Copyright (C) 1987, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
+   Copyright (C) 1987, 1993, 1994, 1995, 1996, 1999 Free Software Foundation, Inc.
    Contributed by Frederic Pierresteguy (F.Pierresteguy@frcl.bull.fr).
 
 This file is part of GNU CC.
@@ -66,7 +66,6 @@ Boston, MA 02111-1307, USA.  */
 # define __HAVE_68881__ 1
 # define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__ }"
 
-#define HAVE_ATEXIT
 #undef DO_GLOBAL_CTORS_BODY            /* don't use svr3.h version */
 #undef DO_GLOBAL_DTORS_BODY
 
index 977812e65a80f32a10a098dd163ec3da36f9d1a2..87c9e8cc056dc80ccf245384d3517eea5975aff1 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler.  HP-UX 68000/68020 version.
-   Copyright (C) 1987, 88, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1987, 88, 93, 94, 95, 96, 1997, 1999 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -56,10 +56,6 @@ Boston, MA 02111-1307, USA.  */
 /* Be compatible with system stddef.h.  */
 #define SIZE_TYPE "unsigned int"
 
-/* Use atexit for static constructors/destructors, instead of defining
-   our own exit function.  */
-#define HAVE_ATEXIT
-
 #include "m68k/m68k.h"
 
 /* See m68k.h.  7 means 68020 with 68881.  */
index 8074e5b4d2efda2586c998005153be2804d554e6..6c14d4fe01dff75ac414d23115a3ebe5da5b4d43 100644 (file)
@@ -800,7 +800,6 @@ do {(CUM).offset = 0;\
    so take that from libgcc2.c */
 
 #define NEED_ATEXIT 1
-#define HAVE_ATEXIT 1
 
 #define EXIT_BODY      \
   do                                                           \
index 11df8850ff0409ab821c6ea6d1eeaffc511ac4e3..88f1793019004e84597a673b14b42a17c347b105 100644 (file)
@@ -70,10 +70,6 @@ Boston, MA 02111-1307, USA.  */
 /* Although the .init section is used, it is not automatically invoked.  */
 #define INVOKE__main
 
-/* State that atexit exists so __do_global_ctors will register
-   __do_global_dtors.  */
-#define HAVE_ATEXIT
-
 #define CTOR_LIST_BEGIN                        \
   asm (INIT_SECTION_ASM_OP);           \
   asm ("\tsubu\t r31,r31,16"); /* (STACK_BOUNDARY / BITS_PER_UNIT) == 16 */ \
index 7ca0459c6254afbea90d036d03f4bf0b6c42a41d..604abc003a4377ba25a372330b3462ad2aebafed 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler.  Iris version 4.
-   Copyright (C) 1991, 1993 Free Software Foundation, Inc.
+   Copyright (C) 1991, 1993, 1999 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -18,10 +18,6 @@ along with GNU CC; see the file COPYING.  If not, write to
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-/* Use atexit for static constructors/destructors, instead of defining
-   our own exit function.  */
-#define HAVE_ATEXIT
-
 /* Profiling is supported via libprof1.a not -lc_p as in Irix 3.  */
 #undef STARTFILE_SPEC
 #define STARTFILE_SPEC \
index 2ca30ea3d848ccc1552d2485cc7a3d70ae9154ba..a497231fcaf3100c65152cca4ed784b3f888a2d7 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions for MIPS running Linux-based GNU systems with ELF format.
-   Copyright (C) 1998 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -21,8 +21,6 @@ Boston, MA 02111-1307, USA.  */
 /* Required to keep collect2.c happy */
 #undef OBJECT_FORMAT_COFF 
 
-#define HAVE_ATEXIT
-
 /* If we don't set MASK_ABICALLS, we can't default to PIC. */
 #undef TARGET_DEFAULT
 #define TARGET_DEFAULT (MASK_ABICALLS|MASK_GAS)
index 3fce9fb1de3f3766592a22bf7a0a6209e329413b..3c90dcaf94e0d462740aeaef2f198441ba65f4d3 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions for DECstation running BSD as target machine for GNU compiler.
-   Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1993, 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -52,10 +52,6 @@ Boston, MA 02111-1307, USA.  */
   "%{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \
    %{!nostartfiles:%{!r*:%{!e*:-e __start}}} -dc -dp %{static:-Bstatic} %{assert*}"
 
-/* We have atexit(3).  */
-
-#define HAVE_ATEXIT
-
 /* Implicit library calls should use memcpy, not bcopy, etc.  */
 
 #define TARGET_MEM_FUNCTIONS
index 3d92619c3e584725fca77e13081dad90aa9aa866..8ae9cb7bad88aa1742c097d9213c7010b9a28baa 100644 (file)
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler.
    DECstation (OSF/1 reference port with OSF/rose) version.
-   Copyright (C) 1991, 1992, 1995, 1996, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1991, 1992, 1995, 1996, 1998, 1999 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -113,10 +113,6 @@ Boston, MA 02111-1307, USA.  */
 /* Default to -G 0 unless doing ecoff work.  */
 #define MIPS_DEFAULT_GVALUE ((TARGET_MIPS_AS) ? 8 : 0)
 
-/* Use atexit for static constructors/destructors, instead of defining
-   our own exit function.  */
-#define HAVE_ATEXIT
-
 /* Generate calls to memcpy, etc., not bcopy, etc.  */
 #define TARGET_MEM_FUNCTIONS
 
index cf6edbccad6cf4e2c04c64901bfb503a7dfde618..c93eff4476c938ade0ce9e9b0c455e4c449d9c8f 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler.  SNI SINIX version.
-   Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
    Contributed by Marco Walther (Marco.Walther@mch.sni.de).
 
 This file is part of GNU CC.
@@ -54,10 +54,6 @@ Boston, MA 02111-1307, USA.  */
 #define getpagesize()  sysconf(_SC_PAGE_SIZE)
 #endif /*  L_trampoline */
 
-/* Use atexit for static constructors/destructors, instead of defining
-   our own exit function.  */
-#define HAVE_ATEXIT
-
 /* Generate calls to memcpy, etc., not bcopy, etc.  */
 #define TARGET_MEM_FUNCTIONS
 
index d1ba64de029034c3b8c91d859fb2cfc0bc83870d..69cf97dc7a2372a698d848ba48500aa0430215be 100644 (file)
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler.
    MIPS RISC-OS System V.4 version.
-   Copyright (C) 1992, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1992, 1998, 1999 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -53,9 +53,5 @@ Boston, MA 02111-1307, USA.  */
 #define getpagesize()  sysconf(_SC_PAGE_SIZE)
 #endif /*  L_trampoline */
 
-/* Use atexit for static constructors/destructors, instead of defining
-   our own exit function.  */
-#define HAVE_ATEXIT
-
 /* Generate calls to memcpy, etc., not bcopy, etc.  */
 #define TARGET_MEM_FUNCTIONS
index 799e1cdf1e759afd638b497eada36508b4c41132..c214c7d8b289cd58861bd194dbe2cb8eefc7652e 100644 (file)
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler.
    MIPS RISC-OS 5.0 System V.4 version.
-   Copyright (C) 1992 Free Software Foundation, Inc.
+   Copyright (C) 1992, 1999 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -66,10 +66,6 @@ Boston, MA 02111-1307, USA.  */
 #define getpagesize()  sysconf(_SC_PAGE_SIZE)
 #endif /*  L_trampoline */
 
-/* Use atexit for static constructors/destructors, instead of defining
-   our own exit function.  */
-#define HAVE_ATEXIT
-
 /* Generate calls to memcpy, etc., not bcopy, etc.  */
 #define TARGET_MEM_FUNCTIONS
 
index d6da6a841a90ff92640cbc4dd564658cca0272a9..e618a3cb9fb162e2ae051fcbc9f43a01def775a6 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler; DECstation (Ultrix) version.
-   Copyright (C) 1991, 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1991, 1997, 1998, 1999 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -45,10 +45,6 @@ Boston, MA 02111-1307, USA.  */
 #define MACHINE_TYPE "DECstation running ultrix"
 #endif
 
-/* Use atexit for static constructors/destructors, instead of defining
-   our own exit function.  Ultrix 4.x has this, 3.x probably does not.  */
-#define HAVE_ATEXIT
-
 /* Generate calls to memcpy, etc., not bcopy, etc.  */
 #define TARGET_MEM_FUNCTIONS
 
index 0fb4d400ee27e9fb7c80cfe94d292503e2e40630..7ba135bd24ecd9cf7bb9e2c8ea53f1f2e7e2e6b8 100644 (file)
   (DEFAULT_SWITCH_TAKES_ARG(CHAR) \
    || (CHAR) == 'R')
 
-/* We have atexit(3).  */
-
-#define HAVE_ATEXIT
-
 /* Implicit library calls should use memcpy, not bcopy, etc.  */
 
 #define TARGET_MEM_FUNCTIONS
index 69c3712e25d5615a7cca6302264d8a49db80c9b0..ea56709d9c92e1ccffe6ac64246bb963b2ef9095 100644 (file)
@@ -1,6 +1,6 @@
 /* Operating system specific defines to be used when targeting GCC
    for NeXTSTEP.
-   Copyright (C) 1989, 90-93, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1989, 90-93, 1996, 1997, 1999 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -81,10 +81,6 @@ Boston, MA 02111-1307, USA.  */
 
 #define NEXT_OBJC_RUNTIME
 
-/* We have atexit.  */
-
-#define HAVE_ATEXIT
-
 /* Enable recent gcc to compile under the old gcc in Next release 1.0.  */
 
 #define __inline inline
index 9d3d5de7556be29a0831c45e33671b9d5f9acb44..d5f4ad1db06f1df7dbaf0035958f2586d849ebbc 100644 (file)
@@ -1,7 +1,7 @@
 /* Definitions of target machine for GNU compiler.
    PC532 with National 32532, running Minix.
    Works with pc532 Minix 1.5hybrid.
-   Copyright (C) 1990 Free Software Foundation, Inc.
+   Copyright (C) 1990, 1999 Free Software Foundation, Inc.
 
    Derived from SEQUENT NS32000, written originally
    by Bruce Culbertson <culberts@hplabs.hp.com>,
@@ -35,7 +35,3 @@ Boston, MA 02111-1307, USA.  */
    call-saved-regs in a function calling setjmp */
 
 #define NON_SAVING_SETJMP (current_function_calls_setjmp)
-
-/* at least with estdio there's no _cleanup() but we have atexit() */
-
-#define HAVE_ATEXIT
index e95fbdaea0cc1ebfc799ebe3cd6e4c0a61d44a2e..60ebfab540b507ee413fdc3b14aac46d3fd5c307 100644 (file)
@@ -139,9 +139,6 @@ Boston, MA 02111-1307, USA.  */
 
 /* Miscellaneous parameters.  */
 
-/* Tell libgcc2.c that OpenBSD targets support atexit.  */
-#define HAVE_ATEXIT
-
 /* Controlling debugging info: dbx options.  */
 
 /* Don't use the `xsTAG;' construct in DBX output; OpenBSD systems that
index 5e81fc1db4320484b356a512ffbd5168181a51d4..21f67280920cb47c34113cbe338de83775111316 100644 (file)
@@ -8,7 +8,7 @@ This file is part of GNU CC.
 
 GNU CC is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
+the Free Software Foundation; either version 2, or (at your option)
 any later version.
 
 GNU CC is distributed in the hope that it will be useful,
@@ -1736,10 +1736,6 @@ while (0)
    few bits. */
 #define SHIFT_COUNT_TRUNCATED 1
 
-/* Use atexit for static constructors/destructors, instead of defining
-   our own exit function.  */
-#define HAVE_ATEXIT
-
 /* Compute the cost of computing a constant rtl expression RTX
    whose rtx-code is CODE.  The body of this macro is a portion
    of a switch statement.  If the code is computed here,
index d4043002a1c142ec7fa55177478b88f9b53036eb..23a41e1d1324c7edb9a081119ac8668505d06702 100644 (file)
@@ -1,7 +1,7 @@
 /* Operating system specific defines to be used when targeting GCC for some
    embedded system running pSOS. We assume GNU tools with ELF, but
    try to maintain compatibility with the MRI tools. Based on svr4.h.
-   Copyright (C) 1996 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1999 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -175,9 +175,3 @@ dtors_section ()                                                    \
 /* For pSOS we use DBX debugging info.  */
 
 #define DBX_DEBUGGING_INFO
-
-
-/* Prevent generation of an exit function.  */
-
-#define HAVE_ATEXIT
-
index b1eaabeb4ccb978fce7bc523d6aa264467fb4450..3a6a572b3247f0d0c94f8880341284c1fd5302cf 100644 (file)
@@ -27,9 +27,6 @@ Boston, MA 02111-1307, USA.
 /* Define a symbol indicating that we are using svr4.h.  */
 #define USING_SVR4_H
 
-/* For the sake of libgcc2.c, indicate target supports atexit.  */
-#define HAVE_ATEXIT
-
 /* Cpp, assembler, linker, library, and startfile spec's.  */
 
 /* This defines which switch letters take arguments.  On svr4, most of
index bb4e8b4df8437cf547e17de2ab477dd22de35c64..65dc53d4bb0a01eee50ac9212fdc483e61253faf 100644 (file)
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler,
    for IBM RS/6000 running MACH.
-   Copyright (C) 1992 Free Software Foundation, Inc.
+   Copyright (C) 1992, 1999 Free Software Foundation, Inc.
    Contributed by Richard Kenner (kenner@nyu.edu)
 
 This file is part of GNU CC.
@@ -35,7 +35,7 @@ Boston, MA 02111-1307, USA.  */
   -bnoso -berrmsg -btextro -bhalt:4 -bnodelcsect"
 
 /* MACH doesn't have atexit.  */
-#undef HAVE_ATEXIT
+#define NEED_ATEXIT
 
 /* Don't default to pcc-struct-return, because gcc is the only compiler, and
    we want to retain compatibility with older gcc versions.  */
index db1108417f0eed9e382cc789cd78474038d152dc..97468f3522205a9937f591fdb760d91054b95c6f 100644 (file)
@@ -2269,10 +2269,6 @@ do {                                                                    \
 
 #define SHIFT_COUNT_TRUNCATED (TARGET_POWER ? 1 : 0)
 
-/* Use atexit for static constructors/destructors, instead of defining
-   our own exit function.  */
-#define HAVE_ATEXIT
-
 /* Compute the cost of computing a constant rtl expression RTX
    whose rtx-code is CODE.  The body of this macro is a portion
    of a switch statement.  If the code is computed here,
index 617ad2f5b451fed659ba473b821e784f47f12000..25c50182bcf710c41b8536e92a49916d838faae1 100644 (file)
@@ -1,5 +1,5 @@
 /* Configuration for GNU C-compiler for BeOS host.
-   Copyright (C) 1997 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1999 Free Software Foundation, Inc.
    Contributed by Fred Fish (fnf@cygnus.com), based on xm-rs6000.h
    by Richard Kenner (kenner@vlsi1.ultra.nyu.edu).
 
@@ -78,9 +78,6 @@ extern void *alloca ();
 #ifndef HAVE_PUTENV
 #define HAVE_PUTENV
 #endif
-#ifndef HAVE_ATEXIT
-#define HAVE_ATEXIT
-#endif
 #ifndef HAVE_RENAME
 #define HAVE_RENAME
 #endif
index 93f27a49ace703d2d43e69dbddb00d9ffbafc960..ab5ec8328a8ac05e0ad51c5b9ff347cdecb87a56 100644 (file)
@@ -2251,8 +2251,5 @@ do {                                                                      \
     cost = 20;                                                         \
 } while (0)                                                            \
 
-/* For the sake of libgcc2.c, indicate target supports atexit.  */
-#define HAVE_ATEXIT
-
 #define SH_DYNAMIC_SHIFT_COST \
   (TARGET_HARD_SH4 ? 1 : TARGET_SH3 ? (TARGET_SMALLCODE ? 1 : 2) : 20)
index 5079ccd33961679e81b3b8708f44bc378c1b5884..28469454bc4872c6a6c67bbaff2c158b4c5b742c 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions for SPARC running Linux-based GNU systems with a.out.
-   Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
    Contributed by Eddie C. Dost (ecd@skynet.be)
 
 This file is part of GNU CC.
@@ -25,9 +25,6 @@ Boston, MA 02111-1307, USA.  */
 /* Don't assume anything about the header files. */
 #define NO_IMPLICIT_EXTERN_C
 
-#undef HAVE_ATEXIT
-#define HAVE_ATEXIT
-
 /* GNU/Linux uses ctype from glibc.a. I am not sure how complete it is.
    For now, we play safe. It may change later. */
 
index bde9573a13a46af679ca0ceef90be7f78b7130fb..96b97974be8e5d92ec61e0149917a158cb62536e 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions for SPARC running Linux-based GNU systems with ELF.
-   Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
    Contributed by Eddie C. Dost (ecd@skynet.be)
 
 This file is part of GNU CC.
@@ -24,9 +24,6 @@ Boston, MA 02111-1307, USA.  */
 /* Don't assume anything about the header files. */
 #define NO_IMPLICIT_EXTERN_C
 
-#undef HAVE_ATEXIT
-#define HAVE_ATEXIT
-
 /* GNU/Linux uses ctype from glibc.a. I am not sure how complete it is.
    For now, we play safe. It may change later. */
 
index 0cd76081a1e7ffe113dab8d8366c2253b0a5c0e6..cab08755f1c239e76426444486882ba39b93be31 100644 (file)
@@ -26,9 +26,6 @@ Boston, MA 02111-1307, USA.  */
 /* Don't assume anything about the header files. */
 #define NO_IMPLICIT_EXTERN_C
 
-#undef HAVE_ATEXIT
-#define HAVE_ATEXIT
-
 #include <sparc/sysv4.h>
 
 #undef MD_EXEC_PREFIX
index 14c7a437d67c174a090b19e3d01e4b3a2324b468..0459c66207c3645619398614d2dc09584f1a8109 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler, for SunOS 4.x
-   Copyright (C) 1994 Free Software Foundation, Inc.
+   Copyright (C) 1994, 1999 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -47,3 +47,8 @@ Boston, MA 02111-1307, USA.  */
               "ta      0x21\n\t"                       \
               : /* no outputs */                       \
               : "r" (ms_flags), "r" (ms_saveret));
+
+/* SunOS has on_exit instead of atexit.  */
+extern int on_exit (void *, void *);   /* The man page says it returns int. */
+#define ON_EXIT(FUNC) on_exit ((FUNC), 0)
+#define NEED_ATEXIT
index 1ecb941e93eadeade2ec0ab27e60ccc69d3fdf27..5b584104494a699d7282089dae07ebd119ac9426 100644 (file)
@@ -42,9 +42,6 @@ Boston, MA 02111-1307, USA.
 /* Define a symbol indicating that we are using svr4.h.  */
 #define USING_SVR4_H
 
-/* For the sake of libgcc2.c, indicate target supports atexit.  */
-#define HAVE_ATEXIT
-
 /* Cpp, assembler, linker, library, and startfile spec's.  */
 
 /* This defines which switch letters take arguments.  On svr4, most of
index 3a14419c1027f1694b8003174cf8dc330bece74c..9f2d00da0ba4c28133d3a670b2b54053fcf10dd4 100644 (file)
@@ -1,3 +1,23 @@
+/* Output variables, constants and external declarations, for GNU compiler.
+   Copyright (C) 1999 Free Software Foundation, Inc.
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING.  If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
 #undef CPP_PREDEFINES
 #define CPP_PREDEFINES " -Dvax -Dunix -Dultrix -Dbsd4_2 -D__vax -D__unix -D__ultrix -D__bsd4_2 -Asystem(unix) -Asystem(bsd) -Acpu(vax) -Amachine(vax)"
 
@@ -7,6 +27,3 @@
 #define PTRDIFF_TYPE "int"
 #define WCHAR_TYPE "unsigned int"
 #define WCHAR_TYPE_SIZE 32
-
-/* True for Ultrix 4.3 and later and possibly earlier.  */
-#define HAVE_ATEXIT
index 1f84f63a2e8386339712460386f409af5e546268..d9f4f7f5a631f44fa29fcb88a4b9a3ef77cdde84 100644 (file)
@@ -1,5 +1,5 @@
 /* Output variables, constants and external declarations, for GNU compiler.
-   Copyright (C) 1988, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1988, 1994, 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -298,9 +298,6 @@ const_section ()                                    \
   fputc ('\n', (FILE));                                                        \
 }
 
-/* True for VMS V4.6 and later.  */
-#define HAVE_ATEXIT
-
 /* The following definitions are used in libgcc2.c with the __main
    function.  The _SHR symbol is used when the sharable image library
    for the C++ library is used - this is picked up automatically by the linker
index 2cffdb7fab615d2d121c81ed1455f3d77341be2b..fc0848b5604da9c27baafb3ef3979bf4da165622 100644 (file)
@@ -1,5 +1,5 @@
 /* Configuration for GCC for Intel i386 running Linux-based GNU systems.
-   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
    Contributed by H.J. Lu (hjl@nynexst.com)
 
 This file is part of GNU CC.
@@ -19,9 +19,6 @@ along with GNU CC; see the file COPYING.  If not, write to
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-#undef  HAVE_ATEXIT
-#define HAVE_ATEXIT
-
 #undef  POSIX
 #define POSIX
 
index 86b1c0ebcacfcee809007568cfe6100cc6839e68..23fa7361b45a03fada349712848f4cf30c8243bd 100644 (file)
@@ -2,7 +2,7 @@
    for getting g++ file-scope static objects constructed.  This file
    will get included either by libgcc2.c (for systems that don't support
    a .init section) or by crtstuff.c (for those that do).
-   Copyright (C) 1991, 1995, 1996, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1991, 1995, 1996, 1998, 1999 Free Software Foundation, Inc.
    Contributed by Ron Guilmette (rfg@segfault.us.com)
 
 This file is part of GNU CC.
@@ -31,22 +31,8 @@ Boston, MA 02111-1307, USA.  */
 */
 
 #ifdef NEED_ATEXIT
-#ifndef HAVE_ATEXIT
-#define HAVE_ATEXIT    1       /* Take it from libgcc2.c */
-#endif
-#endif
-
-#ifdef HAVE_ATEXIT
-#if defined (WINNT) || defined (NEED_ATEXIT)
 extern int atexit (void (*) (void));
 #endif
-#define ON_EXIT(FUNC,ARG) atexit ((FUNC))
-#else
-#ifdef sun
-extern int on_exit (void *, void *);   /* The man page says it returns int. */
-#define ON_EXIT(FUNC,ARG) on_exit ((FUNC), (ARG))
-#endif
-#endif
 
 /*  Declare a pointer to void function type.  */
 
index 33481b141286354effcf2bf3be8ce226f9f23a69..96ce2143be925d440ed931713ff128f02b31570c 100644 (file)
@@ -53,10 +53,6 @@ Boston, MA 02111-1307, USA.  */
 #undef abort
 #endif
 
-#if (SUPPORTS_WEAK == 1) && (defined (ASM_OUTPUT_DEF) || defined (ASM_OUTPUT_WEAK_ALIAS))
-#define WEAK_ALIAS
-#endif
-
 /* In a cross-compilation situation, default to inhibiting compilation
    of routines that use libc.  */
 
@@ -1709,11 +1705,9 @@ __bb_init_func (struct bb *blocks)
   if (blocks->zero_word)
     return;
 
-#ifdef ON_EXIT
   /* Initialize destructor.  */
   if (!bb_head)
-    ON_EXIT (__bb_exit_func, 0);
-#endif
+    atexit (__bb_exit_func);
 
   /* Set up linked list.  */
   blocks->zero_word = 1;
@@ -2084,10 +2078,8 @@ __bb_init_prg ()
   enum bb_func_mode m;
   int i;
 
-#ifdef ON_EXIT
   /* Initialize destructor.  */
-  ON_EXIT (__bb_exit_func, 0);
-#endif
+  atexit (__bb_exit_func);
 
   if (!(file = fopen ("bb.in", "r")))
     return;
@@ -2176,11 +2168,8 @@ __bb_init_prg ()
       bb_stack = (unsigned long *) malloc (bb_stacksize * sizeof (*bb_stack));
     }
 
-#ifdef ON_EXIT
-      /* Initialize destructor.  */
-      ON_EXIT (__bb_exit_trace_func, 0);
-#endif
-
+  /* Initialize destructor.  */
+  atexit (__bb_exit_trace_func);
 }
 
 /* Called upon entering a basic block.  */
@@ -2869,17 +2858,6 @@ __do_global_dtors ()
 #ifndef HAS_INIT_SECTION
 /* Run all the global constructors on entry to the program.  */
 
-#ifndef ON_EXIT
-#define ON_EXIT(a, b)
-#else
-/* Make sure the exit routine is pulled in to define the globals as
-   bss symbols, just in case the linker does not automatically pull
-   bss definitions from the library.  */
-
-extern int _exit_dummy_decl;
-int *_exit_dummy_ref = &_exit_dummy_decl;
-#endif /* ON_EXIT */
-
 void
 __do_global_ctors ()
 {
@@ -2890,7 +2868,7 @@ __do_global_ctors ()
   }
 #endif
   DO_GLOBAL_CTORS_BODY;
-  ON_EXIT (__do_global_dtors, 0);
+  atexit (__do_global_dtors, 0);
 }
 #endif /* no HAS_INIT_SECTION */
 
@@ -2952,22 +2930,17 @@ func_ptr __DTOR_LIST__[2];
 #include "gbl-ctors.h"
 
 #ifdef NEED_ATEXIT
-# ifdef ON_EXIT
-#  undef ON_EXIT
-# endif
-int _exit_dummy_decl = 0;      /* prevent compiler & linker warnings */
-#endif
 
-#ifndef ON_EXIT
+#ifndef HAVE_ON_EXIT
 
-#ifdef NEED_ATEXIT
 # include <errno.h>
 
 static func_ptr *atexit_chain = 0;
 static long atexit_chain_length = 0;
 static volatile long last_atexit_chain_slot = -1;
 
-int atexit (func_ptr func)
+int
+atexit (func_ptr func)
 {
   if (++last_atexit_chain_slot == atexit_chain_length)
     {
@@ -2989,22 +2962,13 @@ int atexit (func_ptr func)
   atexit_chain[last_atexit_chain_slot] = func;
   return (0);
 }
-#endif /* NEED_ATEXIT */
 
-/* If we have no known way of registering our own __do_global_dtors
-   routine so that it will be invoked at program exit time, then we
-   have to define our own exit routine which will get this to happen.  */
-
-extern void __do_global_dtors ();
-extern void __bb_exit_func ();
 extern void _cleanup ();
 extern void _exit () __attribute__ ((noreturn));
 
 void 
 exit (int status)
 {
-#if !defined (INIT_SECTION_ASM_OP) || !defined (OBJECT_FORMAT_ELF)
-#ifdef NEED_ATEXIT
   if (atexit_chain)
     {
       for ( ; last_atexit_chain_slot-- >= 0; )
@@ -3015,19 +2979,6 @@ exit (int status)
       free (atexit_chain);
       atexit_chain = 0;
     }
-#else /* No NEED_ATEXIT */
-  __do_global_dtors ();
-#endif /* No NEED_ATEXIT */
-#endif /* !defined (INIT_SECTION_ASM_OP) || !defined (OBJECT_FORMAT_ELF) */
-/* In gbl-ctors.h, ON_EXIT is defined if HAVE_ATEXIT is defined.  In
-   __bb_init_func and _bb_init_prg, __bb_exit_func is registered with
-   ON_EXIT if ON_EXIT is defined.  Thus we must not call __bb_exit_func here
-   if HAVE_ATEXIT is defined. */
-#ifndef HAVE_ATEXIT
-#ifndef inhibit_libc
-  __bb_exit_func ();
-#endif
-#endif /* !HAVE_ATEXIT */
 #ifdef EXIT_BODY
   EXIT_BODY;
 #else
@@ -3036,17 +2987,17 @@ exit (int status)
   _exit (status);
 }
 
-#else /* ON_EXIT defined */
-int _exit_dummy_decl = 0;      /* prevent compiler & linker warnings */
+#else /* HAVE_ON_EXIT */
 
-# ifndef HAVE_ATEXIT
-/* Provide a fake for atexit() using ON_EXIT.  */
-int atexit (func_ptr func)
+/* Simple; we just need a wrapper for ON_EXIT.  */
+int
+atexit (func_ptr func)
 {
-  return ON_EXIT (func, NULL);
+  return ON_EXIT (func);
 }
-# endif /* HAVE_ATEXIT */
-#endif /* ON_EXIT defined */
+
+#endif /* HAVE_ON_EXIT */
+#endif /* NEED_ATEXIT */
 
 #endif /* L_exit */
 \f
index d918a411e510cbc168ca1970470bbfd98f1d0579..ce26e283567d62de721f2a9da0f8b1a5e9b5276d 100644 (file)
@@ -7660,12 +7660,21 @@ The definition should be a C statement (sans semicolon) to generate the
 appropriate rtl instructions.  It is used only when compiling the end of
 @code{main}.
 
-@item HAVE_ATEXIT
-@findex HAVE_ATEXIT
-Define this if the target system supports the function
-@code{atexit} from the ANSI C standard.  If this is not defined,
-and @code{INIT_SECTION_ASM_OP} is not defined, a default
-@code{exit} function will be provided to support C++.
+@item NEED_ATEXIT
+@findex NEED_ATEXIT
+Define this if the target system lacks the function @code{atexit}
+from the ANSI C standard.  If this macro is defined, a default definition
+will be provided to support C++.  If @code{ON_EXIT} is not defined,
+a default @code{exit} function will also be provided.
+
+@item ON_EXIT
+@findex ON_EXIT
+Define this macro if the target has another way to implement atexit
+functionality without replacing @code{exit}.  For instance, SunOS 4 has
+a similar @code{on_exit} library function.
+
+The definition should be a functional macro which can be used just like
+the @code{atexit} function.
 
 @item EXIT_BODY
 @findex EXIT_BODY