+2002-04-12 Eric Norum <eric.norum@usask.ca>
+
+ * config/rtems.h, config/a29k/rtems.h, config/arm/rtems-elf.h,
+ config/c4x/rtems.h, config/h8300/rtems.h, config/i386/rtems.h,
+ config/i386/rtemself.h, config/i960/rtems.h, config/m68k/rtems.h,
+ config/m68k/rtemself.h, config/mips/rtems.h, config/mips/rtems64.h,
+ config/pa/rtems.h, config/rs6000/rtems.h, config/sh/rtems.h,
+ config/sh/rtemself.h, config/sparc/rtems.h, config/sparc/rtemself.h,
+ config/v850/rtems.h (*-rtems*): Cleanup pass to move common
+ definitions to config/rtems.h and make the targets more similar.
+
Fri Apr 12 08:06:54 2002 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* expr.c (expand_assigment): Remove duplicate conversions #ifdef
#undef CPP_PREDEFINES
#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
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-D__rtems__ -D__ELF__ -Asystem=rtems"
-
-#undef INVOKE_main
-
#undef CPP_PREDEFINES
#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
#define CPP_PREDEFINES "-Dh8300 \
-D__LONG_MAX__=2147483647L -D__LONG_LONG_MAX__=2147483647L \
-D__rtems__ -Asystem=rtems"
-
-/* Generate calls to memcpy, memcmp and memset. */
-#ifndef TARGET_MEM_FUNCTIONS
-#define TARGET_MEM_FUNCTIONS
-#endif
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (80386, RTEMS)");
-
-/* Generate calls to memcpy, memcmp and memset. */
-#ifndef TARGET_MEM_FUNCTIONS
-#define TARGET_MEM_FUNCTIONS
-#endif
/* Specify predefined symbols in preprocessor. */
+#include <i386/i386elf.h>
+
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-D__rtems__ -Asystem=rtems \
-D__ELF__ -D__i386__ -D__USE_INIT_FINI__"
#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"
-
-#undef ENDFILE_SPEC
-#define ENDFILE_SPEC "crtend.o%s crtn.o%s"
-
-/* Generate calls to memcpy, memcmp and memset. */
-#ifndef TARGET_MEM_FUNCTIONS
-#define TARGET_MEM_FUNCTIONS
-#endif
#undef CPP_PREDEFINES
#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
#undef CPP_PREDEFINES
#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
#define MOTOROLA /* Use Motorola syntax rather than MIT. */
-#include "m68k/m68020-elf.h"
-
/* Specify predefined symbols in preprocessor. */
#undef CPP_PREDEFINES
#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. */
-#ifndef TARGET_MEM_FUNCTIONS
-#define TARGET_MEM_FUNCTIONS
-#endif
-
-/*
- * Each RTEMS BSP provides its own crt0 and linker script. Unfortunately
- * this means that crt0 and the linker script are not available as
- * each tool is configured. Without a crt0 and linker script, m68k ELF
- * targets do not successfully link "conftest.c" during the configuration
- * process. RTEMS supplies a crt0.c that provides all the symbols required
- * to successfully link a program. The resulting program will not run
- * but this is enough to satisfy the autoconf macro AC_PROG_CC.
- * Override STARTFILE_SPEC to use the fake crt0.o supplied by rtems.
- */
-#undef STARTFILE_SPEC
-#define STARTFILE_SPEC "crt0.o%s"
-
-/*
- * Redefine INIT_SECTION_ASM_OP and FINI_SECTION_ASM_OP. This is the easiest
- * way to process constructors, destructors, and the exception frame
- * information at startup.
- */
-#undef INIT_SECTION_ASM_OP
-#define INIT_SECTION_ASM_OP "\t.section\t.init"
-#undef FINI_SECTION_ASM_OP
-#define FINI_SECTION_ASM_OP "\t.section\t.fini"
-
-/* Do I need this? */
-#undef INVOKE__main
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-Dmips -DMIPSEB -D_mips -D_MIPSEB \
-D__rtems__ -Asystem=rtems"
-
-/* Generate calls to memcpy, memcmp and memset. */
-#ifndef TARGET_MEM_FUNCTIONS
-#define TARGET_MEM_FUNCTIONS
-#endif
#define CPP_PREDEFINES "-Dmips -DMIPSEB -DR4000 -D_mips -D_MIPSEB -D_R4000 \
-D__rtems__ -Asystem=rtems"
-/* Generate calls to memcpy, memcmp and memset. */
-#ifndef TARGET_MEM_FUNCTIONS
-#define TARGET_MEM_FUNCTIONS
-#endif
-
#undef EXTRA_SECTIONS
#define EXTRA_SECTIONS in_sdata, in_rdata
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-Dhppa -DPWB -Acpu=hppa -Amachine=hppa \
-D__rtems__ -Asystem=rtems"
-
-/* Generate calls to memcpy, memcmp and memset. */
-#ifndef TARGET_MEM_FUNCTIONS
-#define TARGET_MEM_FUNCTIONS
-#endif
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-DPPC -D__rtems__ \
-Asystem=rtems -Acpu=powerpc -Amachine=powerpc"
-
-/* Generate calls to memcpy, memcmp and memset. */
-#ifndef TARGET_MEM_FUNCTIONS
-#define TARGET_MEM_FUNCTIONS
-#endif
-
-#undef STARTFILE_DEFAULT_SPEC
-#define STARTFILE_DEFAULT_SPEC "crt0.o%s"
/* Configuration common to all targets running RTEMS.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2002 Free Software Foundation, Inc.
This file is part of GNU CC.
/* The system headers under RTEMS are C++-aware. */
#define NO_IMPLICIT_EXTERN_C
+
+/* Generate calls to memcpy, memcmp and memset. */
+#ifndef TARGET_MEM_FUNCTIONS
+#define TARGET_MEM_FUNCTIONS
+#endif
+
+/*
+ * Dummy start/end specification to let linker work as
+ * needed by autoconf scripts using this compiler.
+ */
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC "crt0.o%s crti.o%s crtbegin.o%s"
+
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC "crtend.o%s crtn.o%s"
#undef CPP_PREDEFINES
#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
#undef CPP_PREDEFINES
#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
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-Dsparc -D__GCC_NEW_VARARGS__ -D__rtems__ \
-Asystem=rtems"
-
-/* Generate calls to memcpy, memcmp and memset. */
-#ifndef TARGET_MEM_FUNCTIONS
-#define TARGET_MEM_FUNCTIONS
-#endif
#undef CPP_PREDEFINES
#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
-#define TARGET_MEM_FUNCTIONS
-#endif
#undef CPP_PREDEFINES
#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