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_LINKER_FEATURES
33 GLIBCXX_CHECK_MATH_SUPPORT
34 GLIBCXX_CHECK_STDLIB_SUPPORT
35 AC_DEFINE(_GLIBCXX_USE_RANDOM_TR1)
36 # We don't yet support AIX's TLS ABI.
42 # Darwin versions vary, but the linker should work in a cross environment,
43 # so we just check for all the features here.
44 # Check for available headers.
46 # Don't call GLIBCXX_CHECK_LINKER_FEATURES, Darwin doesn't have a GNU ld
47 GLIBCXX_CHECK_MATH_SUPPORT
48 GLIBCXX_CHECK_STDLIB_SUPPORT
52 # GLIBCXX_CHECK_MATH_SUPPORT
55 AC_DEFINE(HAVE_FINITE)
56 AC_DEFINE(HAVE_SINCOS)
61 SECTION_FLAGS='-ffunction-sections -fdata-sections'
62 AC_SUBST(SECTION_FLAGS)
63 GLIBCXX_CHECK_LINKER_FEATURES
64 AC_DEFINE(HAVE_SETENV)
65 AC_DEFINE(HAVE_FINITEF)
66 AC_DEFINE(HAVE_FINITE)
67 AC_DEFINE(HAVE_FREXPF)
69 AC_DEFINE(HAVE_HYPOTF)
72 AC_DEFINE(HAVE_ISNANF)
76 AC_DEFINE(HAVE_ATAN2F)
83 AC_DEFINE(HAVE_FLOORF)
85 AC_DEFINE(HAVE_FREXPF)
86 AC_DEFINE(HAVE_LDEXPF)
87 AC_DEFINE(HAVE_LOG10F)
96 if test x"long_double_math_on_this_cpu" = x"yes"; then
97 AC_DEFINE(HAVE_FINITEL)
98 AC_DEFINE(HAVE_ISINFL)
99 AC_DEFINE(HAVE_ISNANL)
103 SECTION_FLAGS='-ffunction-sections -fdata-sections'
104 AC_SUBST(SECTION_FLAGS)
105 GLIBCXX_CHECK_LINKER_FEATURES
107 # GLIBCXX_CHECK_MATH_SUPPORT
108 AC_DEFINE(HAVE_ISNAN)
109 AC_DEFINE(HAVE_HYPOT)
110 AC_DEFINE(HAVE_ACOSF)
111 AC_DEFINE(HAVE_ASINF)
112 AC_DEFINE(HAVE_ATANF)
114 AC_DEFINE(HAVE_COSHF)
116 AC_DEFINE(HAVE_SINHF)
118 AC_DEFINE(HAVE_TANHF)
120 AC_DEFINE(HAVE_ATAN2F)
121 AC_DEFINE(HAVE_FABSF)
122 AC_DEFINE(HAVE_FMODF)
123 AC_DEFINE(HAVE_FREXPF)
125 AC_DEFINE(HAVE_LOG10F)
128 AC_DEFINE(HAVE_SQRTF)
130 # GLIBCXX_CHECK_STDLIB_SUPPORT
131 AC_DEFINE(HAVE_STRTOLD)
136 AC_DEFINE(HAVE_ISINF)
137 AC_DEFINE(HAVE_ISINFF)
138 AC_DEFINE(HAVE_ISNANF)
139 AC_DEFINE(HAVE_FINITE)
140 AC_DEFINE(HAVE_FINITEF)
144 *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu)
145 GLIBCXX_CHECK_COMPILER_FEATURES
146 GLIBCXX_CHECK_LINKER_FEATURES
147 GLIBCXX_CHECK_MATH_SUPPORT
148 GLIBCXX_CHECK_STDLIB_SUPPORT
149 AC_DEFINE(_GLIBCXX_USE_RANDOM_TR1)
154 GLIBCXX_CHECK_LINKER_FEATURES
155 GLIBCXX_CHECK_MATH_SUPPORT
156 GLIBCXX_CHECK_STDLIB_SUPPORT
159 SECTION_FLAGS='-ffunction-sections -fdata-sections'
160 AC_SUBST(SECTION_FLAGS)
161 GLIBCXX_CHECK_LINKER_FEATURES
162 AC_DEFINE(HAVE_FINITEF)
163 AC_DEFINE(HAVE_FINITE)
164 AC_DEFINE(HAVE_FREXPF)
165 AC_DEFINE(HAVE_HYPOTF)
166 AC_DEFINE(HAVE_ISINF)
167 AC_DEFINE(HAVE_ISINFF)
168 AC_DEFINE(HAVE_ISNAN)
169 AC_DEFINE(HAVE_ISNANF)
170 if test x"long_double_math_on_this_cpu" = x"yes"; then
171 AC_DEFINE(HAVE_FINITEL)
172 AC_DEFINE(HAVE_ISINFL)
173 AC_DEFINE(HAVE_ISNANL)
176 *-qnx6.1* | *-qnx6.2*)
177 SECTION_FLAGS='-ffunction-sections -fdata-sections'
178 AC_SUBST(SECTION_FLAGS)
179 GLIBCXX_CHECK_LINKER_FEATURES
182 AC_DEFINE(HAVE_COSHF)
183 AC_DEFINE(HAVE_COSHL)
186 AC_DEFINE(HAVE_LOG10F)
187 AC_DEFINE(HAVE_LOG10L)
190 AC_DEFINE(HAVE_SINHF)
191 AC_DEFINE(HAVE_SINHL)
194 GLIBCXX_CHECK_COMPILER_FEATURES
195 GLIBCXX_CHECK_LINKER_FEATURES
196 GLIBCXX_CHECK_MATH_SUPPORT
197 GLIBCXX_CHECK_STDLIB_SUPPORT
201 *-solaris2.9 | *-solaris2.10)
202 GLIBCXX_CHECK_LINKER_FEATURES
203 AC_DEFINE(HAVE_MBSTATE_T)
204 AC_DEFINE(HAVE_FINITE)
205 AC_DEFINE(HAVE_FPCLASS)
206 # All of the dependencies for wide character support are here, so
208 AC_DEFINE(_GLIBCXX_USE_WCHAR_T)
213 # These two C99 functions are present only in Solaris >= 10
214 AC_DEFINE(HAVE_STRTOF)
215 AC_DEFINE(HAVE_STRTOLD)
218 AC_DEFINE(HAVE_ISNAN)
219 AC_DEFINE(HAVE_ISNANF)
220 AC_DEFINE(HAVE_MODFF)
221 AC_DEFINE(HAVE_HYPOT)
224 SECTION_FLAGS='-ffunction-sections -fdata-sections'
225 SECTION_LDFLAGS='-Wl,--gc-sections $SECTION_LDFLAGS'
226 AC_SUBST(SECTION_FLAGS)
227 AC_DEFINE(HAVE_FINITE)
228 AC_DEFINE(HAVE_FINITEF)
229 AC_DEFINE(HAVE_FREXPF)
230 AC_DEFINE(HAVE_HYPOTF)
231 AC_DEFINE(HAVE_ISINF)
232 AC_DEFINE(HAVE_ISINFF)
233 AC_DEFINE(HAVE_ISNAN)
234 AC_DEFINE(HAVE_ISNANF)
235 AC_DEFINE(HAVE_SINCOS)
236 AC_DEFINE(HAVE_SINCOSF)
237 if test x"long_double_math_on_this_cpu" = x"yes"; then
238 AC_DEFINE(HAVE_FINITEL)
239 AC_DEFINE(HAVE_HYPOTL)
240 AC_DEFINE(HAVE_ISINFL)
241 AC_DEFINE(HAVE_ISNANL)
245 # Check for available headers.
246 # Don't call GLIBCXX_CHECK_LINKER_FEATURES, VMS doesn't have a GNU ld
247 GLIBCXX_CHECK_MATH_SUPPORT
248 GLIBCXX_CHECK_STDLIB_SUPPORT
251 AC_DEFINE(HAVE_ACOSF)
252 AC_DEFINE(HAVE_ASINF)
253 AC_DEFINE(HAVE_ATAN2F)
254 AC_DEFINE(HAVE_ATANF)
255 AC_DEFINE(HAVE_CEILF)
257 AC_DEFINE(HAVE_COSHF)
259 AC_DEFINE(HAVE_FABSF)
260 AC_DEFINE(HAVE_FLOORF)
261 AC_DEFINE(HAVE_FMODF)
262 AC_DEFINE(HAVE_HYPOT)
263 AC_DEFINE(HAVE_LOG10F)
267 AC_DEFINE(HAVE_SINHF)
268 AC_DEFINE(HAVE_SQRTF)
270 AC_DEFINE(HAVE_TANHF)
273 AC_MSG_ERROR([No support for this host/target combination.])