OSDN Git Service

2008-11-09 Thomas Schwinge <tschwinge@gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / config / i386 / gnu.h
1 /* Configuration for an i386 running GNU with ELF as the target machine.  */
2
3 /*
4 Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
5 2005, 2007, 2008 Free Software Foundation, Inc.
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 of the License, or
12 (at your option) 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.  If not, see <http://www.gnu.org/licenses/>.
21 */
22
23 #undef TARGET_VERSION
24 #define TARGET_VERSION fprintf (stderr, " (i386 GNU)");
25
26 #undef TARGET_OS_CPP_BUILTINS /* config.gcc includes i386/linux.h.  */
27 #define TARGET_OS_CPP_BUILTINS()                \
28   do                                            \
29     {                                           \
30         HURD_TARGET_OS_CPP_BUILTINS();          \
31     }                                           \
32   while (0)
33
34 #undef CPP_SPEC
35 #define CPP_SPEC "%{pthread:-D_REENTRANT} %{posix:-D_POSIX_SOURCE} %{bsd:-D_BSD_SOURCE}"
36
37 #undef CC1_SPEC
38 #define CC1_SPEC "%(cc1_cpu)"
39
40 #undef  LINK_SPEC
41 #define LINK_SPEC "-m elf_i386 %{shared:-shared} \
42   %{!shared: \
43     %{!static: \
44       %{rdynamic:-export-dynamic} \
45       %{!dynamic-linker:-dynamic-linker /lib/ld.so}} \
46     %{static:-static}}"
47
48 #undef  STARTFILE_SPEC
49 #if defined HAVE_LD_PIE
50 #define STARTFILE_SPEC \
51   "%{!shared: %{pg|p|profile:gcrt0.o%s;pie:Scrt1.o%s;static:crt0.o%s;:crt1.o%s}} \
52    crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
53 #else
54 #define STARTFILE_SPEC \
55   "%{!shared: %{pg|p|profile:gcrt0.o%s;static:crt0.o%s;:crt1.o%s}} \
56    crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
57 #endif
58
59 #undef  ENDFILE_SPEC
60 #define ENDFILE_SPEC \
61   "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
62
63 /* FIXME: Is a Hurd-specific fallback mechanism necessary?  */
64 #undef MD_UNWIND_SUPPORT