semi.h revision 1.1
1228753Smm/* Definitions of target machine for GNU compiler.  ARM on semi-hosted platform
2228753Smm   Copyright (C) 1994, 1995, 1996, 1997, 2001, 2004, 2005, 2007
3238856Smm   Free Software Foundation, Inc.
4313570Smm   Contributed by Richard Earnshaw (richard.earnshaw@arm.com)
5228753Smm
6228753Smm   This file is part of GCC.
7228753Smm
8228753Smm   GCC is free software; you can redistribute it and/or modify it
9228753Smm   under the terms of the GNU General Public License as published
10228753Smm   by the Free Software Foundation; either version 3, or (at your
11228753Smm   option) any later version.
12228753Smm
13228753Smm   GCC is distributed in the hope that it will be useful, but WITHOUT
14228753Smm   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15228753Smm   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
16228753Smm   License for more details.
17228753Smm
18228753Smm   You should have received a copy of the GNU General Public License
19228753Smm   along with GCC; see the file COPYING3.  If not see
20228753Smm   <http://www.gnu.org/licenses/>.  */
21228753Smm
22228753Smm#define STARTFILE_SPEC  "crt0.o%s"
23228753Smm
24228753Smm#ifndef LIB_SPEC
25228753Smm#define LIB_SPEC "-lc"
26228753Smm#endif
27228753Smm
28228753Smm#ifndef SUBTARGET_CPP_SPEC
29316337Smm#define SUBTARGET_CPP_SPEC "-D__semi__"
30228753Smm#endif
31232153Smm
32232153Smm#ifndef LINK_SPEC
33232153Smm#define LINK_SPEC "%{mbig-endian:-EB} -X"
34228753Smm#endif
35228753Smm
36228753Smm#ifndef TARGET_VERSION
37228753Smm#define TARGET_VERSION fputs (" (ARM/semi-hosted)", stderr);
38228753Smm#endif
39228753Smm
40232153Smm#ifndef TARGET_DEFAULT_FLOAT_ABI
41232153Smm#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
42232153Smm#endif
43228753Smm
44228753Smm#ifndef TARGET_DEFAULT
45228753Smm#define TARGET_DEFAULT (MASK_APCS_FRAME)
46228753Smm#endif
47228753Smm
48228753Smm#ifndef SUBTARGET_EXTRA_SPECS
49248616Smm#define SUBTARGET_EXTRA_SPECS \
50228753Smm  { "subtarget_extra_asm_spec",	SUBTARGET_EXTRA_ASM_SPEC },
51248616Smm#endif
52248616Smm
53228753Smm#ifndef SUBTARGET_EXTRA_ASM_SPEC
54232153Smm#define SUBTARGET_EXTRA_ASM_SPEC ""
55232153Smm#endif
56232153Smm
57232153Smm/* The compiler supports PIC code generation, even though the binutils
58232153Smm   may not.  If we are asked to compile position independent code, we
59232153Smm   always pass -k to the assembler.  If it doesn't recognize it, then
60228753Smm   it will barf, which probably means that it doesn't know how to
61228753Smm   assemble PIC code.  This is what we want, since otherwise tools
62228753Smm   may incorrectly assume we support PIC compilation even if the
63232153Smm   binutils can't.  */
64232153Smm#ifndef ASM_SPEC
65232153Smm#define ASM_SPEC "\
66228753Smm%{fpic|fpie: -k} %{fPIC|fPIE: -k} \
67228753Smm%{mbig-endian:-EB} \
68228753Smm%{mcpu=*:-mcpu=%*} \
69238856Smm%{march=*:-march=%*} \
70238856Smm%{mapcs-float:-mfloat} \
71238856Smm%{msoft-float:-mfloat-abi=soft} %{mhard-float:-mfloat-abi=hard} \
72232153Smm%{mfloat-abi=*} %{mfpu=*} \
73232153Smm%{mthumb-interwork:-mthumb-interwork} \
74228753Smm%(subtarget_extra_asm_spec)"
75232153Smm#endif
76232153Smm