| 1 |
709 |
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, 2010, 2011 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 |
|
|
/* Do not assume anything about header files. */
|
| 26 |
|
|
#undef NO_IMPLICIT_EXTERN_C
|
| 27 |
|
|
#define NO_IMPLICIT_EXTERN_C
|
| 28 |
|
|
|
| 29 |
|
|
/* The GNU C++ standard library requires that these macros be defined. */
|
| 30 |
|
|
#undef CPLUSPLUS_CPP_SPEC
|
| 31 |
|
|
#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
|
| 32 |
|
|
|
| 33 |
|
|
/* Now we define the strings used to build the spec file. */
|
| 34 |
|
|
#undef LIB_SPEC
|
| 35 |
|
|
#define LIB_SPEC \
|
| 36 |
|
|
"%{pthread:-lpthread} \
|
| 37 |
|
|
%{shared:-lc} \
|
| 38 |
|
|
%{!shared:-lc} "
|
| 39 |
|
|
|
| 40 |
|
|
#define LIBGCC_SPEC "-lgcc"
|
| 41 |
|
|
|
| 42 |
|
|
/* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
|
| 43 |
|
|
the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
|
| 44 |
|
|
provides part of the support for getting C++ file-scope static
|
| 45 |
|
|
object constructed before entering `main'. */
|
| 46 |
|
|
|
| 47 |
|
|
#undef STARTFILE_SPEC
|
| 48 |
|
|
#define STARTFILE_SPEC \
|
| 49 |
|
|
"%{!shared: \
|
| 50 |
|
|
%{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
|
| 51 |
|
|
%{!p:%{profile:gcrt1.o%s} \
|
| 52 |
|
|
%{!profile:crt1.o%s}}}} \
|
| 53 |
|
|
crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
|
| 54 |
|
|
|
| 55 |
|
|
/* Provide a ENDFILE_SPEC appropriate for GNU/Linux. Here we tack on
|
| 56 |
|
|
the GNU/Linux magical crtend.o file (see crtstuff.c) which
|
| 57 |
|
|
provides part of the support for getting C++ file-scope static
|
| 58 |
|
|
object constructed before entering `main', followed by a normal
|
| 59 |
|
|
GNU/Linux "finalizer" file, `crtn.o'. */
|
| 60 |
|
|
|
| 61 |
|
|
#undef ENDFILE_SPEC
|
| 62 |
|
|
#define ENDFILE_SPEC \
|
| 63 |
|
|
"%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
|
| 64 |
|
|
|
| 65 |
|
|
#undef LINK_SPEC
|
| 66 |
|
|
#define LINK_SPEC "%{h*} \
|
| 67 |
|
|
%{static:-Bstatic} \
|
| 68 |
|
|
%{shared:-shared} \
|
| 69 |
|
|
%{symbolic:-Bsymbolic} \
|
| 70 |
|
|
%{rdynamic:-export-dynamic} \
|
| 71 |
|
|
-dynamic-linker /lib/ld-linux.so.2"
|
| 72 |
|
|
|
| 73 |
|
|
#define TARGET_OS_CPP_BUILTINS() GNU_USER_TARGET_OS_CPP_BUILTINS()
|
| 74 |
|
|
|
| 75 |
|
|
#define LINK_GCC_C_SEQUENCE_SPEC \
|
| 76 |
|
|
"%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
|
| 77 |
|
|
|
| 78 |
|
|
#undef CC1_SPEC
|
| 79 |
|
|
#define CC1_SPEC "%{G*} %{!fno-PIC:-fPIC}"
|
| 80 |
|
|
|