FSF GCC merge 02/23/03
[official-gcc.git] / gcc / config / pa / pa-hpux.h
blobb9d563e09be25a6feeff4d836f20338b6c548ea1
1 /* Definitions of target machine for GNU compiler, for HP-UX.
2 Copyright (C) 1991, 1995, 1996, 2002 Free Software Foundation, Inc.
4 This file is part of GNU CC.
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.
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.
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. */
21 #undef TARGET_DEFAULT
22 #define TARGET_DEFAULT 0
24 /* Make GCC agree with types.h. */
25 #undef SIZE_TYPE
26 #undef PTRDIFF_TYPE
28 #define SIZE_TYPE "unsigned int"
29 #define PTRDIFF_TYPE "int"
31 #undef TARGET_OS_CPP_BUILTINS
32 #define TARGET_OS_CPP_BUILTINS() \
33 do \
34 { \
35 builtin_assert ("system=hpux"); \
36 builtin_assert ("system=unix"); \
37 builtin_define ("__hp9000s800"); \
38 builtin_define ("__hp9000s800__"); \
39 builtin_define ("__hp9k8"); \
40 builtin_define ("__hp9k8__"); \
41 builtin_define ("__hpux"); \
42 builtin_define ("__hpux__"); \
43 builtin_define ("__unix"); \
44 builtin_define ("__unix__"); \
45 if (c_language == clk_cplusplus) \
46 { \
47 builtin_define ("_HPUX_SOURCE"); \
48 builtin_define ("_INCLUDE_LONGLONG"); \
49 } \
50 else if (!flag_iso) \
51 { \
52 builtin_define ("_HPUX_SOURCE"); \
53 if (preprocessing_trad_p ()) \
54 { \
55 builtin_define ("hp9000s800"); \
56 builtin_define ("hp9k8"); \
57 builtin_define ("hppa"); \
58 builtin_define ("hpux"); \
59 builtin_define ("unix"); \
60 builtin_define ("__CLASSIC_C__"); \
61 builtin_define ("_PWB"); \
62 builtin_define ("PWB"); \
63 } \
64 else \
65 builtin_define ("__STDC_EXT__"); \
66 } \
67 if (TARGET_SIO) \
68 builtin_define ("_SIO"); \
69 else \
70 { \
71 builtin_define ("__hp9000s700"); \
72 builtin_define ("__hp9000s700__"); \
73 builtin_define ("_WSIO"); \
74 } \
75 } \
76 while (0)
78 #undef SUBTARGET_SWITCHES
79 #define SUBTARGET_SWITCHES \
80 { "sio", MASK_SIO, N_("Generate cpp defines for server IO") }, \
81 { "wsio", -MASK_SIO, N_("Generate cpp defines for workstation IO") },
83 /* Like the default, except no -lg. */
84 #undef LIB_SPEC
85 #define LIB_SPEC "%{!shared:%{!p:%{!pg:-lc}}%{p: -L/lib/libp/ -lc}%{pg: -L/lib/libp/ -lc}}"
87 #undef LINK_SPEC
88 #if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_PA_11)
89 #define LINK_SPEC \
90 "%{!mpa-risc-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}"
91 #else
92 #define LINK_SPEC \
93 "%{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{g*:-a archive} %{shared:-b}"
94 #endif
96 /* hpux8 and later have C++ compatible include files, so do not
97 pretend they are `extern "C"'. */
98 #define NO_IMPLICIT_EXTERN_C