comparison gcc/config/pa/pa-hpux10.h @ 0:a06113de4d67

first commit
author kent <kent@cr.ie.u-ryukyu.ac.jp>
date Fri, 17 Jul 2009 14:47:48 +0900
parents
children 77e2b8dfacca
comparison
equal deleted inserted replaced
-1:000000000000 0:a06113de4d67
1 /* Definitions of target machine for GNU compiler, for HP PA-RISC
2 Copyright (C) 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2004,
3 2007, 2008 Free Software Foundation, Inc.
4 Contributed by Tim Moore (moore@defmacro.cs.utah.edu)
5
6 This file is part of GCC.
7
8 GCC is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3, or (at your option)
11 any later version.
12
13 GCC is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with GCC; see the file COPYING3. If not see
20 <http://www.gnu.org/licenses/>. */
21
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
27 support). We define __STDCPP__ to get certain system headers
28 (notably assert.h) to assume standard preprocessor behavior in C++. */
29 #undef TARGET_OS_CPP_BUILTINS
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 } \
78 while (0)
79
80 #define CPP_SPEC "%{threads: -D_REENTRANT -D_DCE_THREADS}"
81
82 /* We can debug dynamically linked executables on hpux9; we also want
83 dereferencing of a NULL pointer to cause a SEGV. */
84 #undef LINK_SPEC
85 #if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_PA_11)
86 #define LINK_SPEC \
87 "%<fwhole-program\
88 %{!mpa-risc-1-0:%{!march=1.0:%{static:-L/lib/pa1.1 -L/usr/lib/pa1.1 }}}\
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}"
97 #else
98 #define LINK_SPEC \
99 "%<fwhole-program\
100 %{!shared:%{p:-L/lib/libp %{!static:\
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}"
108 #endif
109
110 /* Like the default, except no -lg. */
111 #undef LIB_SPEC
112 #define LIB_SPEC \
113 "%{!shared:\
114 %{!p:%{!pg:\
115 %{!threads:-lc %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}\
116 %{threads:-lcma -lc_r}}}\
117 %{p:%{!pg:-lc %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\
118 %{pg:-lc %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}"
119
120 #undef THREAD_MODEL_SPEC
121 #define THREAD_MODEL_SPEC "%{!threads:single}%{threads:dce}"
122
123 /* Under hpux10, the normal location of the `ld' and `as' programs is the
124 /usr/ccs/bin directory. */
125
126 #ifndef CROSS_DIRECTORY_STRUCTURE
127 #undef MD_EXEC_PREFIX
128 #define MD_EXEC_PREFIX "/usr/ccs/bin/"
129 #endif
130
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. */
134
135 #ifndef CROSS_DIRECTORY_STRUCTURE
136 #undef MD_STARTFILE_PREFIX
137 #define MD_STARTFILE_PREFIX "/usr/ccs/lib/"
138 #define MD_STARTFILE_PREFIX_1 "/opt/langtools/lib/"
139 #endif
140
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. */
143 #undef NEW_HP_ASSEMBLER
144 #define NEW_HP_ASSEMBLER 1