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_RANDOM_TR1)
70 # We don't yet support AIX's TLS ABI.
76 # Darwin versions vary, but the linker should work in a cross environment,
77 # so we just check for all the features here.
78 # Check for available headers.
80 # Don't call GLIBCXX_CHECK_LINKER_FEATURES, Darwin doesn't have a GNU ld
81 GLIBCXX_CHECK_MATH_SUPPORT
82 GLIBCXX_CHECK_STDLIB_SUPPORT
86 # GLIBCXX_CHECK_MATH_SUPPORT
89 AC_DEFINE(HAVE_FINITE)
90 AC_DEFINE(HAVE_SINCOS)
95 SECTION_FLAGS='-ffunction-sections -fdata-sections'
96 AC_SUBST(SECTION_FLAGS)
97 GLIBCXX_CHECK_LINKER_FEATURES
98 AC_DEFINE(HAVE_SETENV)
99 AC_DEFINE(HAVE_FINITEF)
100 AC_DEFINE(HAVE_FINITE)
101 AC_DEFINE(HAVE_FREXPF)
102 AC_DEFINE(HAVE_HYPOT)
103 AC_DEFINE(HAVE_HYPOTF)
104 AC_DEFINE(HAVE_ISINF)
105 AC_DEFINE(HAVE_ISNAN)
106 AC_DEFINE(HAVE_ISNANF)
108 AC_DEFINE(HAVE_ACOSF)
109 AC_DEFINE(HAVE_ASINF)
110 AC_DEFINE(HAVE_ATAN2F)
111 AC_DEFINE(HAVE_ATANF)
112 AC_DEFINE(HAVE_CEILF)
114 AC_DEFINE(HAVE_COSHF)
116 AC_DEFINE(HAVE_FABSF)
117 AC_DEFINE(HAVE_FLOORF)
118 AC_DEFINE(HAVE_FMODF)
119 AC_DEFINE(HAVE_FREXPF)
120 AC_DEFINE(HAVE_LDEXPF)
121 AC_DEFINE(HAVE_LOG10F)
123 AC_DEFINE(HAVE_MODFF)
126 AC_DEFINE(HAVE_SINHF)
127 AC_DEFINE(HAVE_SQRTF)
129 AC_DEFINE(HAVE_TANHF)
130 if test x"long_double_math_on_this_cpu" = x"yes"; then
131 AC_DEFINE(HAVE_FINITEL)
132 AC_DEFINE(HAVE_ISINFL)
133 AC_DEFINE(HAVE_ISNANL)
135 AC_CHECK_FUNCS(__cxa_thread_atexit)
139 SECTION_FLAGS='-ffunction-sections -fdata-sections'
140 AC_SUBST(SECTION_FLAGS)
144 SECTION_FLAGS='-ffunction-sections -fdata-sections'
145 AC_SUBST(SECTION_FLAGS)
146 GLIBCXX_CHECK_LINKER_FEATURES
148 # GLIBCXX_CHECK_MATH_SUPPORT
149 AC_DEFINE(HAVE_ISNAN)
150 AC_DEFINE(HAVE_HYPOT)
151 AC_DEFINE(HAVE_ACOSF)
152 AC_DEFINE(HAVE_ASINF)
153 AC_DEFINE(HAVE_ATANF)
155 AC_DEFINE(HAVE_COSHF)
157 AC_DEFINE(HAVE_SINHF)
159 AC_DEFINE(HAVE_TANHF)
161 AC_DEFINE(HAVE_ATAN2F)
162 AC_DEFINE(HAVE_FABSF)
163 AC_DEFINE(HAVE_FMODF)
164 AC_DEFINE(HAVE_FREXPF)
166 AC_DEFINE(HAVE_LOG10F)
169 AC_DEFINE(HAVE_SQRTF)
171 # GLIBCXX_CHECK_STDLIB_SUPPORT
172 AC_DEFINE(HAVE_STRTOLD)
177 AC_DEFINE(HAVE_ISINF)
178 AC_DEFINE(HAVE_ISINFF)
179 AC_DEFINE(HAVE_ISNANF)
180 AC_DEFINE(HAVE_FINITE)
181 AC_DEFINE(HAVE_FINITEF)
185 *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-cygwin*)
186 GLIBCXX_CHECK_COMPILER_FEATURES
187 GLIBCXX_CHECK_LINKER_FEATURES
188 GLIBCXX_CHECK_MATH_SUPPORT
189 GLIBCXX_CHECK_STDLIB_SUPPORT
190 AC_DEFINE(_GLIBCXX_USE_RANDOM_TR1)
192 AC_CHECK_FUNCS(__cxa_thread_atexit_impl)
193 AC_CHECK_FUNCS(aligned_alloc posix_memalign memalign _aligned_malloc)
197 GLIBCXX_CHECK_LINKER_FEATURES
198 GLIBCXX_CHECK_MATH_SUPPORT
199 GLIBCXX_CHECK_STDLIB_SUPPORT
202 SECTION_FLAGS='-ffunction-sections -fdata-sections'
203 AC_SUBST(SECTION_FLAGS)
204 GLIBCXX_CHECK_LINKER_FEATURES
205 AC_DEFINE(HAVE_FINITEF)
206 AC_DEFINE(HAVE_FINITE)
207 AC_DEFINE(HAVE_FREXPF)
208 AC_DEFINE(HAVE_HYPOTF)
209 AC_DEFINE(HAVE_ISINF)
210 AC_DEFINE(HAVE_ISINFF)
211 AC_DEFINE(HAVE_ISNAN)
212 AC_DEFINE(HAVE_ISNANF)
213 if test x"long_double_math_on_this_cpu" = x"yes"; then
214 AC_DEFINE(HAVE_FINITEL)
215 AC_DEFINE(HAVE_ISINFL)
216 AC_DEFINE(HAVE_ISNANL)
219 *-qnx6.1* | *-qnx6.2*)
220 SECTION_FLAGS='-ffunction-sections -fdata-sections'
221 AC_SUBST(SECTION_FLAGS)
222 GLIBCXX_CHECK_LINKER_FEATURES
225 AC_DEFINE(HAVE_COSHF)
226 AC_DEFINE(HAVE_COSHL)
229 AC_DEFINE(HAVE_LOG10F)
230 AC_DEFINE(HAVE_LOG10L)
233 AC_DEFINE(HAVE_SINHF)
234 AC_DEFINE(HAVE_SINHL)
237 GLIBCXX_CHECK_COMPILER_FEATURES
238 GLIBCXX_CHECK_LINKER_FEATURES
239 GLIBCXX_CHECK_MATH_SUPPORT
240 GLIBCXX_CHECK_STDLIB_SUPPORT
243 GLIBCXX_CHECK_LINKER_FEATURES
244 AC_DEFINE(HAVE_MBSTATE_T)
245 AC_DEFINE(HAVE_FINITE)
246 AC_DEFINE(HAVE_FPCLASS)
247 # All of the dependencies for wide character support are here, so
249 AC_DEFINE(_GLIBCXX_USE_WCHAR_T)
250 # These two C99 functions are present only in Solaris >= 10
251 AC_DEFINE(HAVE_STRTOF)
252 AC_DEFINE(HAVE_STRTOLD)
253 AC_DEFINE(HAVE_ISNAN)
254 AC_DEFINE(HAVE_ISNANF)
255 AC_DEFINE(HAVE_MODFF)
256 AC_DEFINE(HAVE_HYPOT)
259 SECTION_FLAGS='-ffunction-sections -fdata-sections'
260 SECTION_LDFLAGS='-Wl,--gc-sections $SECTION_LDFLAGS'
261 AC_SUBST(SECTION_FLAGS)
262 AC_DEFINE(HAVE_FINITE)
263 AC_DEFINE(HAVE_FINITEF)
264 AC_DEFINE(HAVE_FREXPF)
265 AC_DEFINE(HAVE_HYPOTF)
266 AC_DEFINE(HAVE_ISINF)
267 AC_DEFINE(HAVE_ISINFF)
268 AC_DEFINE(HAVE_ISNAN)
269 AC_DEFINE(HAVE_ISNANF)
270 AC_DEFINE(HAVE_SINCOS)
271 AC_DEFINE(HAVE_SINCOSF)
272 if test x"long_double_math_on_this_cpu" = x"yes"; then
273 AC_DEFINE(HAVE_FINITEL)
274 AC_DEFINE(HAVE_HYPOTL)
275 AC_DEFINE(HAVE_ISINFL)
276 AC_DEFINE(HAVE_ISNANL)
280 # Check for available headers.
281 # Don't call GLIBCXX_CHECK_LINKER_FEATURES, VMS doesn't have a GNU ld
282 GLIBCXX_CHECK_MATH_SUPPORT
283 GLIBCXX_CHECK_STDLIB_SUPPORT
286 AC_DEFINE(HAVE_ACOSF)
287 AC_DEFINE(HAVE_ASINF)
288 AC_DEFINE(HAVE_ATAN2F)
289 AC_DEFINE(HAVE_ATANF)
290 AC_DEFINE(HAVE_CEILF)
292 AC_DEFINE(HAVE_COSHF)
294 AC_DEFINE(HAVE_FABSF)
295 AC_DEFINE(HAVE_FLOORF)
296 AC_DEFINE(HAVE_FMODF)
297 AC_DEFINE(HAVE_HYPOT)
298 AC_DEFINE(HAVE_LOG10F)
302 AC_DEFINE(HAVE_SINHF)
303 AC_DEFINE(HAVE_SQRTF)
305 AC_DEFINE(HAVE_TANHF)
308 AC_MSG_ERROR([No support for this host/target combination.])