summaryrefslogtreecommitdiff
path: root/gcc/config/csky/csky-elf.h
blob: 1e3b815502a7f9cfb4cc3cb843d9a43893993884 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/* Declarations for bare-metal C-SKY targets.
   Copyright (C) 2018-2022 Free Software Foundation, Inc.
   Contributed by C-SKY Microsystems and Mentor Graphics.

   This file is part of GCC.

   GCC is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published
   by the Free Software Foundation; either version 3, or (at your
   option) any later version.

   GCC is distributed in the hope that it will be useful, but WITHOUT
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
   License for more details.

   You should have received a copy of the GNU General Public License
   along with GCC; see the file COPYING3.  If not see
   <http://www.gnu.org/licenses/>.  */


/******************************************************************
 *		 Run-time Target Specification			  *
 ******************************************************************/

#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
  "crt0.o%s crti.o%s crtbegin.o%s"

#undef ENDFILE_SPEC
#define ENDFILE_SPEC "crtend.o%s crtn.o%s"

#undef CC1_SPEC
#define CC1_SPEC		 \
  "%{EB:-EB}			 \
   %{EL:-EL}			 \
   %{fpic|fPIC:-DPIC}		 \
   %{march=ck803s:-march=ck803}	 \
  "

#undef ASM_SPEC
#define ASM_SPEC		\
  "%{mbig-endian:-mbig-endian}	\
  %{EB:-EB}			\
  %{EL:-EL}			\
  %{fpic|fPIC:-pic}		\
  %{mcpu=*:-mcpu=%*}		\
  %{march=*:-march=%*}		\
  %{mhard-float:-mhard-float}	\
  %{mfloat-abi=softfp:-mhard-float} \
  %{mfloat-abi=hard:-mhard-float}   \
  %{melrw:-melrw}		\
  %{mno-elrw:-mno-elrw}		\
  %{mistack:-mistack}		\
  %{mno-istack:-mno-istack}	\
  %{mmp:-mmp}			\
  %{mcp:-mcp}			\
  %{mcache:-mcache}		\
  %{msecurity|mmac:-msecurity}	\
  %{mtrust:-mtrust}		\
  %{mdsp:-mdsp}			\
  %{medsp:-medsp}		\
  %{mvdsp:-mvdsp}		\
  "

#undef	LINK_SPEC
#define LINK_SPEC     \
"%{mbig-endian:-EB}   \
 %{EB:-EB}	      \
 %{EL:-EL} -X"

#undef	LIB_SPEC
#define LIB_SPEC "\
%{pthread:-lpthread} \
--start-group \
-lc \
%{msim:-lsemi}%{!msim:-lnosys} \
--end-group \
%{mccrt:-lcc-rt} \
"
/* FIXME add this to LIB_SPEC when need */
/*   %{!shared:%{profile:-lc_p}%{!profile:-lc}}" */


#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"

/* Disable features only for Linux toolchains.	*/
#undef TARGET_POSIX_IO
#define TARGET_CSKY_LINUX 0