1 /* Declarations for bare-metal C-SKY targets. 2 Copyright (C) 2018-2019 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 %{melrw:-melrw} \ 51 %{mno-elrw:-mno-elrw} \ 52 %{mistack:-mistack} \ 53 %{mno-istack:-mno-istack} \ 54 %{mmp:-mmp} \ 55 %{mcp:-mcp} \ 56 %{mcache:-mcache} \ 57 %{msecurity|mmac:-msecurity} \ 58 %{mtrust:-mtrust} \ 59 %{mdsp:-mdsp} \ 60 %{medsp:-medsp} \ 61 %{mvdsp:-mvdsp} \ 62 " 63 64 #undef LINK_SPEC 65 #define LINK_SPEC \ 66 "%{mbig-endian:-EB} \ 67 %{EB:-EB} \ 68 %{EL:-EL} -X" 69 70 #undef LIB_SPEC 71 #define LIB_SPEC \ 72 "%{pthread:-lpthread} -lc %{mccrt:-lcc-rt}" 73 /* FIXME add this to LIB_SPEC when need */ 74 /* %{!shared:%{profile:-lc_p}%{!profile:-lc}}" */ 75 76 77 #define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)" 78 79 /* Disable features only for Linux toolchains. */ 80 #undef TARGET_POSIX_IO 81 #define TARGET_CSKY_LINUX 0 82