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)
136 AC_CHECK_FUNCS(aligned_alloc posix_memalign memalign _aligned_malloc)
140 SECTION_FLAGS='-ffunction-sections -fdata-sections'
141 AC_SUBST(SECTION_FLAGS)
145 SECTION_FLAGS='-ffunction-sections -fdata-sections'
146 AC_SUBST(SECTION_FLAGS)
147 GLIBCXX_CHECK_LINKER_FEATURES
149 # GLIBCXX_CHECK_MATH_SUPPORT
150 AC_DEFINE(HAVE_ISNAN)
151 AC_DEFINE(HAVE_HYPOT)
152 AC_DEFINE(HAVE_ACOSF)
153 AC_DEFINE(HAVE_ASINF)
154 AC_DEFINE(HAVE_ATANF)
156 AC_DEFINE(HAVE_COSHF)
158 AC_DEFINE(HAVE_SINHF)
160 AC_DEFINE(HAVE_TANHF)
162 AC_DEFINE(HAVE_ATAN2F)
163 AC_DEFINE(HAVE_FABSF)
164 AC_DEFINE(HAVE_FMODF)
165 AC_DEFINE(HAVE_FREXPF)
167 AC_DEFINE(HAVE_LOG10F)
170 AC_DEFINE(HAVE_SQRTF)
172 # GLIBCXX_CHECK_STDLIB_SUPPORT
173 AC_DEFINE(HAVE_STRTOLD)
178 AC_DEFINE(HAVE_ISINF)
179 AC_DEFINE(HAVE_ISINFF)
180 AC_DEFINE(HAVE_ISNANF)
181 AC_DEFINE(HAVE_FINITE)
182 AC_DEFINE(HAVE_FINITEF)
186 *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-cygwin* | *-solaris*)
187 GLIBCXX_CHECK_COMPILER_FEATURES
188 GLIBCXX_CHECK_LINKER_FEATURES
189 GLIBCXX_CHECK_MATH_SUPPORT
190 GLIBCXX_CHECK_STDLIB_SUPPORT
191 AC_DEFINE(_GLIBCXX_USE_RANDOM_TR1)
193 AC_CHECK_FUNCS(__cxa_thread_atexit_impl)
194 AC_CHECK_FUNCS(aligned_alloc posix_memalign memalign _aligned_malloc)
198 GLIBCXX_CHECK_LINKER_FEATURES
199 GLIBCXX_CHECK_MATH_SUPPORT
200 GLIBCXX_CHECK_STDLIB_SUPPORT
201 AC_CHECK_FUNCS(aligned_alloc posix_memalign memalign _aligned_malloc)
202 AC_CHECK_FUNCS(_wfopen)
204 *-netbsd* | *-openbsd*)
205 SECTION_FLAGS='-ffunction-sections -fdata-sections'
206 AC_SUBST(SECTION_FLAGS)
207 GLIBCXX_CHECK_LINKER_FEATURES
208 AC_DEFINE(HAVE_FINITEF)
209 AC_DEFINE(HAVE_FINITE)
210 AC_DEFINE(HAVE_FREXPF)
211 AC_DEFINE(HAVE_HYPOTF)
212 AC_DEFINE(HAVE_ISINF)
213 AC_DEFINE(HAVE_ISINFF)
214 AC_DEFINE(HAVE_ISNAN)
215 AC_DEFINE(HAVE_ISNANF)
216 if test x"long_double_math_on_this_cpu" = x"yes"; then
217 AC_DEFINE(HAVE_FINITEL)
218 AC_DEFINE(HAVE_ISINFL)
219 AC_DEFINE(HAVE_ISNANL)
221 AC_CHECK_FUNCS(aligned_alloc posix_memalign memalign _aligned_malloc)
223 *-qnx6.1* | *-qnx6.2*)
224 SECTION_FLAGS='-ffunction-sections -fdata-sections'
225 AC_SUBST(SECTION_FLAGS)
226 GLIBCXX_CHECK_LINKER_FEATURES
229 AC_DEFINE(HAVE_COSHF)
230 AC_DEFINE(HAVE_COSHL)
233 AC_DEFINE(HAVE_LOG10F)
234 AC_DEFINE(HAVE_LOG10L)
237 AC_DEFINE(HAVE_SINHF)
238 AC_DEFINE(HAVE_SINHL)
241 GLIBCXX_CHECK_COMPILER_FEATURES
242 GLIBCXX_CHECK_LINKER_FEATURES
243 GLIBCXX_CHECK_MATH_SUPPORT
244 GLIBCXX_CHECK_STDLIB_SUPPORT
247 SECTION_FLAGS='-ffunction-sections -fdata-sections'
248 SECTION_LDFLAGS='-Wl,--gc-sections $SECTION_LDFLAGS'
249 AC_SUBST(SECTION_FLAGS)
250 AC_DEFINE(HAVE_FINITE)
251 AC_DEFINE(HAVE_FINITEF)
252 AC_DEFINE(HAVE_FREXPF)
253 AC_DEFINE(HAVE_HYPOTF)
254 AC_DEFINE(HAVE_ISINF)
255 AC_DEFINE(HAVE_ISINFF)
256 AC_DEFINE(HAVE_ISNAN)
257 AC_DEFINE(HAVE_ISNANF)
258 AC_DEFINE(HAVE_SINCOS)
259 AC_DEFINE(HAVE_SINCOSF)
260 if test x"long_double_math_on_this_cpu" = x"yes"; then
261 AC_DEFINE(HAVE_FINITEL)
262 AC_DEFINE(HAVE_HYPOTL)
263 AC_DEFINE(HAVE_ISINFL)
264 AC_DEFINE(HAVE_ISNANL)
268 # Check for available headers.
269 # Don't call GLIBCXX_CHECK_LINKER_FEATURES, VMS doesn't have a GNU ld
270 GLIBCXX_CHECK_MATH_SUPPORT
271 GLIBCXX_CHECK_STDLIB_SUPPORT
274 AC_DEFINE(HAVE_ACOSF)
275 AC_DEFINE(HAVE_ASINF)
276 AC_DEFINE(HAVE_ATAN2F)
277 AC_DEFINE(HAVE_ATANF)
278 AC_DEFINE(HAVE_CEILF)
280 AC_DEFINE(HAVE_COSHF)
282 AC_DEFINE(HAVE_FABSF)
283 AC_DEFINE(HAVE_FLOORF)
284 AC_DEFINE(HAVE_FMODF)
285 AC_DEFINE(HAVE_HYPOT)
286 AC_DEFINE(HAVE_LOG10F)
290 AC_DEFINE(HAVE_SINHF)
291 AC_DEFINE(HAVE_SQRTF)
293 AC_DEFINE(HAVE_TANHF)
296 AC_MSG_ERROR([No support for this host/target combination.])