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 GNU CC.
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)
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.
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. */
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
30 #define LINUX_DEFAULT_ELF
32 /* Target OS preprocessor built-ins. */
33 #define TARGET_OS_CPP_BUILTINS() \
35 builtin_define_std ("unix"); \
36 builtin_define_std ("linux"); \
37 builtin_define ("__gnu_linux__"); \
38 builtin_assert ("system=posix"); \
41 /* Options for this target machine. */
43 #define LIBGCC_SPEC "libgcc.a%s"
45 #ifdef SOME_FUTURE_DAY
47 #define CPP_SPEC "%{posix: -D_POSIX_SOURCE} %(cpp_sysv) %(cpp_endian_big) \
48 %{mcall-linux: %(cpp_os_linux) } \
49 %{!mcall-linux: %(cpp_os_default) }"
52 %{mcall-linux: %(lib_linux) } \
53 %{!mcall-linux:%(lib_default) }"
55 #define STARTFILE_SPEC "\
56 %{mcall-linux: %(startfile_linux) } \
57 %{!mcall-linux: %(startfile_default) }"
59 #define ENDFILE_SPEC "\
60 %{mcall-linux: %(endfile_linux) } \
61 %{!mcall-linux: %(endfile_default) }"
63 /* GNU/Linux support. */
64 #ifndef LIB_LINUX_SPEC
65 #define LIB_LINUX_SPEC "%{mnewlib: --start-group -llinux -lc --end-group } %{!mnewlib: -lc }"
68 #ifndef STARTFILE_LINUX_SPEC
69 #define STARTFILE_LINUX_SPEC "\
70 %{!shared: %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}} \
71 %{mnewlib: ecrti.o%s} \
72 %{!mnewlib: crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}"
75 #ifndef ENDFILE_LINUX_SPEC
76 #define ENDFILE_LINUX_SPEC "\
77 %{mnewlib: ecrtn.o%s} \
78 %{!mnewlib: %{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s}"
81 #ifndef LINK_START_LINUX_SPEC
82 #define LINK_START_LINUX_SPEC "-Ttext 0x10000"
85 #ifndef LINK_OS_LINUX_SPEC
86 #define LINK_OS_LINUX_SPEC ""
89 #ifndef CPP_OS_LINUX_SPEC
90 #define CPP_OS_LINUX_SPEC "-D__unix__ -D__gnu_linux__ -D__linux__ \
91 %{!ansi: -Dunix -Dlinux } \
92 -Asystem=unix -Asystem=linux"
95 #ifndef CPP_OS_LINUX_SPEC
96 #define CPP_OS_LINUX_SPEC ""
100 /* Define any extra SPECS that the compiler needs to generate. */
101 #undef SUBTARGET_EXTRA_SPECS
102 #define SUBTARGET_EXTRA_SPECS \
103 { "lib_linux", LIB_LINUX_SPEC }, \
104 { "lib_default", LIB_DEFAULT_SPEC }, \
105 { "startfile_linux", STARTFILE_LINUX_SPEC }, \
106 { "startfile_default", STARTFILE_DEFAULT_SPEC }, \
107 { "endfile_linux", ENDFILE_LINUX_SPEC }, \
108 { "endfile_default", ENDFILE_DEFAULT_SPEC }, \
109 { "link_shlib", LINK_SHLIB_SPEC }, \
110 { "link_target", LINK_TARGET_SPEC }, \
111 { "link_start", LINK_START_SPEC }, \
112 { "link_start_linux", LINK_START_LINUX_SPEC }, \
113 { "link_os", LINK_OS_SPEC }, \
114 { "link_os_linux", LINK_OS_LINUX_SPEC }, \
115 { "link_os_default", LINK_OS_DEFAULT_SPEC }, \
116 { "cpp_endian_big", CPP_ENDIAN_BIG_SPEC }, \
117 { "cpp_os_linux", CPP_OS_LINUX_SPEC }, \
118 { "cpp_os_default", CPP_OS_DEFAULT_SPEC },
120 #endif /* SOME_FUTURE_DAY */