]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/ia64/hpux.h
hpux.h (AS_NEEDS_DASH_FOR_PIPED_INPUT): Define for non-GNU assembler.
[thirdparty/gcc.git] / gcc / config / ia64 / hpux.h
CommitLineData
7e5b9908 1/* Definitions of target machine GNU compiler. IA-64 version.
24a57808 2 Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009, 2010
ca2b05ba 3 Free Software Foundation, Inc.
7e5b9908
SE
4 Contributed by Steve Ellcey <sje@cup.hp.com> and
5 Reva Cuthbertson <reva@cup.hp.com>
6
3bed2930 7This file is part of GCC.
7e5b9908 8
3bed2930 9GCC is free software; you can redistribute it and/or modify
7e5b9908 10it under the terms of the GNU General Public License as published by
2f83c7d6 11the Free Software Foundation; either version 3, or (at your option)
7e5b9908
SE
12any later version.
13
3bed2930 14GCC is distributed in the hope that it will be useful,
7e5b9908
SE
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17GNU General Public License for more details.
18
19You should have received a copy of the GNU General Public License
2f83c7d6
NC
20along with GCC; see the file COPYING3. If not see
21<http://www.gnu.org/licenses/>. */
7e5b9908 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
70406574
JM
32#undef WCHAR_TYPE
33#define WCHAR_TYPE "unsigned int"
34
35#undef WCHAR_TYPE_SIZE
36#define WCHAR_TYPE_SIZE 32
37
57016b47 38/* Target OS builtins. */
57016b47
SE
39#define TARGET_OS_CPP_BUILTINS() \
40do { \
41 builtin_assert("system=hpux"); \
42 builtin_assert("system=posix"); \
43 builtin_assert("system=unix"); \
44 builtin_define_std("hpux"); \
45 builtin_define_std("unix"); \
46 builtin_define("__IA64__"); \
47 builtin_define("_LONGLONG"); \
a5a8386f 48 builtin_define("_INCLUDE_LONGLONG"); \
9a17c91d 49 builtin_define("__STDC_EXT__"); \
57016b47 50 builtin_define("_UINT128_T"); \
04df6730 51 if (c_dialect_cxx () || !flag_iso) \
57016b47
SE
52 { \
53 builtin_define("_HPUX_SOURCE"); \
7dd7fb88 54 builtin_define("__STDCPP__"); \
6db63df9 55 builtin_define("_INCLUDE__STDC_A1_SOURCE"); \
57016b47 56 } \
24b7a8c9
RS
57 if (TARGET_ILP32) \
58 builtin_define("_ILP32"); \
57016b47 59} while (0)
7e5b9908 60
7e2055ec
ZW
61#undef CPP_SPEC
62#define CPP_SPEC \
63 "%{mt|pthread:-D_REENTRANT -D_THREAD_SAFE -D_POSIX_C_SOURCE=199506L}"
64/* aCC defines also -DRWSTD_MULTI_THREAD, -DRW_MULTI_THREAD. These
65 affect only aCC's C++ library (Rogue Wave-derived) which we do not
66 use, and they violate the user's name space. */
67
5b8fcab6
DB
68#undef ASM_EXTRA_SPEC
69#define ASM_EXTRA_SPEC "%{milp32:-milp32} %{mlp64:-mlp64}"
7e5b9908 70
b8f9bca0
JM
71#ifndef USE_GAS
72#define AS_NEEDS_DASH_FOR_PIPED_INPUT
73#endif
74
7e5b9908
SE
75#undef ENDFILE_SPEC
76
77#undef STARTFILE_SPEC
6db63df9
SE
78#define STARTFILE_SPEC "%{!shared:%{static:crt0%O%s} \
79 %{mlp64:/usr/lib/hpux64/unix98%O%s} \
80 %{!mlp64:/usr/lib/hpux32/unix98%O%s}}"
40ad65d0 81
7e5b9908 82#undef LINK_SPEC
40ad65d0 83#define LINK_SPEC \
543144ed 84 "-z +Accept TypeMismatch \
40ad65d0
SE
85 %{shared:-b} \
86 %{!shared: \
87 -u main \
88 %{static:-noshared}}"
7e5b9908
SE
89
90#undef LIB_SPEC
40ad65d0
SE
91#define LIB_SPEC \
92 "%{!shared: \
715fda99 93 %{mt|pthread:%{fopenmp:-lrt} -lpthread} \
40ad65d0
SE
94 %{p:%{!mlp64:-L/usr/lib/hpux32/libp} \
95 %{mlp64:-L/usr/lib/hpux64/libp} -lprof} \
96 %{pg:%{!mlp64:-L/usr/lib/hpux32/libp} \
97 %{mlp64:-L/usr/lib/hpux64/libp} -lgprof} \
98 %{!symbolic:-lc}}"
99
e373cdb4
ZW
100#define MULTILIB_DEFAULTS { "milp32" }
101
6dd12198
SE
102/* A C expression whose value is zero if pointers that need to be extended
103 from being `POINTER_SIZE' bits wide to `Pmode' are sign-extended and
104 greater then zero if they are zero-extended and less then zero if the
105 ptr_extend instruction should be used. */
106
107#define POINTERS_EXTEND_UNSIGNED -1
108
7e5b9908
SE
109#define JMP_BUF_SIZE (8 * 76)
110
7e5b9908 111#undef TARGET_DEFAULT
b6b979d4 112#define TARGET_DEFAULT \
f19f1e5e 113 (MASK_DWARF2_ASM | MASK_BIG_ENDIAN | MASK_ILP32)
0d7839da 114
4e2b3c87
EB
115/* ??? Might not be needed anymore. */
116#define MEMBER_TYPE_FORCES_BLK(FIELD, MODE) ((MODE) == TFmode)
0d7839da 117
68bb91b1
SE
118/* ASM_OUTPUT_EXTERNAL_LIBCALL defaults to just a globalize_label call,
119 but that doesn't put out the @function type information which causes
120 shared library problems. */
121
122#undef ASM_OUTPUT_EXTERNAL_LIBCALL
123#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \
124do { \
125 (*targetm.asm_out.globalize_label) (FILE, XSTR (FUN, 0)); \
126 ASM_OUTPUT_TYPE_DIRECTIVE (FILE, XSTR (FUN, 0), "function"); \
127} while (0)
128
0d7839da
SE
129#undef FUNCTION_ARG_PADDING
130#define FUNCTION_ARG_PADDING(MODE, TYPE) \
131 ia64_hpux_function_arg_padding ((MODE), (TYPE))
132
133#undef PAD_VARARGS_DOWN
134#define PAD_VARARGS_DOWN (!AGGREGATE_TYPE_P (type))
34c1864f 135
c58b209a
NB
136#define REGISTER_TARGET_PRAGMAS() \
137 c_register_pragma (0, "builtin", ia64_hpux_handle_builtin_pragma)
686f3bf0
SE
138
139/* Tell ia64.c that we are using the HP linker and we should delay output of
140 function extern declarations so that we don't output them for functions
141 which are never used (and may not be defined). */
142
143#undef TARGET_HPUX_LD
144#define TARGET_HPUX_LD 1
145
7e2055ec
ZW
146/* The HPUX dynamic linker objects to weak symbols with no
147 definitions, so do not use them in gthr-posix.h. */
148#define GTHREAD_USE_WEAK 0
149
b64ddb88
SE
150#undef CTORS_SECTION_ASM_OP
151#define CTORS_SECTION_ASM_OP "\t.section\t.init_array,\t\"aw\",\"init_array\""
152
153#undef DTORS_SECTION_ASM_OP
154#define DTORS_SECTION_ASM_OP "\t.section\t.fini_array,\t\"aw\",\"fini_array\""
155
74487c57
MM
156/* The init_array/fini_array technique does not permit the use of
157 initialization priorities. */
158#define SUPPORTS_INIT_PRIORITY 0
159
b64ddb88
SE
160#undef READONLY_DATA_SECTION_ASM_OP
161#define READONLY_DATA_SECTION_ASM_OP "\t.section\t.rodata,\t\"a\",\t\"progbits\""
162
163#undef DATA_SECTION_ASM_OP
164#define DATA_SECTION_ASM_OP "\t.section\t.data,\t\"aw\",\t\"progbits\""
165
166#undef SDATA_SECTION_ASM_OP
167#define SDATA_SECTION_ASM_OP "\t.section\t.sdata,\t\"asw\",\t\"progbits\""
168
169#undef BSS_SECTION_ASM_OP
170#define BSS_SECTION_ASM_OP "\t.section\t.bss,\t\"aw\",\t\"nobits\""
171
172#undef SBSS_SECTION_ASM_OP
173#define SBSS_SECTION_ASM_OP "\t.section\t.sbss,\t\"asw\",\t\"nobits\""
174
175#undef TEXT_SECTION_ASM_OP
176#define TEXT_SECTION_ASM_OP "\t.section\t.text,\t\"ax\",\t\"progbits\""
6ca86a1a
RH
177
178/* It is illegal to have relocations in shared segments on HPUX.
179 Pretend flag_pic is always set. */
9b580a0b
RH
180#undef TARGET_ASM_RELOC_RW_MASK
181#define TARGET_ASM_RELOC_RW_MASK ia64_hpux_reloc_rw_mask
9959901c
RS
182
183/* ia64 HPUX has the float and long double forms of math functions. */
184#undef TARGET_C99_FUNCTIONS
185#define TARGET_C99_FUNCTIONS 1
186
1f7aa7cd 187#undef TARGET_INIT_LIBFUNCS
c15c90bb
ZW
188#define TARGET_INIT_LIBFUNCS ia64_hpux_init_libfuncs
189
190#define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) ((MODE) == TFmode)
4e9db8b2
SE
191
192/* Put all *xf routines in libgcc, regardless of long double size. */
193#undef LIBGCC2_HAS_XF_MODE
194#define LIBGCC2_HAS_XF_MODE 1
4a73d865 195#define XF_SIZE 64
4e9db8b2
SE
196
197/* Put all *tf routines in libgcc, regardless of long double size. */
198#undef LIBGCC2_HAS_TF_MODE
199#define LIBGCC2_HAS_TF_MODE 1
4a73d865 200#define TF_SIZE 113
bdeb7efa
JM
201
202/* HP-UX headers are C++-compatible. */
203#define NO_IMPLICIT_EXTERN_C
d26afa4f
SE
204
205/* HP-UX uses PROFILE_HOOK instead of FUNCTION_PROFILER but we need a
206 FUNCTION_PROFILER defined because its use is not ifdefed. When using
207 PROFILE_HOOK, the profile call comes after the prologue. */
208
209#undef FUNCTION_PROFILER
210#define FUNCTION_PROFILER(FILE, LABELNO) do { } while (0)
211
212#undef PROFILE_HOOK
213#define PROFILE_HOOK(LABEL) ia64_profile_hook (LABEL)
214
215#undef PROFILE_BEFORE_PROLOGUE
216
217#undef NO_PROFILE_COUNTERS
218#define NO_PROFILE_COUNTERS 0
7ee51a34 219
1cc2d70b
SE
220/* The HP-UX linker has a bug that causes calls from functions in
221 .text.unlikely to functions in .text to cause a segfault. Until
222 it is fixed, prevent code from being put into .text.unlikely or
223 .text.hot. */
224
f16d3f39 225#define TARGET_ASM_FUNCTION_SECTION ia64_hpux_function_section