OSDN Git Service

9a4cdec75087049752c8a5d47bb36545e31c6936
[pf3gnuchains/gcc-fork.git] / gcc / config / i386 / nto.h
1 /* Definitions for Intel 386 running QNX/Neutrino.
2    Copyright (C) 2002, 2003, 2007, 2010 Free Software Foundation, Inc.
3
4 This file is part of GCC.
5
6 GCC 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 3, or (at your option)
9 any later version.
10
11 GCC 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 GCC; see the file COPYING3.  If not see
18 <http://www.gnu.org/licenses/>.  */
19
20 #undef  DEFAULT_PCC_STRUCT_RETURN
21 #define DEFAULT_PCC_STRUCT_RETURN 1
22
23 #undef TARGET_VERSION
24 #define TARGET_VERSION  fprintf (stderr, " (QNX/Neutrino/i386 ELF)");
25
26 #undef TARGET_OS_CPP_BUILTINS
27 #define TARGET_OS_CPP_BUILTINS()                \
28   do                                            \
29     {                                           \
30         builtin_define ("__X86__");             \
31         builtin_define ("__QNXNTO__");          \
32         builtin_define ("__QNX__");             \
33         builtin_define ("__ELF__");             \
34         builtin_define ("__LITTLEENDIAN__");    \
35         builtin_assert ("system=qnx");          \
36         builtin_assert ("system=qnxnto");       \
37         builtin_assert ("system=nto");          \
38         builtin_assert ("system=unix");         \
39     }                                           \
40   while (0)
41
42 #undef THREAD_MODEL_SPEC
43 #define THREAD_MODEL_SPEC "posix"
44
45 #ifdef CROSS_DIRECTORY_STRUCTURE
46 #define SYSROOT_SUFFIX_SPEC "x86"
47 #endif
48
49 #ifndef CROSS_DIRECTORY_STRUCTURE
50 #undef MD_EXEC_PREFIX
51 #define MD_EXEC_PREFIX "/usr/ccs/bin/"
52
53 #undef MD_STARTFILE_PREFIX
54 #define MD_STARTFILE_PREFIX "/usr/ccs/lib/"
55 #endif
56
57 #undef STARTFILE_SPEC
58 #define STARTFILE_SPEC \
59 "%{!shared: \
60   %{!symbolic: \
61     %{pg:mcrt1.o%s} \
62     %{!pg:%{p:mcrt1.o%s} \
63     %{!p:crt1.o%s}}}} \
64 crti.o%s \
65 %{fexceptions: crtbegin.o%s} \
66 %{!fexceptions: %R/lib/crtbegin.o}"
67
68 #undef ENDFILE_SPEC
69 #define ENDFILE_SPEC \
70   "crtend.o%s crtn.o%s"
71
72 #undef LINK_SPEC
73 #define LINK_SPEC \
74   "%{h*} %{v:-V} \
75    %{static:-dn -Bstatic} \
76    %{shared:-G -dy -z text} \
77    %{symbolic:-Bsymbolic -G -dy -z text} \
78    %{G:-G} \
79    %{YP,*} \
80    %{!YP,*:%{p:-Y P,%R/lib} \
81     %{!p:-Y P,%R/lib}} \
82    %{Qy:} %{!Qn:-Qy} \
83    -m i386nto \
84    %{!shared: --dynamic-linker /usr/lib/ldqnx.so.2}"
85
86
87 #undef SIZE_TYPE
88 #define SIZE_TYPE "unsigned int"
89
90 #undef PTRDIFF_TYPE
91 #define PTRDIFF_TYPE "int"
92
93 #undef WCHAR_TYPE
94 #define WCHAR_TYPE "long unsigned int"
95
96 #undef WCHAR_TYPE_SIZE
97 #define WCHAR_TYPE_SIZE BITS_PER_WORD
98
99 #define NO_IMPLICIT_EXTERN_C 1
100
101 #define TARGET_POSIX_IO