]>
Commit | Line | Data |
---|---|---|
04fdca4a | 1 | /* Definitions of target machine for GNU compiler, for HP-UX. |
b7849684 | 2 | Copyright (C) 1991, 1995, 1996, 2002, 2003 Free Software Foundation, Inc. |
04fdca4a | 3 | |
b7849684 | 4 | This file is part of GCC. |
04fdca4a | 5 | |
b7849684 | 6 | GCC is free software; you can redistribute it and/or modify |
04fdca4a TG |
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 | ||
b7849684 | 11 | GCC is distributed in the hope that it will be useful, |
04fdca4a TG |
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 | |
b7849684 | 17 | along with GCC; see the file COPYING. If not, write to |
0e29e3c9 RK |
18 | the Free Software Foundation, 59 Temple Place - Suite 330, |
19 | Boston, MA 02111-1307, USA. */ | |
04fdca4a | 20 | |
6ac7dac1 | 21 | #undef TARGET_DEFAULT |
aca49971 | 22 | #define TARGET_DEFAULT 0 |
19c98942 RK |
23 | |
24 | /* Make GCC agree with types.h. */ | |
3e5c2e14 TM |
25 | #undef SIZE_TYPE |
26 | #undef PTRDIFF_TYPE | |
3e5c2e14 | 27 | |
19c98942 | 28 | #define SIZE_TYPE "unsigned int" |
3e5c2e14 | 29 | #define PTRDIFF_TYPE "int" |
19c98942 | 30 | |
cb99b61a JDA |
31 | /* GCC always defines __STDC__. HP C++ compilers don't define it. This |
32 | causes trouble when sys/stdsyms.h is included. As a work around, | |
33 | we define __STDC_EXT__. A similar situation exists with respect to | |
34 | the definition of __cplusplus. We define _INCLUDE_LONGLONG | |
35 | to prevent nlist.h from defining __STDC_32_MODE__ (no longlong | |
36 | support). */ | |
c219e1da JDA |
37 | #undef TARGET_OS_CPP_BUILTINS |
38 | #define TARGET_OS_CPP_BUILTINS() \ | |
39 | do \ | |
40 | { \ | |
41 | builtin_assert ("system=hpux"); \ | |
42 | builtin_assert ("system=unix"); \ | |
43 | builtin_define ("__hp9000s800"); \ | |
44 | builtin_define ("__hp9000s800__"); \ | |
45 | builtin_define ("__hp9k8"); \ | |
46 | builtin_define ("__hp9k8__"); \ | |
47 | builtin_define ("__hpux"); \ | |
48 | builtin_define ("__hpux__"); \ | |
49 | builtin_define ("__unix"); \ | |
50 | builtin_define ("__unix__"); \ | |
04df6730 | 51 | if (c_dialect_cxx ()) \ |
c219e1da JDA |
52 | { \ |
53 | builtin_define ("_HPUX_SOURCE"); \ | |
54 | builtin_define ("_INCLUDE_LONGLONG"); \ | |
cb99b61a | 55 | builtin_define ("__STDC_EXT__"); \ |
c219e1da JDA |
56 | } \ |
57 | else if (!flag_iso) \ | |
58 | { \ | |
59 | builtin_define ("_HPUX_SOURCE"); \ | |
60 | if (preprocessing_trad_p ()) \ | |
61 | { \ | |
62 | builtin_define ("hp9000s800"); \ | |
63 | builtin_define ("hp9k8"); \ | |
64 | builtin_define ("hppa"); \ | |
65 | builtin_define ("hpux"); \ | |
66 | builtin_define ("unix"); \ | |
67 | builtin_define ("__CLASSIC_C__"); \ | |
68 | builtin_define ("_PWB"); \ | |
69 | builtin_define ("PWB"); \ | |
70 | } \ | |
71 | else \ | |
72 | builtin_define ("__STDC_EXT__"); \ | |
73 | } \ | |
74 | if (TARGET_SIO) \ | |
75 | builtin_define ("_SIO"); \ | |
76 | else \ | |
77 | { \ | |
78 | builtin_define ("__hp9000s700"); \ | |
79 | builtin_define ("__hp9000s700__"); \ | |
80 | builtin_define ("_WSIO"); \ | |
81 | } \ | |
82 | } \ | |
83 | while (0) | |
84 | ||
85 | #undef SUBTARGET_SWITCHES | |
86 | #define SUBTARGET_SWITCHES \ | |
87 | { "sio", MASK_SIO, N_("Generate cpp defines for server IO") }, \ | |
88 | { "wsio", -MASK_SIO, N_("Generate cpp defines for workstation IO") }, | |
89 | ||
19c98942 | 90 | /* Like the default, except no -lg. */ |
68cb9589 | 91 | #undef LIB_SPEC |
68d69835 | 92 | #define LIB_SPEC "%{!shared:%{!p:%{!pg:-lc}}%{p: -L/lib/libp/ -lc}%{pg: -L/lib/libp/ -lc}}" |
19c98942 | 93 | |
d2a94ec0 | 94 | #undef LINK_SPEC |
13ee407e | 95 | #if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_PA_11) |
6ac7dac1 | 96 | #define LINK_SPEC \ |
07a722f4 | 97 | "%{!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}" |
6ac7dac1 | 98 | #else |
68d69835 | 99 | #define LINK_SPEC \ |
ad238e4b | 100 | "%{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{g*:-a archive} %{shared:-b}" |
6ac7dac1 | 101 | #endif |
687c8bf5 | 102 | |
ddd5a7c1 | 103 | /* hpux8 and later have C++ compatible include files, so do not |
687c8bf5 RS |
104 | pretend they are `extern "C"'. */ |
105 | #define NO_IMPLICIT_EXTERN_C | |
4677862a JDA |
106 | |
107 | /* hpux11 and earlier don't have fputc_unlocked, so we must inhibit the | |
108 | transformation of fputs_unlocked and fprintf_unlocked to fputc_unlocked. */ | |
109 | #define DONT_HAVE_FPUTC_UNLOCKED | |
685d0e07 JDA |
110 | |
111 | /* We want the entry value of SP saved in the frame marker for | |
112 | compatibility with the HP-UX unwind library. */ | |
113 | #undef TARGET_HPUX_UNWIND_LIBRARY | |
114 | #define TARGET_HPUX_UNWIND_LIBRARY 1 |