OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [config/] [linux.h] - Blame information for rev 455

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 38 julius
/* Definitions for Linux-based GNU systems with ELF format
2
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2003, 2004, 2005, 2006,
3
   2007 Free Software Foundation, Inc.
4
   Contributed by Eric Youngdale.
5
   Modified for stabs-in-ELF by H.J. Lu (hjl@lucon.org).
6
 
7
This file is part of GCC.
8
 
9
GCC is free software; you can redistribute it and/or modify
10
it under the terms of the GNU General Public License as published by
11
the Free Software Foundation; either version 3, or (at your option)
12
any later version.
13
 
14
GCC is distributed in the hope that it will be useful,
15
but WITHOUT ANY WARRANTY; without even the implied warranty of
16
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
GNU General Public License for more details.
18
 
19
You should have received a copy of the GNU General Public License
20
along with GCC; see the file COPYING3.  If not see
21
<http://www.gnu.org/licenses/>.  */
22
 
23
/* Don't assume anything about the header files.  */
24
#define NO_IMPLICIT_EXTERN_C
25
 
26
#undef ASM_APP_ON
27
#define ASM_APP_ON "#APP\n"
28
 
29
#undef ASM_APP_OFF
30
#define ASM_APP_OFF "#NO_APP\n"
31
 
32
#undef MD_EXEC_PREFIX
33
#undef MD_STARTFILE_PREFIX
34
 
35
/* Provide a STARTFILE_SPEC appropriate for GNU/Linux.  Here we add
36
   the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
37
   provides part of the support for getting C++ file-scope static
38
   object constructed before entering `main'.  */
39
 
40
#undef  STARTFILE_SPEC
41
#if defined HAVE_LD_PIE
42
#define STARTFILE_SPEC \
43
  "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \
44
   crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
45
#else
46
#define STARTFILE_SPEC \
47
  "%{!shared: %{pg|p|profile:gcrt1.o%s;:crt1.o%s}} \
48
   crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
49
#endif
50
 
51
/* Provide a ENDFILE_SPEC appropriate for GNU/Linux.  Here we tack on
52
   the GNU/Linux magical crtend.o file (see crtstuff.c) which
53
   provides part of the support for getting C++ file-scope static
54
   object constructed before entering `main', followed by a normal
55
   GNU/Linux "finalizer" file, `crtn.o'.  */
56
 
57
#undef  ENDFILE_SPEC
58
#define ENDFILE_SPEC \
59
  "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
60
 
61
/* This is for -profile to use -lc_p instead of -lc.  */
62
#ifndef CC1_SPEC
63
#define CC1_SPEC "%{profile:-p}"
64
#endif
65
 
66
/* The GNU C++ standard library requires that these macros be defined.  */
67
#undef CPLUSPLUS_CPP_SPEC
68
#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
69
 
70
#undef  LIB_SPEC
71
#define LIB_SPEC \
72
  "%{pthread:-lpthread} \
73
   %{shared:-lc} \
74
   %{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}"
75
 
76
#define LINUX_TARGET_OS_CPP_BUILTINS()                          \
77
    do {                                                        \
78
        builtin_define ("__gnu_linux__");                       \
79
        builtin_define_std ("linux");                           \
80
        builtin_define_std ("unix");                            \
81
        builtin_assert ("system=linux");                        \
82
        builtin_assert ("system=unix");                         \
83
        builtin_assert ("system=posix");                        \
84
    } while (0)
85
 
86
#if defined(HAVE_LD_EH_FRAME_HDR)
87
#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
88
#endif
89
 
90
/* Define this so we can compile MS code for use with WINE.  */
91
#define HANDLE_PRAGMA_PACK_PUSH_POP
92
 
93
#define LINK_GCC_C_SEQUENCE_SPEC \
94
  "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
95
 
96
/* Use --as-needed -lgcc_s for eh support.  */
97
#ifdef HAVE_LD_AS_NEEDED
98
#define USE_LD_AS_NEEDED 1
99
#endif
100
 
101
/* Determine which dynamic linker to use depending on whether GLIBC or
102
   uClibc is the default C library and whether -muclibc or -mglibc has
103
   been passed to change the default.  */
104
#if UCLIBC_DEFAULT
105
#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
106
#else
107
#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:%{mglibc:%e-mglibc and -muclibc used together}" U ";:" G "}"
108
#endif
109
 
110
/* For most targets the following definitions suffice;
111
   GLIBC_DYNAMIC_LINKER must be defined for each target using them, or
112
   GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets
113
   supporting both 32-bit and 64-bit compilation.  */
114
#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
115
#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
116
#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
117
#define LINUX_DYNAMIC_LINKER \
118
  CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
119
#define LINUX_DYNAMIC_LINKER32 \
120
  CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32)
121
#define LINUX_DYNAMIC_LINKER64 \
122
  CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64)
123
 
124
/* Determine whether the entire c99 runtime
125
   is present in the runtime library.  */
126
#define TARGET_C99_FUNCTIONS (OPTION_GLIBC)
127
 
128
#define TARGET_POSIX_IO

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.