]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/config/i370/linux.h
* config.gcc (m68k-*-linux*): Remove definition of LINUX_DEFAULT_ELF.
[thirdparty/gcc.git] / gcc / config / i370 / linux.h
1 /* Definitions of target machine for GNU compiler. System/370 version.
2 Copyright (C) 1989, 1993, 1995, 1996, 1997, 2003
3 Free Software Foundation, Inc.
4 Contributed by Jan Stein (jan@cd.chalmers.se).
5 Modified for Linux/390 by Linas Vepstas (linas@linas.org)
6
7 This file is part of GNU CC.
8
9 GNU CC 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 2, or (at your option)
12 any later version.
13
14 GNU CC 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 GNU CC; see the file COPYING. If not, write to
21 the Free Software Foundation, 59 Temple Place - Suite 330,
22 Boston, MA 02111-1307, USA. */
23
24
25 #define TARGET_VERSION fprintf (stderr, " (i370 GNU/Linux with ELF)");
26
27 /* Specify that we're generating code for a Linux port to 370 */
28
29 #define TARGET_ELF_ABI
30
31 /* Target OS preprocessor built-ins. */
32 #define TARGET_OS_CPP_BUILTINS() \
33 do { \
34 builtin_define_std ("unix"); \
35 builtin_define_std ("linux"); \
36 builtin_define ("__gnu_linux__"); \
37 builtin_assert ("system=posix"); \
38 } while (0)
39
40 /* Options for this target machine. */
41
42 #define LIBGCC_SPEC "libgcc.a%s"
43
44 #ifdef SOME_FUTURE_DAY
45
46 #define CPP_SPEC "%{posix: -D_POSIX_SOURCE} %(cpp_sysv) %(cpp_endian_big) \
47 %{mcall-linux: %(cpp_os_linux) } \
48 %{!mcall-linux: %(cpp_os_default) }"
49
50 #define LIB_SPEC "\
51 %{mcall-linux: %(lib_linux) } \
52 %{!mcall-linux:%(lib_default) }"
53
54 #define STARTFILE_SPEC "\
55 %{mcall-linux: %(startfile_linux) } \
56 %{!mcall-linux: %(startfile_default) }"
57
58 #define ENDFILE_SPEC "\
59 %{mcall-linux: %(endfile_linux) } \
60 %{!mcall-linux: %(endfile_default) }"
61
62 /* GNU/Linux support. */
63 #ifndef LIB_LINUX_SPEC
64 #define LIB_LINUX_SPEC "%{mnewlib: --start-group -llinux -lc --end-group } %{!mnewlib: -lc }"
65 #endif
66
67 #ifndef STARTFILE_LINUX_SPEC
68 #define STARTFILE_LINUX_SPEC "\
69 %{!shared: %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}} \
70 %{mnewlib: ecrti.o%s} \
71 %{!mnewlib: crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}"
72 #endif
73
74 #ifndef ENDFILE_LINUX_SPEC
75 #define ENDFILE_LINUX_SPEC "\
76 %{mnewlib: ecrtn.o%s} \
77 %{!mnewlib: %{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s}"
78 #endif
79
80 #ifndef LINK_START_LINUX_SPEC
81 #define LINK_START_LINUX_SPEC "-Ttext 0x10000"
82 #endif
83
84 #ifndef LINK_OS_LINUX_SPEC
85 #define LINK_OS_LINUX_SPEC ""
86 #endif
87
88 #ifndef CPP_OS_LINUX_SPEC
89 #define CPP_OS_LINUX_SPEC "-D__unix__ -D__gnu_linux__ -D__linux__ \
90 %{!ansi: -Dunix -Dlinux } \
91 -Asystem=unix -Asystem=linux"
92 #endif
93
94 #ifndef CPP_OS_LINUX_SPEC
95 #define CPP_OS_LINUX_SPEC ""
96 #endif
97
98
99 /* Define any extra SPECS that the compiler needs to generate. */
100 #undef SUBTARGET_EXTRA_SPECS
101 #define SUBTARGET_EXTRA_SPECS \
102 { "lib_linux", LIB_LINUX_SPEC }, \
103 { "lib_default", LIB_DEFAULT_SPEC }, \
104 { "startfile_linux", STARTFILE_LINUX_SPEC }, \
105 { "startfile_default", STARTFILE_DEFAULT_SPEC }, \
106 { "endfile_linux", ENDFILE_LINUX_SPEC }, \
107 { "endfile_default", ENDFILE_DEFAULT_SPEC }, \
108 { "link_shlib", LINK_SHLIB_SPEC }, \
109 { "link_target", LINK_TARGET_SPEC }, \
110 { "link_start", LINK_START_SPEC }, \
111 { "link_start_linux", LINK_START_LINUX_SPEC }, \
112 { "link_os", LINK_OS_SPEC }, \
113 { "link_os_linux", LINK_OS_LINUX_SPEC }, \
114 { "link_os_default", LINK_OS_DEFAULT_SPEC }, \
115 { "cpp_endian_big", CPP_ENDIAN_BIG_SPEC }, \
116 { "cpp_os_linux", CPP_OS_LINUX_SPEC }, \
117 { "cpp_os_default", CPP_OS_DEFAULT_SPEC },
118
119 #endif /* SOME_FUTURE_DAY */