190075Sobrien/* Definitions of target machine for GNU compiler.  ARM on semi-hosted platform
2169689Skan   Copyright (C) 1994, 1995, 1996, 1997, 2001, 2004, 2005
3169689Skan   Free Software Foundation, Inc.
490075Sobrien   Contributed by Richard Earnshaw (richard.earnshaw@arm.com)
590075Sobrien
6132718Skan   This file is part of GCC.
790075Sobrien
8132718Skan   GCC is free software; you can redistribute it and/or modify it
9132718Skan   under the terms of the GNU General Public License as published
10132718Skan   by the Free Software Foundation; either version 2, or (at your
11132718Skan   option) any later version.
1290075Sobrien
13132718Skan   GCC is distributed in the hope that it will be useful, but WITHOUT
14132718Skan   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15132718Skan   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
16132718Skan   License for more details.
1790075Sobrien
18132718Skan   You should have received a copy of the GNU General Public License
19132718Skan   along with GCC; see the file COPYING.  If not, write to
20169689Skan   the Free Software Foundation, 51 Franklin Street, Fifth Floor,
21169689Skan   Boston, MA 02110-1301, USA.  */
2290075Sobrien
2390075Sobrien#define STARTFILE_SPEC  "crt0.o%s"
2490075Sobrien
2590075Sobrien#ifndef LIB_SPEC
2690075Sobrien#define LIB_SPEC "-lc"
2790075Sobrien#endif
2890075Sobrien
2990075Sobrien#ifndef SUBTARGET_CPP_SPEC
3090075Sobrien#define SUBTARGET_CPP_SPEC "-D__semi__"
3190075Sobrien#endif
3290075Sobrien
3390075Sobrien#ifndef LINK_SPEC
3490075Sobrien#define LINK_SPEC "%{mbig-endian:-EB} -X"
3590075Sobrien#endif
3690075Sobrien
3790075Sobrien#ifndef TARGET_VERSION
3890075Sobrien#define TARGET_VERSION fputs (" (ARM/semi-hosted)", stderr);
3990075Sobrien#endif
4090075Sobrien
41169689Skan#ifndef TARGET_DEFAULT_FLOAT_ABI
42169689Skan#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
43169689Skan#endif
44169689Skan
4590075Sobrien#ifndef TARGET_DEFAULT
46169689Skan#define TARGET_DEFAULT (MASK_APCS_FRAME)
4790075Sobrien#endif
4890075Sobrien
4990075Sobrien#ifndef SUBTARGET_EXTRA_SPECS
5090075Sobrien#define SUBTARGET_EXTRA_SPECS \
5190075Sobrien  { "subtarget_extra_asm_spec",	SUBTARGET_EXTRA_ASM_SPEC },
5290075Sobrien#endif
5390075Sobrien
5490075Sobrien#ifndef SUBTARGET_EXTRA_ASM_SPEC
5590075Sobrien#define SUBTARGET_EXTRA_ASM_SPEC ""
5690075Sobrien#endif
5790075Sobrien
5890075Sobrien/* The compiler supports PIC code generation, even though the binutils
5990075Sobrien   may not.  If we are asked to compile position independent code, we
6090075Sobrien   always pass -k to the assembler.  If it doesn't recognize it, then
6190075Sobrien   it will barf, which probably means that it doesn't know how to
6290075Sobrien   assemble PIC code.  This is what we want, since otherwise tools
6390075Sobrien   may incorrectly assume we support PIC compilation even if the
6490075Sobrien   binutils can't.  */
6590075Sobrien#ifndef ASM_SPEC
6690075Sobrien#define ASM_SPEC "\
67132718Skan%{fpic|fpie: -k} %{fPIC|fPIE: -k} \
6890075Sobrien%{mbig-endian:-EB} \
69117395Skan%{mcpu=*:-mcpu=%*} \
70117395Skan%{march=*:-march=%*} \
7190075Sobrien%{mapcs-float:-mfloat} \
72169689Skan%{msoft-float:-mfloat-abi=soft} %{mhard-float:-mfloat-abi=hard} \
73169689Skan%{mfloat-abi=*} %{mfpu=*} \
7490075Sobrien%{mthumb-interwork:-mthumb-interwork} \
7590075Sobrien%(subtarget_extra_asm_spec)"
7690075Sobrien#endif
77