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)
204 SECTION_FLAGS='-ffunction-sections -fdata-sections'
205 AC_SUBST(SECTION_FLAGS)
206 GLIBCXX_CHECK_LINKER_FEATURES
207 AC_DEFINE(HAVE_FINITEF)
208 AC_DEFINE(HAVE_FINITE)
209 AC_DEFINE(HAVE_FREXPF)
210 AC_DEFINE(HAVE_HYPOTF)
211 AC_DEFINE(HAVE_ISINF)
212 AC_DEFINE(HAVE_ISINFF)
213 AC_DEFINE(HAVE_ISNAN)
214 AC_DEFINE(HAVE_ISNANF)
215 if test x"long_double_math_on_this_cpu" = x"yes"; then
216 AC_DEFINE(HAVE_FINITEL)
217 AC_DEFINE(HAVE_ISINFL)
218 AC_DEFINE(HAVE_ISNANL)
221 *-qnx6.1* | *-qnx6.2*)
222 SECTION_FLAGS='-ffunction-sections -fdata-sections'
223 AC_SUBST(SECTION_FLAGS)
224 GLIBCXX_CHECK_LINKER_FEATURES
227 AC_DEFINE(HAVE_COSHF)
228 AC_DEFINE(HAVE_COSHL)
231 AC_DEFINE(HAVE_LOG10F)
232 AC_DEFINE(HAVE_LOG10L)
235 AC_DEFINE(HAVE_SINHF)
236 AC_DEFINE(HAVE_SINHL)
239 GLIBCXX_CHECK_COMPILER_FEATURES
240 GLIBCXX_CHECK_LINKER_FEATURES
241 GLIBCXX_CHECK_MATH_SUPPORT
242 GLIBCXX_CHECK_STDLIB_SUPPORT
245 SECTION_FLAGS='-ffunction-sections -fdata-sections'
246 SECTION_LDFLAGS='-Wl,--gc-sections $SECTION_LDFLAGS'
247 AC_SUBST(SECTION_FLAGS)
248 AC_DEFINE(HAVE_FINITE)
249 AC_DEFINE(HAVE_FINITEF)
250 AC_DEFINE(HAVE_FREXPF)
251 AC_DEFINE(HAVE_HYPOTF)
252 AC_DEFINE(HAVE_ISINF)
253 AC_DEFINE(HAVE_ISINFF)
254 AC_DEFINE(HAVE_ISNAN)
255 AC_DEFINE(HAVE_ISNANF)
256 AC_DEFINE(HAVE_SINCOS)
257 AC_DEFINE(HAVE_SINCOSF)
258 if test x"long_double_math_on_this_cpu" = x"yes"; then
259 AC_DEFINE(HAVE_FINITEL)
260 AC_DEFINE(HAVE_HYPOTL)
261 AC_DEFINE(HAVE_ISINFL)
262 AC_DEFINE(HAVE_ISNANL)
266 # Check for available headers.
267 # Don't call GLIBCXX_CHECK_LINKER_FEATURES, VMS doesn't have a GNU ld
268 GLIBCXX_CHECK_MATH_SUPPORT
269 GLIBCXX_CHECK_STDLIB_SUPPORT
272 AC_DEFINE(HAVE_ACOSF)
273 AC_DEFINE(HAVE_ASINF)
274 AC_DEFINE(HAVE_ATAN2F)
275 AC_DEFINE(HAVE_ATANF)
276 AC_DEFINE(HAVE_CEILF)
278 AC_DEFINE(HAVE_COSHF)
280 AC_DEFINE(HAVE_FABSF)
281 AC_DEFINE(HAVE_FLOORF)
282 AC_DEFINE(HAVE_FMODF)
283 AC_DEFINE(HAVE_HYPOT)
284 AC_DEFINE(HAVE_LOG10F)
288 AC_DEFINE(HAVE_SINHF)
289 AC_DEFINE(HAVE_SQRTF)
291 AC_DEFINE(HAVE_TANHF)
294 AC_MSG_ERROR([No support for this host/target combination.])