]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/i370/linux.h
PR c++/17413
[thirdparty/gcc.git] / gcc / config / i370 / linux.h
CommitLineData
8e5578ea 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
7This file is part of GCC.
8
9GCC is free software; you can redistribute it and/or modify
10it under the terms of the GNU General Public License as published by
11the Free Software Foundation; either version 2, or (at your option)
12any later version.
13
14GCC is distributed in the hope that it will be useful,
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17GNU General Public License for more details.
18
19You should have received a copy of the GNU General Public License
20along with GCC; see the file COPYING. If not, write to
21the Free Software Foundation, 59 Temple Place - Suite 330,
22Boston, 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() LINUX_TARGET_OS_CPP_BUILTINS()
33
34/* Options for this target machine. */
35
36#define LIBGCC_SPEC "libgcc.a%s"
37
38#ifdef SOME_FUTURE_DAY
39
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) }"
43
44#define LIB_SPEC "\
45%{mcall-linux: %(lib_linux) } \
46%{!mcall-linux:%(lib_default) }"
47
48#define STARTFILE_SPEC "\
49%{mcall-linux: %(startfile_linux) } \
50%{!mcall-linux: %(startfile_default) }"
51
52#define ENDFILE_SPEC "\
53%{mcall-linux: %(endfile_linux) } \
54%{!mcall-linux: %(endfile_default) }"
55
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
60
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
67
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
73
74#ifndef LINK_START_LINUX_SPEC
75#define LINK_START_LINUX_SPEC "-Ttext 0x10000"
76#endif
77
78#ifndef LINK_OS_LINUX_SPEC
79#define LINK_OS_LINUX_SPEC ""
80#endif
81
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
87
88#ifndef CPP_OS_LINUX_SPEC
89#define CPP_OS_LINUX_SPEC ""
90#endif
91
92
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 },
112
113#endif /* SOME_FUTURE_DAY */