1 /* Definitions of target machine for GNU compiler, for HP-UX.
2 Copyright (C) 1991, 1995, 1996, 2002, 2003 Free Software Foundation, Inc.
4 This file is part of GCC.
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 2, or (at your option)
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.
16 You should have received a copy of the GNU General Public License
17 along with GCC; see the file COPYING. If not, write to
18 the Free Software Foundation, 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
22 #define TARGET_DEFAULT 0
24 /* Make GCC agree with types.h. */
28 #define SIZE_TYPE "unsigned int"
29 #define PTRDIFF_TYPE "int"
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
37 #undef TARGET_OS_CPP_BUILTINS
38 #define TARGET_OS_CPP_BUILTINS() \
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__"); \
51 if (c_dialect_cxx ()) \
53 builtin_define ("_HPUX_SOURCE"); \
54 builtin_define ("_INCLUDE_LONGLONG"); \
55 builtin_define ("__STDC_EXT__"); \
59 builtin_define ("_HPUX_SOURCE"); \
60 if (preprocessing_trad_p ()) \
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"); \
72 builtin_define ("__STDC_EXT__"); \
75 builtin_define ("_SIO"); \
78 builtin_define ("__hp9000s700"); \
79 builtin_define ("__hp9000s700__"); \
80 builtin_define ("_WSIO"); \
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") },
90 /* Like the default, except no -lg. */
92 #define LIB_SPEC "%{!shared:%{!p:%{!pg:-lc}}%{p: -L/lib/libp/ -lc}%{pg: -L/lib/libp/ -lc}}"
95 #if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_PA_11)
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}"
100 "%{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{g*:-a archive} %{shared:-b}"
103 /* hpux8 and later have C++ compatible include files, so do not
104 pretend they are `extern "C"'. */
105 #define NO_IMPLICIT_EXTERN_C
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
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