2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / config / i370 / linux.h
blobf402fbde9f3d50ddbfac43c651fb29340aa656c8
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)
7 This file is part of GCC.
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 2, or (at your option)
12 any later version.
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.
19 You should have received a copy of the GNU General Public License
20 along with GCC; see the file COPYING. If not, write to
21 the Free Software Foundation, 59 Temple Place - Suite 330,
22 Boston, MA 02111-1307, USA. */
25 #define TARGET_VERSION fprintf (stderr, " (i370 GNU/Linux with ELF)");
27 /* Specify that we're generating code for a Linux port to 370 */
29 #define TARGET_ELF_ABI
31 /* Target OS preprocessor built-ins. */
32 #define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS()
34 /* Options for this target machine. */
36 #define LIBGCC_SPEC "libgcc.a%s"
38 #ifdef SOME_FUTURE_DAY
40 #define CPP_SPEC "%{posix: -D_POSIX_SOURCE} %(cpp_sysv) %(cpp_endian_big) \
41 %{mcall-linux: %(cpp_os_linux) } \
42 %{!mcall-linux: %(cpp_os_default) }"
44 #define LIB_SPEC "\
45 %{mcall-linux: %(lib_linux) } \
46 %{!mcall-linux:%(lib_default) }"
48 #define STARTFILE_SPEC "\
49 %{mcall-linux: %(startfile_linux) } \
50 %{!mcall-linux: %(startfile_default) }"
52 #define ENDFILE_SPEC "\
53 %{mcall-linux: %(endfile_linux) } \
54 %{!mcall-linux: %(endfile_default) }"
56 /* GNU/Linux support. */
57 #ifndef LIB_LINUX_SPEC
58 #define LIB_LINUX_SPEC "%{mnewlib: --start-group -llinux -lc --end-group } %{!mnewlib: -lc }"
59 #endif
61 #ifndef STARTFILE_LINUX_SPEC
62 #define STARTFILE_LINUX_SPEC "\
63 %{!shared: %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}} \
64 %{mnewlib: ecrti.o%s} \
65 %{!mnewlib: crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}"
66 #endif
68 #ifndef ENDFILE_LINUX_SPEC
69 #define ENDFILE_LINUX_SPEC "\
70 %{mnewlib: ecrtn.o%s} \
71 %{!mnewlib: %{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s}"
72 #endif
74 #ifndef LINK_START_LINUX_SPEC
75 #define LINK_START_LINUX_SPEC "-Ttext 0x10000"
76 #endif
78 #ifndef LINK_OS_LINUX_SPEC
79 #define LINK_OS_LINUX_SPEC ""
80 #endif
82 #ifndef CPP_OS_LINUX_SPEC
83 #define CPP_OS_LINUX_SPEC "-D__unix__ -D__gnu_linux__ -D__linux__ \
84 %{!ansi: -Dunix -Dlinux } \
85 -Asystem=unix -Asystem=linux"
86 #endif
88 #ifndef CPP_OS_LINUX_SPEC
89 #define CPP_OS_LINUX_SPEC ""
90 #endif
93 /* Define any extra SPECS that the compiler needs to generate. */
94 #undef SUBTARGET_EXTRA_SPECS
95 #define SUBTARGET_EXTRA_SPECS \
96 { "lib_linux", LIB_LINUX_SPEC }, \
97 { "lib_default", LIB_DEFAULT_SPEC }, \
98 { "startfile_linux", STARTFILE_LINUX_SPEC }, \
99 { "startfile_default", STARTFILE_DEFAULT_SPEC }, \
100 { "endfile_linux", ENDFILE_LINUX_SPEC }, \
101 { "endfile_default", ENDFILE_DEFAULT_SPEC }, \
102 { "link_shlib", LINK_SHLIB_SPEC }, \
103 { "link_target", LINK_TARGET_SPEC }, \
104 { "link_start", LINK_START_SPEC }, \
105 { "link_start_linux", LINK_START_LINUX_SPEC }, \
106 { "link_os", LINK_OS_SPEC }, \
107 { "link_os_linux", LINK_OS_LINUX_SPEC }, \
108 { "link_os_default", LINK_OS_DEFAULT_SPEC }, \
109 { "cpp_endian_big", CPP_ENDIAN_BIG_SPEC }, \
110 { "cpp_os_linux", CPP_OS_LINUX_SPEC }, \
111 { "cpp_os_default", CPP_OS_DEFAULT_SPEC },
113 #endif /* SOME_FUTURE_DAY */