OSDN Git Service

db60ad6ab08be6a9324668b6cf5ea44e9b497dda
[pf3gnuchains/gcc-fork.git] / gcc / config / i386 / nto.h
1 /* Definitions for Intel 386 running QNX/Neutrino.
2    Copyright (C) 2002, 2003 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, 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA.  */
20
21 #undef  DEFAULT_PCC_STRUCT_RETURN
22 #define DEFAULT_PCC_STRUCT_RETURN 1
23
24 #undef TARGET_VERSION
25 #define TARGET_VERSION  fprintf (stderr, " (QNX/Neutrino/i386 ELF)");
26
27 #undef TARGET_OS_CPP_BUILTINS
28 #define TARGET_OS_CPP_BUILTINS()                \
29   do                                            \
30     {                                           \
31         builtin_define_std ("__X86__");         \
32         builtin_define_std ("__QNXNTO__");      \
33         builtin_define_std ("__QNX__");         \
34         builtin_define_std ("__ELF__");         \
35         builtin_define_std ("__LITTLEENDIAN__");\
36         builtin_assert ("system=qnx");          \
37         builtin_assert ("system=qnxnto");       \
38         builtin_assert ("system=nto");          \
39         builtin_assert ("system=unix");         \
40         if (flag_pic)                           \
41           {                                     \
42             builtin_define ("__PIC__");         \
43             builtin_define ("__pic__");         \
44           }                                     \
45     }                                           \
46   while (0)
47
48 #undef THREAD_MODEL_SPEC
49 #define THREAD_MODEL_SPEC "posix"
50
51 #ifdef CROSS_COMPILE
52 #define SYSROOT_SUFFIX_SPEC "x86"
53 #endif
54
55 #undef STARTFILE_SPEC
56 #define STARTFILE_SPEC \
57 "%{!shared: \
58   %{!symbolic: \
59     %{pg:mcrt1.o%s} \
60     %{!pg:%{p:mcrt1.o%s} \
61     %{!p:crt1.o%s}}}} \
62 crti.o%s \
63 %{fexceptions: crtbegin.o%s} \
64 %{!fexceptions: %R/lib/crtbegin.o}"
65
66 #undef ENDFILE_SPEC
67 #define ENDFILE_SPEC \
68   "crtend.o%s crtn.o%s"
69
70 #undef LINK_SPEC
71 #define LINK_SPEC \
72   "%{h*} %{v:-V} \
73    %{b} \
74    %{static:-dn -Bstatic} \
75    %{shared:-G -dy -z text} \
76    %{symbolic:-Bsymbolic -G -dy -z text} \
77    %{G:-G} \
78    %{YP,*} \
79    %{!YP,*:%{p:-Y P,%R/lib} \
80     %{!p:-Y P,%R/lib}} \
81    %{Qy:} %{!Qn:-Qy} \
82    -m i386nto \
83    %{!shared: --dynamic-linker /usr/lib/ldqnx.so.2}"
84
85
86 #undef SIZE_TYPE
87 #define SIZE_TYPE "unsigned int"
88
89 #undef PTRDIFF_TYPE
90 #define PTRDIFF_TYPE "int"
91
92 #undef WCHAR_TYPE
93 #define WCHAR_TYPE "long unsigned int"
94
95 #undef WCHAR_TYPE_SIZE
96 #define WCHAR_TYPE_SIZE BITS_PER_WORD
97
98 #define NO_IMPLICIT_EXTERN_C 1
99