diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-09-15 21:41:16 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-09-15 21:41:16 +0000 |
commit | 3da2e0975b47ddd9ac4c762a4263c2ac7dba4379 (patch) | |
tree | 43a34e737f568cf4befde4eaa3fc41de57b903c4 /gcc/config | |
parent | caa1595af210314675316780a6964d54a46c306d (diff) | |
download | ppe42-gcc-3da2e0975b47ddd9ac4c762a4263c2ac7dba4379.tar.gz ppe42-gcc-3da2e0975b47ddd9ac4c762a4263c2ac7dba4379.zip |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29439 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config')
71 files changed, 80 insertions, 269 deletions
diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h index db9dec936d0..98eb40e3c5a 100644 --- a/gcc/config/alpha/alpha.h +++ b/gcc/config/alpha/alpha.h @@ -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) diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h index 8135198e312..afdaa15f59b 100644 --- a/gcc/config/arc/arc.h +++ b/gcc/config/arc/arc.h @@ -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 diff --git a/gcc/config/arm/coff.h b/gcc/config/arm/coff.h index 87f969eddeb..8d8f5605b65 100644 --- a/gcc/config/arm/coff.h +++ b/gcc/config/arm/coff.h @@ -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 diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h index f7bd3b29fa2..39054902ba3 100644 --- a/gcc/config/arm/linux-elf.h +++ b/gcc/config/arm/linux-elf.h @@ -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) diff --git a/gcc/config/arm/linux-telf.h b/gcc/config/arm/linux-telf.h index b6aca0b57b4..8be385295c3 100644 --- a/gcc/config/arm/linux-telf.h +++ b/gcc/config/arm/linux-telf.h @@ -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}" diff --git a/gcc/config/arm/riscix.h b/gcc/config/arm/riscix.h index fad0293337a..37bd1fe313c 100644 --- a/gcc/config/arm/riscix.h +++ b/gcc/config/arm/riscix.h @@ -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 diff --git a/gcc/config/arm/riscix1-1.h b/gcc/config/arm/riscix1-1.h index e896a1eb033..568df54e828 100644 --- a/gcc/config/arm/riscix1-1.h +++ b/gcc/config/arm/riscix1-1.h @@ -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 diff --git a/gcc/config/arm/tcoff.h b/gcc/config/arm/tcoff.h index ece0ea4d045..5f14c1e3283 100644 --- a/gcc/config/arm/tcoff.h +++ b/gcc/config/arm/tcoff.h @@ -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 diff --git a/gcc/config/arm/telf.h b/gcc/config/arm/telf.h index 14527ceef42..1f7bbb7c3b6 100644 --- a/gcc/config/arm/telf.h +++ b/gcc/config/arm/telf.h @@ -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 diff --git a/gcc/config/arm/thumb.h b/gcc/config/arm/thumb.h index 65d6d4ba9cc..9c30a30d639 100644 --- a/gcc/config/arm/thumb.h +++ b/gcc/config/arm/thumb.h @@ -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)) diff --git a/gcc/config/arm/tpe.h b/gcc/config/arm/tpe.h index 50e33a078bf..4432105568b 100644 --- a/gcc/config/arm/tpe.h +++ b/gcc/config/arm/tpe.h @@ -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 diff --git a/gcc/config/arm/unknown-elf.h b/gcc/config/arm/unknown-elf.h index 6402c4e697f..9e3389050a9 100644 --- a/gcc/config/arm/unknown-elf.h +++ b/gcc/config/arm/unknown-elf.h @@ -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) diff --git a/gcc/config/c4x/c4x.h b/gcc/config/c4x/c4x.h index 46e2d054e10..81a5f1d99ff 100644 --- a/gcc/config/c4x/c4x.h +++ b/gcc/config/c4x/c4x.h @@ -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 diff --git a/gcc/config/clipper/clix.h b/gcc/config/clipper/clix.h index c36e4de46a0..43aeadb7e21 100644 --- a/gcc/config/clipper/clix.h +++ b/gcc/config/clipper/clix.h @@ -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; \ diff --git a/gcc/config/elfos.h b/gcc/config/elfos.h index 3438a8d486d..a23805e8a84 100644 --- a/gcc/config/elfos.h +++ b/gcc/config/elfos.h @@ -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" diff --git a/gcc/config/gnu.h b/gcc/config/gnu.h index d1691646e5a..1f4b93ac036 100644 --- a/gcc/config/gnu.h +++ b/gcc/config/gnu.h @@ -12,10 +12,6 @@ #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 diff --git a/gcc/config/i386/386bsd.h b/gcc/config/i386/386bsd.h index 7962321325c..c4e350da37a 100644 --- a/gcc/config/i386/386bsd.h +++ b/gcc/config/i386/386bsd.h @@ -28,10 +28,6 @@ #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) \ diff --git a/gcc/config/i386/cygwin.h b/gcc/config/i386/cygwin.h index 023f4b0221b..20dc576524d 100644 --- a/gcc/config/i386/cygwin.h +++ b/gcc/config/i386/cygwin.h @@ -127,8 +127,6 @@ Boston, MA 02111-1307, USA. */ #define WCHAR_TYPE_SIZE 16 #define WCHAR_TYPE "short unsigned int" -#define HAVE_ATEXIT 1 - /* Enable parsing of #pragma pack(push,<n>) and #pragma pack(pop). */ #define HANDLE_PRAGMA_PACK_PUSH_POP 1 diff --git a/gcc/config/i386/djgpp.h b/gcc/config/i386/djgpp.h index 4ddd90faf58..38d8e22d5bf 100644 --- a/gcc/config/i386/djgpp.h +++ b/gcc/config/i386/djgpp.h @@ -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 diff --git a/gcc/config/i386/freebsd.h b/gcc/config/i386/freebsd.h index 884000b23f1..40ca25e0f94 100644 --- a/gcc/config/i386/freebsd.h +++ b/gcc/config/i386/freebsd.h @@ -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 diff --git a/gcc/config/i386/i386-interix.h b/gcc/config/i386/i386-interix.h index 1b5a6232c47..30017be1a50 100644 --- a/gcc/config/i386/i386-interix.h +++ b/gcc/config/i386/i386-interix.h @@ -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 " \ diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h index 7b368f8e5fb..d208d297f96 100644 --- a/gcc/config/i386/linux.h +++ b/gcc/config/i386/linux.h @@ -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. diff --git a/gcc/config/i386/osfrose.h b/gcc/config/i386/osfrose.h index f75fe1f46c0..fbe8d31007f 100644 --- a/gcc/config/i386/osfrose.h +++ b/gcc/config/i386/osfrose.h @@ -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 */ diff --git a/gcc/config/i386/sco.h b/gcc/config/i386/sco.h index 55af64128a1..dae2de36544 100644 --- a/gcc/config/i386/sco.h +++ b/gcc/config/i386/sco.h @@ -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" diff --git a/gcc/config/i386/sco5.h b/gcc/config/i386/sco5.h index 3aae13d613e..9bd348e797e 100644 --- a/gcc/config/i386/sco5.h +++ b/gcc/config/i386/sco5.h @@ -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 diff --git a/gcc/config/i386/scodbx.h b/gcc/config/i386/scodbx.h index d7d03f86326..e8fed08f303 100644 --- a/gcc/config/i386/scodbx.h +++ b/gcc/config/i386/scodbx.h @@ -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. */ diff --git a/gcc/config/i386/seq-sysv3.h b/gcc/config/i386/seq-sysv3.h index 9e8388d47d7..4b07db029e7 100644 --- a/gcc/config/i386/seq-sysv3.h +++ b/gcc/config/i386/seq-sysv3.h @@ -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 diff --git a/gcc/config/i386/seq2-sysv3.h b/gcc/config/i386/seq2-sysv3.h index 763c5f0adcc..dd43af707a0 100644 --- a/gcc/config/i386/seq2-sysv3.h +++ b/gcc/config/i386/seq2-sysv3.h @@ -4,5 +4,4 @@ /* Use atexit for static destructors, instead of defining our own exit function. */ -#define HAVE_ATEXIT - +#undef NEED_ATEXIT diff --git a/gcc/config/i386/win-nt.h b/gcc/config/i386/win-nt.h index 262c3afee27..a2d2359464b 100644 --- a/gcc/config/i386/win-nt.h +++ b/gcc/config/i386/win-nt.h @@ -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 diff --git a/gcc/config/i386/win32.h b/gcc/config/i386/win32.h index b97a5c8d383..68ad31fee72 100644 --- a/gcc/config/i386/win32.h +++ b/gcc/config/i386/win32.h @@ -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 diff --git a/gcc/config/i860/fx2800.h b/gcc/config/i860/fx2800.h index 50014eac71d..0510f6227ee 100644 --- a/gcc/config/i860/fx2800.h +++ b/gcc/config/i860/fx2800.h @@ -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 diff --git a/gcc/config/i860/paragon.h b/gcc/config/i860/paragon.h index ba09af3941b..d44505c348d 100644 --- a/gcc/config/i860/paragon.h +++ b/gcc/config/i860/paragon.h @@ -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"}, \ diff --git a/gcc/config/interix.h b/gcc/config/interix.h index 9cef8b35bf7..054ce7d9487 100644 --- a/gcc/config/interix.h +++ b/gcc/config/interix.h @@ -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 diff --git a/gcc/config/linux-aout.h b/gcc/config/linux-aout.h index ca8a39d5070..199ea542986 100644 --- a/gcc/config/linux-aout.h +++ b/gcc/config/linux-aout.h @@ -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. */ diff --git a/gcc/config/linux.h b/gcc/config/linux.h index ae0ec4a6258..286f0925098 100644 --- a/gcc/config/linux.h +++ b/gcc/config/linux.h @@ -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. */ diff --git a/gcc/config/lynx-ng.h b/gcc/config/lynx-ng.h index a3a9c3799d4..3ae07e1d601 100644 --- a/gcc/config/lynx-ng.h +++ b/gcc/config/lynx-ng.h @@ -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. */ diff --git a/gcc/config/lynx.h b/gcc/config/lynx.h index 62c790b6bfb..beac4491919 100644 --- a/gcc/config/lynx.h +++ b/gcc/config/lynx.h @@ -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. */ diff --git a/gcc/config/m68k/3b1.h b/gcc/config/m68k/3b1.h index 2b6611ae814..e93b748d4b1 100644 --- a/gcc/config/m68k/3b1.h +++ b/gcc/config/m68k/3b1.h @@ -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. */ diff --git a/gcc/config/m68k/a-ux.h b/gcc/config/m68k/a-ux.h index 1b85ce44046..b0770fc5393 100644 --- a/gcc/config/m68k/a-ux.h +++ b/gcc/config/m68k/a-ux.h @@ -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 */ diff --git a/gcc/config/m68k/apollo68.h b/gcc/config/m68k/apollo68.h index 8eed141dc84..1f75fb3bfe5 100644 --- a/gcc/config/m68k/apollo68.h +++ b/gcc/config/m68k/apollo68.h @@ -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. */ diff --git a/gcc/config/m68k/dpx2.h b/gcc/config/m68k/dpx2.h index b3779743532..5068e977715 100644 --- a/gcc/config/m68k/dpx2.h +++ b/gcc/config/m68k/dpx2.h @@ -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 diff --git a/gcc/config/m68k/hp320.h b/gcc/config/m68k/hp320.h index 977812e65a8..87c9e8cc056 100644 --- a/gcc/config/m68k/hp320.h +++ b/gcc/config/m68k/hp320.h @@ -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. */ diff --git a/gcc/config/m68k/mot3300.h b/gcc/config/m68k/mot3300.h index 8074e5b4d2e..6c14d4fe01d 100644 --- a/gcc/config/m68k/mot3300.h +++ b/gcc/config/m68k/mot3300.h @@ -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 \ diff --git a/gcc/config/m88k/sysv3.h b/gcc/config/m88k/sysv3.h index 11df8850ff0..88f17930190 100644 --- a/gcc/config/m88k/sysv3.h +++ b/gcc/config/m88k/sysv3.h @@ -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 */ \ diff --git a/gcc/config/mips/iris4.h b/gcc/config/mips/iris4.h index 7ca0459c625..604abc003a4 100644 --- a/gcc/config/mips/iris4.h +++ b/gcc/config/mips/iris4.h @@ -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 \ diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h index 2ca30ea3d84..a497231fcaf 100644 --- a/gcc/config/mips/linux.h +++ b/gcc/config/mips/linux.h @@ -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) diff --git a/gcc/config/mips/netbsd.h b/gcc/config/mips/netbsd.h index 3fce9fb1de3..3c90dcaf94e 100644 --- a/gcc/config/mips/netbsd.h +++ b/gcc/config/mips/netbsd.h @@ -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 diff --git a/gcc/config/mips/osfrose.h b/gcc/config/mips/osfrose.h index 3d92619c3e5..8ae9cb7bad8 100644 --- a/gcc/config/mips/osfrose.h +++ b/gcc/config/mips/osfrose.h @@ -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 diff --git a/gcc/config/mips/sni-svr4.h b/gcc/config/mips/sni-svr4.h index cf6edbccad6..c93eff4476c 100644 --- a/gcc/config/mips/sni-svr4.h +++ b/gcc/config/mips/sni-svr4.h @@ -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 diff --git a/gcc/config/mips/svr4-4.h b/gcc/config/mips/svr4-4.h index d1ba64de029..69cf97dc7a2 100644 --- a/gcc/config/mips/svr4-4.h +++ b/gcc/config/mips/svr4-4.h @@ -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 diff --git a/gcc/config/mips/svr4-5.h b/gcc/config/mips/svr4-5.h index 799e1cdf1e7..c214c7d8b28 100644 --- a/gcc/config/mips/svr4-5.h +++ b/gcc/config/mips/svr4-5.h @@ -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 diff --git a/gcc/config/mips/ultrix.h b/gcc/config/mips/ultrix.h index d6da6a841a9..e618a3cb9fb 100644 --- a/gcc/config/mips/ultrix.h +++ b/gcc/config/mips/ultrix.h @@ -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 diff --git a/gcc/config/netbsd.h b/gcc/config/netbsd.h index 0fb4d400ee2..7ba135bd24e 100644 --- a/gcc/config/netbsd.h +++ b/gcc/config/netbsd.h @@ -66,10 +66,6 @@ (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 diff --git a/gcc/config/nextstep.h b/gcc/config/nextstep.h index 69c3712e25d..ea56709d9c9 100644 --- a/gcc/config/nextstep.h +++ b/gcc/config/nextstep.h @@ -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 diff --git a/gcc/config/ns32k/pc532-min.h b/gcc/config/ns32k/pc532-min.h index 9d3d5de7556..d5f4ad1db06 100644 --- a/gcc/config/ns32k/pc532-min.h +++ b/gcc/config/ns32k/pc532-min.h @@ -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 diff --git a/gcc/config/openbsd.h b/gcc/config/openbsd.h index e95fbdaea0c..60ebfab540b 100644 --- a/gcc/config/openbsd.h +++ b/gcc/config/openbsd.h @@ -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 diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h index 5e81fc1db43..21f67280920 100644 --- a/gcc/config/pa/pa.h +++ b/gcc/config/pa/pa.h @@ -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, diff --git a/gcc/config/psos.h b/gcc/config/psos.h index d4043002a1c..23a41e1d132 100644 --- a/gcc/config/psos.h +++ b/gcc/config/psos.h @@ -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 - diff --git a/gcc/config/ptx4.h b/gcc/config/ptx4.h index b1eaabeb4cc..3a6a572b324 100644 --- a/gcc/config/ptx4.h +++ b/gcc/config/ptx4.h @@ -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 diff --git a/gcc/config/rs6000/mach.h b/gcc/config/rs6000/mach.h index bb4e8b4df84..65dc53d4bb0 100644 --- a/gcc/config/rs6000/mach.h +++ b/gcc/config/rs6000/mach.h @@ -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. */ diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index db1108417f0..97468f35222 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -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, diff --git a/gcc/config/rs6000/xm-beos.h b/gcc/config/rs6000/xm-beos.h index 617ad2f5b45..25c50182bcf 100644 --- a/gcc/config/rs6000/xm-beos.h +++ b/gcc/config/rs6000/xm-beos.h @@ -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 diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h index 93f27a49ace..ab5ec8328a8 100644 --- a/gcc/config/sh/sh.h +++ b/gcc/config/sh/sh.h @@ -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) diff --git a/gcc/config/sparc/linux-aout.h b/gcc/config/sparc/linux-aout.h index 5079ccd3396..28469454bc4 100644 --- a/gcc/config/sparc/linux-aout.h +++ b/gcc/config/sparc/linux-aout.h @@ -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. */ diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h index bde9573a13a..96b97974be8 100644 --- a/gcc/config/sparc/linux.h +++ b/gcc/config/sparc/linux.h @@ -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. */ diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h index 0cd76081a1e..cab08755f1c 100644 --- a/gcc/config/sparc/linux64.h +++ b/gcc/config/sparc/linux64.h @@ -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 diff --git a/gcc/config/sparc/sunos4.h b/gcc/config/sparc/sunos4.h index 14c7a437d67..0459c66207c 100644 --- a/gcc/config/sparc/sunos4.h +++ b/gcc/config/sparc/sunos4.h @@ -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 diff --git a/gcc/config/svr4.h b/gcc/config/svr4.h index 1ecb941e93e..5b584104494 100644 --- a/gcc/config/svr4.h +++ b/gcc/config/svr4.h @@ -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 diff --git a/gcc/config/vax/ultrix.h b/gcc/config/vax/ultrix.h index 3a14419c102..9f2d00da0ba 100644 --- a/gcc/config/vax/ultrix.h +++ b/gcc/config/vax/ultrix.h @@ -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 diff --git a/gcc/config/vax/vms.h b/gcc/config/vax/vms.h index 1f84f63a2e8..d9f4f7f5a63 100644 --- a/gcc/config/vax/vms.h +++ b/gcc/config/vax/vms.h @@ -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 diff --git a/gcc/config/xm-linux.h b/gcc/config/xm-linux.h index 2cffdb7fab6..fc0848b5604 100644 --- a/gcc/config/xm-linux.h +++ b/gcc/config/xm-linux.h @@ -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 |