OSDN Git Service

* config/host-hpux.c: Change copyright header to refer to version 3 of the GNU
[pf3gnuchains/gcc-fork.git] / gcc / config / pa / pa-hpux.h
1 /* Definitions of target machine for GNU compiler, for HP-UX.
2    Copyright (C) 1991, 1995, 1996, 2002, 2003, 2004, 2007
3    Free Software Foundation, Inc.
4
5 This file is part of GCC.
6
7 GCC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
10 any later version.
11
12 GCC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3.  If not see
19 <http://www.gnu.org/licenses/>.  */
20
21 /* HP-UX UNIX features.  */
22 #undef TARGET_HPUX
23 #define TARGET_HPUX 1
24
25 #undef TARGET_DEFAULT
26 #define TARGET_DEFAULT MASK_BIG_SWITCH
27
28 /* Make GCC agree with types.h.  */
29 #undef SIZE_TYPE
30 #undef PTRDIFF_TYPE
31
32 #define SIZE_TYPE "unsigned int"
33 #define PTRDIFF_TYPE "int"
34
35 #define LONG_DOUBLE_TYPE_SIZE 128
36 #define HPUX_LONG_DOUBLE_LIBRARY
37 #define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) ((MODE) == TFmode)
38
39 /* GCC always defines __STDC__.  HP C++ compilers don't define it.  This
40    causes trouble when sys/stdsyms.h is included.  As a work around,
41    we define __STDC_EXT__.  A similar situation exists with respect to
42    the definition of __cplusplus.  We define _INCLUDE_LONGLONG
43    to prevent nlist.h from defining __STDC_32_MODE__ (no longlong
44    support).  */
45 #undef TARGET_OS_CPP_BUILTINS
46 #define TARGET_OS_CPP_BUILTINS()                                \
47   do                                                            \
48     {                                                           \
49         builtin_assert ("system=hpux");                         \
50         builtin_assert ("system=unix");                         \
51         builtin_define ("__hp9000s800");                        \
52         builtin_define ("__hp9000s800__");                      \
53         builtin_define ("__hp9k8");                             \
54         builtin_define ("__hp9k8__");                           \
55         builtin_define ("__hpux");                              \
56         builtin_define ("__hpux__");                            \
57         builtin_define ("__unix");                              \
58         builtin_define ("__unix__");                            \
59         if (c_dialect_cxx ())                                   \
60           {                                                     \
61             builtin_define ("_HPUX_SOURCE");                    \
62             builtin_define ("_INCLUDE_LONGLONG");               \
63             builtin_define ("__STDC_EXT__");                    \
64           }                                                     \
65         else if (!flag_iso)                                     \
66           {                                                     \
67             builtin_define ("_HPUX_SOURCE");                    \
68             if (preprocessing_trad_p ())                        \
69               {                                                 \
70                 builtin_define ("hp9000s800");                  \
71                 builtin_define ("hp9k8");                       \
72                 builtin_define ("hppa");                        \
73                 builtin_define ("hpux");                        \
74                 builtin_define ("unix");                        \
75                 builtin_define ("__CLASSIC_C__");               \
76                 builtin_define ("_PWB");                        \
77                 builtin_define ("PWB");                         \
78               }                                                 \
79             else                                                \
80               builtin_define ("__STDC_EXT__");                  \
81           }                                                     \
82         if (TARGET_SIO)                                         \
83           builtin_define ("_SIO");                              \
84         else                                                    \
85           {                                                     \
86             builtin_define ("__hp9000s700");                    \
87             builtin_define ("__hp9000s700__");                  \
88             builtin_define ("_WSIO");                           \
89           }                                                     \
90     }                                                           \
91   while (0)
92
93 /* Like the default, except no -lg.  */
94 #undef LIB_SPEC
95 #define LIB_SPEC "%{!shared:%{!p:%{!pg:-lc}}%{p: -L/lib/libp/ -lc}%{pg: -L/lib/libp/ -lc}}"
96
97 #undef LINK_SPEC
98 #if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_PA_11)
99 #define LINK_SPEC \
100   "%{!mpa-risc-1-0:%{!march=1.0:%{!shared:-L/lib/pa1.1 -L/usr/lib/pa1.1 }}}%{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{g*:-a archive} %{shared:-b}"
101 #else
102 #define LINK_SPEC \
103   "%{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{g*:-a archive} %{shared:-b}"
104 #endif
105
106 /* hpux8 and later have C++ compatible include files, so do not
107    pretend they are `extern "C"'.  */
108 #define NO_IMPLICIT_EXTERN_C
109
110 /* hpux11 and earlier don't have fputc_unlocked, so we must inhibit the
111    transformation of fputs_unlocked and fprintf_unlocked to fputc_unlocked.  */
112 #define DONT_HAVE_FPUTC_UNLOCKED
113
114 /* We want the entry value of SP saved in the frame marker for
115    compatibility with the HP-UX unwind library.  */
116 #undef TARGET_HPUX_UNWIND_LIBRARY
117 #define TARGET_HPUX_UNWIND_LIBRARY 1
118
119 /* Handle #pragma weak and #pragma pack.  */
120 #undef HANDLE_SYSV_PRAGMA
121 #define HANDLE_SYSV_PRAGMA
122
123 /* Define this so we can compile MS code for use with WINE.  */
124 #undef HANDLE_PRAGMA_PACK_PUSH_POP
125 #define HANDLE_PRAGMA_PACK_PUSH_POP
126
127 #define MD_UNWIND_SUPPORT "config/pa/hpux-unwind.h"