]>
Commit | Line | Data |
---|---|---|
336bd6ac | 1 | /* Configuration file for Symbian OS on ARM processors. |
a945c346 | 2 | Copyright (C) 2004-2024 Free Software Foundation, Inc. |
336bd6ac MM |
3 | Contributed by CodeSourcery, LLC |
4 | ||
5 | This file is part of GCC. | |
6 | ||
7 | GCC is free software; you can redistribute it and/or modify it | |
8 | under the terms of the GNU General Public License as published | |
2f83c7d6 | 9 | by the Free Software Foundation; either version 3, or (at your |
336bd6ac MM |
10 | option) any later version. |
11 | ||
12 | GCC is distributed in the hope that it will be useful, but WITHOUT | |
13 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | |
14 | or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public | |
15 | License for more details. | |
16 | ||
17 | You should have received a copy of the GNU General Public License | |
2f83c7d6 NC |
18 | along with GCC; see the file COPYING3. If not see |
19 | <http://www.gnu.org/licenses/>. */ | |
336bd6ac | 20 | |
336bd6ac MM |
21 | /* Do not expand builtin functions (unless explicitly prefixed with |
22 | "__builtin"). Symbian OS code relies on properties of the standard | |
23 | library that go beyond those guaranteed by the ANSI/ISO standard. | |
24 | For example, "memcpy" works even with overlapping memory, like | |
e53b6e56 | 25 | "memmove". We cannot simply set flag_no_builtin in arm.cc because |
336bd6ac MM |
26 | (a) flag_no_builtin is not declared in language-independent code, |
27 | and (b) that would prevent users from explicitly overriding the | |
63c5b495 | 28 | default with -fbuiltin, which may sometimes be useful. |
336bd6ac MM |
29 | |
30 | Make all symbols hidden by default. Symbian OS expects that all | |
31 | exported symbols will be explicitly marked with | |
2ed9e527 MM |
32 | "__declspec(dllexport)". |
33 | ||
34 | Enumeration types use 4 bytes, even if the enumerals are small, | |
35 | unless explicitly overridden. | |
36 | ||
37 | The wchar_t type is a 2-byte type, unless explicitly | |
38 | overridden. */ | |
39 | #define CC1_SPEC \ | |
40 | "%{!fbuiltin:%{!fno-builtin:-fno-builtin}} " \ | |
41 | "%{!fvisibility=*:-fvisibility=hidden} " \ | |
42 | "%{!fshort-enums:%{!fno-short-enums:-fno-short-enums}} " \ | |
43 | "%{!fshort-wchar:%{!fno-short-wchar:-fshort-wchar}} " | |
866cf037 | 44 | #define CC1PLUS_SPEC CC1_SPEC |
336bd6ac | 45 | |
99b2692a | 46 | /* Symbian OS does not use crt*.o, unlike the generic unknown-elf |
336bd6ac MM |
47 | configuration. */ |
48 | #undef STARTFILE_SPEC | |
99b2692a PB |
49 | #define STARTFILE_SPEC "" |
50 | ||
51 | #undef ENDFILE_SPEC | |
52 | #define ENDFILE_SPEC "" | |
336bd6ac | 53 | |
19dc705e MM |
54 | /* Do not link with any libraries by default. On Symbian OS, the user |
55 | must supply all required libraries on the command line. */ | |
56 | #undef LIB_SPEC | |
57 | #define LIB_SPEC "" | |
58 | ||
63c5b495 MM |
59 | /* Support the "dllimport" attribute. */ |
60 | #define TARGET_DLLIMPORT_DECL_ATTRIBUTES 1 | |
87c2399d | 61 | |
e4dc702c | 62 | /* The assembler should assume VFP FPU format, and armv5t. */ |
87c2399d MM |
63 | #undef SUBTARGET_ASM_FLOAT_SPEC |
64 | #define SUBTARGET_ASM_FLOAT_SPEC \ | |
e4dc702c | 65 | "%{!mfpu=*:-mfpu=vfp} %{!mcpu=*:%{!march=*:-march=armv5t}}" |
87c2399d | 66 | |
f9a02408 | 67 | /* Define the __symbian__ macro. */ |
40a1c5cb | 68 | #undef TARGET_OS_CPP_BUILTINS |
b54c93b7 JM |
69 | #define TARGET_OS_CPP_BUILTINS() \ |
70 | do \ | |
71 | { \ | |
72 | /* Include the default BPABI stuff. */ \ | |
73 | TARGET_BPABI_CPP_BUILTINS (); \ | |
74 | /* Symbian OS does not support merging symbols across DLL \ | |
75 | boundaries. */ \ | |
76 | builtin_define ("__GXX_MERGED_TYPEINFO_NAMES=0"); \ | |
77 | builtin_define ("__symbian__"); \ | |
78 | } \ | |
f9a02408 | 79 | while (false) |
1e731102 | 80 | |
88c6057f MM |
81 | /* On SymbianOS, these sections are not writable, so we use "a", |
82 | rather than "aw", for the section attributes. */ | |
83 | #undef ARM_EABI_CTORS_SECTION_OP | |
84 | #define ARM_EABI_CTORS_SECTION_OP \ | |
85 | "\t.section\t.init_array,\"a\",%init_array" | |
86 | #undef ARM_EABI_DTORS_SECTION_OP | |
87 | #define ARM_EABI_DTORS_SECTION_OP \ | |
88 | "\t.section\t.fini_array,\"a\",%fini_array" | |
1e731102 MM |
89 | |
90 | /* SymbianOS cannot merge entities with vague linkage at runtime. */ | |
91 | #define TARGET_ARM_DYNAMIC_VAGUE_LINKAGE_P false | |
571191af PB |
92 | |
93 | #define TARGET_DEFAULT_WORD_RELOCATIONS 1 | |
1e874273 PB |
94 | |
95 | #define ARM_TARGET2_DWARF_FORMAT DW_EH_PE_absptr |