Initial revision
[official-gcc.git] / gcc / config / m68k / vxm68k.h
blob063ded86a63aa2424bd54b7f58117da1f03ac405
1 /* Definitions of target machine for GNU compiler. Vxworks m68k version.
2 Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc.
4 This file is part of GNU CC.
6 GNU CC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
11 GNU CC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU CC; see the file COPYING. If not, write to
18 the Free Software Foundation, 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
21 /* This comment is here to see if it will keep Sun's cpp from dying. */
23 #include "m68k/m68k-none.h"
24 #include "aoutos.h"
26 #undef CPP_PREDEFINES
27 #define CPP_PREDEFINES "-Dmc68000 -D__vxworks -D__vxworks_5 -Acpu(m68k) -Amachine(m68k)"
29 /* The default value for -DCPU=. */
30 #if TARGET_CPU_DEFAULT == M68K_CPU_m68k || TARGET_CPU_DEFAULT == M68K_CPU_m68020
31 #define CPP_SUBTARGET_CPU_DEFAULT_SPEC "-DCPU=MC68020"
32 #else
33 #if TARGET_CPU_DEFAULT == M68K_CPU_m68000
34 #define CPP_SUBTARGET_CPU_DEFAULT_SPEC "-DCPU=MC68000"
35 #else
36 #if TARGET_CPU_DEFAULT == M68K_CPU_m68030
37 #define CPP_SUBTARGET_CPU_DEFAULT_SPEC "-DCPU=MC68030"
38 #else
39 #if TARGET_CPU_DEFAULT == M68K_CPU_m68040
40 #define CPP_SUBTARGET_CPU_DEFAULT_SPEC "-DCPU=MC68040"
41 #else
42 #if TARGET_CPU_DEFAULT == M68K_CPU_m68302
43 #define CPP_SUBTARGET_CPU_DEFAULT_SPEC "-DCPU=MC68302"
44 #else
45 #if TARGET_CPU_DEFAULT == M68K_CPU_m68332
46 #define CPP_SUBTARGET_CPU_DEFAULT_SPEC "-DCPU=MC68332"
47 #else
48 Unrecognized value in TARGET_CPU_DEFAULT.
49 #endif
50 #endif
51 #endif
52 #endif
53 #endif
54 #endif
56 #undef SUBTARGET_EXTRA_SPECS
57 #define SUBTARGET_EXTRA_SPECS \
58 { "cpp_subtarget_cpu_default", CPP_SUBTARGET_CPU_DEFAULT_SPEC }
60 /* Vxworks header files require that the macro CPU be set. */
61 /* ??? The previous code didn't set CPU if -ansi. */
62 #undef CPP_SUBTARGET_SPEC
63 #define CPP_SUBTARGET_SPEC "\
64 %{m68000:-DCPU=MC68000 }%{m68010:-DCPU=MC68010 }%{m68020:-DCPU=MC68020 }%{mc68020:-DCPU=MC68020 }%{m68030:-DCPU=MC68030 }%{m68040:-DCPU=MC68040 }%{m68020-40:-DCPU=MC68020 }%{m68302:-DCPU=MC68000 }%{m68332:-DCPU=CPU32 } \
65 %{!mc68000:%{!m68000:%{!m68010:%{!mc68020:%{!m68020:%{!m68030:%{!m68040:%{!m68020-40:%{!m68302:%{!m68332:%(cpp_subtarget_cpu_default) }}}}}}}}}} \
68 #define DBX_DEBUGGING_INFO
69 #undef SDB_DEBUGGING_INFO
71 /* These are the official values from WRS. */
72 #undef WCHAR_TYPE
73 #define WCHAR_TYPE "char"
74 #undef WCHAR_TYPE_SIZE
75 #define WCHAR_TYPE_SIZE 8
76 #undef PTRDIFF_TYPE
77 #define PTRDIFF_TYPE "long int"
78 #undef SIZE_TYPE
79 #define SIZE_TYPE "unsigned int"
81 /* VxWorks does all the library stuff itself. */
83 #define LIB_SPEC ""
85 /* Provide required defaults for linker -e. */
87 #define LINK_SPEC "%{!nostdlib:%{!r*:%{!e*:-e start}}}"
89 /* VxWorks provides the functionality of crt0.o and friends itself. */
91 #define STARTFILE_SPEC ""
93 /* Every structure or union's size must be a multiple of 2 bytes. */
95 #define STRUCTURE_SIZE_BOUNDARY 16
97 /* Allow folding division by zero. */
98 #define REAL_INFINITY
100 /* GCC is the primary compiler for VxWorks, so we don't need this. */
101 #undef PCC_STATIC_STRUCT_RETURN