Mercurial > hg > CbC > CbC_gcc
annotate gcc/config/pa/pa-hpux10.h @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
rev | line source |
---|---|
0 | 1 /* Definitions of target machine for GNU compiler, for HP PA-RISC |
131 | 2 Copyright (C) 1995-2018 Free Software Foundation, Inc. |
0 | 3 Contributed by Tim Moore (moore@defmacro.cs.utah.edu) |
4 | |
5 This file is part of GCC. | |
6 | |
7 GCC is free software; you can redistribute it and/or modify | |
8 it under the terms of the GNU General Public License as published by | |
9 the Free Software Foundation; either version 3, or (at your option) | |
10 any later version. | |
11 | |
12 GCC is distributed in the hope that it will be useful, | |
13 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 GNU General Public License for more details. | |
16 | |
17 You should have received a copy of the GNU General Public License | |
18 along with GCC; see the file COPYING3. If not see | |
19 <http://www.gnu.org/licenses/>. */ | |
20 | |
21 /* GCC always defines __STDC__. HP C++ compilers don't define it. This | |
22 causes trouble when sys/stdsyms.h is included. As a work around, | |
23 we define __STDC_EXT__. A similar situation exists with respect to | |
24 the definition of __cplusplus. We define _INCLUDE_LONGLONG | |
25 to prevent nlist.h from defining __STDC_32_MODE__ (no longlong | |
26 support). We define __STDCPP__ to get certain system headers | |
111 | 27 (notably assert.h) to assume standard preprocessor behavior in C++. |
28 We define _XOPEN_SOURCE_EXTENDED when we define _HPUX_SOURCE to avoid | |
29 non standard hpux variants in _INCLUDE_XOPEN_SOURCE_EXTENDED. */ | |
0 | 30 #undef TARGET_OS_CPP_BUILTINS |
31 #define TARGET_OS_CPP_BUILTINS() \ | |
32 do \ | |
33 { \ | |
34 builtin_assert ("system=hpux"); \ | |
35 builtin_assert ("system=unix"); \ | |
36 builtin_define ("__hp9000s800"); \ | |
37 builtin_define ("__hp9000s800__"); \ | |
38 builtin_define ("__hpux"); \ | |
39 builtin_define ("__hpux__"); \ | |
40 builtin_define ("__unix"); \ | |
41 builtin_define ("__unix__"); \ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
42 builtin_define ("__STDC_EXT__"); \ |
0 | 43 if (c_dialect_cxx ()) \ |
44 { \ | |
45 builtin_define ("_HPUX_SOURCE"); \ | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
46 builtin_define ("_REENTRANT"); \ |
0 | 47 builtin_define ("_INCLUDE_LONGLONG"); \ |
48 builtin_define ("__STDCPP__"); \ | |
111 | 49 builtin_define ("_LARGEFILE_SOURCE"); \ |
50 builtin_define ("_LARGEFILE64_SOURCE"); \ | |
51 if (flag_pa_unix >= 1995) \ | |
52 { \ | |
53 builtin_define ("_XOPEN_UNIX"); \ | |
54 builtin_define ("_XOPEN_SOURCE_EXTENDED"); \ | |
55 } \ | |
0 | 56 } \ |
111 | 57 else if (flag_iso) \ |
58 { \ | |
59 if (flag_isoc94) \ | |
60 builtin_define ("_INCLUDE__STDC_A1_SOURCE"); \ | |
61 } \ | |
62 else \ | |
0 | 63 { \ |
64 builtin_define ("_HPUX_SOURCE"); \ | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
65 builtin_define ("_REENTRANT"); \ |
0 | 66 if (preprocessing_trad_p ()) \ |
67 { \ | |
68 builtin_define ("hp9000s800"); \ | |
69 builtin_define ("hppa"); \ | |
70 builtin_define ("hpux"); \ | |
71 builtin_define ("unix"); \ | |
72 builtin_define ("__CLASSIC_C__"); \ | |
73 builtin_define ("_PWB"); \ | |
74 builtin_define ("PWB"); \ | |
75 } \ | |
111 | 76 if (flag_pa_unix >= 1995) \ |
77 { \ | |
78 builtin_define ("_XOPEN_UNIX"); \ | |
79 builtin_define ("_XOPEN_SOURCE_EXTENDED"); \ | |
80 } \ | |
0 | 81 } \ |
82 if (TARGET_SIO) \ | |
83 builtin_define ("_SIO"); \ | |
84 else \ | |
85 { \ | |
86 builtin_define ("__hp9000s700"); \ | |
87 builtin_define ("__hp9000s700__"); \ | |
88 builtin_define ("_WSIO"); \ | |
89 } \ | |
90 } \ | |
91 while (0) | |
92 | |
93 #define CPP_SPEC "%{threads: -D_REENTRANT -D_DCE_THREADS}" | |
94 | |
95 /* We can debug dynamically linked executables on hpux9; we also want | |
96 dereferencing of a NULL pointer to cause a SEGV. */ | |
97 #undef LINK_SPEC | |
98 #if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_PA_11) | |
99 #define LINK_SPEC \ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
100 "%{!mpa-risc-1-0:%{!march=1.0:%{static:-L/lib/pa1.1 -L/usr/lib/pa1.1 }}}\ |
0 | 101 %{!shared:%{p:-L/lib/libp %{!static:\ |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
102 %nwarning: consider linking with '-static' as system libraries with\n\ |
0 | 103 %n profiling support are only provided in archive format}}}\ |
104 %{!shared:%{pg:-L/lib/libp %{!static:\ | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
105 %nwarning: consider linking with '-static' as system libraries with\n\ |
0 | 106 %n profiling support are only provided in archive format}}}\ |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
107 %{!shared:%{!static:%{rdynamic:-E}}}\ |
0 | 108 -z %{mlinker-opt:-O} %{!shared:-u main}\ |
109 %{static:-a archive} %{shared:-b}" | |
110 #else | |
111 #define LINK_SPEC \ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
112 "%{!shared:%{p:-L/lib/libp %{!static:\ |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
113 %nwarning: consider linking with '-static' as system libraries with\n\ |
0 | 114 %n profiling support are only provided in archive format}}}\ |
115 %{!shared:%{pg:-L/lib/libp %{!static:\ | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
116 %nwarning: consider linking with '-static' as system libraries with\n\ |
0 | 117 %n profiling support are only provided in archive format}}}\ |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
118 %{!shared:%{!static:%{rdynamic:-E}}}\ |
0 | 119 -z %{mlinker-opt:-O} %{!shared:-u main}\ |
120 %{static:-a archive} %{shared:-b}" | |
121 #endif | |
122 | |
123 /* Like the default, except no -lg. */ | |
124 #undef LIB_SPEC | |
125 #define LIB_SPEC \ | |
126 "%{!shared:\ | |
127 %{!p:%{!pg:\ | |
128 %{!threads:-lc %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}\ | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
129 %{threads:-lcma -lc}}}\ |
0 | 130 %{p:%{!pg:-lc %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\ |
131 %{pg:-lc %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}" | |
132 | |
133 #undef THREAD_MODEL_SPEC | |
134 #define THREAD_MODEL_SPEC "%{!threads:single}%{threads:dce}" | |
135 | |
136 /* Under hpux10, the normal location of the `ld' and `as' programs is the | |
137 /usr/ccs/bin directory. */ | |
138 | |
139 #ifndef CROSS_DIRECTORY_STRUCTURE | |
140 #undef MD_EXEC_PREFIX | |
141 #define MD_EXEC_PREFIX "/usr/ccs/bin/" | |
142 #endif | |
143 | |
144 /* Under hpux10, the normal location of the various *crt*.o files is | |
145 the /usr/ccs/lib directory. However, the profiling files are in | |
146 /opt/langtools/lib. */ | |
147 | |
148 #ifndef CROSS_DIRECTORY_STRUCTURE | |
149 #undef MD_STARTFILE_PREFIX | |
150 #define MD_STARTFILE_PREFIX "/usr/ccs/lib/" | |
151 #define MD_STARTFILE_PREFIX_1 "/opt/langtools/lib/" | |
152 #endif | |
153 | |
154 /* hpux10 has the new HP assembler. It's still lousy, but it's a whole lot | |
155 better than the assembler shipped with older versions of hpux. */ | |
156 #undef NEW_HP_ASSEMBLER | |
157 #define NEW_HP_ASSEMBLER 1 |