]> gcc.gnu.org Git - gcc.git/blame - gcc/config/pa/pa-hpux10.h
Update Copyright years for files modified in 2008 and/or 2009.
[gcc.git] / gcc / config / pa / pa-hpux10.h
CommitLineData
c219e1da 1/* Definitions of target machine for GNU compiler, for HP PA-RISC
2f83c7d6 2 Copyright (C) 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2004,
66647d44 3 2007, 2008 Free Software Foundation, Inc.
7fc5b331
JL
4 Contributed by Tim Moore (moore@defmacro.cs.utah.edu)
5
b7849684 6This file is part of GCC.
7fc5b331 7
b7849684 8GCC is free software; you can redistribute it and/or modify
7fc5b331 9it under the terms of the GNU General Public License as published by
2f83c7d6 10the Free Software Foundation; either version 3, or (at your option)
7fc5b331
JL
11any later version.
12
b7849684 13GCC is distributed in the hope that it will be useful,
7fc5b331
JL
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
2f83c7d6
NC
19along with GCC; see the file COPYING3. If not see
20<http://www.gnu.org/licenses/>. */
7fc5b331 21
cb99b61a
JDA
22/* GCC always defines __STDC__. HP C++ compilers don't define it. This
23 causes trouble when sys/stdsyms.h is included. As a work around,
24 we define __STDC_EXT__. A similar situation exists with respect to
25 the definition of __cplusplus. We define _INCLUDE_LONGLONG
26 to prevent nlist.h from defining __STDC_32_MODE__ (no longlong
7dd7fb88
ZW
27 support). We define __STDCPP__ to get certain system headers
28 (notably assert.h) to assume standard preprocessor behavior in C++. */
c219e1da 29#undef TARGET_OS_CPP_BUILTINS
d711cf67
JDA
30#define TARGET_OS_CPP_BUILTINS() \
31 do \
32 { \
33 builtin_assert ("system=hpux"); \
34 builtin_assert ("system=unix"); \
35 builtin_define ("__hp9000s800"); \
36 builtin_define ("__hp9000s800__"); \
37 builtin_define ("__hpux"); \
38 builtin_define ("__hpux__"); \
39 builtin_define ("__unix"); \
40 builtin_define ("__unix__"); \
41 if (c_dialect_cxx ()) \
42 { \
43 builtin_define ("_HPUX_SOURCE"); \
44 builtin_define ("_INCLUDE_LONGLONG"); \
45 builtin_define ("__STDC_EXT__"); \
46 builtin_define ("__STDCPP__"); \
47 } \
48 else if (!flag_iso) \
49 { \
50 builtin_define ("_HPUX_SOURCE"); \
51 if (preprocessing_trad_p ()) \
52 { \
53 builtin_define ("hp9000s800"); \
54 builtin_define ("hppa"); \
55 builtin_define ("hpux"); \
56 builtin_define ("unix"); \
57 builtin_define ("__CLASSIC_C__"); \
58 builtin_define ("_PWB"); \
59 builtin_define ("PWB"); \
60 } \
61 else \
62 builtin_define ("__STDC_EXT__"); \
63 } \
64 if (flag_pa_unix >= 1995) \
65 { \
66 builtin_define ("_XOPEN_UNIX"); \
67 builtin_define ("_XOPEN_SOURCE_EXTENDED"); \
68 } \
69 if (TARGET_SIO) \
70 builtin_define ("_SIO"); \
71 else \
72 { \
73 builtin_define ("__hp9000s700"); \
74 builtin_define ("__hp9000s700__"); \
75 builtin_define ("_WSIO"); \
76 } \
77 } \
c219e1da
JDA
78 while (0)
79
80#define CPP_SPEC "%{threads: -D_REENTRANT -D_DCE_THREADS}"
81
7fc5b331 82/* We can debug dynamically linked executables on hpux9; we also want
956d6950 83 dereferencing of a NULL pointer to cause a SEGV. */
7fc5b331 84#undef LINK_SPEC
f48758e4 85#if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_PA_11)
7fc5b331 86#define LINK_SPEC \
d9de9cad
JDA
87 "%<fwhole-program\
88 %{!mpa-risc-1-0:%{!march=1.0:%{static:-L/lib/pa1.1 -L/usr/lib/pa1.1 }}}\
f48758e4
JDA
89 %{!shared:%{p:-L/lib/libp %{!static:\
90 %nWarning: consider linking with `-static' as system libraries with\n\
91 %n profiling support are only provided in archive format}}}\
92 %{!shared:%{pg:-L/lib/libp %{!static:\
93 %nWarning: consider linking with `-static' as system libraries with\n\
94 %n profiling support are only provided in archive format}}}\
95 -z %{mlinker-opt:-O} %{!shared:-u main}\
96 %{static:-a archive} %{shared:-b}"
7fc5b331
JL
97#else
98#define LINK_SPEC \
d9de9cad
JDA
99 "%<fwhole-program\
100 %{!shared:%{p:-L/lib/libp %{!static:\
f48758e4
JDA
101 %nWarning: consider linking with `-static' as system libraries with\n\
102 %n profiling support are only provided in archive format}}}\
103 %{!shared:%{pg:-L/lib/libp %{!static:\
104 %nWarning: consider linking with `-static' as system libraries with\n\
105 %n profiling support are only provided in archive format}}}\
106 -z %{mlinker-opt:-O} %{!shared:-u main}\
107 %{static:-a archive} %{shared:-b}"
7fc5b331
JL
108#endif
109
154bba13
TT
110/* Like the default, except no -lg. */
111#undef LIB_SPEC
112#define LIB_SPEC \
113 "%{!shared:\
7238ae53 114 %{!p:%{!pg:\
f401d0f5 115 %{!threads:-lc %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}\
7238ae53 116 %{threads:-lcma -lc_r}}}\
f48758e4
JDA
117 %{p:%{!pg:-lc %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\
118 %{pg:-lc %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}"
154bba13 119
5467baef
JDA
120#undef THREAD_MODEL_SPEC
121#define THREAD_MODEL_SPEC "%{!threads:single}%{threads:dce}"
122
c28eb6c2
JL
123/* Under hpux10, the normal location of the `ld' and `as' programs is the
124 /usr/ccs/bin directory. */
125
2989d30c 126#ifndef CROSS_DIRECTORY_STRUCTURE
c28eb6c2
JL
127#undef MD_EXEC_PREFIX
128#define MD_EXEC_PREFIX "/usr/ccs/bin/"
129#endif
130
7238ae53
JL
131/* Under hpux10, the normal location of the various *crt*.o files is
132 the /usr/ccs/lib directory. However, the profiling files are in
133 /opt/langtools/lib. */
c28eb6c2 134
2989d30c 135#ifndef CROSS_DIRECTORY_STRUCTURE
c28eb6c2
JL
136#undef MD_STARTFILE_PREFIX
137#define MD_STARTFILE_PREFIX "/usr/ccs/lib/"
7238ae53 138#define MD_STARTFILE_PREFIX_1 "/opt/langtools/lib/"
c28eb6c2
JL
139#endif
140
f45ebe47
JL
141/* hpux10 has the new HP assembler. It's still lousy, but it's a whole lot
142 better than the assembler shipped with older versions of hpux. */
8d913d99
AM
143#undef NEW_HP_ASSEMBLER
144#define NEW_HP_ASSEMBLER 1
This page took 2.185619 seconds and 5 git commands to generate.