1 /* Definitions of target machine for GCC,
2 for SPARC running in an embedded environment using the ELF file format.
3 Copyright (C) 2005 Free Software Foundation, Inc.
5 This file is part of GCC.
7 GCC 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)
12 GCC 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.
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING. If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
23 #define TARGET_VERSION fprintf (stderr, " (sparc-elf)")
26 #define TARGET_DEFAULT MASK_FPU
28 /* Don't assume anything about the header files. */
29 #define NO_IMPLICIT_EXTERN_C
31 /* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
32 It's safe to pass -s always, even if -g is not used. */
35 "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s \
36 %{fpic|fpie|fPIC|fPIE:-K PIC} %(asm_cpu)"
38 /* Use the default. */
42 #define STARTFILE_SPEC "crt0.o%s crti.o%s crtbegin.o%s"
45 #define ENDFILE_SPEC \
46 "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
49 /* Don't set the target flags, this is done by the linker script */
53 /* This defines which switch letters take arguments.
54 It is as in svr4.h but with -R added. */
55 #undef SWITCH_TAKES_ARG
56 #define SWITCH_TAKES_ARG(CHAR) \
57 (DEFAULT_SWITCH_TAKES_ARG(CHAR) \
62 #undef LOCAL_LABEL_PREFIX
63 #define LOCAL_LABEL_PREFIX "."
65 /* This is how to store into the string LABEL
66 the symbol_ref name of an internal numbered label where
67 PREFIX is the class of label and NUM is the number within the class.
68 This is suitable for output with `assemble_name'. */
70 #undef ASM_GENERATE_INTERNAL_LABEL
71 #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
72 sprintf ((LABEL), "*.L%s%ld", (PREFIX), (long)(NUM))
74 /* ??? Inherited from sol2.h. Probably wrong. */
76 #define WCHAR_TYPE "long int"
78 #undef WCHAR_TYPE_SIZE
79 #define WCHAR_TYPE_SIZE BITS_PER_WORD
81 /* ??? until fixed. */
82 #undef LONG_DOUBLE_TYPE_SIZE
83 #define LONG_DOUBLE_TYPE_SIZE 64