1 /* Target independent definitions for LynxOS, using Lynx's old as and ld.
2 Copyright (C) 1993 Free Software Foundation, Inc.
4 This file is part of GNU CC.
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)
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.
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. */
20 /* This is for backwards compatibility with older Lynx tools, which use
21 a version of a.out format. */
24 #define ASM_SPEC "%{mcoff:-C}"
27 #define CPP_SPEC "%{mthreads:-D_MULTITHREADED} \
28 %{mposix:-D_POSIX_SOURCE} \
29 %{msystem-v:-I/usr/include_v}"
31 /* Provide required defaults for linker switches. */
34 #define LINK_SPEC "%{msystem-v:-V} %{mcoff:-k}"
37 #define LIB_SPEC "%{mthreads:-L/lib/thread/}%{msystem-v:-lc_v}%{!msystem-v:%{mposix:-lc_p} -lc}"
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}}}"
43 #define ENDFILE_SPEC "%{mcoff:initn.o%s} %{p:_etext.o%s}"
46 #define SIZE_TYPE "unsigned int"
49 #define WCHAR_TYPE "int"
52 #define PTRDIFF_TYPE "long int"
54 /* We want to output DBX debugging information. */
56 #define DBX_DEBUGGING_INFO
57 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
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. */
63 #define SDB_DEBUGGING_INFO
65 /* Generate calls to memcpy, memcmp and memset. */
67 #define TARGET_MEM_FUNCTIONS
69 /* Handle #pragma pack and sometimes #pragma weak. */
71 #define HANDLE_SYSV_PRAGMA
73 #define TARGET_THREADS (target_flags & MASK_THREADS)
74 #define MASK_THREADS 0x40000000
76 #define TARGET_POSIX (target_flags & MASK_POSIX)
77 #define MASK_POSIX 0x20000000
79 #define TARGET_SYSTEM_V (target_flags & MASK_SYSTEM_V)
80 #define MASK_SYSTEM_V 0x10000000
82 #define TARGET_COFF (target_flags & MASK_COFF)
83 #define MASK_COFF 0x08000000
85 #undef SUBTARGET_SWITCHES
86 #define SUBTARGET_SWITCHES \
87 {"threads", MASK_THREADS}, \
88 {"posix", MASK_POSIX}, \
89 {"system-v", MASK_SYSTEM_V}, \
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"); }
99 /* Define this so that C++ destructors will use atexit. */
103 /* This is defined only so that we can find the assembler. Everything else
106 #define MD_EXEC_PREFIX "/usr/local/lib/gcc-"
108 /* This is needed because /bin/ld does not handle -L options correctly. */
110 #define LINK_LIBGCC_SPECIAL_1
112 /* The Lynx linker considers __main to be a possible entry point, so we
113 must use a different name. */
115 #define NAME__MAIN "____main"
116 #define SYMBOL__MAIN ____main