OSDN Git Service

112b24a487f74db4c207d1a1335afb5d5e1c90d9
[pf3gnuchains/gcc-fork.git] / gcc / config / lynx-ng.h
1 /* Target independent definitions for LynxOS, using Lynx's old as and ld.
2    Copyright (C) 1993 Free Software Foundation, Inc.
3
4 This file is part of GNU CC.
5
6 GNU CC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
10
11 GNU CC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with GNU CC; see the file COPYING.  If not, write to
18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
19
20 /* This is for backwards compatibility with older Lynx tools, which use
21    a version of a.out format. */
22
23 #undef ASM_SPEC
24 #define ASM_SPEC "%{mcoff:-C}"
25
26 #undef CPP_SPEC
27 #define CPP_SPEC "%{mthreads:-D_MULTITHREADED}  \
28   %{mposix:-D_POSIX_SOURCE}  \
29   %{msystem-v:-I/usr/include_v}"
30
31 /* Provide required defaults for linker switches.  */
32
33 #undef LINK_SPEC
34 #define LINK_SPEC "%{msystem-v:-V} %{mcoff:-k}"
35
36 #undef LIB_SPEC
37 #define LIB_SPEC "%{mthreads:-L/lib/thread/}%{msystem-v:-lc_v}%{!msystem-v:%{mposix:-lc_p} -lc}"
38
39 #undef STARTFILE_SPEC
40 #define STARTFILE_SPEC "%{p:%{mcoff:pinit1.o%s}%{!mcoff:pinit.o%s}}%{!p:%{msystem-v:%{mcoff:vinit1.o%s}%{!mcoff:vinit.o%s}}%{!msystem-v:%{mcoff:init1.o%s}%{!mcoff:init.o%s}}}"
41
42 #undef ENDFILE_SPEC
43 #define ENDFILE_SPEC "%{mcoff:initn.o%s} %{p:_etext.o%s}"
44
45 #undef SIZE_TYPE
46 #define SIZE_TYPE "unsigned int"
47
48 #undef WCHAR_TYPE
49 #define WCHAR_TYPE "int"
50
51 #undef PTRDIFF_TYPE
52 #define PTRDIFF_TYPE "long int"
53
54 /* We want to output DBX debugging information.  */
55
56 #define DBX_DEBUGGING_INFO
57 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
58
59 /* We optionally want to be able to produce SDB debugging output so that
60    we can create debuggable SDB/coff files.  This won't be needed when
61    stabs-in-coff works.  */
62
63 #define SDB_DEBUGGING_INFO
64
65 /* Generate calls to memcpy, memcmp and memset.  */
66
67 #define TARGET_MEM_FUNCTIONS
68
69 /* Handle #pragma pack and sometimes #pragma weak.  */
70
71 #define HANDLE_SYSV_PRAGMA
72
73 #define TARGET_THREADS  (target_flags & MASK_THREADS)
74 #define MASK_THREADS    0x40000000
75
76 #define TARGET_POSIX    (target_flags & MASK_POSIX)
77 #define MASK_POSIX      0x20000000
78
79 #define TARGET_SYSTEM_V (target_flags & MASK_SYSTEM_V)
80 #define MASK_SYSTEM_V   0x10000000
81
82 #define TARGET_COFF     (target_flags & MASK_COFF)
83 #define MASK_COFF       0x08000000
84
85 #undef SUBTARGET_SWITCHES
86 #define SUBTARGET_SWITCHES \
87     {"threads",         MASK_THREADS},          \
88     {"posix",           MASK_POSIX},            \
89     {"system-v",        MASK_SYSTEM_V},         \
90     {"coff",            MASK_COFF},
91
92 #undef SUBTARGET_OVERRIDE_OPTIONS
93 #define SUBTARGET_OVERRIDE_OPTIONS \
94 { if (TARGET_SYSTEM_V && profile_flag)                  \
95     warning ("-msystem-v and -p are incompatible");             \
96   if (TARGET_SYSTEM_V && TARGET_THREADS)                        \
97     warning ("-msystem-v and -mthreads are incompatible"); }
98
99 /* Define this so that C++ destructors will use atexit.  */
100
101 #define HAVE_ATEXIT
102
103 /* This is defined only so that we can find the assembler.  Everything else
104    is in /bin.  */
105
106 #define MD_EXEC_PREFIX "/usr/local/lib/gcc-"
107
108 /* This is needed because /bin/ld does not handle -L options correctly. */
109
110 #define LINK_LIBGCC_SPECIAL_1
111
112 /* The Lynx linker considers __main to be a possible entry point, so we
113    must use a different name.  */
114
115 #define NAME__MAIN "____main"
116 #define SYMBOL__MAIN ____main