aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorCatherine Moore <clm@cygnus.com>1999-04-14 10:46:50 +0000
committerCatherine Moore <clm@gcc.gnu.org>1999-04-14 06:46:50 -0400
commitd8265d2995912b37d74cd9a9dd18f5beff04e66d (patch)
tree1e5592b544936dacfc7a9952467ed24b511b0c29 /gcc
parent4e46365be1d700724ebf25f3f86ac069a4b32915 (diff)
downloadgcc-d8265d2995912b37d74cd9a9dd18f5beff04e66d.zip
gcc-d8265d2995912b37d74cd9a9dd18f5beff04e66d.tar.gz
gcc-d8265d2995912b37d74cd9a9dd18f5beff04e66d.tar.bz2
Wed Apr 14 10:48:03 1999 Catherine Moore <clm@cygnus.com>
* config/mips/elf.h, config/mips/elf64.h (CTORS_SECTION_ASM_OP): Define. (DTORS_SECTION_ASM_OP): Define. (EXTRA_SECTIONS): Define. (INVOKE__main): Define. (NAME__MAIN): Define. (SYMBOL__MAIN): Define. (EXTRA_SECTIONS_FUNCTIONS): Define. (SECTION_FUNCTION_TEMPLATE): Define. (ASM_OUTPUT_CONSTRUCTOR): Define. (ASM_OUTPUT_DESTRUCTOR): Define. (CTOR_LIST_BEGIN): Define. (CTOR_LIST_END): Define. (DTOR_LIST_BEGIN): Define. (DTOR_LIST_END): Define. (LIB_SPEC): Define. (STARTFILE_SPEC): Define. (ENDFILE_SPEC): Define. * config/mips/linux.h: Undefine all of the above. * config/mips/rtems64.h: Likewise. * config/mips/t-r3900: Likewise. * config/mips/t-elf: New file. * config/mips/vxworks.h: New file. * configure.in (mips-wrs-vxworks): Use mips/vxworks.h. (mips*-*-*elf*): Use t-elf instead of t-ecoff. * configure: Regenerate. From-SVN: r26446
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog29
-rw-r--r--gcc/config/mips/elf.h96
-rw-r--r--gcc/config/mips/elf64.h96
-rw-r--r--gcc/config/mips/linux.h29
-rw-r--r--gcc/config/mips/rtems64.h34
-rw-r--r--gcc/config/mips/t-elf96
-rw-r--r--gcc/config/mips/t-r39004
-rw-r--r--gcc/config/mips/vxworks.h50
-rwxr-xr-xgcc/configure24
-rw-r--r--gcc/configure.in26
10 files changed, 455 insertions, 29 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7c87db7..0e971bc 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,32 @@
+Wed Apr 14 10:48:03 1999 Catherine Moore <clm@cygnus.com>
+
+ * config/mips/elf.h, config/mips/elf64.h
+ (CTORS_SECTION_ASM_OP): Define.
+ (DTORS_SECTION_ASM_OP): Define.
+ (EXTRA_SECTIONS): Define.
+ (INVOKE__main): Define.
+ (NAME__MAIN): Define.
+ (SYMBOL__MAIN): Define.
+ (EXTRA_SECTIONS_FUNCTIONS): Define.
+ (SECTION_FUNCTION_TEMPLATE): Define.
+ (ASM_OUTPUT_CONSTRUCTOR): Define.
+ (ASM_OUTPUT_DESTRUCTOR): Define.
+ (CTOR_LIST_BEGIN): Define.
+ (CTOR_LIST_END): Define.
+ (DTOR_LIST_BEGIN): Define.
+ (DTOR_LIST_END): Define.
+ (LIB_SPEC): Define.
+ (STARTFILE_SPEC): Define.
+ (ENDFILE_SPEC): Define.
+ * config/mips/linux.h: Undefine all of the above.
+ * config/mips/rtems64.h: Likewise.
+ * config/mips/t-r3900: Likewise.
+ * config/mips/t-elf: New file.
+ * config/mips/vxworks.h: New file.
+ * configure.in (mips-wrs-vxworks): Use mips/vxworks.h.
+ (mips*-*-*elf*): Use t-elf instead of t-ecoff.
+ * configure: Regenerate.
+
Wed Apr 14 09:59:38 1999 Richard Henderson <rth@cygnus.com>
* reload1.c (emit_reload_insns): Also find equivalent mems
diff --git a/gcc/config/mips/elf.h b/gcc/config/mips/elf.h
index 1364e2a..c6ec871 100644
--- a/gcc/config/mips/elf.h
+++ b/gcc/config/mips/elf.h
@@ -1,6 +1,6 @@
/* Definitions of target machine for GNU compiler. MIPS R3000 version with
GOFAST floating point library.
- Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1997, 1999 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -232,3 +232,97 @@ do { \
\
DECL_SECTION_NAME (DECL) = build_string (len, string); \
} while (0)
+
+/* Support the ctors/dtors and other sections. */
+
+/* Define the pseudo-ops used to switch to the .ctors and .dtors sections.
+
+ Note that we want to give these sections the SHF_WRITE attribute
+ because these sections will actually contain data (i.e. tables of
+ addresses of functions in the current root executable or shared library
+ file) and, in the case of a shared library, the relocatable addresses
+ will have to be properly resolved/relocated (and then written into) by
+ the dynamic linker when it actually attaches the given shared library
+ to the executing process. (Note that on SVR4, you may wish to use the
+ `-z text' option to the ELF linker, when building a shared library, as
+ an additional check that you are doing everything right. But if you do
+ use the `-z text' option when building a shared library, you will get
+ errors unless the .ctors and .dtors sections are marked as writable
+ via the SHF_WRITE attribute.) */
+
+#define CTORS_SECTION_ASM_OP "\t.section\t.ctors,\"aw\""
+#define DTORS_SECTION_ASM_OP "\t.section\t.dtors,\"aw\""
+
+/* A list of other sections which the compiler might be "in" at any
+ given time. */
+#undef EXTRA_SECTIONS
+#define EXTRA_SECTIONS in_sdata, in_rdata, in_ctors, in_dtors
+
+#define INVOKE__main
+#define NAME__MAIN "__gccmain"
+#define SYMBOL__MAIN __gccmain
+
+#undef EXTRA_SECTION_FUNCTIONS
+#define EXTRA_SECTION_FUNCTIONS \
+ SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP) \
+ SECTION_FUNCTION_TEMPLATE(rdata_section, in_rdata, RDATA_SECTION_ASM_OP) \
+ SECTION_FUNCTION_TEMPLATE(ctors_section, in_ctors, CTORS_SECTION_ASM_OP) \
+ SECTION_FUNCTION_TEMPLATE(dtors_section, in_dtors, DTORS_SECTION_ASM_OP)
+
+#define SECTION_FUNCTION_TEMPLATE(FN, ENUM, OP) \
+void FN () \
+{ \
+ if (in_section != ENUM) \
+ { \
+ fprintf (asm_out_file, "%s\n", OP); \
+ in_section = ENUM; \
+ } \
+}
+
+
+/* A C statement (sans semicolon) to output an element in the table of
+ global constructors. */
+#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \
+ do { \
+ ctors_section (); \
+ fprintf (FILE, "\t%s\t", TARGET_LONG64 ? ".dword" : ".word"); \
+ assemble_name (FILE, NAME); \
+ fprintf (FILE, "\n"); \
+ } while (0)
+
+
+/* A C statement (sans semicolon) to output an element in the table of
+ global destructors. */
+#define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \
+ do { \
+ dtors_section (); \
+ fprintf (FILE, "\t%s\t", TARGET_LONG64 ? ".dword" : ".word"); \
+ assemble_name (FILE, NAME); \
+ fprintf (FILE, "\n"); \
+ } while (0)
+
+#define CTOR_LIST_BEGIN \
+asm (CTORS_SECTION_ASM_OP); \
+func_ptr __CTOR_LIST__[1] = { (func_ptr) (-1) }
+
+#define CTOR_LIST_END \
+asm (CTORS_SECTION_ASM_OP); \
+func_ptr __CTOR_END__[1] = { (func_ptr) 0 };
+
+#define DTOR_LIST_BEGIN \
+asm (DTORS_SECTION_ASM_OP); \
+func_ptr __DTOR_LIST__[1] = { (func_ptr) (-1) }
+
+#define DTOR_LIST_END \
+asm (DTORS_SECTION_ASM_OP); \
+func_ptr __DTOR_END__[1] = { (func_ptr) 0 };
+
+/* Don't set the target flags, this is done by the linker script */
+#undef LIB_SPEC
+#define LIB_SPEC ""
+
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC "crtbegin%O%s crt0%O%s"
+
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC "crtend%O%s"
diff --git a/gcc/config/mips/elf64.h b/gcc/config/mips/elf64.h
index b6cf372..cb02f9c 100644
--- a/gcc/config/mips/elf64.h
+++ b/gcc/config/mips/elf64.h
@@ -1,6 +1,6 @@
/* Definitions of target machine for GNU compiler. MIPS R4000 version with
GOFAST floating point library.
- Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -256,3 +256,97 @@ do { \
\
DECL_SECTION_NAME (DECL) = build_string (len, string); \
} while (0)
+
+/* Support the ctors/dtors and other sections. */
+
+/* Define the pseudo-ops used to switch to the .ctors and .dtors sections.
+
+ Note that we want to give these sections the SHF_WRITE attribute
+ because these sections will actually contain data (i.e. tables of
+ addresses of functions in the current root executable or shared library
+ file) and, in the case of a shared library, the relocatable addresses
+ will have to be properly resolved/relocated (and then written into) by
+ the dynamic linker when it actually attaches the given shared library
+ to the executing process. (Note that on SVR4, you may wish to use the
+ `-z text' option to the ELF linker, when building a shared library, as
+ an additional check that you are doing everything right. But if you do
+ use the `-z text' option when building a shared library, you will get
+ errors unless the .ctors and .dtors sections are marked as writable
+ via the SHF_WRITE attribute.) */
+
+#define CTORS_SECTION_ASM_OP "\t.section\t.ctors,\"aw\""
+#define DTORS_SECTION_ASM_OP "\t.section\t.dtors,\"aw\""
+
+/* A list of other sections which the compiler might be "in" at any
+ given time. */
+#undef EXTRA_SECTIONS
+#define EXTRA_SECTIONS in_sdata, in_rdata, in_ctors, in_dtors
+
+#define INVOKE__main
+#define NAME__MAIN "__gccmain"
+#define SYMBOL__MAIN __gccmain
+
+#undef EXTRA_SECTION_FUNCTIONS
+#define EXTRA_SECTION_FUNCTIONS \
+ SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP) \
+ SECTION_FUNCTION_TEMPLATE(rdata_section, in_rdata, RDATA_SECTION_ASM_OP) \
+ SECTION_FUNCTION_TEMPLATE(ctors_section, in_ctors, CTORS_SECTION_ASM_OP) \
+ SECTION_FUNCTION_TEMPLATE(dtors_section, in_dtors, DTORS_SECTION_ASM_OP)
+
+#define SECTION_FUNCTION_TEMPLATE(FN, ENUM, OP) \
+void FN () \
+{ \
+ if (in_section != ENUM) \
+ { \
+ fprintf (asm_out_file, "%s\n", OP); \
+ in_section = ENUM; \
+ } \
+}
+
+
+/* A C statement (sans semicolon) to output an element in the table of
+ global constructors. */
+#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \
+ do { \
+ ctors_section (); \
+ fprintf (FILE, "\t%s\t", TARGET_LONG64 ? ".dword" : ".word"); \
+ assemble_name (FILE, NAME); \
+ fprintf (FILE, "\n"); \
+ } while (0)
+
+
+/* A C statement (sans semicolon) to output an element in the table of
+ global destructors. */
+#define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \
+ do { \
+ dtors_section (); \
+ fprintf (FILE, "\t%s\t", TARGET_LONG64 ? ".dword" : ".word"); \
+ assemble_name (FILE, NAME); \
+ fprintf (FILE, "\n"); \
+ } while (0)
+
+#define CTOR_LIST_BEGIN \
+asm (CTORS_SECTION_ASM_OP); \
+func_ptr __CTOR_LIST__[1] = { (func_ptr) (-1) }
+
+#define CTOR_LIST_END \
+asm (CTORS_SECTION_ASM_OP); \
+func_ptr __CTOR_END__[1] = { (func_ptr) 0 };
+
+#define DTOR_LIST_BEGIN \
+asm (DTORS_SECTION_ASM_OP); \
+func_ptr __DTOR_LIST__[1] = { (func_ptr) (-1) }
+
+#define DTOR_LIST_END \
+asm (DTORS_SECTION_ASM_OP); \
+func_ptr __DTOR_END__[1] = { (func_ptr) 0 };
+
+/* Don't set the target flags, this is done by the linker script */
+#undef LIB_SPEC
+#define LIB_SPEC ""
+
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC "crtbegin%O%s crt0%O%s"
+
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC "crtend%O%s"
diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h
index e780a4b..f4ed424 100644
--- a/gcc/config/mips/linux.h
+++ b/gcc/config/mips/linux.h
@@ -68,3 +68,32 @@ Boston, MA 02111-1307, USA. */
#undef SUBTARGET_ASM_SPEC
#define SUBTARGET_ASM_SPEC "-KPIC"
+
+/* Undefine the following which were defined in elf.h. This will cause the linux
+ port to continue to use collect2 for constructors/destructors. These may be removed
+ when .ctor/.dtor section support is desired. */
+
+#undef CTORS_SECTION_ASM_OP
+#undef DTORS_SECTION_ASM_OP
+
+#undef EXTRA_SECTIONS
+#define EXTRA_SECTIONS in_sdata, in_rdata
+
+#undef INVOKE__main
+#undef NAME__MAIN
+#undef SYMBOL__MAIN
+
+#undef EXTRA_SECTION_FUNCTIONS
+#define EXTRA_SECTION_FUNCTIONS \
+ SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP) \
+ SECTION_FUNCTION_TEMPLATE(rdata_section, in_rdata, RDATA_SECTION_ASM_OP)
+
+#undef ASM_OUTPUT_CONSTRUCTOR
+#undef ASM_OUTPUT_DESTRUCTOR
+
+#undef CTOR_LIST_BEGIN
+#undef CTOR_LIST_END
+#undef DTOR_LIST_BEGIN
+#undef DTOR_LIST_END
+
+/* End of undefines to turn off .ctor/.dtor section support */
diff --git a/gcc/config/mips/rtems64.h b/gcc/config/mips/rtems64.h
index 42c7a65..cd79970 100644
--- a/gcc/config/mips/rtems64.h
+++ b/gcc/config/mips/rtems64.h
@@ -1,5 +1,5 @@
/* Definitions for rtems targeting a MIPS ORION using ecoff.
- Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
Contributed by Joel Sherrill (joel@OARcorp.com).
This file is part of GNU CC.
@@ -29,3 +29,35 @@ Boston, MA 02111-1307, USA. */
#ifndef TARGET_MEM_FUNCTIONS
#define TARGET_MEM_FUNCTIONS
#endif
+
+/* Undefine the following which were defined in elf64.h. This will cause the rtems64
+ port to continue to use collect2 for constructors/destructors. These may be removed
+ when .ctor/.dtor section support is desired. */
+
+#undef CTORS_SECTION_ASM_OP
+#undef DTORS_SECTION_ASM_OP
+
+#undef EXTRA_SECTIONS
+#define EXTRA_SECTIONS in_sdata, in_rdata
+
+#undef INVOKE__main
+#undef NAME__MAIN
+#undef SYMBOL__MAIN
+
+#undef EXTRA_SECTION_FUNCTIONS
+#define EXTRA_SECTION_FUNCTIONS \
+ SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP) \
+ SECTION_FUNCTION_TEMPLATE(rdata_section, in_rdata, RDATA_SECTION_ASM_OP)
+
+#undef ASM_OUTPUT_CONSTRUCTOR
+#undef ASM_OUTPUT_DESTRUCTOR
+
+#undef CTOR_LIST_BEGIN
+#undef CTOR_LIST_END
+#undef DTOR_LIST_BEGIN
+#undef DTOR_LIST_END
+
+#undef STARTFILE_SPEC
+#undef ENDFILE_SPEC
+
+/* End of undefines to turn off .ctor/.dtor section support */
diff --git a/gcc/config/mips/t-elf b/gcc/config/mips/t-elf
new file mode 100644
index 0000000..dd01b7f
--- /dev/null
+++ b/gcc/config/mips/t-elf
@@ -0,0 +1,96 @@
+CONFIG2_H = $(srcdir)/config/mips/ecoff.h
+
+# We have a premade insn-attrtab.c to save the hour it takes to run genattrtab.
+# PREMADE_ATTRTAB = $(srcdir)/config/mips/mips-at.c
+# PREMADE_ATTRTAB_MD = $(srcdir)/config/mips/mips-at.md
+
+# Suppress building libgcc1.a, since the MIPS compiler port is complete
+# and does not need anything from libgcc1.a.
+LIBGCC1 =
+
+EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o
+# Don't let CTOR_LIST end up in sdata section.
+CRTSTUFF_T_CFLAGS = -G 0
+
+# When building a cross compiler, put the mips16 support functions in
+# libgcc1.a.
+CROSS_LIBGCC1 = libgcc1-asm.a
+LIB1ASMSRC = mips/mips16.S
+LIB1ASMFUNCS = _m16addsf3 _m16subsf3 _m16mulsf3 _m16divsf3 \
+ _m16eqsf2 _m16nesf2 _m16gtsf2 _m16gesf2 _m16lesf2 _m16ltsf2 \
+ _m16fltsisf _m16fixsfsi \
+ _m16adddf3 _m16subdf3 _m16muldf3 _m16divdf3 \
+ _m16extsfdf2 _m16trdfsf2 \
+ _m16eqdf2 _m16nedf2 _m16gtdf2 _m16gedf2 _m16ledf2 _m16ltdf2 \
+ _m16fltsidf _m16fixdfsi \
+ _m16retsf _m16retdf \
+ _m16stub1 _m16stub2 _m16stub5 _m16stub6 _m16stub9 _m16stub10 \
+ _m16stubsf0 _m16stubsf1 _m16stubsf2 _m16stubsf5 _m16stubsf6 \
+ _m16stubsf9 _m16stubsf10 \
+ _m16stubdf0 _m16stubdf1 _m16stubdf2 _m16stubdf5 _m16stubdf6 \
+ _m16stubdf9 _m16stubdf10
+
+# We must build libgcc2.a with -G 0, in case the user wants to link
+# without the $gp register.
+TARGET_LIBGCC2_CFLAGS = -G 0
+
+# fp-bit and dp-bit are really part of libgcc1, but this will cause
+# them to be built correctly, so... [taken from t-sparclite]
+LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c
+
+dp-bit.c: $(srcdir)/config/fp-bit.c
+ echo '#ifdef __MIPSEL__' > dp-bit.c
+ echo '#define FLOAT_BIT_ORDER_MISMATCH' >> dp-bit.c
+ echo '#endif' >> dp-bit.c
+ echo '#define US_SOFTWARE_GOFAST' >> dp-bit.c
+ cat $(srcdir)/config/fp-bit.c >> dp-bit.c
+
+fp-bit.c: $(srcdir)/config/fp-bit.c
+ echo '#define FLOAT' > fp-bit.c
+ echo '#ifdef __MIPSEL__' >> fp-bit.c
+ echo '#define FLOAT_BIT_ORDER_MISMATCH' >> fp-bit.c
+ echo '#endif' >> fp-bit.c
+ echo '#define US_SOFTWARE_GOFAST' >> fp-bit.c
+ cat $(srcdir)/config/fp-bit.c >> fp-bit.c
+
+# Build the libraries for both hard and soft floating point
+
+MULTILIB_OPTIONS = msoft-float/msingle-float EL/EB mips1/mips3
+MULTILIB_DIRNAMES = soft-float single el eb mips1 mips3
+MULTILIB_MATCHES = msingle-float=m4650
+
+LIBGCC = stmp-multilib
+INSTALL_LIBGCC = install-multilib
+
+# Add additional dependencies to recompile selected modules whenever the
+# tm.h file changes. The files compiled are:
+#
+# gcc.c (*_SPEC changes)
+# toplev.c (new switches + assembly output changes)
+# sdbout.c (debug format changes)
+# dbxout.c (debug format changes)
+# dwarfout.c (debug format changes)
+# final.c (assembly output changes)
+# varasm.c (assembly output changes)
+# cse.c (cost functions)
+# insn-output.c (possible ifdef changes in tm.h)
+# regclass.c (fixed/call used register changes)
+# cccp.c (new preprocessor macros, -v version #)
+# explow.c (GO_IF_LEGITIMATE_ADDRESS)
+# recog.c (GO_IF_LEGITIMATE_ADDRESS)
+# reload.c (GO_IF_LEGITIMATE_ADDRESS)
+
+gcc.o: $(CONFIG2_H)
+toplev.o: $(CONFIG2_H)
+sdbout.o: $(CONFIG2_H)
+dbxout.o: $(CONFIG2_H)
+dwarfout.o: $(CONFIG2_H)
+final.o: $(CONFIG2_H)
+varasm.o: $(CONFIG2_H)
+cse.o: $(CONFIG2_H)
+insn-output.o: $(CONFIG2_H)
+regclass.o: $(CONFIG2_H)
+cccp.o: $(CONFIG2_H)
+explow.o: $(CONFIG2_H)
+recog.o: $(CONFIG2_H)
+reload.o: $(CONFIG2_H)
diff --git a/gcc/config/mips/t-r3900 b/gcc/config/mips/t-r3900
index 40da335..055143f 100644
--- a/gcc/config/mips/t-r3900
+++ b/gcc/config/mips/t-r3900
@@ -49,6 +49,10 @@ fp-bit.c: $(srcdir)/config/fp-bit.c
echo '#define US_SOFTWARE_GOFAST' >> fp-bit.c
cat $(srcdir)/config/fp-bit.c >> fp-bit.c
+EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o
+# Don't let CTOR_LIST end up in sdata section.
+CRTSTUFF_T_CFLAGS = -G 0
+
# Build the libraries for both hard and soft floating point
MULTILIB_OPTIONS = msoft-float/msingle-float EL/EB
diff --git a/gcc/config/mips/vxworks.h b/gcc/config/mips/vxworks.h
new file mode 100644
index 0000000..0856c37
--- /dev/null
+++ b/gcc/config/mips/vxworks.h
@@ -0,0 +1,50 @@
+/* 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. */
+
+/* Undefine the following which were defined in elf.h. Thise will cause the mips-vxworks
+ port to continue to use collect2 for constructors/destructors. This entire file may
+ be removed when .ctor/.dtor section support is desired. */
+
+#undef CTORS_SECTION_ASM_OP
+#undef DTORS_SECTION_ASM_OP
+
+#undef EXTRA_SECTIONS
+#define EXTRA_SECTIONS in_sdata, in_rdata
+
+#undef INVOKE__main
+#undef NAME__MAIN
+#undef SYMBOL__MAIN
+
+#undef EXTRA_SECTION_FUNCTIONS
+#define EXTRA_SECTION_FUNCTIONS \
+ SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP) \
+ SECTION_FUNCTION_TEMPLATE(rdata_section, in_rdata, RDATA_SECTION_ASM_OP)
+
+#undef ASM_OUTPUT_CONSTRUCTOR
+#undef ASM_OUTPUT_DESTRUCTOR
+
+#undef CTOR_LIST_BEGIN
+#undef CTOR_LIST_END
+#undef DTOR_LIST_BEGIN
+#undef DTOR_LIST_END
+
+#undef STARTFILE_SPEC
+#undef ENDFILE_SPEC
+
+/* End of undefines to turn off .ctor/.dtor section support */
diff --git a/gcc/configure b/gcc/configure
index 53e28e6..8c3a82a 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -4434,7 +4434,7 @@ for machine in $build $host $target; do
# fi
;;
mips-wrs-vxworks)
- tm_file="mips/elf.h libgloss.h"
+ tm_file="mips/elf.h libgloss.h mips/vxworks.h"
tmake_file=mips/t-ecoff
gas=yes
gnu_ld=yes
@@ -4841,38 +4841,38 @@ for machine in $build $host $target; do
;;
mipsel-*-elf*)
tm_file="mips/elfl.h libgloss.h"
- tmake_file=mips/t-ecoff
+ tmake_file=mips/t-elf
;;
mips-*-elf*)
- tm_file="mips/elf.h libgloss.h"
- tmake_file=mips/t-ecoff
+ tm_file="mips/elf.h"
+ tmake_file=mips/t-elf
;;
mips64el-*-elf*)
- tm_file="mips/elfl64.h libgloss.h"
- tmake_file=mips/t-ecoff
+ tm_file="mips/elfl64.h"
+ tmake_file=mips/t-elf
;;
mips64orionel-*-elf*)
tm_file="mips/elforion.h mips/elfl64.h libgloss.h"
- tmake_file=mips/t-ecoff
+ tmake_file=mips/t-elf
;;
mips64-*-elf*)
- tm_file="mips/elf64.h libgloss.h"
- tmake_file=mips/t-ecoff
+ tm_file="mips/elf64.h"
+ tmake_file=mips/t-elf
;;
mips64orion-*-elf*)
tm_file="mips/elforion.h mips/elf64.h libgloss.h"
- tmake_file=mips/t-ecoff
+ tmake_file=mips/t-elf
;;
mips64orion-*-rtems*)
tm_file="mips/elforion.h mips/elf64.h mips/rtems64.h"
tmake_file="mips/t-ecoff t-rtems"
;;
mipstx39el-*-elf*)
- tm_file="mips/r3900.h mips/elfl.h mips/abi64.h libgloss.h"
+ tm_file="mips/r3900.h mips/elfl.h mips/abi64.h"
tmake_file=mips/t-r3900
;;
mipstx39-*-elf*)
- tm_file="mips/r3900.h mips/elf.h mips/abi64.h libgloss.h"
+ tm_file="mips/r3900.h mips/elf.h mips/abi64.h"
tmake_file=mips/t-r3900
# FIXME mips-elf should be fixed to use crtstuff.
use_collect2=yes
diff --git a/gcc/configure.in b/gcc/configure.in
index 834d8d2..464e895 100644
--- a/gcc/configure.in
+++ b/gcc/configure.in
@@ -2166,7 +2166,7 @@ changequote([,])dnl
# fi
;;
mips-wrs-vxworks)
- tm_file="mips/elf.h libgloss.h"
+ tm_file="mips/elf.h libgloss.h mips/vxworks.h"
tmake_file=mips/t-ecoff
gas=yes
gnu_ld=yes
@@ -2585,41 +2585,39 @@ changequote([,])dnl
;;
mipsel-*-elf*)
tm_file="mips/elfl.h libgloss.h"
- tmake_file=mips/t-ecoff
+ tmake_file=mips/t-elf
;;
mips-*-elf*)
- tm_file="mips/elf.h libgloss.h"
- tmake_file=mips/t-ecoff
+ tm_file="mips/elf.h"
+ tmake_file=mips/t-elf
;;
mips64el-*-elf*)
- tm_file="mips/elfl64.h libgloss.h"
- tmake_file=mips/t-ecoff
+ tm_file="mips/elfl64.h"
+ tmake_file=mips/t-elf
;;
mips64orionel-*-elf*)
tm_file="mips/elforion.h mips/elfl64.h libgloss.h"
- tmake_file=mips/t-ecoff
+ tmake_file=mips/t-elf
;;
mips64-*-elf*)
- tm_file="mips/elf64.h libgloss.h"
- tmake_file=mips/t-ecoff
+ tm_file="mips/elf64.h"
+ tmake_file=mips/t-elf
;;
mips64orion-*-elf*)
tm_file="mips/elforion.h mips/elf64.h libgloss.h"
- tmake_file=mips/t-ecoff
+ tmake_file=mips/t-elf
;;
mips64orion-*-rtems*)
tm_file="mips/elforion.h mips/elf64.h mips/rtems64.h"
tmake_file="mips/t-ecoff t-rtems"
;;
mipstx39el-*-elf*)
- tm_file="mips/r3900.h mips/elfl.h mips/abi64.h libgloss.h"
+ tm_file="mips/r3900.h mips/elfl.h mips/abi64.h"
tmake_file=mips/t-r3900
;;
mipstx39-*-elf*)
- tm_file="mips/r3900.h mips/elf.h mips/abi64.h libgloss.h"
+ tm_file="mips/r3900.h mips/elf.h mips/abi64.h"
tmake_file=mips/t-r3900
- # FIXME mips-elf should be fixed to use crtstuff.
- use_collect2=yes
;;
mips-*-*) # Default MIPS RISC-OS 4.0.
if test x$stabs = xyes; then