1 /* Target independent definitions for LynxOS.
2 Copyright (C) 1993, 1994, 1995, 1996, 1999, 2000, 2002, 2003, 2004,
3 2007 Free Software Foundation, Inc.
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
12 GCC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>. */
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
28 #ifndef EXTRA_OS_LYNX_TARGET_SPECS
29 # define EXTRA_OS_LYNX_TARGET_SPECS
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
42 #ifndef SUBTARGET_EXTRA_SPECS
43 # define SUBTARGET_EXTRA_SPECS EXTRA_OS_LYNX_SPECS
47 # define CPP_SPEC "%(cpp_cpu) %(cpp_os_lynx)"
51 # define LIB_SPEC "%(lib_os_lynx)"
55 # define LINK_SPEC "%(link_os_lynx)"
58 #ifndef STARTFILE_SPEC
59 # define STARTFILE_SPEC "%(startfile_os_lynx)"
63 # define ENDFILE_SPEC "%(endfile_os_lynx)"
66 #ifndef CPP_OS_LYNX_SPEC
67 # define CPP_OS_LYNX_SPEC \
70 %ecannot use mthreads and mlegacy-threads together}} \
71 %{mthreads: -D_MULTITHREADED} \
72 %{mlegacy-threads: -D_THREADS_POSIX4ad4} \
73 -Asystem=lynx -Asystem=unix -D__Lynx__ -D__unix__"
76 #ifndef LIB_OS_LYNX_SPEC
77 # define LIB_OS_LYNX_SPEC \
78 "%{mlegacy-threads:-lposix-pre1c} -lm -lc"
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
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. */
92 #ifndef LINK_OS_LYNX_SPEC
93 # define LINK_OS_LYNX_SPEC \
94 "%{shared} %{static} \
95 %{mshared: %{static: %ecannot use mshared and static together}} \
96 %{!mshared: %{!shared: %{!static: -static}}} \
99 %{mshared: -L/lib/thread/shlib -rpath /lib/thread/shlib} \
101 %{!static: -L/lib/thread/shlib -rpath /lib/thread/shlib} \
102 %{!mshared: -L/lib/thread}} \
103 %{shared: %{static: -L/lib/thread}}} \
105 %{mshared: -L/lib/shlib -rpath /lib/shlib} \
106 %{shared: -L/lib/shlib -rpath /lib/shlib}} \
107 %{mlegacy-threads:-lposix-pre1c} -lm -lc"
110 #ifndef STARTFILE_OS_LYNX_SPEC
111 # define STARTFILE_OS_LYNX_SPEC \
114 %{p:gcrt1.o%s} %{pg:gcrt1.o%s} \
115 %{!p:%{!pg:crt1.o%s}}} \
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}"
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}"
131 /* Define the actual types of some ANSI-mandated types. */
134 # define SIZE_TYPE "unsigned int"
138 # define PTRDIFF_TYPE "int"
142 # define WCHAR_TYPE "long int"
145 #ifndef WCHAR_TYPE_SIZE
146 # define WCHAR_TYPE_SIZE BITS_PER_WORD
149 /* Define ASM_OUTPUT_ALIGN to use the .balign directive rather that
150 the .align directive with GAS. */
152 #ifndef ASM_OUTPUT_ALIGN
153 # define ASM_OUTPUT_ALIGN(FILE, LOG) \
157 fprintf ((FILE), "\t.balign %d\n", 1 << (LOG)); \
162 /* Keep the *_DEBUGGING_INFO defines from elfos.h except that stabs is
163 the default on LynxOS. */
165 #ifndef PREFERRED_DEBUGGING_TYPE
166 # define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
169 /* We have C++ support in our system headers. */
171 #ifndef NO_IMPLICIT_EXTERN_C
172 # define NO_IMPLICIT_EXTERN_C
175 #ifndef TARGET_POSIX_IO
176 # define TARGET_POSIX_IO