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 #undef PREFERRED_DEBUGGING_TYPE
58 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
60 /* We optionally want to be able to produce SDB debugging output so that
61 we can create debuggable SDB/coff files. This won't be needed when
62 stabs-in-coff works. */
64 #define SDB_DEBUGGING_INFO
66 /* Generate calls to memcpy, memcmp and memset. */
68 #define TARGET_MEM_FUNCTIONS
70 /* Handle #pragma pack and sometimes #pragma weak. */
72 #define HANDLE_SYSV_PRAGMA
74 #define TARGET_THREADS (target_flags & MASK_THREADS)
75 #define MASK_THREADS 0x40000000
77 #define TARGET_POSIX (target_flags & MASK_POSIX)
78 #define MASK_POSIX 0x20000000
80 #define TARGET_SYSTEM_V (target_flags & MASK_SYSTEM_V)
81 #define MASK_SYSTEM_V 0x10000000
83 #define TARGET_COFF (target_flags & MASK_COFF)
84 #define MASK_COFF 0x08000000
86 #undef SUBTARGET_SWITCHES
87 #define SUBTARGET_SWITCHES \
88 {"threads", MASK_THREADS}, \
89 {"posix", MASK_POSIX}, \
90 {"system-v", MASK_SYSTEM_V}, \
93 #undef SUBTARGET_OVERRIDE_OPTIONS
94 #define SUBTARGET_OVERRIDE_OPTIONS \
95 { if (TARGET_SYSTEM_V && profile_flag) \
96 warning ("-msystem-v and -p are incompatible"); \
97 if (TARGET_SYSTEM_V && TARGET_THREADS) \
98 warning ("-msystem-v and -mthreads are incompatible"); }
100 /* Define this so that C++ destructors will use atexit. */
104 /* This is defined only so that we can find the assembler. Everything else
107 #define MD_EXEC_PREFIX "/usr/local/lib/gcc-"
109 /* This is needed because /bin/ld does not handle -L options correctly. */
111 #define LINK_LIBGCC_SPECIAL_1
113 /* The Lynx linker considers __main to be a possible entry point, so we
114 must use a different name. */
116 #define NAME__MAIN "____main"
117 #define SYMBOL__MAIN ____main