Update FSF address.
[official-gcc.git] / gcc / config / arm / symbian.h
blobaf1ba9a64bb7d03c8d1eb41a3a45556ea165b8b5
1 /* Configuration file for Symbian OS on ARM processors.
2 Copyright (C) 2004, 2005
3 Free Software Foundation, Inc.
4 Contributed by CodeSourcery, LLC
6 This file is part of GCC.
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.
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.
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, 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA. */
23 /* Do not expand builtin functions (unless explicitly prefixed with
24 "__builtin"). Symbian OS code relies on properties of the standard
25 library that go beyond those guaranteed by the ANSI/ISO standard.
26 For example, "memcpy" works even with overlapping memory, like
27 "memmove". We cannot simply set flag_no_builtin in arm.c because
28 (a) flag_no_builtin is not declared in language-independent code,
29 and (b) that would prevent users from explicitly overriding the
30 default with -fbuiltin, which may sometimes be useful.
32 Make all symbols hidden by default. Symbian OS expects that all
33 exported symbols will be explicitly marked with
34 "__declspec(dllexport)".
36 Enumeration types use 4 bytes, even if the enumerals are small,
37 unless explicitly overridden.
39 The wchar_t type is a 2-byte type, unless explicitly
40 overridden. */
41 #define CC1_SPEC \
42 "%{!fbuiltin:%{!fno-builtin:-fno-builtin}} " \
43 "%{!fvisibility=*:-fvisibility=hidden} " \
44 "%{!fshort-enums:%{!fno-short-enums:-fno-short-enums}} " \
45 "%{!fshort-wchar:%{!fno-short-wchar:-fshort-wchar}} "
46 #define CC1PLUS_SPEC CC1_SPEC
48 /* Symbian OS does not use crt*.o, unlike the generic unknown-elf
49 configuration. */
50 #undef STARTFILE_SPEC
51 #define STARTFILE_SPEC ""
53 #undef ENDFILE_SPEC
54 #define ENDFILE_SPEC ""
56 /* Do not link with any libraries by default. On Symbian OS, the user
57 must supply all required libraries on the command line. */
58 #undef LIB_SPEC
59 #define LIB_SPEC ""
61 /* Support the "dllimport" attribute. */
62 #define TARGET_DLLIMPORT_DECL_ATTRIBUTES 1
64 /* Symbian OS assumes ARM V5 or above. Since -march=armv5 is
65 equivalent to making the ARM 10TDMI core the default, we can set
66 SUBTARGET_CPU_DEFAULT and get an equivalent effect. */
67 #undef SUBTARGET_CPU_DEFAULT
68 #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
70 /* The assembler should assume VFP FPU format, and armv5t. */
71 #undef SUBTARGET_ASM_FLOAT_SPEC
72 #define SUBTARGET_ASM_FLOAT_SPEC \
73 "%{!mfpu=*:-mfpu=vfp} %{!mcpu=*:%{!march=*:-march=armv5t}}"
75 /* SymbianOS provides the BPABI routines in a separate library.
76 Therefore, we do not need to define any of them in libgcc. */
77 #undef RENAME_LIBRARY
78 #define RENAME_LIBRARY(GCC_NAME, AEABI_NAME) /* empty */
80 /* Define the __symbian__ macro. */
81 #undef TARGET_OS_CPP_BUILTINS
82 #define TARGET_OS_CPP_BUILTINS() \
83 do \
84 { \
85 /* Include the default BPABI stuff. */ \
86 TARGET_BPABI_CPP_BUILTINS (); \
87 builtin_define ("__symbian__"); \
88 } \
89 while (false)
91 /* On SymbianOS, these sections are not writable, so we use "a",
92 rather than "aw", for the section attributes. */
93 #undef ARM_EABI_CTORS_SECTION_OP
94 #define ARM_EABI_CTORS_SECTION_OP \
95 "\t.section\t.init_array,\"a\",%init_array"
96 #undef ARM_EABI_DTORS_SECTION_OP
97 #define ARM_EABI_DTORS_SECTION_OP \
98 "\t.section\t.fini_array,\"a\",%fini_array"
100 /* SymbianOS cannot merge entities with vague linkage at runtime. */
101 #define TARGET_ARM_DYNAMIC_VAGUE_LINKAGE_P false