Mercurial > hg > CbC > CbC_gcc
comparison gcc/config/openbsd.h @ 55:77e2b8dfacca gcc-4.4.5
update it from 4.4.3 to 4.5.0
author | ryoma <e075725@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 12 Feb 2010 23:39:51 +0900 |
parents | a06113de4d67 |
children | f6334be47118 |
comparison
equal
deleted
inserted
replaced
52:c156f1bd5cd9 | 55:77e2b8dfacca |
---|---|
82 builtin_assert ("system=bsd"); \ | 82 builtin_assert ("system=bsd"); \ |
83 builtin_assert ("system=OpenBSD"); \ | 83 builtin_assert ("system=OpenBSD"); \ |
84 } \ | 84 } \ |
85 while (0) | 85 while (0) |
86 | 86 |
87 /* TARGET_OS_CPP_BUILTINS() common to all OpenBSD ELF targets. */ | |
88 #define OPENBSD_OS_CPP_BUILTINS_ELF() \ | |
89 do \ | |
90 { \ | |
91 OPENBSD_OS_CPP_BUILTINS(); \ | |
92 builtin_define ("__ELF__"); \ | |
93 } \ | |
94 while (0) | |
95 | |
96 /* TARGET_OS_CPP_BUILTINS() common to all LP64 OpenBSD targets. */ | |
97 #define OPENBSD_OS_CPP_BUILTINS_LP64() \ | |
98 do \ | |
99 { \ | |
100 builtin_define ("_LP64"); \ | |
101 builtin_define ("__LP64__"); \ | |
102 } \ | |
103 while (0) | |
104 | |
87 /* CPP_SPEC appropriate for OpenBSD. We deal with -posix and -pthread. | 105 /* CPP_SPEC appropriate for OpenBSD. We deal with -posix and -pthread. |
88 XXX the way threads are handled currently is not very satisfying, | 106 XXX the way threads are handled currently is not very satisfying, |
89 since all code must be compiled with -pthread to work. | 107 since all code must be compiled with -pthread to work. |
90 This two-stage defines makes it easy to pick that for targets that | 108 This two-stage defines makes it easy to pick that for targets that |
91 have subspecs. */ | 109 have subspecs. */ |
93 #define OBSD_CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}" | 111 #define OBSD_CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}" |
94 #else | 112 #else |
95 #define OBSD_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}" | 113 #define OBSD_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}" |
96 #endif | 114 #endif |
97 | 115 |
98 /* LIB_SPEC appropriate for OpenBSD. */ | 116 #undef LIB_SPEC |
99 #ifdef HAS_LIBC_R | 117 #define LIB_SPEC OBSD_LIB_SPEC |
100 /* -lc(_r)?(_p)?, select _r for threads, and _p for p or pg. */ | |
101 # define OBSD_LIB_SPEC "%{!shared:-lc%{pthread:_r}%{p:_p}%{!p:%{pg:_p}}}" | |
102 #else | |
103 /* Include -lpthread if -pthread is specified on the command line. */ | |
104 # define OBSD_LIB_SPEC "%{!shared:%{pthread:-lpthread%{p:_p}%{!p:%{pg:_p}}}} %{!shared:-lc%{p:_p}%{!p:%{pg:_p}}}" | |
105 #endif | |
106 | |
107 | 118 |
108 #ifndef OBSD_HAS_CORRECT_SPECS | 119 #ifndef OBSD_HAS_CORRECT_SPECS |
109 | 120 |
110 #ifndef OBSD_NO_DYNAMIC_LIBRARIES | 121 #ifndef OBSD_NO_DYNAMIC_LIBRARIES |
111 #undef SWITCH_TAKES_ARG | 122 #undef SWITCH_TAKES_ARG |
126 #endif | 137 #endif |
127 | 138 |
128 /* Since we use gas, stdin -> - is a good idea. */ | 139 /* Since we use gas, stdin -> - is a good idea. */ |
129 #define AS_NEEDS_DASH_FOR_PIPED_INPUT | 140 #define AS_NEEDS_DASH_FOR_PIPED_INPUT |
130 | 141 |
131 /* LINK_SPEC appropriate for OpenBSD. Support for GCC options | 142 #undef LIB_SPEC |
132 -static, -assert, and -nostdlib. */ | 143 #define LIB_SPEC OBSD_LIB_SPEC |
133 #undef LINK_SPEC | 144 |
134 #ifdef OBSD_NO_DYNAMIC_LIBRARIES | 145 #if defined(HAVE_LD_EH_FRAME_HDR) |
135 #define LINK_SPEC \ | 146 #define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " |
136 "%{g:%{!nostdlib:-L/usr/lib/debug}} %{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{assert*}" | |
137 #else | |
138 #define LINK_SPEC \ | |
139 "%{g:%{!nostdlib:-L/usr/lib/debug}} %{!shared:%{!nostdlib:%{!r*:%{!e*:-e start}}}} %{shared:-Bshareable -x} -dc -dp %{R*} %{static:-Bstatic} %{assert*}" | |
140 #endif | 147 #endif |
141 | 148 |
142 #undef LIB_SPEC | 149 #undef LIB_SPEC |
143 #define LIB_SPEC OBSD_LIB_SPEC | 150 #define LIB_SPEC OBSD_LIB_SPEC |
144 #endif | 151 #endif |
279 #endif | 286 #endif |
280 | 287 |
281 /* Storage layout. */ | 288 /* Storage layout. */ |
282 | 289 |
283 | 290 |
284 /* Otherwise, since we support weak, gthr.h erroneously tries to use | |
285 #pragma weak. */ | |
286 #define GTHREAD_USE_WEAK 0 | |
287 | |
288 /* bug work around: we don't want to support #pragma weak, but the current | 291 /* bug work around: we don't want to support #pragma weak, but the current |
289 code layout needs HANDLE_PRAGMA_WEAK asserted for __attribute((weak)) to | 292 code layout needs HANDLE_PRAGMA_WEAK asserted for __attribute((weak)) to |
290 work. On the other hand, we don't define HANDLE_PRAGMA_WEAK directly, | 293 work. On the other hand, we don't define HANDLE_PRAGMA_WEAK directly, |
291 as this depends on a few other details as well... */ | 294 as this depends on a few other details as well... */ |
292 #define HANDLE_SYSV_PRAGMA 1 | 295 #define HANDLE_SYSV_PRAGMA 1 |