111
|
1 /* Definitions for AArch64 running FreeBSD
|
131
|
2 Copyright (C) 2016-2018 Free Software Foundation, Inc.
|
111
|
3
|
|
4 This file is part of GCC.
|
|
5
|
|
6 GCC is free software; you can redistribute it and/or modify it
|
|
7 under the terms of the GNU General Public License as published by
|
|
8 the Free Software Foundation; either version 3, or (at your option)
|
|
9 any later version.
|
|
10
|
|
11 GCC is distributed in the hope that it will be useful, but
|
|
12 WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
14 General Public License for more details.
|
|
15
|
|
16 You should have received a copy of the GNU General Public License
|
|
17 along with GCC; see the file COPYING3. If not see
|
|
18 <http://www.gnu.org/licenses/>. */
|
|
19
|
|
20 #ifndef GCC_AARCH64_FREEBSD_H
|
|
21 #define GCC_AARCH64_FREEBSD_H
|
|
22
|
|
23 #undef SUBTARGET_CPP_SPEC
|
|
24 #define SUBTARGET_CPP_SPEC FBSD_CPP_SPEC
|
|
25
|
|
26 #if TARGET_BIG_ENDIAN_DEFAULT
|
|
27 #define TARGET_LINKER_EMULATION "aarch64fbsdb"
|
|
28 #else
|
|
29 #define TARGET_LINKER_EMULATION "aarch64fbsd"
|
|
30 #endif
|
|
31
|
|
32 #undef SUBTARGET_EXTRA_LINK_SPEC
|
|
33 #define SUBTARGET_EXTRA_LINK_SPEC " -m" TARGET_LINKER_EMULATION
|
|
34
|
|
35 #undef FBSD_TARGET_LINK_SPEC
|
|
36 #define FBSD_TARGET_LINK_SPEC " \
|
|
37 %{p:%nconsider using `-pg' instead of `-p' with gprof (1) } \
|
|
38 %{v:-V} \
|
|
39 %{assert*} %{R*} %{rpath*} %{defsym*} \
|
|
40 %{shared:-Bshareable %{h*} %{soname*}} \
|
|
41 %{symbolic:-Bsymbolic} \
|
|
42 %{static:-Bstatic} \
|
|
43 %{!static: \
|
|
44 %{rdynamic:-export-dynamic} \
|
|
45 %{!shared:-dynamic-linker " FBSD_DYNAMIC_LINKER " }} \
|
|
46 -X" SUBTARGET_EXTRA_LINK_SPEC " \
|
|
47 %{mbig-endian:-EB} %{mlittle-endian:-EL}"
|
|
48
|
|
49 #if TARGET_FIX_ERR_A53_835769_DEFAULT
|
|
50 #define CA53_ERR_835769_SPEC \
|
|
51 " %{!mno-fix-cortex-a53-835769:--fix-cortex-a53-835769}"
|
|
52 #else
|
|
53 #define CA53_ERR_835769_SPEC \
|
|
54 " %{mfix-cortex-a53-835769:--fix-cortex-a53-835769}"
|
|
55 #endif
|
|
56
|
|
57 #ifdef TARGET_FIX_ERR_A53_843419_DEFAULT
|
|
58 #define CA53_ERR_843419_SPEC \
|
|
59 " %{!mno-fix-cortex-a53-843419:--fix-cortex-a53-843419}"
|
|
60 #else
|
|
61 #define CA53_ERR_843419_SPEC \
|
|
62 " %{mfix-cortex-a53-843419:--fix-cortex-a53-843419}"
|
|
63 #endif
|
|
64
|
|
65 #undef LINK_SPEC
|
|
66 #define LINK_SPEC FBSD_TARGET_LINK_SPEC \
|
|
67 CA53_ERR_835769_SPEC \
|
|
68 CA53_ERR_843419_SPEC
|
|
69
|
|
70 #define GNU_USER_TARGET_MATHFILE_SPEC \
|
|
71 "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s}"
|
|
72
|
|
73 #undef ENDFILE_SPEC
|
|
74 #define ENDFILE_SPEC \
|
|
75 GNU_USER_TARGET_MATHFILE_SPEC " " \
|
|
76 FBSD_ENDFILE_SPEC
|
|
77
|
|
78 #undef TARGET_OS_CPP_BUILTINS
|
|
79 #define TARGET_OS_CPP_BUILTINS() \
|
|
80 do \
|
|
81 { \
|
|
82 FBSD_TARGET_OS_CPP_BUILTINS (); \
|
|
83 } \
|
|
84 while (false)
|
|
85
|
|
86 #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
|
|
87
|
|
88 /* Uninitialized common symbols in non-PIE executables, even with
|
|
89 strong definitions in dependent shared libraries, will resolve
|
|
90 to COPY relocated symbol in the executable. See PR65780. */
|
|
91 #undef TARGET_BINDS_LOCAL_P
|
|
92 #define TARGET_BINDS_LOCAL_P default_binds_local_p_2
|
|
93
|
|
94 /* Use the AAPCS type for wchar_t, override the one from
|
|
95 config/freebsd.h. */
|
|
96 #undef WCHAR_TYPE
|
|
97 #define WCHAR_TYPE "unsigned int"
|
|
98
|
|
99 #undef MCOUNT_NAME
|
|
100 #define MCOUNT_NAME ".mcount"
|
|
101
|
|
102 #endif /* GCC_AARCH64_FREEBSD_H */
|