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)
138 SECTION_FLAGS='-ffunction-sections -fdata-sections'
139 AC_SUBST(SECTION_FLAGS)
140 GLIBCXX_CHECK_LINKER_FEATURES
142 # GLIBCXX_CHECK_MATH_SUPPORT
143 AC_DEFINE(HAVE_ISNAN)
144 AC_DEFINE(HAVE_HYPOT)
145 AC_DEFINE(HAVE_ACOSF)
146 AC_DEFINE(HAVE_ASINF)
147 AC_DEFINE(HAVE_ATANF)
149 AC_DEFINE(HAVE_COSHF)
151 AC_DEFINE(HAVE_SINHF)
153 AC_DEFINE(HAVE_TANHF)
155 AC_DEFINE(HAVE_ATAN2F)
156 AC_DEFINE(HAVE_FABSF)
157 AC_DEFINE(HAVE_FMODF)
158 AC_DEFINE(HAVE_FREXPF)
160 AC_DEFINE(HAVE_LOG10F)
163 AC_DEFINE(HAVE_SQRTF)
165 # GLIBCXX_CHECK_STDLIB_SUPPORT
166 AC_DEFINE(HAVE_STRTOLD)
171 AC_DEFINE(HAVE_ISINF)
172 AC_DEFINE(HAVE_ISINFF)
173 AC_DEFINE(HAVE_ISNANF)
174 AC_DEFINE(HAVE_FINITE)
175 AC_DEFINE(HAVE_FINITEF)
179 *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-cygwin*)
180 GLIBCXX_CHECK_COMPILER_FEATURES
181 GLIBCXX_CHECK_LINKER_FEATURES
182 GLIBCXX_CHECK_MATH_SUPPORT
183 GLIBCXX_CHECK_STDLIB_SUPPORT
184 AC_DEFINE(_GLIBCXX_USE_RANDOM_TR1)
186 AC_CHECK_FUNCS(__cxa_thread_atexit_impl)
187 AC_CHECK_FUNCS(aligned_alloc posix_memalign memalign _aligned_malloc)
191 GLIBCXX_CHECK_LINKER_FEATURES
192 GLIBCXX_CHECK_MATH_SUPPORT
193 GLIBCXX_CHECK_STDLIB_SUPPORT
196 SECTION_FLAGS='-ffunction-sections -fdata-sections'
197 AC_SUBST(SECTION_FLAGS)
198 GLIBCXX_CHECK_LINKER_FEATURES
199 AC_DEFINE(HAVE_FINITEF)
200 AC_DEFINE(HAVE_FINITE)
201 AC_DEFINE(HAVE_FREXPF)
202 AC_DEFINE(HAVE_HYPOTF)
203 AC_DEFINE(HAVE_ISINF)
204 AC_DEFINE(HAVE_ISINFF)
205 AC_DEFINE(HAVE_ISNAN)
206 AC_DEFINE(HAVE_ISNANF)
207 if test x"long_double_math_on_this_cpu" = x"yes"; then
208 AC_DEFINE(HAVE_FINITEL)
209 AC_DEFINE(HAVE_ISINFL)
210 AC_DEFINE(HAVE_ISNANL)
213 *-qnx6.1* | *-qnx6.2*)
214 SECTION_FLAGS='-ffunction-sections -fdata-sections'
215 AC_SUBST(SECTION_FLAGS)
216 GLIBCXX_CHECK_LINKER_FEATURES
219 AC_DEFINE(HAVE_COSHF)
220 AC_DEFINE(HAVE_COSHL)
223 AC_DEFINE(HAVE_LOG10F)
224 AC_DEFINE(HAVE_LOG10L)
227 AC_DEFINE(HAVE_SINHF)
228 AC_DEFINE(HAVE_SINHL)
231 GLIBCXX_CHECK_COMPILER_FEATURES
232 GLIBCXX_CHECK_LINKER_FEATURES
233 GLIBCXX_CHECK_MATH_SUPPORT
234 GLIBCXX_CHECK_STDLIB_SUPPORT
237 GLIBCXX_CHECK_LINKER_FEATURES
238 AC_DEFINE(HAVE_MBSTATE_T)
239 AC_DEFINE(HAVE_FINITE)
240 AC_DEFINE(HAVE_FPCLASS)
241 # All of the dependencies for wide character support are here, so
243 AC_DEFINE(_GLIBCXX_USE_WCHAR_T)
244 # These two C99 functions are present only in Solaris >= 10
245 AC_DEFINE(HAVE_STRTOF)
246 AC_DEFINE(HAVE_STRTOLD)
247 AC_DEFINE(HAVE_ISNAN)
248 AC_DEFINE(HAVE_ISNANF)
249 AC_DEFINE(HAVE_MODFF)
250 AC_DEFINE(HAVE_HYPOT)
253 SECTION_FLAGS='-ffunction-sections -fdata-sections'
254 SECTION_LDFLAGS='-Wl,--gc-sections $SECTION_LDFLAGS'
255 AC_SUBST(SECTION_FLAGS)
256 AC_DEFINE(HAVE_FINITE)
257 AC_DEFINE(HAVE_FINITEF)
258 AC_DEFINE(HAVE_FREXPF)
259 AC_DEFINE(HAVE_HYPOTF)
260 AC_DEFINE(HAVE_ISINF)
261 AC_DEFINE(HAVE_ISINFF)
262 AC_DEFINE(HAVE_ISNAN)
263 AC_DEFINE(HAVE_ISNANF)
264 AC_DEFINE(HAVE_SINCOS)
265 AC_DEFINE(HAVE_SINCOSF)
266 if test x"long_double_math_on_this_cpu" = x"yes"; then
267 AC_DEFINE(HAVE_FINITEL)
268 AC_DEFINE(HAVE_HYPOTL)
269 AC_DEFINE(HAVE_ISINFL)
270 AC_DEFINE(HAVE_ISNANL)
274 # Check for available headers.
275 # Don't call GLIBCXX_CHECK_LINKER_FEATURES, VMS doesn't have a GNU ld
276 GLIBCXX_CHECK_MATH_SUPPORT
277 GLIBCXX_CHECK_STDLIB_SUPPORT
280 AC_DEFINE(HAVE_ACOSF)
281 AC_DEFINE(HAVE_ASINF)
282 AC_DEFINE(HAVE_ATAN2F)
283 AC_DEFINE(HAVE_ATANF)
284 AC_DEFINE(HAVE_CEILF)
286 AC_DEFINE(HAVE_COSHF)
288 AC_DEFINE(HAVE_FABSF)
289 AC_DEFINE(HAVE_FLOORF)
290 AC_DEFINE(HAVE_FMODF)
291 AC_DEFINE(HAVE_HYPOT)
292 AC_DEFINE(HAVE_LOG10F)
296 AC_DEFINE(HAVE_SINHF)
297 AC_DEFINE(HAVE_SQRTF)
299 AC_DEFINE(HAVE_TANHF)
302 AC_MSG_ERROR([No support for this host/target combination.])