1 /* Xtensa/Elf configuration.
2 Derived from the configuration for GCC for Intel i386 running Linux.
3 Copyright (C) 2001 Free Software Foundation, Inc.
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2, or (at your option) any later
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
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 the Free
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
22 /* Don't assume anything about the header files. */
23 #define NO_IMPLICIT_EXTERN_C
26 #define ASM_APP_ON "#APP\n"
29 #define ASM_APP_OFF "#NO_APP\n"
32 #undef MD_STARTFILE_PREFIX
35 #define TARGET_VERSION fputs (" (Xtensa/ELF)", stderr);
38 #define SIZE_TYPE "unsigned int"
41 #define PTRDIFF_TYPE "int"
44 #define WCHAR_TYPE "int"
46 #undef WCHAR_TYPE_SIZE
47 #define WCHAR_TYPE_SIZE BITS_PER_WORD
50 #define ASM_SPEC "%{v} %{mno-density:--no-density} \
51 %{mtext-section-literals:--text-section-literals} \
52 %{mno-text-section-literals:--no-text-section-literals} \
53 %{mtarget-align:--target-align} \
54 %{mno-target-align:--no-target-align} \
55 %{mlongcalls:--longcalls} \
56 %{mno-longcalls:--no-longcalls}"
61 #define LIB_SPEC "-lc -lsim -lc -lhandlers-sim"
64 #define STARTFILE_SPEC "crt1-sim%O%s crti%O%s crtbegin%O%s _vectors%O%s"
67 #define ENDFILE_SPEC "crtend%O%s crtn%O%s"
74 %{rdynamic:-export-dynamic} \
78 #define CPP_PREDEFINES "-D__XTENSA__ -D__ELF__ -Acpu=xtensa -Amachine=xtensa"
80 /* Local compiler-generated symbols must have a prefix that the assembler
81 understands. By default, this is $, although some targets (e.g.,
82 NetBSD-ELF) need to override this. */
84 #ifndef LOCAL_LABEL_PREFIX
85 #define LOCAL_LABEL_PREFIX "."
88 /* By default, external symbols do not have an underscore prepended. */
90 #ifndef USER_LABEL_PREFIX
91 #define USER_LABEL_PREFIX ""
94 /* Define this macro if the assembler does not accept the character
95 "." in label names. By default constructors and destructors in G++
96 have names that use ".". If this macro is defined, these names
97 are rewritten to avoid ".". */
98 #define NO_DOT_IN_LABEL
100 /* Define NO_DOLLAR_IN_LABEL in your favorite tm file if your assembler
101 doesn't allow $ in symbol names. */
102 #undef NO_DOLLAR_IN_LABEL
104 /* Do not force "-fpic" for this target. */
105 #define XTENSA_ALWAYS_PIC 0
107 /* Redefine the standard ELF version of ASM_DECLARE_FUNCTION_SIZE to
108 allow adding the ".end literal_prefix" directive at the end of the
110 #undef ASM_DECLARE_FUNCTION_SIZE
111 #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \
114 if (!flag_inhibit_size_directive) \
117 static int labelno; \
121 ASM_GENERATE_INTERNAL_LABEL (label, "Lfe", labelno); \
122 ASM_OUTPUT_INTERNAL_LABEL (FILE, "Lfe", labelno); \
124 fprintf (FILE, "%s", SIZE_ASM_OP); \
125 assemble_name (FILE, (FNAME)); \
126 fprintf (FILE, ","); \
127 assemble_name (FILE, label); \
128 fprintf (FILE, "-"); \
129 assemble_name (FILE, (FNAME)); \
132 XTENSA_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL); \