]>
Commit | Line | Data |
---|---|---|
336bd6ac | 1 | /* Configuration file for Symbian OS on ARM processors. |
2f83c7d6 | 2 | Copyright (C) 2004, 2005, 2007 |
336bd6ac MM |
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 | |
2f83c7d6 | 10 | by the Free Software Foundation; either version 3, or (at your |
336bd6ac MM |
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 | |
2f83c7d6 NC |
19 | along with GCC; see the file COPYING3. If not see |
20 | <http://www.gnu.org/licenses/>. */ | |
336bd6ac | 21 | |
336bd6ac MM |
22 | /* Do not expand builtin functions (unless explicitly prefixed with |
23 | "__builtin"). Symbian OS code relies on properties of the standard | |
24 | library that go beyond those guaranteed by the ANSI/ISO standard. | |
25 | For example, "memcpy" works even with overlapping memory, like | |
26 | "memmove". We cannot simply set flag_no_builtin in arm.c because | |
27 | (a) flag_no_builtin is not declared in language-independent code, | |
28 | and (b) that would prevent users from explicitly overriding the | |
63c5b495 | 29 | default with -fbuiltin, which may sometimes be useful. |
336bd6ac MM |
30 | |
31 | Make all symbols hidden by default. Symbian OS expects that all | |
32 | exported symbols will be explicitly marked with | |
2ed9e527 MM |
33 | "__declspec(dllexport)". |
34 | ||
35 | Enumeration types use 4 bytes, even if the enumerals are small, | |
36 | unless explicitly overridden. | |
37 | ||
38 | The wchar_t type is a 2-byte type, unless explicitly | |
39 | overridden. */ | |
40 | #define CC1_SPEC \ | |
41 | "%{!fbuiltin:%{!fno-builtin:-fno-builtin}} " \ | |
42 | "%{!fvisibility=*:-fvisibility=hidden} " \ | |
43 | "%{!fshort-enums:%{!fno-short-enums:-fno-short-enums}} " \ | |
44 | "%{!fshort-wchar:%{!fno-short-wchar:-fshort-wchar}} " | |
866cf037 | 45 | #define CC1PLUS_SPEC CC1_SPEC |
336bd6ac | 46 | |
99b2692a | 47 | /* Symbian OS does not use crt*.o, unlike the generic unknown-elf |
336bd6ac MM |
48 | configuration. */ |
49 | #undef STARTFILE_SPEC | |
99b2692a PB |
50 | #define STARTFILE_SPEC "" |
51 | ||
52 | #undef ENDFILE_SPEC | |
53 | #define ENDFILE_SPEC "" | |
336bd6ac | 54 | |
19dc705e MM |
55 | /* Do not link with any libraries by default. On Symbian OS, the user |
56 | must supply all required libraries on the command line. */ | |
57 | #undef LIB_SPEC | |
58 | #define LIB_SPEC "" | |
59 | ||
63c5b495 MM |
60 | /* Support the "dllimport" attribute. */ |
61 | #define TARGET_DLLIMPORT_DECL_ATTRIBUTES 1 | |
87c2399d MM |
62 | |
63 | /* Symbian OS assumes ARM V5 or above. Since -march=armv5 is | |
64 | equivalent to making the ARM 10TDMI core the default, we can set | |
65 | SUBTARGET_CPU_DEFAULT and get an equivalent effect. */ | |
66 | #undef SUBTARGET_CPU_DEFAULT | |
67 | #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi | |
68 | ||
e4dc702c | 69 | /* The assembler should assume VFP FPU format, and armv5t. */ |
87c2399d MM |
70 | #undef SUBTARGET_ASM_FLOAT_SPEC |
71 | #define SUBTARGET_ASM_FLOAT_SPEC \ | |
e4dc702c | 72 | "%{!mfpu=*:-mfpu=vfp} %{!mcpu=*:%{!march=*:-march=armv5t}}" |
87c2399d | 73 | |
f9a02408 MM |
74 | /* SymbianOS provides the BPABI routines in a separate library. |
75 | Therefore, we do not need to define any of them in libgcc. */ | |
76 | #undef RENAME_LIBRARY | |
77 | #define RENAME_LIBRARY(GCC_NAME, AEABI_NAME) /* empty */ | |
78 | ||
79 | /* Define the __symbian__ macro. */ | |
40a1c5cb | 80 | #undef TARGET_OS_CPP_BUILTINS |
b54c93b7 JM |
81 | #define TARGET_OS_CPP_BUILTINS() \ |
82 | do \ | |
83 | { \ | |
84 | /* Include the default BPABI stuff. */ \ | |
85 | TARGET_BPABI_CPP_BUILTINS (); \ | |
86 | /* Symbian OS does not support merging symbols across DLL \ | |
87 | boundaries. */ \ | |
88 | builtin_define ("__GXX_MERGED_TYPEINFO_NAMES=0"); \ | |
89 | builtin_define ("__symbian__"); \ | |
90 | } \ | |
f9a02408 | 91 | while (false) |
1e731102 | 92 | |
88c6057f MM |
93 | /* On SymbianOS, these sections are not writable, so we use "a", |
94 | rather than "aw", for the section attributes. */ | |
95 | #undef ARM_EABI_CTORS_SECTION_OP | |
96 | #define ARM_EABI_CTORS_SECTION_OP \ | |
97 | "\t.section\t.init_array,\"a\",%init_array" | |
98 | #undef ARM_EABI_DTORS_SECTION_OP | |
99 | #define ARM_EABI_DTORS_SECTION_OP \ | |
100 | "\t.section\t.fini_array,\"a\",%fini_array" | |
1e731102 MM |
101 | |
102 | /* SymbianOS cannot merge entities with vague linkage at runtime. */ | |
103 | #define TARGET_ARM_DYNAMIC_VAGUE_LINKAGE_P false |