1 /* 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, 2010 Free Software Foundation, Inc.
4 Contributed by Philip Blundell <philb@gnu.org>
6 This file is part of GCC.
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.
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.
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/>. */
22 /* elfos.h should have already been included. Now just override
23 any conflicting definitions and add any extras. */
25 /* Run-time Target Specification. */
27 #define TARGET_VERSION fputs (" (LM32 GNU/Linux with ELF)", stderr);
29 /* Do not assume anything about header files. */
30 #undef NO_IMPLICIT_EXTERN_C
31 #define NO_IMPLICIT_EXTERN_C
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)"
37 /* Now we define the strings used to build the spec file. */
40 "%{pthread:-lpthread} \
44 #define LIBGCC_SPEC "-lgcc"
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'. */
52 #define STARTFILE_SPEC \
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}"
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'. */
66 #define ENDFILE_SPEC \
67 "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
70 #define LINK_SPEC "%{h*} %{version:-v} \
73 %{symbolic:-Bsymbolic} \
74 %{rdynamic:-export-dynamic} \
75 %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}"
77 #define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS()
79 #define LINK_GCC_C_SEQUENCE_SPEC \
80 "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
83 #define CC1_SPEC "%{G*} %{!fno-PIC:-fPIC}"