* real.c: Avoid parse error if FLOAT_WORDS_BIG_ENDIAN is
[official-gcc.git] / gcc / config / lynx.h
blob94544be19b097b30b109ccb3032fcabff9ecd2ab
1 /* Target independent definitions for LynxOS.
2 Copyright (C) 1993, 1994, 1995, 1996, 1999, 2000, 2002
3 Free Software Foundation, Inc.
5 This file is part of GNU CC.
7 GNU CC 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 2, or (at your option)
10 any later version.
12 GNU CC 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 GNU CC; see the file COPYING. If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
22 /* LynxOS is a multi-platform Unix, similar to SVR3, but not identical.
23 We can get quite a bit from generic svr3, but have to do some overrides. */
25 #include "svr3.h"
27 /* Define various macros, depending on the combination of flags. */
29 #undef CPP_SPEC
30 #define CPP_SPEC "%{mthreads:-D_MULTITHREADED} \
31 %{mposix:-D_POSIX_SOURCE} \
32 %{msystem-v:-I/usr/include_v}"
34 /* No asm spec needed, since using GNU assembler always. */
36 /* No linker spec needed, since using GNU linker always. */
38 #undef LIB_SPEC
39 #define LIB_SPEC "%{mthreads:-L/lib/thread/} \
40 %{msystem-v:-lc_v} \
41 %{!msystem-v:%{mposix:-lc_p} -lc -lm}"
43 /* Set the appropriate names for the Lynx startfiles. */
45 #undef STARTFILE_SPEC
46 #define STARTFILE_SPEC "%{p:%{mthreads:thread/pinit1.o%s}%{!mthreads:pinit1.o%s}}%{!p:%{msystem-v:vinit1.o%s -e_start}%{!msystem-v:%{mthreads:thread/init1.o%s}%{!mthreads:init1.o%s}}}"
48 #undef ENDFILE_SPEC
49 #define ENDFILE_SPEC "%{p:_etext.o%s}%{!p:initn.o%s}"
51 /* Override the svr3 versions. */
53 #undef WCHAR_TYPE
54 #define WCHAR_TYPE "int"
56 #undef PTRDIFF_TYPE
57 #define PTRDIFF_TYPE "long int"
59 /* We want to output DBX (stabs) debugging information normally. */
61 #define DBX_DEBUGGING_INFO 1
62 #undef PREFERRED_DEBUGGING_TYPE
63 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
65 /* It is convenient to be able to generate standard coff debugging
66 if requested via -gcoff. */
68 #define SDB_DEBUGGING_INFO 1
70 /* Be function-relative for block and source line stab directives. */
72 #define DBX_BLOCKS_FUNCTION_RELATIVE 1
74 /* but, to make this work, functions must appear prior to line info */
76 #define DBX_FUNCTION_FIRST
78 /* Generate a blank trailing N_SO to mark the end of the .o file, since
79 we can't depend upon the linker to mark .o file boundaries with
80 embedded stabs. */
82 #define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME) \
83 fprintf (FILE, \
84 "\t.text\n\t.stabs \"\",%d,0,0,Letext\nLetext:\n", N_SO)
86 #undef ASM_OUTPUT_SOURCE_LINE
87 #define ASM_OUTPUT_SOURCE_LINE(file, line) \
88 { static int sym_lineno = 1; \
89 fprintf (file, ".stabn 68,0,%d,.LM%d-", \
90 line, sym_lineno); \
91 assemble_name (file, \
92 XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0)); \
93 fprintf (file, "\n.LM%d:\n", sym_lineno); \
94 sym_lineno += 1; }
96 /* Handle #pragma pack and sometimes #pragma weak. */
98 #define HANDLE_SYSV_PRAGMA
100 /* Some additional command-line options. */
102 #define TARGET_THREADS (target_flags & MASK_THREADS)
103 #define MASK_THREADS 0x40000000
105 #define TARGET_POSIX (target_flags & MASK_POSIX)
106 #define MASK_POSIX 0x20000000
108 #define TARGET_SYSTEM_V (target_flags & MASK_SYSTEM_V)
109 #define MASK_SYSTEM_V 0x10000000
111 #undef SUBTARGET_SWITCHES
112 #define SUBTARGET_SWITCHES \
113 {"threads", MASK_THREADS}, \
114 {"posix", MASK_POSIX}, \
115 {"system-v", MASK_SYSTEM_V},
117 #undef SUBTARGET_OVERRIDE_OPTIONS
118 #define SUBTARGET_OVERRIDE_OPTIONS \
119 do { \
120 if (TARGET_SYSTEM_V && profile_flag) \
121 warning ("-msystem-v and -p are incompatible"); \
122 if (TARGET_SYSTEM_V && TARGET_THREADS) \
123 warning ("-msystem-v and -mthreads are incompatible"); \
124 } while (0)
126 /* Since init.o et al put all sorts of stuff into the init section,
127 we can't use the standard init section support in crtbegin.o. */
129 #undef INIT_SECTION_ASM_OP
131 #undef EXTRA_SECTIONS
132 #define EXTRA_SECTIONS in_fini
134 #undef EXTRA_SECTION_FUNCTIONS
135 #define EXTRA_SECTION_FUNCTIONS \
136 FINI_SECTION_FUNCTION
138 #undef CTORS_SECTION_ASM_OP
139 #define CTORS_SECTION_ASM_OP "\t.section\t.ctors"
140 #undef DTORS_SECTION_ASM_OP
141 #define DTORS_SECTION_ASM_OP "\t.section\t.dtors"
143 #undef DO_GLOBAL_CTORS_BODY
144 #undef DO_GLOBAL_DTORS_BODY
146 /* LynxOS doesn't have mcount. */
147 #undef FUNCTION_PROFILER
148 #define FUNCTION_PROFILER(file, profile_label_no)