1 /* Definitions of target machine for GNU compiler. Vxworks m68k version. 2 Copyright (C) 1994, 1996, 1997, 1998 Free Software Foundation, Inc. 3 4 This file is part of GNU CC. 5 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. 10 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. 15 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. */ 20 21 /* This comment is here to see if it will keep Sun's cpp from dying. */ 22 23 #include "m68k/m68k-none.h" 24 #include "aoutos.h" 25 26 #undef CPP_PREDEFINES 27 #define CPP_PREDEFINES "-Dmc68000 -D__vxworks -D__vxworks_5 -Acpu=m68k -Amachine=m68k" 28 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 55 56 #undef SUBTARGET_EXTRA_SPECS 57 #define SUBTARGET_EXTRA_SPECS \ 58 { "cpp_subtarget_cpu_default", CPP_SUBTARGET_CPU_DEFAULT_SPEC } 59 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) }}}}}}}}}} \ 66 " 67 68 #define DBX_DEBUGGING_INFO 1 69 #undef SDB_DEBUGGING_INFO 70 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" 80 81 /* VxWorks does all the library stuff itself. */ 82 83 #define LIB_SPEC "" 84 85 /* Provide required defaults for linker. */ 86 87 #define LINK_SPEC "-r" 88 89 /* VxWorks provides the functionality of crt0.o and friends itself. */ 90 91 #define STARTFILE_SPEC "" 92 93 /* Every structure or union's size must be a multiple of 2 bytes. */ 94 95 #define STRUCTURE_SIZE_BOUNDARY 16 96 97 /* GCC is the primary compiler for VxWorks, so we don't need this. */ 98 #undef PCC_STATIC_STRUCT_RETURN 99 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 104