OSDN Git Service

definitions in config/m[368]*:
[pf3gnuchains/gcc-fork.git] / gcc / config / m68k / rtemself.h
1 /* Definitions for rtems targeting a Motorola m68k using elf.
2    Copyright (C) 1999, 2000, National Research Council of Canada.
3    Contributed by Charles-Antoine Gauthier (charles.gauthier@nrc.ca).
4
5 This file is part of GNU CC.
6
7 GNU CC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
10 any later version.
11
12 GNU CC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GNU CC; see the file COPYING.  If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA.  */
21
22
23 #define MOTOROLA       /* Use Motorola syntax rather than MIT.  */
24
25 #include "m68k/m68020-elf.h"
26
27 /* Specify predefined symbols in preprocessor.  */
28
29 #undef CPP_PREDEFINES
30 #define CPP_PREDEFINES "-Dmc68000 -Drtems -D__rtems__ -D__ELF__ \
31    -Asystem(rtems) -Acpu(mc68000) -Acpu(m68k) -Amachine(m68k)"
32
33 /* Generate calls to memcpy, memcmp and memset.  */
34 #ifndef TARGET_MEM_FUNCTIONS
35 #define TARGET_MEM_FUNCTIONS
36 #endif
37
38 /*
39  *  Each RTEMS BSP provides its own crt0 and linker script.  Unfortunately
40  *  this means that crt0 and the linker script are not available as
41  *  each tool is configured.  Without a crt0 and linker script, m68k ELF
42  *  targets do not successfully link "conftest.c" during the configuration
43  *  process.  RTEMS supplies a crt0.c that provides all the symbols required
44  *  to successfully link a program.  The resulting program will not run 
45  *  but this is enough to satisfy the autoconf macro AC_PROG_CC.
46  *  Override STARTFILE_SPEC to use the fake crt0.o supplied by rtems.
47  */
48 #undef STARTFILE_SPEC
49 #define STARTFILE_SPEC "crt0.o%s"
50
51 /*
52  *  Redefine INIT_SECTION_ASM_OP and FINI_SECTION_ASM_OP. This is the easiest
53  *  way to process constructors, destructors, and the exception frame
54  *  information at startup.
55  */
56 #undef INIT_SECTION_ASM_OP
57 #define INIT_SECTION_ASM_OP    "\t.section\t.init"
58 #undef FINI_SECTION_ASM_OP
59 #define FINI_SECTION_ASM_OP    "\t.section\t.fini"
60
61 #undef EH_FRAME_SECTION_ASM_OP
62 #define EH_FRAME_SECTION_ASM_OP        "\t.section\t.eh_frame"
63
64 /* Do I need this? */
65 #undef INVOKE__main
66
67 /* Get machine-independent configuration parameters for RTEMS.  */
68 #include <rtems.h>
69
70 /* end of m68k/rtemself.h */