OSDN Git Service

c03b428e692a612aefc130b7110f65bcaf818415
[pf3gnuchains/gcc-fork.git] / gcc / config / arm / symbian.h
1 /* Configuration file for Symbian OS on ARM processors.
2    Copyright (C) 2004
3    Free Software Foundation, Inc.
4    Contributed by CodeSourcery, LLC   
5
6    This file is part of GCC.
7
8    GCC is free software; you can redistribute it and/or modify it
9    under the terms of the GNU General Public License as published
10    by the Free Software Foundation; either version 2, or (at your
11    option) any later version.
12
13    GCC is distributed in the hope that it will be useful, but WITHOUT
14    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
16    License for more details.
17
18    You should have received a copy of the GNU General Public License
19    along with GCC; see the file COPYING.  If not, write to
20    the Free Software Foundation, 59 Temple Place - Suite 330,
21    Boston, MA 02111-1307, USA.  */
22
23 /* Use the SYMBIAN ABI by default.  */
24 #define ARM_DEFAULT_ABI ARM_ABI_AAPCS
25
26 /* Do not expand builtin functions (unless explicitly prefixed with
27    "__builtin").  Symbian OS code relies on properties of the standard
28    library that go beyond those guaranteed by the ANSI/ISO standard.
29    For example, "memcpy" works even with overlapping memory, like
30    "memmove".  We cannot simply set flag_no_builtin in arm.c because
31    (a) flag_no_builtin is not declared in language-independent code,
32    and (b) that would prevent users from explicitly overriding the
33    default with -fbuiltin, which may sometimes be useful.
34
35    Make all symbols hidden by default.  Symbian OS expects that all
36    exported symbols will be explicitly marked with
37    "__declspec(dllexport)".  
38
39    Enumeration types use 4 bytes, even if the enumerals are small,
40    unless explicitly overridden.
41
42    The wchar_t type is a 2-byte type, unless explicitly
43    overridden.  */
44 #define CC1_SPEC                                                \
45   "%{!fbuiltin:%{!fno-builtin:-fno-builtin}} "                  \
46   "%{!fvisibility=*:-fvisibility=hidden} "                      \
47   "%{!fshort-enums:%{!fno-short-enums:-fno-short-enums}} "      \
48   "%{!fshort-wchar:%{!fno-short-wchar:-fshort-wchar}} "
49 #define CC1PLUS_SPEC CC1_SPEC
50
51 /* Symbian OS does not use crt0.o, unlike the generic unknown-elf
52    configuration.  */
53 #undef STARTFILE_SPEC
54 #define STARTFILE_SPEC "crti%O%s crtbegin%O%s"
55
56 /* The generic link spec in elf.h does not support shared libraries.  */
57 #undef LINK_SPEC
58 #define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} "           \
59   "%{static:-Bstatic} %{shared:-shared} %{symbolic:-Bsymbolic} "        \
60   "-X"
61
62 /* Support the "dllimport" attribute.  */
63 #define TARGET_DLLIMPORT_DECL_ATTRIBUTES 1