Debian Codegraph @

gcc/config/csky/csky-elf.h

raw
1 /* Declarations for bare-metal C-SKY targets.
2 Copyright (C) 2018-2025 Free Software Foundation, Inc.
3 Contributed by C-SKY Microsystems and Mentor Graphics.
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 * Run-time Target Specification *
24 ******************************************************************/
25
26 #undef STARTFILE_SPEC
27 #define STARTFILE_SPEC \
28 "crt0.o%s crti.o%s crtbegin.o%s"
29
30 #undef ENDFILE_SPEC
31 #define ENDFILE_SPEC "crtend.o%s crtn.o%s"
32
33 #undef CC1_SPEC
34 #define CC1_SPEC \
35 "%{EB:-EB} \
36 %{EL:-EL} \
37 %{fpic|fPIC:-DPIC} \
38 %{march=ck803s:-march=ck803} \
39 "
40
41 #undef ASM_SPEC
42 #define ASM_SPEC \
43 "%{mbig-endian:-mbig-endian} \
44 %{EB:-EB} \
45 %{EL:-EL} \
46 %{fpic|fPIC:-pic} \
47 %{mcpu=*:-mcpu=%*} \
48 %{march=*:-march=%*} \
49 %{mhard-float:-mhard-float} \
50 %{mfloat-abi=softfp:-mhard-float} \
51 %{mfloat-abi=hard:-mhard-float} \
52 %{melrw:-melrw} \
53 %{mno-elrw:-mno-elrw} \
54 %{mistack:-mistack} \
55 %{mno-istack:-mno-istack} \
56 %{mmp:-mmp} \
57 %{mcp:-mcp} \
58 %{mcache:-mcache} \
59 %{msecurity|mmac:-msecurity} \
60 %{mtrust:-mtrust} \
61 %{mdsp:-mdsp} \
62 %{medsp:-medsp} \
63 %{mvdsp:-mvdsp} \
64 "
65
66 #undef LINK_SPEC
67 #define LINK_SPEC \
68 "%{mbig-endian:-EB} \
69 %{EB:-EB} \
70 %{EL:-EL} -X"
71
72 #undef LIB_SPEC
73 #define LIB_SPEC "\
74 %{pthread:-lpthread} \
75 --start-group \
76 -lc \
77 %{msim:-lsemi}%{!msim:-lnosys} \
78 --end-group \
79 %{mccrt:-lcc-rt} \
80 "
81 /* FIXME add this to LIB_SPEC when need */
82 /* %{!shared:%{profile:-lc_p}%{!profile:-lc}}" */
83
84
85 #define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
86
87 /* Disable features only for Linux toolchains. */
88 #undef TARGET_POSIX_IO
89 #define TARGET_CSKY_LINUX 0