OSDN Git Service

* alpha/linux.h: Define __gnu_linux__ wherever __linux__ is
[pf3gnuchains/gcc-fork.git] / gcc / config / i386 / linux64.h
1 /* Definitions for AMD x86-64 running Linux-based GNU systems with ELF format.
2    Copyright (C) 2001, 2002 Free Software Foundation, Inc.
3    Contributed by Jan Hubicka <jh@suse.cz>, based on linux.h.
4
5 This file is part of GNU CC.
6
7 GNU CC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
10 any later version.
11
12 GNU CC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GNU CC; see the file COPYING.  If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA.  */
21
22 #define LINUX_DEFAULT_ELF
23
24 #define TARGET_VERSION fprintf (stderr, " (x86-64 Linux/ELF)");
25
26 #undef CPP_PREDEFINES
27 #define CPP_PREDEFINES "-D__ELF__ -Dunix -Dgnu_linux -Dlinux -Asystem(posix)"
28
29 #undef CPP_SPEC
30 #define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT} %{!m32:-D__LONG_MAX__=9223372036854775807L}"
31
32 /* Provide a LINK_SPEC.  Here we provide support for the special GCC
33    options -static and -shared, which allow us to link things in one
34    of these three modes by applying the appropriate combinations of
35    options at link-time.
36
37    When the -shared link option is used a final link is not being
38    done.  */
39
40 #undef  LINK_SPEC
41 #define LINK_SPEC "%{!m32:-m elf_x86_64 -Y P,/usr/lib64} %{m32:-m elf_i386} \
42   %{shared:-shared} \
43   %{!shared: \
44     %{!static: \
45       %{rdynamic:-export-dynamic} \
46       %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
47       %{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \
48     %{static:-static}}"
49
50 #undef  STARTFILE_SPEC
51 #define STARTFILE_SPEC \
52   "%{m32:%{!shared: \
53        %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
54        %{!p:%{profile:gcrt1.o%s} %{!profile:crt1.o%s}}}} \
55      crti.o%s %{static:crtbeginT.o%s}\
56      %{!static:%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}} \
57    %{!m32:%{!shared: \
58        %{pg:/usr/lib64/gcrt1.o%s} %{!pg:%{p:/usr/lib64/gcrt1.o%s} \
59        %{!p:%{profile:/usr/lib64/gcrt1.o%s} %{!profile:/usr/lib64/crt1.o%s}}}}\
60      /usr/lib64/crti.o%s %{static:crtbeginT.o%s} \
61      %{!static:%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}}"
62
63 #undef  ENDFILE_SPEC
64 #define ENDFILE_SPEC "\
65   %{m32:%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s} \
66   %{!m32:%{!shared:crtend.o%s} %{shared:crtendS.o%s} /usr/lib64/crtn.o%s}"