2 dnl This file contains details for non-native builds.
5 AC_DEFUN([GLIBCXX_CROSSCONFIG],[
6 # Base decisions on target environment.
9 # This is a freestanding configuration; there is nothing to do here.
15 AC_DEFINE(HAVE_ATAN2F)
22 AC_DEFINE(HAVE_FLOORF)
24 AC_DEFINE(HAVE_FREXPF)
26 AC_DEFINE(HAVE_HYPOTF)
27 AC_DEFINE(HAVE_LDEXPF)
28 AC_DEFINE(HAVE_LOG10F)
39 # These definitions are for the SDE C library rather than newlib.
40 SECTION_FLAGS='-ffunction-sections -fdata-sections'
41 AC_SUBST(SECTION_FLAGS)
42 GLIBCXX_CHECK_COMPILER_FEATURES
43 GLIBCXX_CHECK_LINKER_FEATURES
44 GLIBCXX_CHECK_MATH_SUPPORT
45 GLIBCXX_CHECK_STDLIB_SUPPORT
47 AC_DEFINE(HAVE_FINITE)
52 AC_DEFINE(HAVE_LDEXPF)
58 GLIBCXX_CHECK_COMPILER_FEATURES
59 GLIBCXX_CHECK_LINKER_FEATURES
60 GLIBCXX_CHECK_MATH_SUPPORT
61 GLIBCXX_CHECK_STDLIB_SUPPORT
66 GLIBCXX_CHECK_LINKER_FEATURES
67 GLIBCXX_CHECK_MATH_SUPPORT
68 GLIBCXX_CHECK_STDLIB_SUPPORT
69 AC_DEFINE(_GLIBCXX_USE_DEV_RANDOM)
70 AC_DEFINE(_GLIBCXX_USE_RANDOM_TR1)
71 # We don't yet support AIX's TLS ABI.
77 # Darwin versions vary, but the linker should work in a cross environment,
78 # so we just check for all the features here.
79 # Check for available headers.
81 # Don't call GLIBCXX_CHECK_LINKER_FEATURES, Darwin doesn't have a GNU ld
82 GLIBCXX_CHECK_MATH_SUPPORT
83 GLIBCXX_CHECK_STDLIB_SUPPORT
87 # GLIBCXX_CHECK_MATH_SUPPORT
90 AC_DEFINE(HAVE_FINITE)
91 AC_DEFINE(HAVE_SINCOS)
96 SECTION_FLAGS='-ffunction-sections -fdata-sections'
97 AC_SUBST(SECTION_FLAGS)
98 GLIBCXX_CHECK_LINKER_FEATURES
99 AC_DEFINE(HAVE_SETENV)
100 AC_DEFINE(HAVE_FINITEF)
101 AC_DEFINE(HAVE_FINITE)
102 AC_DEFINE(HAVE_FREXPF)
103 AC_DEFINE(HAVE_HYPOT)
104 AC_DEFINE(HAVE_HYPOTF)
105 AC_DEFINE(HAVE_ISINF)
106 AC_DEFINE(HAVE_ISNAN)
107 AC_DEFINE(HAVE_ISNANF)
109 AC_DEFINE(HAVE_ACOSF)
110 AC_DEFINE(HAVE_ASINF)
111 AC_DEFINE(HAVE_ATAN2F)
112 AC_DEFINE(HAVE_ATANF)
113 AC_DEFINE(HAVE_CEILF)
115 AC_DEFINE(HAVE_COSHF)
117 AC_DEFINE(HAVE_FABSF)
118 AC_DEFINE(HAVE_FLOORF)
119 AC_DEFINE(HAVE_FMODF)
120 AC_DEFINE(HAVE_FREXPF)
121 AC_DEFINE(HAVE_LDEXPF)
122 AC_DEFINE(HAVE_LOG10F)
124 AC_DEFINE(HAVE_MODFF)
127 AC_DEFINE(HAVE_SINHF)
128 AC_DEFINE(HAVE_SQRTF)
130 AC_DEFINE(HAVE_TANHF)
131 if test x"long_double_math_on_this_cpu" = x"yes"; then
132 AC_DEFINE(HAVE_FINITEL)
133 AC_DEFINE(HAVE_ISINFL)
134 AC_DEFINE(HAVE_ISNANL)
136 AC_CHECK_FUNCS(__cxa_thread_atexit)
137 AC_CHECK_FUNCS(aligned_alloc posix_memalign memalign _aligned_malloc)
141 SECTION_FLAGS='-ffunction-sections -fdata-sections'
142 AC_SUBST(SECTION_FLAGS)
146 SECTION_FLAGS='-ffunction-sections -fdata-sections'
147 AC_SUBST(SECTION_FLAGS)
148 GLIBCXX_CHECK_LINKER_FEATURES
150 # GLIBCXX_CHECK_MATH_SUPPORT
151 AC_DEFINE(HAVE_ISNAN)
152 AC_DEFINE(HAVE_HYPOT)
153 AC_DEFINE(HAVE_ACOSF)
154 AC_DEFINE(HAVE_ASINF)
155 AC_DEFINE(HAVE_ATANF)
157 AC_DEFINE(HAVE_COSHF)
159 AC_DEFINE(HAVE_SINHF)
161 AC_DEFINE(HAVE_TANHF)
163 AC_DEFINE(HAVE_ATAN2F)
164 AC_DEFINE(HAVE_FABSF)
165 AC_DEFINE(HAVE_FMODF)
166 AC_DEFINE(HAVE_FREXPF)
168 AC_DEFINE(HAVE_LOG10F)
171 AC_DEFINE(HAVE_SQRTF)
173 # GLIBCXX_CHECK_STDLIB_SUPPORT
174 AC_DEFINE(HAVE_STRTOLD)
179 AC_DEFINE(HAVE_ISINF)
180 AC_DEFINE(HAVE_ISINFF)
181 AC_DEFINE(HAVE_ISNANF)
182 AC_DEFINE(HAVE_FINITE)
183 AC_DEFINE(HAVE_FINITEF)
187 *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-cygwin* | *-solaris*)
188 GLIBCXX_CHECK_COMPILER_FEATURES
189 GLIBCXX_CHECK_LINKER_FEATURES
190 GLIBCXX_CHECK_MATH_SUPPORT
191 GLIBCXX_CHECK_STDLIB_SUPPORT
192 AC_DEFINE(_GLIBCXX_USE_DEV_RANDOM)
193 AC_DEFINE(_GLIBCXX_USE_RANDOM_TR1)
195 AC_CHECK_FUNCS(__cxa_thread_atexit_impl)
196 AC_CHECK_FUNCS(aligned_alloc posix_memalign memalign _aligned_malloc)
200 GLIBCXX_CHECK_LINKER_FEATURES
201 GLIBCXX_CHECK_MATH_SUPPORT
202 GLIBCXX_CHECK_STDLIB_SUPPORT
203 AC_CHECK_FUNCS(aligned_alloc posix_memalign memalign _aligned_malloc)
204 AC_CHECK_FUNCS(_wfopen)
206 *-netbsd* | *-openbsd*)
207 SECTION_FLAGS='-ffunction-sections -fdata-sections'
208 AC_SUBST(SECTION_FLAGS)
209 GLIBCXX_CHECK_LINKER_FEATURES
210 AC_DEFINE(HAVE_FINITEF)
211 AC_DEFINE(HAVE_FINITE)
212 AC_DEFINE(HAVE_FREXPF)
213 AC_DEFINE(HAVE_HYPOTF)
214 AC_DEFINE(HAVE_ISINF)
215 AC_DEFINE(HAVE_ISINFF)
216 AC_DEFINE(HAVE_ISNAN)
217 AC_DEFINE(HAVE_ISNANF)
218 if test x"long_double_math_on_this_cpu" = x"yes"; then
219 AC_DEFINE(HAVE_FINITEL)
220 AC_DEFINE(HAVE_ISINFL)
221 AC_DEFINE(HAVE_ISNANL)
223 AC_CHECK_FUNCS(aligned_alloc posix_memalign memalign _aligned_malloc)
225 *-qnx6.1* | *-qnx6.2*)
226 SECTION_FLAGS='-ffunction-sections -fdata-sections'
227 AC_SUBST(SECTION_FLAGS)
228 GLIBCXX_CHECK_LINKER_FEATURES
231 AC_DEFINE(HAVE_COSHF)
232 AC_DEFINE(HAVE_COSHL)
235 AC_DEFINE(HAVE_LOG10F)
236 AC_DEFINE(HAVE_LOG10L)
239 AC_DEFINE(HAVE_SINHF)
240 AC_DEFINE(HAVE_SINHL)
243 GLIBCXX_CHECK_COMPILER_FEATURES
244 GLIBCXX_CHECK_LINKER_FEATURES
245 GLIBCXX_CHECK_MATH_SUPPORT
246 GLIBCXX_CHECK_STDLIB_SUPPORT
249 SECTION_FLAGS='-ffunction-sections -fdata-sections'
250 SECTION_LDFLAGS='-Wl,--gc-sections $SECTION_LDFLAGS'
251 AC_SUBST(SECTION_FLAGS)
252 AC_DEFINE(HAVE_FINITE)
253 AC_DEFINE(HAVE_FINITEF)
254 AC_DEFINE(HAVE_FREXPF)
255 AC_DEFINE(HAVE_HYPOTF)
256 AC_DEFINE(HAVE_ISINF)
257 AC_DEFINE(HAVE_ISINFF)
258 AC_DEFINE(HAVE_ISNAN)
259 AC_DEFINE(HAVE_ISNANF)
260 AC_DEFINE(HAVE_SINCOS)
261 AC_DEFINE(HAVE_SINCOSF)
262 if test x"long_double_math_on_this_cpu" = x"yes"; then
263 AC_DEFINE(HAVE_FINITEL)
264 AC_DEFINE(HAVE_HYPOTL)
265 AC_DEFINE(HAVE_ISINFL)
266 AC_DEFINE(HAVE_ISNANL)
270 # Check for available headers.
271 # Don't call GLIBCXX_CHECK_LINKER_FEATURES, VMS doesn't have a GNU ld
272 GLIBCXX_CHECK_MATH_SUPPORT
273 GLIBCXX_CHECK_STDLIB_SUPPORT
276 AC_DEFINE(HAVE_ACOSF)
277 AC_DEFINE(HAVE_ASINF)
278 AC_DEFINE(HAVE_ATAN2F)
279 AC_DEFINE(HAVE_ATANF)
280 AC_DEFINE(HAVE_CEILF)
282 AC_DEFINE(HAVE_COSHF)
284 AC_DEFINE(HAVE_FABSF)
285 AC_DEFINE(HAVE_FLOORF)
286 AC_DEFINE(HAVE_FMODF)
287 AC_DEFINE(HAVE_HYPOT)
288 AC_DEFINE(HAVE_LOG10F)
292 AC_DEFINE(HAVE_SINHF)
293 AC_DEFINE(HAVE_SQRTF)
295 AC_DEFINE(HAVE_TANHF)
298 AC_MSG_ERROR([No support for this host/target combination.])