1 /* Configuration file for Symbian OS on ARM processors.
2 Copyright (C) 2004-2018 Free Software Foundation, Inc.
3 Contributed by CodeSourcery, LLC
5 This file is part of GCC.
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
9 by the Free Software Foundation; either version 3, or (at your
10 option) any later version.
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.
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>. */
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
25 "memmove". We cannot simply set flag_no_builtin in arm.c because
26 (a) flag_no_builtin is not declared in language-independent code,
27 and (b) that would prevent users from explicitly overriding the
28 default with -fbuiltin, which may sometimes be useful.
30 Make all symbols hidden by default. Symbian OS expects that all
31 exported symbols will be explicitly marked with
32 "__declspec(dllexport)".
34 Enumeration types use 4 bytes, even if the enumerals are small,
35 unless explicitly overridden.
37 The wchar_t type is a 2-byte type, unless explicitly
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}} "
44 #define CC1PLUS_SPEC CC1_SPEC
46 /* Symbian OS does not use crt*.o, unlike the generic unknown-elf
49 #define STARTFILE_SPEC ""
52 #define ENDFILE_SPEC ""
54 /* Do not link with any libraries by default. On Symbian OS, the user
55 must supply all required libraries on the command line. */
59 /* Support the "dllimport" attribute. */
60 #define TARGET_DLLIMPORT_DECL_ATTRIBUTES 1
62 /* The assembler should assume VFP FPU format, and armv5t. */
63 #undef SUBTARGET_ASM_FLOAT_SPEC
64 #define SUBTARGET_ASM_FLOAT_SPEC \
65 "%{!mfpu=*:-mfpu=vfp} %{!mcpu=*:%{!march=*:-march=armv5t}}"
67 /* Define the __symbian__ macro. */
68 #undef TARGET_OS_CPP_BUILTINS
69 #define TARGET_OS_CPP_BUILTINS() \
72 /* Include the default BPABI stuff. */ \
73 TARGET_BPABI_CPP_BUILTINS (); \
74 /* Symbian OS does not support merging symbols across DLL \
76 builtin_define ("__GXX_MERGED_TYPEINFO_NAMES=0"); \
77 builtin_define ("__symbian__"); \
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"
90 /* SymbianOS cannot merge entities with vague linkage at runtime. */
91 #define TARGET_ARM_DYNAMIC_VAGUE_LINKAGE_P false
93 #define TARGET_DEFAULT_WORD_RELOCATIONS 1
95 #define ARM_TARGET2_DWARF_FORMAT DW_EH_PE_absptr