190075Sobrien/* Definitions for ARM running ucLinux using ELF
2169689Skan   Copyright (C) 1999, 2001, 2004, 2005 Free Software Foundation, Inc.
390075Sobrien   Contributed by Philip Blundell <pb@nexus.co.uk>
490075Sobrien
5132718Skan   This file is part of GCC.
690075Sobrien
7132718Skan   GCC is free software; you can redistribute it and/or modify it
8132718Skan   under the terms of the GNU General Public License as published
9132718Skan   by the Free Software Foundation; either version 2, or (at your
10132718Skan   option) any later version.
1190075Sobrien
12132718Skan   GCC is distributed in the hope that it will be useful, but WITHOUT
13132718Skan   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14132718Skan   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
15132718Skan   License for more details.
1690075Sobrien
17132718Skan   You should have received a copy of the GNU General Public License
18132718Skan   along with this program; see the file COPYING.  If not, write to
19169689Skan   the Free Software Foundation, 51 Franklin Street, Fifth Floor,
20169689Skan   Boston, MA 02110-1301, USA.  */
2190075Sobrien
2290075Sobrien/* We don't want a PLT.  */
2390075Sobrien#undef  NEED_PLT_RELOC
2490075Sobrien#define NEED_PLT_RELOC 0
2590075Sobrien
2690075Sobrien#undef  TARGET_VERSION
2790075Sobrien#define TARGET_VERSION fputs (" (ARM/ELF ucLinux)", stderr);
2890075Sobrien
2990075Sobrien#undef  TARGET_DEFAULT
30169689Skan#define TARGET_DEFAULT (MASK_SINGLE_PIC_BASE)
31169689Skan
32169689Skan/* NOTE: The remaining definitions in this file are needed because uclinux
33169689Skan   does not use config/linux.h.  */
34169689Skan
35169689Skan/* Do not assume anything about header files.  */
36169689Skan#define NO_IMPLICIT_EXTERN_C
37169689Skan
38169689Skan/* The GNU C++ standard library requires that these macros be defined.  */
39169689Skan#undef CPLUSPLUS_CPP_SPEC
40169689Skan#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
41169689Skan
42169689Skan/* Provide a STARTFILE_SPEC appropriate for GNU/Linux.  Here we add
43169689Skan   the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
44169689Skan   provides part of the support for getting C++ file-scope static
45169689Skan   object constructed before entering `main'.  */
46169689Skan
47169689Skan#undef  STARTFILE_SPEC
48169689Skan#define STARTFILE_SPEC \
49169689Skan  "%{!shared: \
50169689Skan     %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
51169689Skan		       %{!p:%{profile:gcrt1.o%s} \
52169689Skan			 %{!profile:crt1.o%s}}}} \
53169689Skan   crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
54169689Skan
55169689Skan/* Provide a ENDFILE_SPEC appropriate for GNU/Linux.  Here we tack on
56169689Skan   the GNU/Linux magical crtend.o file (see crtstuff.c) which
57169689Skan   provides part of the support for getting C++ file-scope static
58169689Skan   object constructed before entering `main', followed by a normal
59169689Skan   GNU/Linux "finalizer" file, `crtn.o'.  */
60169689Skan
61169689Skan#undef  ENDFILE_SPEC
62169689Skan#define ENDFILE_SPEC \
63169689Skan  "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
64169689Skan
65169689Skan#undef  CC1_SPEC
66169689Skan#define CC1_SPEC "%{profile:-p}"
67169689Skan
68169689Skan#define LINK_GCC_C_SEQUENCE_SPEC \
69169689Skan  "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
70169689Skan
71169689Skan/* Use --as-needed -lgcc_s for eh support.  */
72169689Skan#ifdef HAVE_LD_AS_NEEDED
73169689Skan#define USE_LD_AS_NEEDED 1
74169689Skan#endif
75