1 /* Definitions for ARM running Linux-based GNU systems using ELF
2 Copyright (C) 1993, 1994, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 Free Software Foundation, Inc.
5 Contributed by Philip Blundell <philb@gnu.org>
7 This file is part of GCC.
9 GCC is free software; you can redistribute it and/or modify it
10 under the terms of the GNU General Public License as published
11 by the Free Software Foundation; either version 2, or (at your
12 option) any later version.
14 GCC is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
17 License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; see the file COPYING. If not, write to
21 the Free Software Foundation, 51 Franklin Street, Fifth Floor,
22 Boston, MA 02110-1301, USA. */
24 /* elfos.h should have already been included. Now just override
25 any conflicting definitions and add any extras. */
27 /* Run-time Target Specification. */
29 #define TARGET_VERSION fputs (" (ARM GNU/Linux with ELF)", stderr);
31 #undef TARGET_DEFAULT_FLOAT_ABI
32 #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
35 #define TARGET_DEFAULT (0)
37 #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
39 #define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
41 #undef MULTILIB_DEFAULTS
42 #define MULTILIB_DEFAULTS \
43 { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
45 /* Now we define the strings used to build the spec file. */
48 "%{pthread:-lpthread} \
50 %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
52 #define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
54 #define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.2"
56 #define LINUX_TARGET_LINK_SPEC "%{h*} %{version:-v} \
60 %{symbolic:-Bsymbolic} \
61 %{rdynamic:-export-dynamic} \
62 %{!dynamic-linker:-dynamic-linker " LINUX_TARGET_INTERPRETER "} \
65 SUBTARGET_EXTRA_LINK_SPEC
68 #define LINK_SPEC LINUX_TARGET_LINK_SPEC
70 #define TARGET_OS_CPP_BUILTINS() \
73 LINUX_TARGET_OS_CPP_BUILTINS(); \
76 builtin_define ("__PIC__"); \
77 builtin_define ("__pic__"); \
82 /* This is how we tell the assembler that two symbols have the same value. */
83 #define ASM_OUTPUT_DEF(FILE, NAME1, NAME2) \
86 assemble_name (FILE, NAME1); \
87 fputs (" = ", FILE); \
88 assemble_name (FILE, NAME2); \
93 /* NWFPE always understands FPA instructions. */
94 #undef FPUTYPE_DEFAULT
95 #define FPUTYPE_DEFAULT FPUTYPE_FPA_EMU3
97 /* Call the function profiler with a given profile label. */
98 #undef ARM_FUNCTION_PROFILER
99 #define ARM_FUNCTION_PROFILER(STREAM, LABELNO) \
101 fprintf (STREAM, "\tbl\tmcount%s\n", \
102 (TARGET_ARM && NEED_PLT_RELOC) ? "(PLT)" : ""); \
105 /* The GNU/Linux profiler clobbers the link register. Make sure the
106 prologue knows to save it. */
107 #define PROFILE_HOOK(X) \
108 emit_insn (gen_rtx_CLOBBER (VOIDmode, gen_rtx_REG (SImode, LR_REGNUM)))
110 /* The GNU/Linux profiler needs a frame pointer. */
111 #define SUBTARGET_FRAME_POINTER_REQUIRED current_function_profile