1 /* Definitions of target machine for GNU compiler. Vxworks m68k version.
2 Copyright (C) 1994, 1996, 1997, 1998 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)
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"
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"
33 #if TARGET_CPU_DEFAULT == M68K_CPU_m68000
34 #define CPP_SUBTARGET_CPU_DEFAULT_SPEC "-DCPU=MC68000"
36 #if TARGET_CPU_DEFAULT == M68K_CPU_m68030
37 #define CPP_SUBTARGET_CPU_DEFAULT_SPEC "-DCPU=MC68030"
39 #if TARGET_CPU_DEFAULT == M68K_CPU_m68040
40 #define CPP_SUBTARGET_CPU_DEFAULT_SPEC "-DCPU=MC68040"
42 #if TARGET_CPU_DEFAULT == M68K_CPU_m68302
43 #define CPP_SUBTARGET_CPU_DEFAULT_SPEC "-DCPU=MC68302"
45 #if TARGET_CPU_DEFAULT == M68K_CPU_m68332
46 #define CPP_SUBTARGET_CPU_DEFAULT_SPEC "-DCPU=MC68332"
48 Unrecognized value in TARGET_CPU_DEFAULT
.
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. */
73 #define WCHAR_TYPE "char"
74 #undef WCHAR_TYPE_SIZE
75 #define WCHAR_TYPE_SIZE 8
77 #define PTRDIFF_TYPE "long int"
79 #define SIZE_TYPE "unsigned int"
81 /* VxWorks does all the library stuff itself. */
85 /* Provide required defaults for linker. */
87 #define LINK_SPEC "-r"
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 /* GCC is the primary compiler for VxWorks, so we don't need this. */
98 #undef PCC_STATIC_STRUCT_RETURN
100 /* Restrict use of 128 bit floating-point by default since VxWorks doesn't
101 have the proper accuracy routines for that size; this is not done because
102 the hardware doesn't support it, despite the name. */
103 #define WIDEST_HARDWARE_FP_SIZE 64