OSDN Git Service

* c-common.c (preprocessing_trad_p): Define.
[pf3gnuchains/gcc-fork.git] / gcc / config / pa / pa-hpux11.h
1 /* Definitions of target machine for GNU compiler, for HP PA-RISC
2    Copyright (C) 1998, 1999, 2000, 2002 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 TARGET_OS_CPP_BUILTINS
22 #define TARGET_OS_CPP_BUILTINS()                                \
23   do                                                            \
24     {                                                           \
25         builtin_assert ("system=hpux");                         \
26         builtin_assert ("system=unix");                         \
27         builtin_define ("__hp9000s800");                        \
28         builtin_define ("__hp9000s800__");                      \
29         builtin_define ("__hpux");                              \
30         builtin_define ("__hpux__");                            \
31         builtin_define ("__unix");                              \
32         builtin_define ("__unix__");                            \
33         if (c_language == clk_cplusplus)                        \
34           {                                                     \
35             builtin_define ("_HPUX_SOURCE");                    \
36             builtin_define ("_INCLUDE_LONGLONG");               \
37           }                                                     \
38         else                                                    \
39           {                                                     \
40             if (!flag_iso)                                      \
41               {                                                 \
42                 builtin_define ("_HPUX_SOURCE");                \
43                 if (preprocessing_trad_p ())                    \
44                   {                                             \
45                     builtin_define ("hp9000s800");              \
46                     builtin_define ("hppa");                    \
47                     builtin_define ("hpux");                    \
48                     builtin_define ("unix");                    \
49                     builtin_define ("__CLASSIC_C__");           \
50                     builtin_define ("_PWB");                    \
51                     builtin_define ("PWB");                     \
52                   }                                             \
53                 else                                            \
54                   builtin_define ("__STDC_EXT__");              \
55               }                                                 \
56             if (!TARGET_64BIT)                                  \
57               builtin_define ("_ILP32");                        \
58           }                                                     \
59         if (TARGET_SIO)                                         \
60           builtin_define ("_SIO");                              \
61         else                                                    \
62           {                                                     \
63             builtin_define ("__hp9000s700");                    \
64             builtin_define ("__hp9000s700__");                  \
65             builtin_define ("_WSIO");                           \
66           }                                                     \
67     }                                                           \
68   while (0)
69
70 /* We can debug dynamically linked executables on hpux11; we also
71    want dereferencing of a NULL pointer to cause a SEGV.  */
72 #undef LINK_SPEC
73 #if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & 1)
74 #define LINK_SPEC \
75   "%{!mpa-risc-1-0:%{!shared:-L/lib/pa1.1 -L/usr/lib/pa1.1 }} -z %{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{shared:-b}"
76 #else
77 #define LINK_SPEC \
78   "-z %{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{shared:-b}"
79 #endif
80
81 /* Like the default, except no -lg.  */
82 #undef LIB_SPEC
83 #define LIB_SPEC \
84   "%{!shared:\
85      %{!p:%{!pg:\
86        %{!threads:-lc}\
87        %{threads:-lcma -lc_r}}}\
88      %{p: -L/lib/libp/ -lc}\
89      %{pg: -L/lib/libp/ -lc}}"
90
91 /* Under hpux11, the normal location of the `ld' and `as' programs is the
92    /usr/ccs/bin directory.  */
93
94 #ifndef CROSS_COMPILE
95 #undef MD_EXEC_PREFIX
96 #define MD_EXEC_PREFIX "/usr/ccs/bin/"
97 #endif
98
99 /* Under hpux11 the normal location of the various *crt*.o files is
100    the /usr/ccs/lib directory.  However, the profiling files are in
101    /opt/langtools/lib.  */
102
103 #ifndef CROSS_COMPILE
104 #undef MD_STARTFILE_PREFIX
105 #define MD_STARTFILE_PREFIX "/usr/ccs/lib/"
106 #define MD_STARTFILE_PREFIX_1 "/opt/langtools/lib/"
107 #endif
108
109 /* hpux11 has the new HP assembler.  It's still lousy, but it's a whole lot
110    better than the assembler shipped with older versions of hpux.  */
111 #undef NEW_HP_ASSEMBLER
112 #define NEW_HP_ASSEMBLER 1
113
114 /* Make GCC agree with types.h.  */
115 #undef SIZE_TYPE
116 #undef PTRDIFF_TYPE
117
118 #define SIZE_TYPE "long unsigned int"
119 #define PTRDIFF_TYPE "long int"