1 |
282 |
jeremybenn |
/* Definitions for LM32 running Linux-based GNU systems using ELF
|
2 |
|
|
Copyright (C) 1993, 1994, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
3 |
|
|
2009 Free Software Foundation, Inc.
|
4 |
|
|
Contributed by Philip Blundell <philb@gnu.org>
|
5 |
|
|
|
6 |
|
|
This file is part of GCC.
|
7 |
|
|
|
8 |
|
|
GCC is free software; you can redistribute it and/or modify it
|
9 |
|
|
under the terms of the GNU General Public License as published
|
10 |
|
|
by the Free Software Foundation; either version 3, or (at your
|
11 |
|
|
option) any later version.
|
12 |
|
|
|
13 |
|
|
GCC is distributed in the hope that it will be useful, but WITHOUT
|
14 |
|
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
15 |
|
|
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
16 |
|
|
License for more details.
|
17 |
|
|
|
18 |
|
|
You should have received a copy of the GNU General Public License
|
19 |
|
|
along with GCC; see the file COPYING3. If not see
|
20 |
|
|
<http://www.gnu.org/licenses/>. */
|
21 |
|
|
|
22 |
|
|
/* elfos.h should have already been included. Now just override
|
23 |
|
|
any conflicting definitions and add any extras. */
|
24 |
|
|
|
25 |
|
|
/* Run-time Target Specification. */
|
26 |
|
|
#undef TARGET_VERSION
|
27 |
|
|
#define TARGET_VERSION fputs (" (LM32 GNU/Linux with ELF)", stderr);
|
28 |
|
|
|
29 |
|
|
/* Do not assume anything about header files. */
|
30 |
|
|
#undef NO_IMPLICIT_EXTERN_C
|
31 |
|
|
#define NO_IMPLICIT_EXTERN_C
|
32 |
|
|
|
33 |
|
|
/* The GNU C++ standard library requires that these macros be defined. */
|
34 |
|
|
#undef CPLUSPLUS_CPP_SPEC
|
35 |
|
|
#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
|
36 |
|
|
|
37 |
|
|
/* Now we define the strings used to build the spec file. */
|
38 |
|
|
#undef LIB_SPEC
|
39 |
|
|
#define LIB_SPEC \
|
40 |
|
|
"%{pthread:-lpthread} \
|
41 |
|
|
%{shared:-lc} \
|
42 |
|
|
%{!shared:-lc} "
|
43 |
|
|
|
44 |
|
|
#define LIBGCC_SPEC "-lgcc"
|
45 |
|
|
|
46 |
|
|
/* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
|
47 |
|
|
the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
|
48 |
|
|
provides part of the support for getting C++ file-scope static
|
49 |
|
|
object constructed before entering `main'. */
|
50 |
|
|
|
51 |
|
|
#undef STARTFILE_SPEC
|
52 |
|
|
#define STARTFILE_SPEC \
|
53 |
|
|
"%{!shared: \
|
54 |
|
|
%{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
|
55 |
|
|
%{!p:%{profile:gcrt1.o%s} \
|
56 |
|
|
%{!profile:crt1.o%s}}}} \
|
57 |
|
|
crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
|
58 |
|
|
|
59 |
|
|
/* Provide a ENDFILE_SPEC appropriate for GNU/Linux. Here we tack on
|
60 |
|
|
the GNU/Linux magical crtend.o file (see crtstuff.c) which
|
61 |
|
|
provides part of the support for getting C++ file-scope static
|
62 |
|
|
object constructed before entering `main', followed by a normal
|
63 |
|
|
GNU/Linux "finalizer" file, `crtn.o'. */
|
64 |
|
|
|
65 |
|
|
#undef ENDFILE_SPEC
|
66 |
|
|
#define ENDFILE_SPEC \
|
67 |
|
|
"%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
|
68 |
|
|
|
69 |
|
|
#undef LINK_SPEC
|
70 |
|
|
#define LINK_SPEC "%{h*} %{version:-v} \
|
71 |
|
|
%{b} %{Wl,*:%*} \
|
72 |
|
|
%{static:-Bstatic} \
|
73 |
|
|
%{shared:-shared} \
|
74 |
|
|
%{symbolic:-Bsymbolic} \
|
75 |
|
|
%{rdynamic:-export-dynamic} \
|
76 |
|
|
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}"
|
77 |
|
|
|
78 |
|
|
#define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS()
|
79 |
|
|
|
80 |
|
|
#define LINK_GCC_C_SEQUENCE_SPEC \
|
81 |
|
|
"%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
|
82 |
|
|
|
83 |
|
|
#undef CC1_SPEC
|
84 |
|
|
#define CC1_SPEC "%{G*} %{!fno-PIC:-fPIC}"
|
85 |
|
|
|