]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/lynx.h
host-hpux.c: Change copyright header to refer to version 3 of the GNU General Public...
[thirdparty/gcc.git] / gcc / config / lynx.h
CommitLineData
4f587cb0 1/* Target independent definitions for LynxOS.
2f83c7d6
NC
2 Copyright (C) 1993, 1994, 1995, 1996, 1999, 2000, 2002, 2003, 2004,
3 2007 Free Software Foundation, Inc.
4fb420c2 4
2a71dcad 5This file is part of GCC.
4843c185 6
2a71dcad 7GCC is free software; you can redistribute it and/or modify
4843c185 8it under the terms of the GNU General Public License as published by
2f83c7d6 9the Free Software Foundation; either version 3, or (at your option)
4843c185
RS
10any later version.
11
2a71dcad 12GCC is distributed in the hope that it will be useful,
4843c185
RS
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
2f83c7d6
NC
18along with GCC; see the file COPYING3. If not see
19<http://www.gnu.org/licenses/>. */
4843c185 20
4f587cb0
AN
21/* In this file we set up defaults that can be chosen by
22 <target>/lynx.h files. A target-specific lynx.h file can decide
23 either to define and override these definitions or to use them by
24 ensuring they are undefined at this point. If we were to #undef
25 them here we might accidentally disable some target-specific
26 defines. */
27
28#ifndef EXTRA_OS_LYNX_TARGET_SPECS
29# define EXTRA_OS_LYNX_TARGET_SPECS
30#endif
31
32#ifndef EXTRA_OS_LYNX_SPECS
33# define EXTRA_OS_LYNX_SPECS \
34 { "cpp_os_lynx", CPP_OS_LYNX_SPEC }, \
35 { "lib_os_lynx", LIB_OS_LYNX_SPEC }, \
36 { "link_os_lynx", LINK_OS_LYNX_SPEC }, \
37 { "startfile_os_lynx", STARTFILE_OS_LYNX_SPEC }, \
38 { "endfile_os_lynx", ENDFILE_OS_LYNX_SPEC }, \
39 EXTRA_OS_LYNX_TARGET_SPECS
40#endif
41
42#ifndef SUBTARGET_EXTRA_SPECS
43# define SUBTARGET_EXTRA_SPECS EXTRA_OS_LYNX_SPECS
44#endif
45
46#ifndef CPP_SPEC
47# define CPP_SPEC "%(cpp_cpu) %(cpp_os_lynx)"
48#endif
49
50#ifndef LIB_SPEC
51# define LIB_SPEC "%(lib_os_lynx)"
52#endif
53
54#ifndef LINK_SPEC
55# define LINK_SPEC "%(link_os_lynx)"
56#endif
57
58#ifndef STARTFILE_SPEC
59# define STARTFILE_SPEC "%(startfile_os_lynx)"
60#endif
61
62#ifndef ENDFILE_SPEC
63# define ENDFILE_SPEC "%(endfile_os_lynx)"
64#endif
65
66#ifndef CPP_OS_LYNX_SPEC
67# define CPP_OS_LYNX_SPEC \
68"%{mthreads: \
69 %{mlegacy-threads: \
ab532386 70 %ecannot use mthreads and mlegacy-threads together}} \
4f587cb0
AN
71 %{mthreads: -D_MULTITHREADED} \
72 %{mlegacy-threads: -D_THREADS_POSIX4ad4} \
73 -Asystem=lynx -Asystem=unix -D__Lynx__ -D__unix__"
74#endif
75
76#ifndef LIB_OS_LYNX_SPEC
77# define LIB_OS_LYNX_SPEC \
78"%{mlegacy-threads:-lposix-pre1c} -lm -lc"
79#endif
80
81/* We link static executables for LynxOS by default unless -mshared is
82 used when linking an executable. Along the same line, we link to
83 shared libraries when linking a shared object by default unless
84 -static is used.
85
86 We have to pass in our -L options here otherwise the translated
87 startfile directories (%D) will take priority over this.
88 Furthermore since we have to pass in -L options here we have to
89 make sure that -L options provided by the user take priority over
90 everything we specify. */
91
92#ifndef LINK_OS_LYNX_SPEC
93# define LINK_OS_LYNX_SPEC \
94"%{shared} %{static} \
ab532386 95 %{mshared: %{static: %ecannot use mshared and static together}} \
4f587cb0
AN
96 %{!mshared: %{!shared: %{!static: -static}}} \
97 %{L*} \
98 %{mthreads: \
99 %{mshared: -L/lib/thread/shlib -rpath /lib/thread/shlib} \
100 %{shared: \
101 %{!static: -L/lib/thread/shlib -rpath /lib/thread/shlib} \
102 %{!mshared: -L/lib/thread}} \
103 %{shared: %{static: -L/lib/thread}}} \
104 %{!mthreads: \
105 %{mshared: -L/lib/shlib -rpath /lib/shlib} \
106 %{shared: -L/lib/shlib -rpath /lib/shlib}} \
107 %{mlegacy-threads:-lposix-pre1c} -lm -lc"
108#endif
109
110#ifndef STARTFILE_OS_LYNX_SPEC
111# define STARTFILE_OS_LYNX_SPEC \
112"%{!shared: \
113 %{!mthreads: \
114 %{p:gcrt1.o%s} %{pg:gcrt1.o%s} \
115 %{!p:%{!pg:crt1.o%s}}} \
116 %{mthreads: \
117 %{p:thread/gcrt1.o%s} %{pg:thread/gcrt1.o%s} \
118 %{!p:%{!pg:thread/crt1.o%s }}}}\
119 %{mthreads: thread/crti.o%s} %{!mthreads: crti.o%s} \
120 %{!shared: crtbegin.o%s} \
121 %{shared: crtbeginS.o%s}"
122#endif
123
124#ifndef ENDFILE_OS_LYNX_SPEC
125# define ENDFILE_OS_LYNX_SPEC \
126"%{!shared: crtend.o%s} \
127 %{shared: crtendS.o%s} \
128 %{mthreads: thread/crtn.o%s} %{!mthreads: crtn.o%s}"
129#endif
130
4f587cb0
AN
131/* Define the actual types of some ANSI-mandated types. */
132
133#ifndef SIZE_TYPE
134# define SIZE_TYPE "unsigned int"
135#endif
136
137#ifndef PTRDIFF_TYPE
138# define PTRDIFF_TYPE "int"
139#endif
140
141#ifndef WCHAR_TYPE
142# define WCHAR_TYPE "long int"
143#endif
144
145#ifndef WCHAR_TYPE_SIZE
146# define WCHAR_TYPE_SIZE BITS_PER_WORD
147#endif
148
149/* Define ASM_OUTPUT_ALIGN to use the .balign directive rather that
150 the .align directive with GAS. */
151
152#ifndef ASM_OUTPUT_ALIGN
153# define ASM_OUTPUT_ALIGN(FILE, LOG) \
154 do \
155 { \
156 if ((LOG) != 0) \
157 fprintf ((FILE), "\t.balign %d\n", 1 << (LOG)); \
158 } \
159 while (0)
160#endif
161
162/* Keep the *_DEBUGGING_INFO defines from elfos.h except that stabs is
163 the default on LynxOS. */
164
165#ifndef PREFERRED_DEBUGGING_TYPE
166# define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
167#endif
168
169/* We have C++ support in our system headers. */
170
171#ifndef NO_IMPLICIT_EXTERN_C
172# define NO_IMPLICIT_EXTERN_C
173#endif
174
4969c0d8
L
175#ifndef TARGET_POSIX_IO
176# define TARGET_POSIX_IO
4f587cb0 177#endif