From f22b4bc43d0fb8af1928d6a702dae4121cf138c2 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 13 Feb 2002 22:49:03 +0000 Subject: [PATCH] config.gcc (a29k-*-rtems): General cleanup across all RTEMS targets... 2002-02-13 Joel Sherrill * config.gcc (a29k-*-rtems), config/a29k/rtems.h: General cleanup across all RTEMS targets including removal of #includes from config/*/rtems*.h file and adding them to tm_file setting. Added xm_defines=POSIX to many targets. * config.gcc (c4x-*-rtems), config/c4x/rtems.h: Ditto. * config.gcc (h8300-*-rtems), config/h8300/rtems.h: Ditto. * config.gcc (hppa1.1-*-rtems), config/pa/rtems.h: Ditto. * config.gcc (i960-*-rtems), config/i960/rtems.h: Ditto. * config.gcc (m68k-*-rtems*), config/m68k/rtems.h, config/m68k/rtemself.h: Ditto. * config.gcc (mips*-*-rtems*), config/mips/rtems.h, config/mips/rtems64.h: Ditto. * config.gcc (powerpc-*-rtems*), config/rs6000/rtems.h: Ditto. * config.gcc (sh-*-rtems*), config/sh/rtems.h, config/sh/rtemself.h: Ditto. * config.gcc (sparc-*-rtems*), config/sparc/rtems.h, config/sparc/rtemself.h: Ditto. * config.gcc (v850-*-rtems*), config/v850/rtems.h: Ditto. * config.gcc (arm-rtems), config/arm/rtems-elf.h: Ditto plus moved arm-rtems stanza closer to other arm-elf targets and made arm-rtems more like arm-elf. * config.gcc (i[34567]86-*-rtems*), config/i386/djgpp-rtems.h, config/i386/rtems.h, config/i386/rtemself.h: Ditto plus i386-rtemself target made more similar to i386-elf. * config/i386/t-rtems-i386: Added soft float support and multilibs. * config/m68k/t-m68kbare: Add 68040 and 68060 as multilib alternatives to be similar to config/m68k/t-m68kelf. * gthr-rtems.h: Encapsulate with extern "C" for C++. From-SVN: r49749 --- gcc/ChangeLog | 31 ++++++++++++++++ gcc/config.gcc | 64 ++++++++++++++++++++------------ gcc/config/a29k/rtems.h | 9 +---- gcc/config/arm/rtems-elf.h | 10 ++--- gcc/config/c4x/rtems.h | 11 +----- gcc/config/h8300/rtems.h | 11 +----- gcc/config/i386/djgpp-rtems.h | 9 +---- gcc/config/i386/rtems.h | 11 +----- gcc/config/i386/rtemself.h | 69 ++++++----------------------------- gcc/config/i386/t-rtems-i386 | 40 ++++++++++++++++++++ gcc/config/i960/rtems.h | 9 +---- gcc/config/m68k/rtems.h | 9 +---- gcc/config/m68k/rtemself.h | 9 +---- gcc/config/m68k/t-m68kbare | 4 +- gcc/config/mips/rtems.h | 7 +--- gcc/config/mips/rtems64.h | 9 +---- gcc/config/pa/rtems.h | 7 +--- gcc/config/rs6000/rtems.h | 4 +- gcc/config/sh/rtems.h | 7 +--- gcc/config/sh/rtemself.h | 7 +--- gcc/config/sparc/rtems.h | 4 +- gcc/config/sparc/rtemself.h | 6 +-- gcc/config/v850/rtems.h | 11 +----- gcc/gthr-rtems.h | 9 ++++- 24 files changed, 173 insertions(+), 194 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ce1b0ce6c23..6e5c90f883e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,34 @@ +2002-02-13 Joel Sherrill + + * config.gcc (a29k-*-rtems), config/a29k/rtems.h: General cleanup across + all RTEMS targets including removal of #includes from config/*/rtems*.h + file and adding them to tm_file setting. Added xm_defines=POSIX to + many targets. + * config.gcc (c4x-*-rtems), config/c4x/rtems.h: Ditto. + * config.gcc (h8300-*-rtems), config/h8300/rtems.h: Ditto. + * config.gcc (hppa1.1-*-rtems), config/pa/rtems.h: Ditto. + * config.gcc (i960-*-rtems), config/i960/rtems.h: Ditto. + * config.gcc (m68k-*-rtems*), config/m68k/rtems.h, + config/m68k/rtemself.h: Ditto. + * config.gcc (mips*-*-rtems*), config/mips/rtems.h, + config/mips/rtems64.h: Ditto. + * config.gcc (powerpc-*-rtems*), config/rs6000/rtems.h: Ditto. + * config.gcc (sh-*-rtems*), config/sh/rtems.h, config/sh/rtemself.h: + Ditto. + * config.gcc (sparc-*-rtems*), config/sparc/rtems.h, + config/sparc/rtemself.h: Ditto. + * config.gcc (v850-*-rtems*), config/v850/rtems.h: Ditto. + * config.gcc (arm-rtems), config/arm/rtems-elf.h: Ditto plus moved + arm-rtems stanza closer to other arm-elf targets and made arm-rtems + more like arm-elf. + * config.gcc (i[34567]86-*-rtems*), config/i386/djgpp-rtems.h, + config/i386/rtems.h, config/i386/rtemself.h: Ditto plus i386-rtemself + target made more similar to i386-elf. + * config/i386/t-rtems-i386: Added soft float support and multilibs. + * config/m68k/t-m68kbare: Add 68040 and 68060 as multilib alternatives to + be similar to config/m68k/t-m68kelf. + * gthr-rtems.h: Encapsulate with extern "C" for C++. + Wed Feb 13 23:41:15 CET 2002 Jan Hubicka * regmove.c (kill_value): Handle subregs. diff --git a/gcc/config.gcc b/gcc/config.gcc index 80fb31a7bbb..588e648d3d2 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -410,7 +410,8 @@ a29k-*-udi | a29k-*-coff) tmake_file=a29k/t-a29kbare ;; a29k*-*-rtems*) - tm_file=a29k/rtems.h + xm_defines=POSIX + tm_file="a29k/a29k.h a29k/rtems.h rtems.h" tmake_file="a29k/t-a29kbare t-rtems" if test x$enable_threads = xyes; then thread_file='rtems' @@ -590,13 +591,6 @@ arc-*-elf*) tm_file="dbxelf.h elfos.h svr4.h ${tm_file}" extra_parts="crtinit.o crtfini.o" ;; -arm*-*-rtems*) - tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/rtems-elf.h rtems.h" - tmake_file="arm/t-arm-elf t-rtems" - if test x$enable_threads = xyes; then - thread_file='rtems' - fi - ;; arm-*-coff* | armel-*-coff*) tm_file="arm/semi.h arm/aout.h arm/arm.h arm/coff.h" tmake_file=arm/t-arm-coff @@ -663,6 +657,14 @@ arm*-*-ecos-elf) tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/ecos-elf.h" tmake_file=arm/t-arm-elf ;; +arm*-*-rtems*) + xm_defines=POSIX + tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/rtems-elf.h rtems.h" + tmake_file="arm/t-arm-elf t-rtems" + if test x$enable_threads = xyes; then + thread_file='rtems' + fi + ;; arm*-*-elf) tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h" tmake_file=arm/t-arm-elf @@ -703,8 +705,9 @@ c38-convex-*) use_collect2=yes ;; c4x-*-rtems*) + xm_defines=POSIX tmake_file="c4x/t-c4x t-rtems" - tm_file=c4x/rtems.h + tm_file='c4x/c4x.h c4x/rtems.h rtems.h" if test x$enable_threads = xyes; then thread_file='rtems' fi @@ -759,8 +762,9 @@ fr30-*-elf) extra_parts="crti.o crtn.o crtbegin.o crtend.o" ;; h8300-*-rtems*) + xm_defines=POSIX tmake_file="h8300/t-h8300 t-rtems" - tm_file=h8300/rtems.h + tm_file="h8300/h8300.h h8300/rtems.h rtems.h" if test x$enable_threads = xyes; then thread_file='rtems' fi @@ -808,8 +812,9 @@ hppa1.1-*-osf*) use_collect2=yes ;; hppa1.1-*-rtems*) + xm_defines=POSIX target_cpu_default="(MASK_JUMP_IN_DELAY | MASK_PORTABLE_RUNTIME | MASK_GAS | MASK_NO_SPACE_REGS | MASK_SOFT_FLOAT)" - tm_file="${tm_file} pa/pa32-regs.h dbxelf.h elfos.h pa/elf.h pa/pa-pro-end.h libgloss.h pa/rtems.h" + tm_file="${tm_file} pa/pa32-regs.h dbxelf.h elfos.h pa/elf.h pa/pa-pro-end.h libgloss.h pa/rtems.h rtems.h" tmake_file="pa/t-bsd pa/t-pro" ;; hppa1.0-*-osf*) @@ -1287,21 +1292,24 @@ i[34567]86-*-osfrose*) # 386 using OSF/rose extra_objs=halfpic.o ;; i[34567]86-go32-rtems*) - tm_file=i386/djgpp-rtems.h + xm_defines=POSIX + tm_file="i386/djgpp.h i386/djgpp-rtems.h rtems.h" tmake_file=t-rtems if test x$enable_threads = xyes; then thread_file='rtems' fi ;; i[34567]86-*-rtemscoff*) - tm_file=i386/rtems.h + xm_defines=POSIX + tm_file="i386/i386-coff.h i386/rtems.h rtems.h" tmake_file=t-rtems if test x$enable_threads = xyes; then thread_file='rtems' fi ;; i[34567]86-*-rtems*|i[34567]86-*-rtemself*) - tm_file="${tm_file} i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/rtemself.h rtems.h" + xm_defines=POSIX + tm_file="${tm_file} i386/att.h dbxelf.h elfos.h i386/i386elf.h i386/rtemself.h rtems.h" extra_parts="crtbegin.o crtend.o crti.o crtn.o" tmake_file="i386/t-rtems-i386 i386/t-crtstuff t-rtems" if test x$enable_threads = xyes; then @@ -1563,8 +1571,9 @@ i960-*-coff*) cxx_target_objs="i960-c.o" ;; i960-*-rtems) + xm_defines=POSIX tmake_file="i960/t-960bare t-rtems" - tm_file="${tm_file} dbxcoff.h i960/rtems.h" + tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/rtems.h rtems.h" if test x$enable_threads = xyes; then thread_file='rtems' fi @@ -2009,16 +2018,18 @@ m68k-*-psos*) float_format=m68k ;; m68k-*-rtemscoff*) + xm_defines=POSIX tmake_file="m68k/t-m68kbare t-rtems" - tm_file=m68k/rtems.h + tm_file="m68k/m68k-coff.h m68k/rtems.h rtems.h" float_format=m68k if test x$enable_threads = xyes; then thread_file='rtems' fi ;; m68k-*-rtemself*|m68k-*-rtems*) + xm_defines=POSIX tmake_file="m68k/t-m68kbare t-rtems m68k/t-crtstuff" - tm_file=m68k/rtemself.h + tm_file="m68k/m68k-none.h m68k/m68kelf.h dbxelf.h elfos.h m68k/m68kemb.h m68k/m68020-elf.h m68k/rtemself.h rtems.h" float_format=m68k extra_parts="crtbegin.o crtend.o" if test x$enable_threads = xyes; then @@ -2536,14 +2547,16 @@ mips64orion-*-elf*) tmake_file=mips/t-elf ;; mips64orion-*-rtems*) - tm_file="mips/elforion.h mips/elf64.h mips/rtems64.h" + xm_defines=POSIX + tm_file="mips/elforion.h mips/elf64.h mips/rtems64.h rtems.h" tmake_file="mips/t-elf t-rtems" if test x$enable_threads = xyes; then thread_file='rtems' fi ;; mips*-*-rtems*) - tm_file="mips/elf.h mips/rtems.h" + xm_defines=POSIX + tm_file="mips/elf.h mips/rtems.h rtems.h" tmake_file="mips/t-elf t-rtems" if test x$enable_threads = xyes; then thread_file='rtems' @@ -2740,7 +2753,7 @@ powerpc-*-eabi*) ;; powerpc-*-rtems*) xm_defines=POSIX - tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rtems.h rs6000/rtems.h" + tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/rtems.h rtems.h" tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm" if test x$enable_threads = xyes; then thread_file='rtems' @@ -2899,16 +2912,18 @@ sh64-*-elf*) fi ;; sh-*-rtemself*) + xm_defines=POSIX tmake_file="sh/t-sh sh/t-elf t-rtems" - tm_file="${tm_file} sh/elf.h sh/rtemself.h" + tm_file="${tm_file} sh/elf.h sh/rtemself.h rtems.h" float_format=sh if test x$enable_threads = xyes; then thread_file='rtems' fi ;; sh-*-rtems*) + xm_defines=POSIX tmake_file="sh/t-sh t-rtems" - tm_file="${tm_file} sh/rtems.h" + tm_file="${tm_file} sh/rtems.h rtems.h" float_format=sh if test x$enable_threads = xyes; then thread_file='rtems' @@ -3012,6 +3027,7 @@ sparc-*-lynxos*) tmake_file=sparc/t-sunos41 ;; sparc-*-rtemsaout*) + xm_defines=POSIX tmake_file="sparc/t-sparcbare t-rtems" tm_file="${tm_file} aoutos.h sparc/aout.h sparc/rtems.h rtems.h" if test x$enable_threads = xyes; then @@ -3019,6 +3035,7 @@ sparc-*-rtemsaout*) fi ;; sparc-*-rtems*|sparc-*-rtemself*) + xm_defines=POSIX tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sol2.h sparc/elf.h sparc/rtemself.h rtems.h" tmake_file="sparc/t-elf t-rtems" extra_parts="crti.o crtn.o crtbegin.o crtend.o" @@ -3231,7 +3248,8 @@ thumb*-*-*) *** when the -mthumb switch is given to the compiler." 1>&2; exit 1; } ;; v850-*-rtems*) - tm_file="dbxelf.h elfos.h svr4.h ${tm_file} v850/rtems.h" + xm_defines=POSIX + tm_file="dbxelf.h elfos.h svr4.h ${tm_file} v850/v850.h v850/rtems.h rtems.h" tmake_file="v850/t-v850 t-rtems" if test x$stabs = xyes then diff --git a/gcc/config/a29k/rtems.h b/gcc/config/a29k/rtems.h index e2adcc8fd5e..d5a633b380a 100644 --- a/gcc/config/a29k/rtems.h +++ b/gcc/config/a29k/rtems.h @@ -1,5 +1,5 @@ /* Definitions for rtems targeting a AMD A29K using COFF. - Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc. Contributed by Joel Sherrill (joel@OARcorp.com). This file is part of GNU CC. @@ -19,18 +19,13 @@ 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. */ -#include "a29k/a29k.h" - /* Specify predefined symbols in preprocessor. */ #undef CPP_PREDEFINES -#define CPP_PREDEFINES "-D_AM29K -D_AM29000 -D_EPI -Drtems -D__rtems__ \ +#define CPP_PREDEFINES "-D_AM29K -D_AM29000 -D_EPI -D__rtems__ \ -Asystem(rtems) -Acpu(a29k) -Amachine(a29k)" /* Generate calls to memcpy, memcmp and memset. */ #ifndef TARGET_MEM_FUNCTIONS #define TARGET_MEM_FUNCTIONS #endif - -/* Get machine-independent configuration parameters for RTEMS. */ -#include diff --git a/gcc/config/arm/rtems-elf.h b/gcc/config/arm/rtems-elf.h index 954f72b9882..65ed71e35ac 100644 --- a/gcc/config/arm/rtems-elf.h +++ b/gcc/config/arm/rtems-elf.h @@ -1,5 +1,5 @@ /* Definitions for RTEMS based ARM systems using ELF - Copyright (C) 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 2000, 2002 Free Software Foundation, Inc. This file is part of GNU CC. @@ -19,15 +19,13 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Run-time Target Specification. */ -#undef TARGET_VERSION #define TARGET_VERSION fputs (" (ARM/ELF RTEMS)", stderr); #define HAS_INIT_SECTION -#undef CPP_PREDEFINES -#define CPP_PREDEFINES "-Darm -Darm_elf -Drtems -D__rtems__ -D__ELF__ \ +#undef CPP_PREDEFINES +#define CPP_PREDEFINES "-D__rtems__ -D__ELF__ \ -Asystem(rtems) -Acpu(arm) -Amachine(arm)" -/*#undef INVOKE_main*/ - +#undef INVOKE_main diff --git a/gcc/config/c4x/rtems.h b/gcc/config/c4x/rtems.h index 97fa417cf6a..d4364dffa4e 100644 --- a/gcc/config/c4x/rtems.h +++ b/gcc/config/c4x/rtems.h @@ -1,5 +1,5 @@ /* Definitions of RTEMS executing on an TMS320C[34]x using coff - Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1999, 2002 Free Software Foundation, Inc. Contributed by Joel Sherrill (joel@OARcorp.com). This file is part of GNU CC. @@ -19,19 +19,12 @@ 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. */ -#include "c4x/c4x.h" - /* Specify predefined symbols in preprocessor. */ #undef CPP_PREDEFINES -#define CPP_PREDEFINES "-D__rtems__ -Asystem=rtems" +#define CPP_PREDEFINES "-D__rtems__ -Asystem=rtems -D__USE_INIT_FINI__" /* Generate calls to memcpy, memcmp and memset. */ #ifndef TARGET_MEM_FUNCTIONS #define TARGET_MEM_FUNCTIONS #endif - -/* Include machine independent RTEMS configuration parameters. */ -#include - -/* End of c4x/rtems.h. */ diff --git a/gcc/config/h8300/rtems.h b/gcc/config/h8300/rtems.h index 1ac2de92856..35e4d73c533 100644 --- a/gcc/config/h8300/rtems.h +++ b/gcc/config/h8300/rtems.h @@ -1,5 +1,5 @@ /* Definitions for rtems targeting a H8 - Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 2000, 2002 Free Software Foundation, Inc. Contributed by Joel Sherrill (joel@OARcorp.com). This file is part of GNU CC. @@ -19,19 +19,12 @@ 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. */ -#include "h8300/h8300.h" - -/* Specify predefined symbols in preprocessor. */ - #undef CPP_PREDEFINES #define CPP_PREDEFINES "-Dh8300 \ -D__LONG_MAX__=2147483647L -D__LONG_LONG_MAX__=2147483647L \ - -Drtems -D__rtems__ -Asystem(rtems) -Acpu(h8300) -Amachine(h8300)" + -D__rtems__ -Asystem(rtems) -Acpu(h8300) -Amachine(h8300)" /* Generate calls to memcpy, memcmp and memset. */ #ifndef TARGET_MEM_FUNCTIONS #define TARGET_MEM_FUNCTIONS #endif - -/* Get machine-independent configuration parameters for RTEMS. */ -#include diff --git a/gcc/config/i386/djgpp-rtems.h b/gcc/config/i386/djgpp-rtems.h index b8f4908e45e..551b666b765 100644 --- a/gcc/config/i386/djgpp-rtems.h +++ b/gcc/config/i386/djgpp-rtems.h @@ -1,7 +1,7 @@ /* Configuration for an i386 running RTEMS on top of MS-DOS with DJGPP v2.x. - Copyright (C) 1996,1999 Free Software Foundation, Inc. + Copyright (C) 1996, 1999, 2002 Free Software Foundation, Inc. Contributed by Joel Sherrill (joel@OARcorp.com). This file is part of GNU CC. @@ -21,20 +21,15 @@ 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. */ -#include "i386/djgpp.h" - /* Specify predefined symbols in preprocessor. */ #ifdef CPP_PREDEFINES #undef CPP_PREDEFINES #endif -#define CPP_PREDEFINES "-Dunix -DGO32 -DDJGPP=2 -DMSDOS \ +#define CPP_PREDEFINES "-Dunix -DGO32 -DDJGPP=2 -DMSDOS -D__rtems__ \ -Asystem=unix -Asystem=msdos -Asystem=rtems" /* Generate calls to memcpy, memcmp and memset. */ #ifndef TARGET_MEM_FUNCTIONS #define TARGET_MEM_FUNCTIONS #endif - -/* end of i386/djgpp-rtems.h */ - diff --git a/gcc/config/i386/rtems.h b/gcc/config/i386/rtems.h index 9101332bb03..c2381c79f6e 100644 --- a/gcc/config/i386/rtems.h +++ b/gcc/config/i386/rtems.h @@ -1,5 +1,5 @@ /* Definitions for rtems targeting an Intel i386 using coff. - Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 2000, 2002 Free Software Foundation, Inc. Contributed by Joel Sherrill (joel@OARcorp.com). This file is part of GNU CC. @@ -19,19 +19,12 @@ 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. */ -#include "i386/i386-coff.h" - /* Specify predefined symbols in preprocessor. */ #undef CPP_PREDEFINES -#define CPP_PREDEFINES "-Drtems -D__rtems__ -Asystem=rtems" +#define CPP_PREDEFINES "-D__rtems__ -Asystem=rtems" /* Generate calls to memcpy, memcmp and memset. */ #ifndef TARGET_MEM_FUNCTIONS #define TARGET_MEM_FUNCTIONS #endif - -/* Get machine-independent configuration parameters for RTEMS. */ -#include - -/* end of i386/rtems.h */ diff --git a/gcc/config/i386/rtemself.h b/gcc/config/i386/rtemself.h index 6e31f56b2e8..2ebc517cb1a 100644 --- a/gcc/config/i386/rtemself.h +++ b/gcc/config/i386/rtemself.h @@ -1,8 +1,6 @@ -/* Definitions for Intel 386 running Linux-based GNU systems with ELF format. - Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000 - Free Software Foundation, Inc. - Contributed by Eric Youngdale. - Modified for stabs-in-ELF by H.J. Lu. +/* Definitions for rtems targeting a ix86 using ELF. + Copyright (C) 1996, 1997, 2000, 2001, 2002 Free Software Foundation, Inc. + Contributed by Joel Sherrill (joel@OARcorp.com). This file is part of GNU CC. @@ -21,60 +19,14 @@ 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. */ -#define LINUX_DEFAULT_ELF +/* Specify predefined symbols in preprocessor. */ -#undef TARGET_VERSION -#define TARGET_VERSION fprintf (stderr, " (i386 RTEMS with ELF)"); - -/* The svr4 ABI for the i386 says that records and unions are returned - in memory. */ -#undef DEFAULT_PCC_STRUCT_RETURN -#define DEFAULT_PCC_STRUCT_RETURN 1 - -#undef DBX_REGISTER_NUMBER -#define DBX_REGISTER_NUMBER(n) svr4_dbx_register_map[n] - -/* Output assembler code to FILE to increment profiler label # LABELNO - for profiling a function entry. */ - -#undef FUNCTION_PROFILER -#define FUNCTION_PROFILER(FILE, LABELNO) \ -{ \ - if (flag_pic) \ - { \ - fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%edx\n", \ - LPREFIX, (LABELNO)); \ - fprintf (FILE, "\tcall *mcount@GOT(%%ebx)\n"); \ - } \ - else \ - { \ - fprintf (FILE, "\tmovl $%sP%d,%%edx\n", LPREFIX, (LABELNO)); \ - fprintf (FILE, "\tcall mcount\n"); \ - } \ -} - -#undef SIZE_TYPE -#define SIZE_TYPE "unsigned int" - -#undef PTRDIFF_TYPE -#define PTRDIFF_TYPE "int" - -#undef WCHAR_TYPE -#define WCHAR_TYPE "long int" - -#undef WCHAR_TYPE_SIZE -#define WCHAR_TYPE_SIZE BITS_PER_WORD - #undef CPP_PREDEFINES -#define CPP_PREDEFINES "-Drtems -D__rtems__ -Asystem=rtems" +#define CPP_PREDEFINES "-D__rtems__ -Asystem=rtems \ + -D__ELF__ -D__i386__ -D__USE_INIT_FINI__" -/* A C statement (sans semicolon) to output to the stdio stream - FILE the assembler definition of uninitialized global DECL named - NAME whose size is SIZE bytes and alignment is ALIGN bytes. - Try to use asm_output_aligned_bss to implement this macro. */ - -#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ - asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN) +#undef CPP_SPEC +#define CPP_SPEC "%(cpp_cpu) %{msoft-float:-D_SOFT_FLOAT}" #undef STARTFILE_SPEC #define STARTFILE_SPEC "crt0.o%s crti.o%s crtbegin.o%s" @@ -82,4 +34,7 @@ Boston, MA 02111-1307, USA. */ #undef ENDFILE_SPEC #define ENDFILE_SPEC "crtend.o%s crtn.o%s" -/* end of i386/rtemself.h */ +/* Generate calls to memcpy, memcmp and memset. */ +#ifndef TARGET_MEM_FUNCTIONS +#define TARGET_MEM_FUNCTIONS +#endif diff --git a/gcc/config/i386/t-rtems-i386 b/gcc/config/i386/t-rtems-i386 index d301ed96d5f..b57f4fd82df 100644 --- a/gcc/config/i386/t-rtems-i386 +++ b/gcc/config/i386/t-rtems-i386 @@ -12,3 +12,43 @@ crtn.o: $(srcdir)/config/i386/sol2-cn.asm $(GCC_PASSES) sed -e '/^!/d' <$(srcdir)/config/i386/sol2-cn.asm >crtn.s $(GCC_FOR_TARGET) -c -o crtn.o crtn.s +# We want fine grained libraries, so use the new code to build the +# floating point emulation libraries. +FPBIT = fp-bit.c +DPBIT = dp-bit.c + +LIB2FUNCS_EXTRA = xp-bit.c + +dp-bit.c: $(srcdir)/config/fp-bit.c + echo '#ifdef __LITTLE_ENDIAN__' > dp-bit.c + echo '#define FLOAT_BIT_ORDER_MISMATCH' >>dp-bit.c + echo '#endif' >> 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 __LITTLE_ENDIAN__' >> fp-bit.c + echo '#define FLOAT_BIT_ORDER_MISMATCH' >>fp-bit.c + echo '#endif' >> fp-bit.c + cat $(srcdir)/config/fp-bit.c >> fp-bit.c + +xp-bit.c: $(srcdir)/config/fp-bit.c + echo '#define EXTENDED_FLOAT_STUBS' > xp-bit.c + cat $(srcdir)/config/fp-bit.c >> xp-bit.c + +MULTILIB_OPTIONS = mcpu=i486/mcpu=pentium/mcpu=pentiumpro/mcpu=k6/mcpu=athlon \ +msoft-float mno-fp-ret-in-387 +MULTILIB_DIRNAMES= m486 mpentium mpentiumpro k6 athlon soft-float nofp +MULTILIB_MATCHES = msoft-float=mno-m80387 +MULTILIB_EXCEPTIONS = \ +mno-fp-ret-in-387 \ +mcpu=i486/*mno-fp-ret-in-387* \ +mcpu=pentium/*msoft-float* mcpu=pentium/*mno-fp-ret-in-387* \ +mcpu=pentiumpro/*msoft-float* mcpu=pentiumpro/*mno-fp-ret-in-387* \ +mcpu=k6/*msoft-float* mcpu=k6/*mno-fp-ret-in-387* \ +mcpu=athlon/*msoft-float* mcpu=athlon/*mno-fp-ret-in-387* + +EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o + +LIBGCC = stmp-multilib +INSTALL_LIBGCC = install-multilib diff --git a/gcc/config/i960/rtems.h b/gcc/config/i960/rtems.h index 7486a8bac98..d1dccc030e4 100644 --- a/gcc/config/i960/rtems.h +++ b/gcc/config/i960/rtems.h @@ -1,5 +1,5 @@ /* Definitions for rtems targeting an Intel i960. - Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 2000, 2002 Free Software Foundation, Inc. Contributed by Joel Sherrill (joel@OARcorp.com). This file is part of GNU CC. @@ -19,18 +19,13 @@ 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. */ -#include "i960/i960-coff.h" - /* Specify predefined symbols in preprocessor. */ #undef CPP_PREDEFINES -#define CPP_PREDEFINES "-Di960 -Di80960 -DI960 -DI80960 -Drtems -D__rtems__ \ +#define CPP_PREDEFINES "-Di960 -Di80960 -DI960 -DI80960 -D__rtems__ \ -Asystem=rtems -Acpu=i960 -Amachine=i960" /* Generate calls to memcpy, memcmp and memset. */ #ifndef TARGET_MEM_FUNCTIONS #define TARGET_MEM_FUNCTIONS #endif - -/* Get machine-independent configuration parameters for RTEMS. */ -#include diff --git a/gcc/config/m68k/rtems.h b/gcc/config/m68k/rtems.h index 0b0fb82b88d..89b51601eb4 100644 --- a/gcc/config/m68k/rtems.h +++ b/gcc/config/m68k/rtems.h @@ -1,5 +1,5 @@ /* Definitions for rtems targeting a Motorola m68k using coff. - Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 2000, 2002 Free Software Foundation, Inc. Contributed by Joel Sherrill (joel@OARcorp.com). This file is part of GNU CC. @@ -19,18 +19,13 @@ 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. */ -#include "m68k/m68k-coff.h" - /* Specify predefined symbols in preprocessor. */ #undef CPP_PREDEFINES -#define CPP_PREDEFINES "-Dmc68000 -Drtems -D__rtems__ \ +#define CPP_PREDEFINES "-Dmc68000 -D__rtems__ \ -Asystem=rtems -Acpu=mc68000 -Acpu=m68k -Amachine=m68k" /* Generate calls to memcpy, memcmp and memset. */ #ifndef TARGET_MEM_FUNCTIONS #define TARGET_MEM_FUNCTIONS #endif - -/* Get machine-independent configuration parameters for RTEMS. */ -#include diff --git a/gcc/config/m68k/rtemself.h b/gcc/config/m68k/rtemself.h index a8b32e6e90d..473ee25548b 100644 --- a/gcc/config/m68k/rtemself.h +++ b/gcc/config/m68k/rtemself.h @@ -1,5 +1,5 @@ /* Definitions for rtems targeting a Motorola m68k using elf. - Copyright (C) 1999, 2000, National Research Council of Canada. + Copyright (C) 1999, 2000, 2002 National Research Council of Canada. Contributed by Charles-Antoine Gauthier (charles.gauthier@nrc.ca). This file is part of GNU CC. @@ -27,7 +27,7 @@ Boston, MA 02111-1307, USA. */ /* Specify predefined symbols in preprocessor. */ #undef CPP_PREDEFINES -#define CPP_PREDEFINES "-Dmc68000 -Drtems -D__rtems__ -D__ELF__ \ +#define CPP_PREDEFINES "-Dmc68000 -D__rtems__ -D__ELF__ -D__USE_INIT_FINI__ \ -Asystem=rtems -Acpu=mc68000 -Acpu=m68k -Amachine=m68k" /* Generate calls to memcpy, memcmp and memset. */ @@ -60,8 +60,3 @@ Boston, MA 02111-1307, USA. */ /* Do I need this? */ #undef INVOKE__main - -/* Get machine-independent configuration parameters for RTEMS. */ -#include - -/* end of m68k/rtemself.h */ diff --git a/gcc/config/m68k/t-m68kbare b/gcc/config/m68k/t-m68kbare index e723ee6a4f1..d9651d1b75b 100644 --- a/gcc/config/m68k/t-m68kbare +++ b/gcc/config/m68k/t-m68kbare @@ -14,8 +14,8 @@ xfgnulib.c: $(srcdir)/config/m68k/fpgnulib.c MULTILIB_OPTIONS = m68000/m68020/m5200/mcpu32/m68040/m68060 m68881/msoft-float MULTILIB_DIRNAMES = -MULTILIB_MATCHES = m68000=mc68000 m68000=m68302 mcpu32=m68332 m68020=mc68020 -MULTILIB_EXCEPTIONS = m68000/msoft-float m5200/m68881 m5200/msoft-float mcpu32/m68881 mcpu32/msoft-float m68040/m68881 m68040/msoft-float m68060/m68881 m68060/msoft-float +MULTILIB_MATCHES = m68000=mc68000 m68000=m68302 mcpu32=m68332 m68020=mc68020 +MULTILIB_EXCEPTIONS = m68000/msoft-float m5200/m68881 m5200/msoft-float mcpu32/m68881 mcpu32/msoft-float m68040/m68681 m68060/m68681 LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib diff --git a/gcc/config/mips/rtems.h b/gcc/config/mips/rtems.h index 23463d7f81e..d11aae0aa1a 100644 --- a/gcc/config/mips/rtems.h +++ b/gcc/config/mips/rtems.h @@ -1,5 +1,5 @@ /* Definitions for rtems targeting a MIPS using ELF. - Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc. Contributed by Joel Sherrill (joel@OARcorp.com). This file is part of GNU CC. @@ -23,12 +23,9 @@ Boston, MA 02111-1307, USA. */ #undef CPP_PREDEFINES #define CPP_PREDEFINES "-Dmips -DMIPSEB -D_mips -D_MIPSEB \ - -Drtems -D__rtems__ -Asystem(rtems)" + -D__rtems__ -Asystem(rtems)" /* Generate calls to memcpy, memcmp and memset. */ #ifndef TARGET_MEM_FUNCTIONS #define TARGET_MEM_FUNCTIONS #endif - -/* Get machine-independent configuration parameters for RTEMS. */ -#include diff --git a/gcc/config/mips/rtems64.h b/gcc/config/mips/rtems64.h index aedb02a87b5..78281b6d818 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, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc. Contributed by Joel Sherrill (joel@OARcorp.com). This file is part of GNU CC. @@ -23,7 +23,7 @@ Boston, MA 02111-1307, USA. */ #undef CPP_PREDEFINES #define CPP_PREDEFINES "-Dmips -DMIPSEB -DR4000 -D_mips -D_MIPSEB -D_R4000 \ - -Drtems -D__rtems__ -Asystem=rtems" + -D__rtems__ -Asystem=rtems" /* Generate calls to memcpy, memcmp and memset. */ #ifndef TARGET_MEM_FUNCTIONS @@ -40,8 +40,3 @@ Boston, MA 02111-1307, USA. */ #undef STARTFILE_SPEC #undef ENDFILE_SPEC - -/* End of undefines to turn off .ctor/.dtor section support */ - -/* Get machine-independent configuration parameters for RTEMS. */ -#include diff --git a/gcc/config/pa/rtems.h b/gcc/config/pa/rtems.h index c3165ecd9b9..10b892e796b 100644 --- a/gcc/config/pa/rtems.h +++ b/gcc/config/pa/rtems.h @@ -1,5 +1,5 @@ /* Definitions of target machine for GNU compiler, for PRO. - Copyright (C) 1997, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 2000, 2002 Free Software Foundation, Inc. Contributed by Joel Sherrill (joel@OARcorp.com). This file is part of GNU CC. @@ -23,12 +23,9 @@ Boston, MA 02111-1307, USA. */ #undef CPP_PREDEFINES #define CPP_PREDEFINES "-Dhppa -DPWB -Acpu=hppa -Amachine=hppa \ - -Drtems -D__rtems__ -Asystem=rtems" + -D__rtems__ -Asystem=rtems" /* Generate calls to memcpy, memcmp and memset. */ #ifndef TARGET_MEM_FUNCTIONS #define TARGET_MEM_FUNCTIONS #endif - -/* Get machine-independent configuration parameters for RTEMS. */ -#include diff --git a/gcc/config/rs6000/rtems.h b/gcc/config/rs6000/rtems.h index 6810d38a6b4..cb5cac51b74 100644 --- a/gcc/config/rs6000/rtems.h +++ b/gcc/config/rs6000/rtems.h @@ -1,5 +1,5 @@ /* Definitions for rtems targeting a PowerPC using elf. - Copyright (C) 1996, 1997, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Joel Sherrill (joel@OARcorp.com). This file is part of GNU CC. @@ -22,7 +22,7 @@ Boston, MA 02111-1307, USA. */ /* Specify predefined symbols in preprocessor. */ #undef CPP_PREDEFINES -#define CPP_PREDEFINES "-DPPC -Drtems -D__rtems__ \ +#define CPP_PREDEFINES "-DPPC -D__rtems__ \ -Asystem=rtems -Acpu=powerpc -Amachine=powerpc" /* Generate calls to memcpy, memcmp and memset. */ diff --git a/gcc/config/sh/rtems.h b/gcc/config/sh/rtems.h index 014760ec507..3f8ce8b6034 100644 --- a/gcc/config/sh/rtems.h +++ b/gcc/config/sh/rtems.h @@ -1,5 +1,5 @@ /* Definitions for rtems targeting a SH using COFF. - Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc. Contributed by Joel Sherrill (joel@OARcorp.com). This file is part of GNU CC. @@ -22,13 +22,10 @@ Boston, MA 02111-1307, USA. */ /* Specify predefined symbols in preprocessor. */ #undef CPP_PREDEFINES -#define CPP_PREDEFINES "-D__sh__ -Drtems -D__rtems__ \ +#define CPP_PREDEFINES "-D__sh__ -D__rtems__ \ -Asystem=rtems -Acpu=sh -Amachine=sh" /* Generate calls to memcpy, memcmp and memset. */ #ifndef TARGET_MEM_FUNCTIONS #define TARGET_MEM_FUNCTIONS #endif - -/* Get machine-independent configuration parameters for RTEMS. */ -#include diff --git a/gcc/config/sh/rtemself.h b/gcc/config/sh/rtemself.h index db7bf7da079..552d77a9b60 100644 --- a/gcc/config/sh/rtemself.h +++ b/gcc/config/sh/rtemself.h @@ -1,5 +1,5 @@ /* Definitions for rtems targeting a SH using elf. - Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc. Contributed by Joel Sherrill (joel@OARcorp.com). This file is part of GNU CC. @@ -22,13 +22,10 @@ Boston, MA 02111-1307, USA. */ /* Specify predefined symbols in preprocessor. */ #undef CPP_PREDEFINES -#define CPP_PREDEFINES "-D__sh__ -D__ELF__ -Drtems -D__rtems__ \ +#define CPP_PREDEFINES "-D__sh__ -D__ELF__ -D__rtems__ \ -Asystem=rtems -Acpu=sh -Amachine=sh" /* Generate calls to memcpy, memcmp and memset. */ #ifndef TARGET_MEM_FUNCTIONS #define TARGET_MEM_FUNCTIONS #endif - -/* Get machine-independent configuration parameters for RTEMS. */ -#include diff --git a/gcc/config/sparc/rtems.h b/gcc/config/sparc/rtems.h index 9db8049d4cf..f6947ea645e 100644 --- a/gcc/config/sparc/rtems.h +++ b/gcc/config/sparc/rtems.h @@ -1,5 +1,5 @@ /* Definitions for rtems targeting a SPARC using a.out. - Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 2000, 2002 Free Software Foundation, Inc. Contributed by Joel Sherrill (joel@OARcorp.com). This file is part of GNU CC. @@ -23,7 +23,7 @@ Boston, MA 02111-1307, USA. */ /* Specify predefined symbols in preprocessor. */ #undef CPP_PREDEFINES -#define CPP_PREDEFINES "-Dsparc -D__GCC_NEW_VARARGS__ -Drtems -D__rtems__ \ +#define CPP_PREDEFINES "-Dsparc -D__GCC_NEW_VARARGS__ -D__rtems__ \ -Asystem=rtems" /* Generate calls to memcpy, memcmp and memset. */ diff --git a/gcc/config/sparc/rtemself.h b/gcc/config/sparc/rtemself.h index 108ff33ca44..6faa9be55f7 100644 --- a/gcc/config/sparc/rtemself.h +++ b/gcc/config/sparc/rtemself.h @@ -1,5 +1,5 @@ /* Definitions for rtems targeting a SPARC using ELF. - Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 2000, 2002 Free Software Foundation, Inc. Contributed by Joel Sherrill (joel@OARcorp.com). This file is part of GNU CC. @@ -22,8 +22,8 @@ Boston, MA 02111-1307, USA. */ /* Specify predefined symbols in preprocessor. */ #undef CPP_PREDEFINES -#define CPP_PREDEFINES "-Dsparc -D__GCC_NEW_VARARGS__ -Drtems -D__rtems__ \ - -Asystem=rtems" +#define CPP_PREDEFINES "-Dsparc -D__GCC_NEW_VARARGS__ -D__rtems__ \ + -D__USE_INIT_FINI__ -Asystem=rtems" /* Generate calls to memcpy, memcmp and memset. */ #ifndef TARGET_MEM_FUNCTIONS diff --git a/gcc/config/v850/rtems.h b/gcc/config/v850/rtems.h index 6317e5da455..4f49ba6f804 100644 --- a/gcc/config/v850/rtems.h +++ b/gcc/config/v850/rtems.h @@ -1,5 +1,5 @@ /* Definitions for rtems targeting a v850 using elf - Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 2000, 2002 Free Software Foundation, Inc. Contributed by Joel Sherrill (joel@OARcorp.com). This file is part of GNU CC. @@ -19,20 +19,13 @@ 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. */ -#include "v850/v850.h" - /* Specify predefined symbols in preprocessor. */ #undef CPP_PREDEFINES -#define CPP_PREDEFINES "-D__v851__ -D__v850 -Drtems \ +#define CPP_PREDEFINES "-D__v851__ -D__v850 -D__rtems__ \ -Asystem=rtems -Acpu=v850 -Amachine=v850" /* Generate calls to memcpy, memcmp and memset. */ #ifndef TARGET_MEM_FUNCTIONS #define TARGET_MEM_FUNCTIONS #endif - -/* Get machine-independent configuration parameters for RTEMS. */ -#include - -/* end of v850/rtems.h */ diff --git a/gcc/gthr-rtems.h b/gcc/gthr-rtems.h index eca281ef2f0..7a2264b6bfb 100644 --- a/gcc/gthr-rtems.h +++ b/gcc/gthr-rtems.h @@ -1,7 +1,7 @@ /* RTEMS threads compatibily routines for libgcc2 and libobjc. by: Rosimildo da Silva( rdasilva@connecttel.com ) */ /* Compile this one with gcc. */ -/* Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1999, 2000, 2002 Free Software Foundation, Inc. This file is part of GCC. @@ -30,6 +30,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #ifndef GCC_GTHR_RTEMS_H #define GCC_GTHR_RTEMS_H +#ifdef __cplusplus +extern "C" { +#endif #define __GTHREADS 1 @@ -124,4 +127,8 @@ __gthread_mutex_unlock (__gthread_mutex_t *mutex) return rtems_gxx_mutex_unlock( mutex ); } +#ifdef __cplusplus +} +#endif + #endif /* ! GCC_GTHR_RTEMS_H */