1 |
12 |
jlechner |
/* Configuration file for ARM BPABI targets.
|
2 |
|
|
Copyright (C) 2004, 2005
|
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, 51 Franklin Street, Fifth Floor,
|
21 |
|
|
Boston, MA 02110-1301, USA. */
|
22 |
|
|
|
23 |
|
|
/* Use the AAPCS ABI by default. */
|
24 |
|
|
#define ARM_DEFAULT_ABI ARM_ABI_AAPCS
|
25 |
|
|
|
26 |
|
|
/* Assume that AAPCS ABIs should adhere to the full BPABI. */
|
27 |
|
|
#define TARGET_BPABI (TARGET_AAPCS_BASED)
|
28 |
|
|
|
29 |
|
|
/* BPABI targets use EABI frame unwinding tables. */
|
30 |
|
|
#define TARGET_UNWIND_INFO 1
|
31 |
|
|
|
32 |
|
|
/* Section 4.1 of the AAPCS requires the use of VFP format. */
|
33 |
|
|
#undef FPUTYPE_DEFAULT
|
34 |
|
|
#define FPUTYPE_DEFAULT FPUTYPE_VFP
|
35 |
|
|
|
36 |
|
|
/* EABI targets should enable interworking by default. */
|
37 |
|
|
#undef TARGET_DEFAULT
|
38 |
|
|
#define TARGET_DEFAULT MASK_INTERWORK
|
39 |
|
|
|
40 |
|
|
/* The ARM BPABI functions return a boolean; they use no special
|
41 |
|
|
calling convention. */
|
42 |
|
|
#define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) TARGET_BPABI
|
43 |
|
|
|
44 |
|
|
/* The BPABI integer comparison routines return { -1, 0, 1 }. */
|
45 |
|
|
#define TARGET_LIB_INT_CMP_BIASED !TARGET_BPABI
|
46 |
|
|
|
47 |
|
|
/* Tell the assembler to build BPABI binaries. */
|
48 |
|
|
#undef SUBTARGET_EXTRA_ASM_SPEC
|
49 |
|
|
#define SUBTARGET_EXTRA_ASM_SPEC "%{mabi=apcs-gnu|mabi=atpcs:-meabi=gnu;:-meabi=4}"
|
50 |
|
|
|
51 |
|
|
/* The generic link spec in elf.h does not support shared libraries. */
|
52 |
|
|
#undef LINK_SPEC
|
53 |
|
|
#define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} " \
|
54 |
|
|
"%{static:-Bstatic} %{shared:-shared} %{symbolic:-Bsymbolic} " \
|
55 |
|
|
"-X"
|
56 |
|
|
|
57 |
|
|
#if defined (__thumb__)
|
58 |
|
|
#define RENAME_LIBRARY_SET ".thumb_set"
|
59 |
|
|
#else
|
60 |
|
|
#define RENAME_LIBRARY_SET ".set"
|
61 |
|
|
#endif
|
62 |
|
|
|
63 |
|
|
/* Make __aeabi_AEABI_NAME an alias for __GCC_NAME. */
|
64 |
|
|
#define RENAME_LIBRARY(GCC_NAME, AEABI_NAME) \
|
65 |
|
|
__asm__ (".globl\t__aeabi_" #AEABI_NAME "\n" \
|
66 |
|
|
RENAME_LIBRARY_SET "\t__aeabi_" #AEABI_NAME \
|
67 |
|
|
", __" #GCC_NAME "\n");
|
68 |
|
|
|
69 |
|
|
/* Give some libgcc functions an additional __aeabi name. */
|
70 |
|
|
#ifdef L_muldi3
|
71 |
|
|
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (muldi3, lmul)
|
72 |
|
|
#endif
|
73 |
|
|
#ifdef L_muldi3
|
74 |
|
|
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (muldi3, lmul)
|
75 |
|
|
#endif
|
76 |
|
|
#ifdef L_fixdfdi
|
77 |
|
|
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixdfdi, d2lz)
|
78 |
|
|
#endif
|
79 |
|
|
#ifdef L_fixunsdfdi
|
80 |
|
|
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunsdfdi, d2ulz)
|
81 |
|
|
#endif
|
82 |
|
|
#ifdef L_fixsfdi
|
83 |
|
|
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixsfdi, f2lz)
|
84 |
|
|
#endif
|
85 |
|
|
#ifdef L_fixunssfdi
|
86 |
|
|
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunssfdi, f2ulz)
|
87 |
|
|
#endif
|
88 |
|
|
#ifdef L_floatdidf
|
89 |
|
|
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatdidf, l2d)
|
90 |
|
|
#endif
|
91 |
|
|
#ifdef L_floatdisf
|
92 |
|
|
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatdisf, l2f)
|
93 |
|
|
#endif
|
94 |
|
|
|
95 |
|
|
/* The BPABI requires that we always use an out-of-line implementation
|
96 |
|
|
of RTTI comparison, even if the target supports weak symbols,
|
97 |
|
|
because the same object file might be used on a target that does
|
98 |
|
|
not support merging symbols across DLL boundaries. This macro is
|
99 |
|
|
broken out separately so that it can be used within
|
100 |
|
|
TARGET_OS_CPP_BUILTINS in configuration files for systems based on
|
101 |
|
|
the BPABI. */
|
102 |
|
|
#define TARGET_BPABI_CPP_BUILTINS() \
|
103 |
|
|
do \
|
104 |
|
|
{ \
|
105 |
|
|
builtin_define ("__GXX_MERGED_TYPEINFO_NAMES=0"); \
|
106 |
|
|
} \
|
107 |
|
|
while (false)
|
108 |
|
|
|
109 |
|
|
#undef TARGET_OS_CPP_BUILTINS
|
110 |
|
|
#define TARGET_OS_CPP_BUILTINS() \
|
111 |
|
|
TARGET_BPABI_CPP_BUILTINS()
|
112 |
|
|
|
113 |
|
|
/* The BPABI specifies the use of .{init,fini}_array. Therefore, we
|
114 |
|
|
do not want GCC to put anything into the .{init,fini} sections. */
|
115 |
|
|
#undef INIT_SECTION_ASM_OP
|
116 |
|
|
#undef FINI_SECTION_ASM_OP
|
117 |
|
|
#define INIT_ARRAY_SECTION_ASM_OP ARM_EABI_CTORS_SECTION_OP
|
118 |
|
|
#define FINI_ARRAY_SECTION_ASM_OP ARM_EABI_DTORS_SECTION_OP
|