131
|
1 /* Definitions of target machine of Andes NDS32 cpu for GNU compiler
|
|
2 Copyright (C) 2012-2014 Free Software Foundation, Inc.
|
|
3 Contributed by Andes Technology Corporation.
|
|
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
|
|
9 by the Free Software Foundation; either version 3, or (at your
|
|
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
|
|
18 along with GCC; see the file COPYING3. If not see
|
|
19 <http://www.gnu.org/licenses/>. */
|
|
20
|
|
21
|
|
22 /* ------------------------------------------------------------------------ */
|
|
23
|
|
24 #define TARGET_LINUX_ABI 1
|
|
25
|
|
26 #undef SIZE_TYPE
|
|
27 #define SIZE_TYPE "unsigned int"
|
|
28
|
|
29 #undef PTRDIFF_TYPE
|
|
30 #define PTRDIFF_TYPE "int"
|
|
31
|
|
32 #ifdef TARGET_DEFAULT_TLSDESC_TRAMPOLINE
|
|
33 #define NDS32_TLSDESC_TRAMPOLINE_SPEC \
|
|
34 " %{!mno-tlsdesc-trampoline:--mtlsdesc-trampoline}"
|
|
35 #else
|
|
36 #define NDS32_TLSDESC_TRAMPOLINE_SPEC ""
|
|
37 #endif
|
|
38
|
|
39 #define TARGET_OS_CPP_BUILTINS() \
|
|
40 do \
|
|
41 { \
|
|
42 GNU_USER_TARGET_OS_CPP_BUILTINS(); \
|
|
43 } \
|
|
44 while (0)
|
|
45
|
|
46 #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
|
|
47
|
|
48 /* In the configure stage we may use options --enable-default-relax,
|
|
49 --enable-Os-default-ifc and --enable-Os-default-ex9. They effect
|
|
50 the default spec of passing --relax, --mifc, and --mex9 to linker.
|
|
51 We use NDS32_RELAX_SPEC, NDS32_IFC_SPEC, and NDS32_EX9_SPEC
|
|
52 so that we can customize them conveniently. */
|
|
53 #define LINK_SPEC \
|
|
54 " %{G*}" \
|
|
55 " %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
|
|
56 " %{shared:-shared} \
|
|
57 %{!shared: \
|
|
58 %{!static: \
|
|
59 %{rdynamic:-export-dynamic} \
|
|
60 -dynamic-linker " GNU_USER_DYNAMIC_LINKER "} \
|
|
61 %{static:-static}}" \
|
|
62 NDS32_RELAX_SPEC \
|
|
63 NDS32_TLSDESC_TRAMPOLINE_SPEC
|
|
64
|
|
65 #define LINK_PIE_SPEC "%{pie:%{!fno-pie:%{!fno-PIE:%{!static:-pie}}}} "
|
|
66
|
|
67 #define CPP_SPEC "%{pthread:-D_REENTRANT}"
|
|
68
|
|
69 /* The SYNC operations are implemented as library functions, not
|
|
70 INSN patterns. As a result, the HAVE defines for the patterns are
|
|
71 not defined. We need to define them to generate the corresponding
|
|
72 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_* and __GCC_ATOMIC_*_LOCK_FREE
|
|
73 defines.
|
|
74 Ref: https://sourceware.org/ml/libc-alpha/2014-09/msg00322.html */
|
|
75 #define HAVE_sync_compare_and_swapqi 1
|
|
76 #define HAVE_sync_compare_and_swaphi 1
|
|
77 #define HAVE_sync_compare_and_swapsi 1
|