]> gcc.gnu.org Git - gcc.git/blame - gcc/config/interix.h
c-decl.c, [...]: Don't check TARGET_MEM_FUNCTIONS.
[gcc.git] / gcc / config / interix.h
CommitLineData
052dbd9e
MK
1/* Operating system specific defines to be used when targeting GCC for
2 Interix
5dd8a9b1 3 Copyright (C) 1994, 1995, 1999, 2002 Free Software Foundation, Inc.
052dbd9e
MK
4 Donn Terry, Softway Systems, Inc. (donn@softway.com)
5 Modified from code
6 Contributed by Douglas B. Rupp (drupp@cs.washington.edu).
7
2a71dcad 8This file is part of GCC.
052dbd9e 9
2a71dcad 10GCC is free software; you can redistribute it and/or modify
052dbd9e
MK
11it under the terms of the GNU General Public License as published by
12the Free Software Foundation; either version 2, or (at your option)
13any later version.
14
2a71dcad 15GCC is distributed in the hope that it will be useful,
052dbd9e
MK
16but WITHOUT ANY WARRANTY; without even the implied warranty of
17MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18GNU General Public License for more details.
19
20You should have received a copy of the GNU General Public License
2a71dcad 21along with GCC; see the file COPYING. If not, write to
052dbd9e
MK
22the Free Software Foundation, 59 Temple Place - Suite 330,
23Boston, MA 02111-1307, USA. */
24
052dbd9e
MK
25/* POSIX/Uni-thread only for now. Look at the winnt version
26for windows/multi thread */
27
28/* We need multiple -lc -lcpsx because they mutually refer;
29 that should go away someday */
30
31#undef LIB_SPEC
32#define LIB_SPEC "\
33 %{!shared:%{!dynamic:-lc -lcpsx -lc -lcpsx %$INTERIX_ROOT/usr/lib/psxdll.a \
34 %$INTERIX_ROOT/usr/lib/psxdll2.a \
35 }} \
36 %{!G:%{!dynamic:-lc -lcpsx -lc -lcpsx %$INTERIX_ROOT/usr/lib/psxdll.a \
37 %$INTERIX_ROOT/usr/lib/psxdll2.a \
38 }} \
39 %{dynamic:-lc %$INTERIX_ROOT/usr/lib/psxdll.a \
40 %$INTERIX_ROOT/usr/lib/psxdll2.a \
41 } \
42 %{v}"
43
44#undef LINK_SPEC
45#define LINK_SPEC "%{!shared:-stack 0x400000,0x10000} \
46 -subsystem posix \
47 %{g} \
48 %{dynamic:-Bdynamic} \
49 %{static:-Bstatic} \
50 %{shared:--shared -Bdynamic} \
51 %{G:--shared -Bdynamic} \
52 %{symbolic:--shared -Bsymbolic -Bdynamic} \
53 %{soname*:--soname %*} \
54 %{rpath*:--rpath %*} \
55 "
56
57#undef STARTFILE_SPEC
58#define STARTFILE_SPEC \
59 "%{!shared:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}}} %{shared:crti%O%s}"
60
61#undef WORD_SWITCH_TAKES_ARG
62#define WORD_SWITCH_TAKES_ARG(STR) \
63 ((DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \
64 || !strcmp(STR, "rpath")) \
65 && strcmp (STR, "Tdata") && strcmp (STR, "Ttext") \
66 && strcmp (STR, "Tbss"))
67
68
006946e4 69#define STDC_0_IN_SYSTEM_HEADERS 1
052dbd9e 70
32f0ffb3 71#define HANDLE_SYSV_PRAGMA 1
615c8231
DT
72#undef HANDLE_PRAGMA_WEAK /* until the link format can handle it */
73
74/* Names to predefine in the preprocessor for this target machine. */
75
23532de9
JT
76#define DBX_DEBUGGING_INFO 1
77#define SDB_DEBUGGING_INFO 1
615c8231
DT
78#undef PREFERRED_DEBUGGING_TYPE
79#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
80
81
82/* TARGET_DEFAULT from configure */
83
84#undef WCHAR_TYPE
85#undef WCHAR_TYPE_SIZE
615c8231
DT
86#define WCHAR_TYPE "short unsigned int"
87#define WCHAR_TYPE_SIZE 16
5dd8a9b1
ZW
88
89/* Our strategy for finding global constructors is a bit different, although
991b6592 90 not a lot. */
5dd8a9b1
ZW
91#define DO_GLOBAL_CTORS_BODY \
92do { \
93 int i; \
94 unsigned long nptrs; \
95 func_ptr *p; \
96 asm( \
97 " .section .ctor_head, \"rw\"\n" \
98 "1:\n" \
99 " .text \n" \
100 ASM_LOAD_ADDR(1b,%0) \
101 : "=r" (p) : : "cc"); \
102 for (nptrs = 0; p[nptrs] != 0; nptrs++); \
103 for (i = nptrs-1; i >= 0; i--) \
104 p[i] (); \
105} while (0)
106
107#define DO_GLOBAL_DTORS_BODY \
108do { \
109 func_ptr *p; \
110 asm( \
111 " .section .dtor_head, \"rw\"\n" \
112 "1:\n" \
113 " .text \n" \
114 ASM_LOAD_ADDR(1b,%0) \
115 : "=r" (p) : : "cc"); \
116 while (*p) \
117 { \
118 p++; \
119 (*(p-1)) (); \
120 } \
121} while (0)
This page took 1.098357 seconds and 5 git commands to generate.