PR target/84564
[official-gcc.git] / gcc / config / arm / semi.h
blob6522e911ebecf62b9a8f86e4f8027f980bfb9a08
1 /* Definitions of target machine for GNU compiler. ARM on semi-hosted platform
2 Copyright (C) 1994-2018 Free Software Foundation, Inc.
3 Contributed by Richard Earnshaw (richard.earnshaw@arm.com)
5 This file is part of GCC.
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.
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.
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/>. */
21 #define STARTFILE_SPEC "crt0.o%s"
23 #ifndef LIB_SPEC
24 #define LIB_SPEC "-lc"
25 #endif
27 #ifndef SUBTARGET_CPP_SPEC
28 #define SUBTARGET_CPP_SPEC "-D__semi__"
29 #endif
31 #ifndef LINK_SPEC
32 #define LINK_SPEC "%{mbig-endian:-EB} -X"
33 #endif
35 #ifndef TARGET_DEFAULT_FLOAT_ABI
36 #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
37 #endif
39 #ifndef TARGET_DEFAULT
40 #define TARGET_DEFAULT (MASK_APCS_FRAME)
41 #endif
43 #ifndef SUBTARGET_EXTRA_SPECS
44 #define SUBTARGET_EXTRA_SPECS \
45 { "subtarget_extra_asm_spec", SUBTARGET_EXTRA_ASM_SPEC },
46 #endif
48 #ifndef SUBTARGET_EXTRA_ASM_SPEC
49 #define SUBTARGET_EXTRA_ASM_SPEC ""
50 #endif
52 /* The compiler supports PIC code generation, even though the binutils
53 may not. If we are asked to compile position independent code, we
54 always pass -k to the assembler. If it doesn't recognize it, then
55 it will barf, which probably means that it doesn't know how to
56 assemble PIC code. This is what we want, since otherwise tools
57 may incorrectly assume we support PIC compilation even if the
58 binutils can't. */
59 #ifndef ASM_SPEC
60 #define ASM_SPEC "\
61 %{" FPIE_OR_FPIC_SPEC ": -k} \
62 %{mbig-endian:-EB} \
63 %(arm_cpu_spec) \
64 %{mapcs-float:-mfloat} \
65 %{mfloat-abi=*} %{mfpu=*} \
66 %{mthumb-interwork:-mthumb-interwork} \
67 %(subtarget_extra_asm_spec)"
68 #endif