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.
13 # These definitions are for the SDE C library rather than newlib.
14 SECTION_FLAGS='-ffunction-sections -fdata-sections'
15 AC_SUBST(SECTION_FLAGS)
16 GLIBCXX_CHECK_COMPILER_FEATURES
17 GLIBCXX_CHECK_LINKER_FEATURES
18 GLIBCXX_CHECK_MATH_SUPPORT
19 GLIBCXX_CHECK_STDLIB_SUPPORT
21 AC_DEFINE(HAVE_FINITE)
26 AC_DEFINE(HAVE_LDEXPF)
32 GLIBCXX_CHECK_COMPILER_FEATURES
33 GLIBCXX_CHECK_LINKER_FEATURES
34 GLIBCXX_CHECK_MATH_SUPPORT
35 GLIBCXX_CHECK_STDLIB_SUPPORT
40 GLIBCXX_CHECK_LINKER_FEATURES
41 GLIBCXX_CHECK_MATH_SUPPORT
42 GLIBCXX_CHECK_STDLIB_SUPPORT
43 AC_DEFINE(_GLIBCXX_USE_RANDOM_TR1)
44 # We don't yet support AIX's TLS ABI.
50 # Darwin versions vary, but the linker should work in a cross environment,
51 # so we just check for all the features here.
52 # Check for available headers.
54 # Don't call GLIBCXX_CHECK_LINKER_FEATURES, Darwin doesn't have a GNU ld
55 GLIBCXX_CHECK_MATH_SUPPORT
56 GLIBCXX_CHECK_STDLIB_SUPPORT
60 # GLIBCXX_CHECK_MATH_SUPPORT
63 AC_DEFINE(HAVE_FINITE)
64 AC_DEFINE(HAVE_SINCOS)
69 SECTION_FLAGS='-ffunction-sections -fdata-sections'
70 AC_SUBST(SECTION_FLAGS)
71 GLIBCXX_CHECK_LINKER_FEATURES
72 AC_DEFINE(HAVE_SETENV)
73 AC_DEFINE(HAVE_FINITEF)
74 AC_DEFINE(HAVE_FINITE)
75 AC_DEFINE(HAVE_FREXPF)
77 AC_DEFINE(HAVE_HYPOTF)
80 AC_DEFINE(HAVE_ISNANF)
84 AC_DEFINE(HAVE_ATAN2F)
91 AC_DEFINE(HAVE_FLOORF)
93 AC_DEFINE(HAVE_FREXPF)
94 AC_DEFINE(HAVE_LDEXPF)
95 AC_DEFINE(HAVE_LOG10F)
100 AC_DEFINE(HAVE_SINHF)
101 AC_DEFINE(HAVE_SQRTF)
103 AC_DEFINE(HAVE_TANHF)
104 if test x"long_double_math_on_this_cpu" = x"yes"; then
105 AC_DEFINE(HAVE_FINITEL)
106 AC_DEFINE(HAVE_ISINFL)
107 AC_DEFINE(HAVE_ISNANL)
111 SECTION_FLAGS='-ffunction-sections -fdata-sections'
112 AC_SUBST(SECTION_FLAGS)
113 GLIBCXX_CHECK_LINKER_FEATURES
115 # GLIBCXX_CHECK_MATH_SUPPORT
116 AC_DEFINE(HAVE_ISNAN)
117 AC_DEFINE(HAVE_HYPOT)
118 AC_DEFINE(HAVE_ACOSF)
119 AC_DEFINE(HAVE_ASINF)
120 AC_DEFINE(HAVE_ATANF)
122 AC_DEFINE(HAVE_COSHF)
124 AC_DEFINE(HAVE_SINHF)
126 AC_DEFINE(HAVE_TANHF)
128 AC_DEFINE(HAVE_ATAN2F)
129 AC_DEFINE(HAVE_FABSF)
130 AC_DEFINE(HAVE_FMODF)
131 AC_DEFINE(HAVE_FREXPF)
133 AC_DEFINE(HAVE_LOG10F)
136 AC_DEFINE(HAVE_SQRTF)
138 # GLIBCXX_CHECK_STDLIB_SUPPORT
139 AC_DEFINE(HAVE_STRTOLD)
144 AC_DEFINE(HAVE_ISINF)
145 AC_DEFINE(HAVE_ISINFF)
146 AC_DEFINE(HAVE_ISNANF)
147 AC_DEFINE(HAVE_FINITE)
148 AC_DEFINE(HAVE_FINITEF)
152 *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu | *-cygwin*)
153 GLIBCXX_CHECK_COMPILER_FEATURES
154 GLIBCXX_CHECK_LINKER_FEATURES
155 GLIBCXX_CHECK_MATH_SUPPORT
156 GLIBCXX_CHECK_STDLIB_SUPPORT
157 AC_DEFINE(_GLIBCXX_USE_RANDOM_TR1)
159 AC_CHECK_FUNCS(__cxa_thread_atexit_impl)
163 GLIBCXX_CHECK_LINKER_FEATURES
164 GLIBCXX_CHECK_MATH_SUPPORT
165 GLIBCXX_CHECK_STDLIB_SUPPORT
168 SECTION_FLAGS='-ffunction-sections -fdata-sections'
169 AC_SUBST(SECTION_FLAGS)
170 GLIBCXX_CHECK_LINKER_FEATURES
171 AC_DEFINE(HAVE_FINITEF)
172 AC_DEFINE(HAVE_FINITE)
173 AC_DEFINE(HAVE_FREXPF)
174 AC_DEFINE(HAVE_HYPOTF)
175 AC_DEFINE(HAVE_ISINF)
176 AC_DEFINE(HAVE_ISINFF)
177 AC_DEFINE(HAVE_ISNAN)
178 AC_DEFINE(HAVE_ISNANF)
179 if test x"long_double_math_on_this_cpu" = x"yes"; then
180 AC_DEFINE(HAVE_FINITEL)
181 AC_DEFINE(HAVE_ISINFL)
182 AC_DEFINE(HAVE_ISNANL)
185 *-qnx6.1* | *-qnx6.2*)
186 SECTION_FLAGS='-ffunction-sections -fdata-sections'
187 AC_SUBST(SECTION_FLAGS)
188 GLIBCXX_CHECK_LINKER_FEATURES
191 AC_DEFINE(HAVE_COSHF)
192 AC_DEFINE(HAVE_COSHL)
195 AC_DEFINE(HAVE_LOG10F)
196 AC_DEFINE(HAVE_LOG10L)
199 AC_DEFINE(HAVE_SINHF)
200 AC_DEFINE(HAVE_SINHL)
203 GLIBCXX_CHECK_COMPILER_FEATURES
204 GLIBCXX_CHECK_LINKER_FEATURES
205 GLIBCXX_CHECK_MATH_SUPPORT
206 GLIBCXX_CHECK_STDLIB_SUPPORT
209 GLIBCXX_CHECK_LINKER_FEATURES
210 AC_DEFINE(HAVE_MBSTATE_T)
211 AC_DEFINE(HAVE_FINITE)
212 AC_DEFINE(HAVE_FPCLASS)
213 # All of the dependencies for wide character support are here, so
215 AC_DEFINE(_GLIBCXX_USE_WCHAR_T)
216 # These two C99 functions are present only in Solaris >= 10
217 AC_DEFINE(HAVE_STRTOF)
218 AC_DEFINE(HAVE_STRTOLD)
219 AC_DEFINE(HAVE_ISNAN)
220 AC_DEFINE(HAVE_ISNANF)
221 AC_DEFINE(HAVE_MODFF)
222 AC_DEFINE(HAVE_HYPOT)
225 SECTION_FLAGS='-ffunction-sections -fdata-sections'
226 SECTION_LDFLAGS='-Wl,--gc-sections $SECTION_LDFLAGS'
227 AC_SUBST(SECTION_FLAGS)
228 AC_DEFINE(HAVE_FINITE)
229 AC_DEFINE(HAVE_FINITEF)
230 AC_DEFINE(HAVE_FREXPF)
231 AC_DEFINE(HAVE_HYPOTF)
232 AC_DEFINE(HAVE_ISINF)
233 AC_DEFINE(HAVE_ISINFF)
234 AC_DEFINE(HAVE_ISNAN)
235 AC_DEFINE(HAVE_ISNANF)
236 AC_DEFINE(HAVE_SINCOS)
237 AC_DEFINE(HAVE_SINCOSF)
238 if test x"long_double_math_on_this_cpu" = x"yes"; then
239 AC_DEFINE(HAVE_FINITEL)
240 AC_DEFINE(HAVE_HYPOTL)
241 AC_DEFINE(HAVE_ISINFL)
242 AC_DEFINE(HAVE_ISNANL)
246 # Check for available headers.
247 # Don't call GLIBCXX_CHECK_LINKER_FEATURES, VMS doesn't have a GNU ld
248 GLIBCXX_CHECK_MATH_SUPPORT
249 GLIBCXX_CHECK_STDLIB_SUPPORT
252 AC_DEFINE(HAVE_ACOSF)
253 AC_DEFINE(HAVE_ASINF)
254 AC_DEFINE(HAVE_ATAN2F)
255 AC_DEFINE(HAVE_ATANF)
256 AC_DEFINE(HAVE_CEILF)
258 AC_DEFINE(HAVE_COSHF)
260 AC_DEFINE(HAVE_FABSF)
261 AC_DEFINE(HAVE_FLOORF)
262 AC_DEFINE(HAVE_FMODF)
263 AC_DEFINE(HAVE_HYPOT)
264 AC_DEFINE(HAVE_LOG10F)
268 AC_DEFINE(HAVE_SINHF)
269 AC_DEFINE(HAVE_SQRTF)
271 AC_DEFINE(HAVE_TANHF)
274 AC_MSG_ERROR([No support for this host/target combination.])