* config/xtensa/elf.h (ASM_SPEC): Remove no-density option. Reformat.
[official-gcc.git] / gcc / config / xtensa / linux.h
blobef5aae04f63e08e69e3e57c97afdb09fe2fe81b9
1 /* Xtensa Linux configuration.
2 Derived from the configuration for GCC for Intel i386 running Linux.
3 Copyright (C) 2001, 2002, 2003 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
10 version.
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
15 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 the Free
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20 02111-1307, USA. */
22 #define TARGET_OS_CPP_BUILTINS() \
23 do { \
24 builtin_define_std ("linux"); \
25 builtin_define_std ("unix"); \
26 builtin_define ("__gnu_linux__"); \
27 builtin_assert ("system=posix"); \
28 } while (0)
30 #undef SUBTARGET_CPP_SPEC
31 #define SUBTARGET_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
33 #undef TARGET_VERSION
34 #define TARGET_VERSION fputs (" (Xtensa GNU/Linux with ELF)", stderr);
36 #undef WCHAR_TYPE
37 #define WCHAR_TYPE "long int"
39 #undef WCHAR_TYPE_SIZE
40 #define WCHAR_TYPE_SIZE 32
42 #undef ASM_SPEC
43 #define ASM_SPEC \
44 "%{v} \
45 %{mtext-section-literals:--text-section-literals} \
46 %{mno-text-section-literals:--no-text-section-literals} \
47 %{mtarget-align:--target-align} \
48 %{mno-target-align:--no-target-align} \
49 %{mlongcalls:--longcalls} \
50 %{mno-longcalls:--no-longcalls}"
52 #undef LINK_SPEC
53 #define LINK_SPEC \
54 "%{shared:-shared} \
55 %{!shared: \
56 %{!ibcs: \
57 %{!static: \
58 %{rdynamic:-export-dynamic} \
59 %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
60 %{static:-static}}}"
62 #undef LOCAL_LABEL_PREFIX
63 #define LOCAL_LABEL_PREFIX "."
65 /* Always enable "-fpic" for Xtensa Linux. */
66 #define XTENSA_ALWAYS_PIC 1
68 /* Redefine the standard ELF version of ASM_DECLARE_FUNCTION_SIZE to
69 allow adding the ".end literal_prefix" directive at the end of the
70 function. */
71 #undef ASM_DECLARE_FUNCTION_SIZE
72 #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \
73 do \
74 { \
75 if (!flag_inhibit_size_directive) \
76 ASM_OUTPUT_MEASURED_SIZE (FILE, FNAME); \
77 XTENSA_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL); \
78 } \
79 while (0)