1 /* Definitions of target machine for GNU compiler, for HP-UX. 2 Copyright (C) 1991, 1995, 1996, 2002, 2003 Free Software Foundation, Inc. 3 4 This file is part of GCC. 5 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) 9 any later version. 10 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. 15 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. */ 20 21 #undef TARGET_DEFAULT 22 #define TARGET_DEFAULT 0 23 24 /* Make GCC agree with types.h. */ 25 #undef SIZE_TYPE 26 #undef PTRDIFF_TYPE 27 28 #define SIZE_TYPE "unsigned int" 29 #define PTRDIFF_TYPE "int" 30 31 #define LONG_DOUBLE_TYPE_SIZE 128 32 #define HPUX_LONG_DOUBLE_LIBRARY 33 #define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) ((MODE) == TFmode) 34 35 /* GCC always defines __STDC__. HP C++ compilers don't define it. This 36 causes trouble when sys/stdsyms.h is included. As a work around, 37 we define __STDC_EXT__. A similar situation exists with respect to 38 the definition of __cplusplus. We define _INCLUDE_LONGLONG 39 to prevent nlist.h from defining __STDC_32_MODE__ (no longlong 40 support). */ 41 #undef TARGET_OS_CPP_BUILTINS 42 #define TARGET_OS_CPP_BUILTINS() \ 43 do \ 44 { \ 45 builtin_assert ("system=hpux"); \ 46 builtin_assert ("system=unix"); \ 47 builtin_define ("__hp9000s800"); \ 48 builtin_define ("__hp9000s800__"); \ 49 builtin_define ("__hp9k8"); \ 50 builtin_define ("__hp9k8__"); \ 51 builtin_define ("__hpux"); \ 52 builtin_define ("__hpux__"); \ 53 builtin_define ("__unix"); \ 54 builtin_define ("__unix__"); \ 55 if (c_dialect_cxx ()) \ 56 { \ 57 builtin_define ("_HPUX_SOURCE"); \ 58 builtin_define ("_INCLUDE_LONGLONG"); \ 59 builtin_define ("__STDC_EXT__"); \ 60 } \ 61 else if (!flag_iso) \ 62 { \ 63 builtin_define ("_HPUX_SOURCE"); \ 64 if (preprocessing_trad_p ()) \ 65 { \ 66 builtin_define ("hp9000s800"); \ 67 builtin_define ("hp9k8"); \ 68 builtin_define ("hppa"); \ 69 builtin_define ("hpux"); \ 70 builtin_define ("unix"); \ 71 builtin_define ("__CLASSIC_C__"); \ 72 builtin_define ("_PWB"); \ 73 builtin_define ("PWB"); \ 74 } \ 75 else \ 76 builtin_define ("__STDC_EXT__"); \ 77 } \ 78 if (TARGET_SIO) \ 79 builtin_define ("_SIO"); \ 80 else \ 81 { \ 82 builtin_define ("__hp9000s700"); \ 83 builtin_define ("__hp9000s700__"); \ 84 builtin_define ("_WSIO"); \ 85 } \ 86 } \ 87 while (0) 88 89 #undef SUBTARGET_SWITCHES 90 #define SUBTARGET_SWITCHES \ 91 { "sio", MASK_SIO, N_("Generate cpp defines for server IO") }, \ 92 { "wsio", -MASK_SIO, N_("Generate cpp defines for workstation IO") }, 93 94 /* Like the default, except no -lg. */ 95 #undef LIB_SPEC 96 #define LIB_SPEC "%{!shared:%{!p:%{!pg:-lc}}%{p: -L/lib/libp/ -lc}%{pg: -L/lib/libp/ -lc}}" 97 98 #undef LINK_SPEC 99 #if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_PA_11) 100 #define LINK_SPEC \ 101 "%{!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}" 102 #else 103 #define LINK_SPEC \ 104 "%{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{g*:-a archive} %{shared:-b}" 105 #endif 106 107 /* hpux8 and later have C++ compatible include files, so do not 108 pretend they are `extern "C"'. */ 109 #define NO_IMPLICIT_EXTERN_C 110 111 /* hpux11 and earlier don't have fputc_unlocked, so we must inhibit the 112 transformation of fputs_unlocked and fprintf_unlocked to fputc_unlocked. */ 113 #define DONT_HAVE_FPUTC_UNLOCKED 114 115 /* We want the entry value of SP saved in the frame marker for 116 compatibility with the HP-UX unwind library. */ 117 #undef TARGET_HPUX_UNWIND_LIBRARY 118 #define TARGET_HPUX_UNWIND_LIBRARY 1 119