Mercurial > hg > CbC > CbC_gcc
annotate gcc/config/interix.h @ 103:edcadcec937d
modify __rectype
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 23 Mar 2012 17:11:33 +0900 |
parents | f6334be47118 |
children |
rev | line source |
---|---|
0 | 1 /* Operating system specific defines to be used when targeting GCC for |
2 Interix | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
3 Copyright (C) 1994, 1995, 1999, 2002, 2004, 2007, 2010 |
0 | 4 Free Software Foundation, Inc. |
5 Donn Terry, Softway Systems, Inc. (donn@softway.com) | |
6 Modified from code | |
7 Contributed by Douglas B. Rupp (drupp@cs.washington.edu). | |
8 | |
9 This file is part of GCC. | |
10 | |
11 GCC is free software; you can redistribute it and/or modify | |
12 it under the terms of the GNU General Public License as published by | |
13 the Free Software Foundation; either version 3, or (at your option) | |
14 any later version. | |
15 | |
16 GCC is distributed in the hope that it will be useful, | |
17 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 GNU General Public License for more details. | |
20 | |
21 You should have received a copy of the GNU General Public License | |
22 along with GCC; see the file COPYING3. If not see | |
23 <http://www.gnu.org/licenses/>. */ | |
24 | |
25 /* POSIX/Uni-thread only for now. Look at the winnt version | |
26 for 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 %{rpath*:--rpath %*} \ | |
54 " | |
55 | |
56 #undef STARTFILE_SPEC | |
57 #define STARTFILE_SPEC \ | |
58 "%{!shared:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}}} %{shared:crti%O%s}" | |
59 | |
60 | |
61 #define STDC_0_IN_SYSTEM_HEADERS 1 | |
62 | |
63 /* Names to predefine in the preprocessor for this target machine. */ | |
64 | |
65 #define DBX_DEBUGGING_INFO 1 | |
66 #define SDB_DEBUGGING_INFO 1 | |
67 #undef PREFERRED_DEBUGGING_TYPE | |
68 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG | |
69 | |
70 | |
71 /* TARGET_DEFAULT from configure */ | |
72 | |
73 #undef WCHAR_TYPE | |
74 #undef WCHAR_TYPE_SIZE | |
75 #define WCHAR_TYPE "short unsigned int" | |
76 #define WCHAR_TYPE_SIZE 16 | |
77 | |
78 /* Our strategy for finding global constructors is a bit different, although | |
79 not a lot. */ | |
80 #define DO_GLOBAL_CTORS_BODY \ | |
81 do { \ | |
82 int i; \ | |
83 unsigned long nptrs; \ | |
84 func_ptr *p; \ | |
85 asm( \ | |
86 " .section .ctor_head, \"rw\"\n" \ | |
87 "1:\n" \ | |
88 " .text \n" \ | |
89 ASM_LOAD_ADDR(1b,%0) \ | |
90 : "=r" (p) : : "cc"); \ | |
91 for (nptrs = 0; p[nptrs] != 0; nptrs++); \ | |
92 for (i = nptrs-1; i >= 0; i--) \ | |
93 p[i] (); \ | |
94 } while (0) | |
95 | |
96 #define DO_GLOBAL_DTORS_BODY \ | |
97 do { \ | |
98 func_ptr *p; \ | |
99 asm( \ | |
100 " .section .dtor_head, \"rw\"\n" \ | |
101 "1:\n" \ | |
102 " .text \n" \ | |
103 ASM_LOAD_ADDR(1b,%0) \ | |
104 : "=r" (p) : : "cc"); \ | |
105 while (*p) \ | |
106 { \ | |
107 p++; \ | |
108 (*(p-1)) (); \ | |
109 } \ | |
110 } while (0) |