]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/ia64/hpux.h
std_complex.h (pow(const complex&, const _Tp&), [...]): Fully qualify with std::...
[thirdparty/gcc.git] / gcc / config / ia64 / hpux.h
CommitLineData
7e5b9908 1/* Definitions of target machine GNU compiler. IA-64 version.
c58b209a 2 Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
7e5b9908
SE
3 Contributed by Steve Ellcey <sje@cup.hp.com> and
4 Reva Cuthbertson <reva@cup.hp.com>
5
3bed2930 6This file is part of GCC.
7e5b9908 7
3bed2930 8GCC is free software; you can redistribute it and/or modify
7e5b9908
SE
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation; either version 2, or (at your option)
11any later version.
12
3bed2930 13GCC is distributed in the hope that it will be useful,
7e5b9908
SE
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
3bed2930 19along with GCC; see the file COPYING. If not, write to
7e5b9908
SE
20the Free Software Foundation, 59 Temple Place - Suite 330,
21Boston, MA 02111-1307, USA. */
22
243a7070
DB
23/* This macro is a C statement to print on `stderr' a string describing the
24 particular machine description choice. */
25
26#define TARGET_VERSION fprintf (stderr, " (IA-64) HP-UX");
27
02befdf4
ZW
28/* Enable HPUX ABI quirks. */
29#undef TARGET_HPUX
30#define TARGET_HPUX 1
31
57016b47 32/* Target OS builtins. */
57016b47
SE
33#define TARGET_OS_CPP_BUILTINS() \
34do { \
35 builtin_assert("system=hpux"); \
36 builtin_assert("system=posix"); \
37 builtin_assert("system=unix"); \
38 builtin_define_std("hpux"); \
39 builtin_define_std("unix"); \
40 builtin_define("__IA64__"); \
41 builtin_define("_LONGLONG"); \
a5a8386f 42 builtin_define("_INCLUDE_LONGLONG"); \
57016b47 43 builtin_define("_UINT128_T"); \
04df6730 44 if (c_dialect_cxx () || !flag_iso) \
57016b47
SE
45 { \
46 builtin_define("_HPUX_SOURCE"); \
47 builtin_define("__STDC_EXT__"); \
48 } \
24b7a8c9
RS
49 if (TARGET_ILP32) \
50 builtin_define("_ILP32"); \
57016b47 51} while (0)
7e5b9908 52
7e2055ec
ZW
53#undef CPP_SPEC
54#define CPP_SPEC \
55 "%{mt|pthread:-D_REENTRANT -D_THREAD_SAFE -D_POSIX_C_SOURCE=199506L}"
56/* aCC defines also -DRWSTD_MULTI_THREAD, -DRW_MULTI_THREAD. These
57 affect only aCC's C++ library (Rogue Wave-derived) which we do not
58 use, and they violate the user's name space. */
59
5b8fcab6
DB
60#undef ASM_EXTRA_SPEC
61#define ASM_EXTRA_SPEC "%{milp32:-milp32} %{mlp64:-mlp64}"
7e5b9908
SE
62
63#undef ENDFILE_SPEC
64
65#undef STARTFILE_SPEC
40ad65d0
SE
66#define STARTFILE_SPEC "%{!shared:%{static:crt0%O%s}}"
67
7e5b9908 68#undef LINK_SPEC
40ad65d0
SE
69#define LINK_SPEC \
70 "+Accept TypeMismatch \
71 %{shared:-b} \
72 %{!shared: \
73 -u main \
74 %{static:-noshared}}"
7e5b9908
SE
75
76#undef LIB_SPEC
40ad65d0
SE
77#define LIB_SPEC \
78 "%{!shared: \
7e2055ec 79 %{mt|pthread:-lpthread} \
40ad65d0
SE
80 %{p:%{!mlp64:-L/usr/lib/hpux32/libp} \
81 %{mlp64:-L/usr/lib/hpux64/libp} -lprof} \
82 %{pg:%{!mlp64:-L/usr/lib/hpux32/libp} \
83 %{mlp64:-L/usr/lib/hpux64/libp} -lgprof} \
84 %{!symbolic:-lc}}"
85
86#ifndef CROSS_COMPILE
87#undef LIBGCC_SPEC
88#define LIBGCC_SPEC \
e373cdb4 89 "%{shared-libgcc:%{!mlp64:-lgcc_s}%{mlp64:-lgcc_s_hpux64} -lgcc} \
40ad65d0
SE
90 %{!shared-libgcc:-lgcc}"
91#endif
7e5b9908 92
6dd12198
SE
93#undef SUBTARGET_SWITCHES
94#define SUBTARGET_SWITCHES \
95 { "ilp32", MASK_ILP32, "Generate ILP32 code" }, \
96 { "lp64", -MASK_ILP32, "Generate LP64 code" },
97
e373cdb4
ZW
98#define MULTILIB_DEFAULTS { "milp32" }
99
6dd12198
SE
100/* A C expression whose value is zero if pointers that need to be extended
101 from being `POINTER_SIZE' bits wide to `Pmode' are sign-extended and
102 greater then zero if they are zero-extended and less then zero if the
103 ptr_extend instruction should be used. */
104
105#define POINTERS_EXTEND_UNSIGNED -1
106
7e5b9908
SE
107#define JMP_BUF_SIZE (8 * 76)
108
7e5b9908 109#undef TARGET_DEFAULT
b6b979d4
SE
110#define TARGET_DEFAULT \
111 (MASK_DWARF2_ASM | MASK_BIG_ENDIAN | MASK_ILP32 | MASK_INLINE_FLOAT_DIV_THR)
0d7839da
SE
112
113/* This needs to be set to force structure arguments with a single
114 field to be treated as structures and not as the type of their
115 field. Without this a structure with a single char will be
116 returned just like a char variable and that is wrong on HP-UX
3870df96
SE
117 IA64. */
118
02befdf4
ZW
119#define MEMBER_TYPE_FORCES_BLK(FIELD, MODE) \
120 (TREE_CODE (TREE_TYPE (FIELD)) != REAL_TYPE || MODE == TFmode)
0d7839da 121
68bb91b1
SE
122/* ASM_OUTPUT_EXTERNAL_LIBCALL defaults to just a globalize_label call,
123 but that doesn't put out the @function type information which causes
124 shared library problems. */
125
126#undef ASM_OUTPUT_EXTERNAL_LIBCALL
127#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \
128do { \
129 (*targetm.asm_out.globalize_label) (FILE, XSTR (FUN, 0)); \
130 ASM_OUTPUT_TYPE_DIRECTIVE (FILE, XSTR (FUN, 0), "function"); \
131} while (0)
132
0d7839da
SE
133#undef FUNCTION_ARG_PADDING
134#define FUNCTION_ARG_PADDING(MODE, TYPE) \
135 ia64_hpux_function_arg_padding ((MODE), (TYPE))
136
137#undef PAD_VARARGS_DOWN
138#define PAD_VARARGS_DOWN (!AGGREGATE_TYPE_P (type))
34c1864f 139
c58b209a
NB
140#define REGISTER_TARGET_PRAGMAS() \
141 c_register_pragma (0, "builtin", ia64_hpux_handle_builtin_pragma)
686f3bf0
SE
142
143/* Tell ia64.c that we are using the HP linker and we should delay output of
144 function extern declarations so that we don't output them for functions
145 which are never used (and may not be defined). */
146
147#undef TARGET_HPUX_LD
148#define TARGET_HPUX_LD 1
149
7e2055ec
ZW
150/* The HPUX dynamic linker objects to weak symbols with no
151 definitions, so do not use them in gthr-posix.h. */
152#define GTHREAD_USE_WEAK 0
153
686f3bf0
SE
154/* Put out the needed function declarations at the end. */
155
a5fe455b 156#define TARGET_ASM_FILE_END ia64_hpux_file_end
b64ddb88
SE
157
158#undef CTORS_SECTION_ASM_OP
159#define CTORS_SECTION_ASM_OP "\t.section\t.init_array,\t\"aw\",\"init_array\""
160
161#undef DTORS_SECTION_ASM_OP
162#define DTORS_SECTION_ASM_OP "\t.section\t.fini_array,\t\"aw\",\"fini_array\""
163
74487c57
MM
164/* The init_array/fini_array technique does not permit the use of
165 initialization priorities. */
166#define SUPPORTS_INIT_PRIORITY 0
167
b64ddb88
SE
168#undef READONLY_DATA_SECTION_ASM_OP
169#define READONLY_DATA_SECTION_ASM_OP "\t.section\t.rodata,\t\"a\",\t\"progbits\""
170
171#undef DATA_SECTION_ASM_OP
172#define DATA_SECTION_ASM_OP "\t.section\t.data,\t\"aw\",\t\"progbits\""
173
174#undef SDATA_SECTION_ASM_OP
175#define SDATA_SECTION_ASM_OP "\t.section\t.sdata,\t\"asw\",\t\"progbits\""
176
177#undef BSS_SECTION_ASM_OP
178#define BSS_SECTION_ASM_OP "\t.section\t.bss,\t\"aw\",\t\"nobits\""
179
180#undef SBSS_SECTION_ASM_OP
181#define SBSS_SECTION_ASM_OP "\t.section\t.sbss,\t\"asw\",\t\"nobits\""
182
183#undef TEXT_SECTION_ASM_OP
184#define TEXT_SECTION_ASM_OP "\t.section\t.text,\t\"ax\",\t\"progbits\""
6ca86a1a
RH
185
186/* It is illegal to have relocations in shared segments on HPUX.
187 Pretend flag_pic is always set. */
188#undef TARGET_ASM_SELECT_SECTION
189#define TARGET_ASM_SELECT_SECTION ia64_rwreloc_select_section
190#undef TARGET_ASM_UNIQUE_SECTION
191#define TARGET_ASM_UNIQUE_SECTION ia64_rwreloc_unique_section
192#undef TARGET_ASM_SELECT_RTX_SECTION
193#define TARGET_ASM_SELECT_RTX_SECTION ia64_rwreloc_select_rtx_section
1e1bd14e
RH
194#undef TARGET_SECTION_TYPE_FLAGS
195#define TARGET_SECTION_TYPE_FLAGS ia64_rwreloc_section_type_flags
9959901c 196
c743369c
MM
197/* HP-UX does not support thread-local storage. */
198#undef TARGET_HAVE_TLS
199#define TARGET_HAVE_TLS false
200
9959901c
RS
201/* ia64 HPUX has the float and long double forms of math functions. */
202#undef TARGET_C99_FUNCTIONS
203#define TARGET_C99_FUNCTIONS 1
204
c15c90bb
ZW
205#define TARGET_INIT_LIBFUNCS ia64_hpux_init_libfuncs
206
207#define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) ((MODE) == TFmode)