2003-08-05 10:00:18 +08:00
|
|
|
dnl
|
2006-09-21 20:07:36 +08:00
|
|
|
dnl This file contains details for non-native builds.
|
2003-08-05 10:00:18 +08:00
|
|
|
dnl
|
|
|
|
|
2005-04-06 08:05:51 +08:00
|
|
|
AC_DEFUN([GLIBCXX_CROSSCONFIG],[
|
2003-08-05 10:00:18 +08:00
|
|
|
# Base decisions on target environment.
|
|
|
|
case "${host}" in
|
2004-08-03 04:28:22 +08:00
|
|
|
arm*-*-symbianelf*)
|
|
|
|
# This is a freestanding configuration; there is nothing to do here.
|
|
|
|
;;
|
|
|
|
|
2007-09-14 22:50:26 +08:00
|
|
|
mips*-sde-elf*)
|
|
|
|
# These definitions are for the SDE C library rather than newlib.
|
|
|
|
SECTION_FLAGS='-ffunction-sections -fdata-sections'
|
|
|
|
AC_SUBST(SECTION_FLAGS)
|
|
|
|
GLIBCXX_CHECK_COMPILER_FEATURES
|
|
|
|
GLIBCXX_CHECK_LINKER_FEATURES
|
|
|
|
GLIBCXX_CHECK_MATH_SUPPORT
|
|
|
|
GLIBCXX_CHECK_STDLIB_SUPPORT
|
|
|
|
|
|
|
|
AC_DEFINE(HAVE_FINITE)
|
|
|
|
AC_DEFINE(HAVE_HYPOT)
|
|
|
|
AC_DEFINE(HAVE_ISNAN)
|
|
|
|
AC_DEFINE(HAVE_ISINF)
|
|
|
|
|
|
|
|
AC_DEFINE(HAVE_LDEXPF)
|
|
|
|
AC_DEFINE(HAVE_MODF)
|
|
|
|
AC_DEFINE(HAVE_SQRTF)
|
|
|
|
;;
|
|
|
|
|
2014-03-21 02:57:07 +08:00
|
|
|
spu-*-elf*)
|
|
|
|
GLIBCXX_CHECK_COMPILER_FEATURES
|
|
|
|
GLIBCXX_CHECK_LINKER_FEATURES
|
|
|
|
GLIBCXX_CHECK_MATH_SUPPORT
|
|
|
|
GLIBCXX_CHECK_STDLIB_SUPPORT
|
|
|
|
AM_ICONV
|
|
|
|
;;
|
|
|
|
|
2009-06-03 03:15:03 +08:00
|
|
|
*-aix*)
|
|
|
|
GLIBCXX_CHECK_LINKER_FEATURES
|
|
|
|
GLIBCXX_CHECK_MATH_SUPPORT
|
|
|
|
GLIBCXX_CHECK_STDLIB_SUPPORT
|
|
|
|
AC_DEFINE(_GLIBCXX_USE_RANDOM_TR1)
|
|
|
|
# We don't yet support AIX's TLS ABI.
|
|
|
|
#GCC_CHECK_TLS
|
|
|
|
AM_ICONV
|
|
|
|
;;
|
|
|
|
|
2003-08-20 11:32:00 +08:00
|
|
|
*-darwin*)
|
|
|
|
# Darwin versions vary, but the linker should work in a cross environment,
|
|
|
|
# so we just check for all the features here.
|
|
|
|
# Check for available headers.
|
|
|
|
|
|
|
|
# Don't call GLIBCXX_CHECK_LINKER_FEATURES, Darwin doesn't have a GNU ld
|
|
|
|
GLIBCXX_CHECK_MATH_SUPPORT
|
|
|
|
GLIBCXX_CHECK_STDLIB_SUPPORT
|
|
|
|
;;
|
|
|
|
|
2004-07-07 09:07:05 +08:00
|
|
|
*djgpp)
|
2007-03-03 18:52:24 +08:00
|
|
|
# GLIBCXX_CHECK_MATH_SUPPORT
|
2007-02-27 05:37:05 +08:00
|
|
|
AC_DEFINE(HAVE_ISINF)
|
|
|
|
AC_DEFINE(HAVE_ISNAN)
|
|
|
|
AC_DEFINE(HAVE_FINITE)
|
|
|
|
AC_DEFINE(HAVE_SINCOS)
|
|
|
|
AC_DEFINE(HAVE_HYPOT)
|
2004-07-07 09:07:05 +08:00
|
|
|
;;
|
|
|
|
|
2003-08-05 10:00:18 +08:00
|
|
|
*-freebsd*)
|
|
|
|
SECTION_FLAGS='-ffunction-sections -fdata-sections'
|
|
|
|
AC_SUBST(SECTION_FLAGS)
|
|
|
|
GLIBCXX_CHECK_LINKER_FEATURES
|
|
|
|
AC_DEFINE(HAVE_SETENV)
|
|
|
|
AC_DEFINE(HAVE_FINITEF)
|
|
|
|
AC_DEFINE(HAVE_FINITE)
|
|
|
|
AC_DEFINE(HAVE_FREXPF)
|
|
|
|
AC_DEFINE(HAVE_HYPOT)
|
|
|
|
AC_DEFINE(HAVE_HYPOTF)
|
|
|
|
AC_DEFINE(HAVE_ISINF)
|
|
|
|
AC_DEFINE(HAVE_ISNAN)
|
|
|
|
AC_DEFINE(HAVE_ISNANF)
|
|
|
|
|
|
|
|
AC_DEFINE(HAVE_ACOSF)
|
|
|
|
AC_DEFINE(HAVE_ASINF)
|
|
|
|
AC_DEFINE(HAVE_ATAN2F)
|
|
|
|
AC_DEFINE(HAVE_ATANF)
|
|
|
|
AC_DEFINE(HAVE_CEILF)
|
|
|
|
AC_DEFINE(HAVE_COSF)
|
|
|
|
AC_DEFINE(HAVE_COSHF)
|
|
|
|
AC_DEFINE(HAVE_EXPF)
|
|
|
|
AC_DEFINE(HAVE_FABSF)
|
|
|
|
AC_DEFINE(HAVE_FLOORF)
|
|
|
|
AC_DEFINE(HAVE_FMODF)
|
|
|
|
AC_DEFINE(HAVE_FREXPF)
|
|
|
|
AC_DEFINE(HAVE_LDEXPF)
|
|
|
|
AC_DEFINE(HAVE_LOG10F)
|
|
|
|
AC_DEFINE(HAVE_LOGF)
|
|
|
|
AC_DEFINE(HAVE_MODFF)
|
|
|
|
AC_DEFINE(HAVE_POWF)
|
|
|
|
AC_DEFINE(HAVE_SINF)
|
|
|
|
AC_DEFINE(HAVE_SINHF)
|
|
|
|
AC_DEFINE(HAVE_SQRTF)
|
|
|
|
AC_DEFINE(HAVE_TANF)
|
|
|
|
AC_DEFINE(HAVE_TANHF)
|
|
|
|
if test x"long_double_math_on_this_cpu" = x"yes"; then
|
|
|
|
AC_DEFINE(HAVE_FINITEL)
|
|
|
|
AC_DEFINE(HAVE_ISINFL)
|
|
|
|
AC_DEFINE(HAVE_ISNANL)
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*-hpux*)
|
|
|
|
SECTION_FLAGS='-ffunction-sections -fdata-sections'
|
|
|
|
AC_SUBST(SECTION_FLAGS)
|
|
|
|
GLIBCXX_CHECK_LINKER_FEATURES
|
2009-01-13 09:49:30 +08:00
|
|
|
|
|
|
|
# GLIBCXX_CHECK_MATH_SUPPORT
|
|
|
|
AC_DEFINE(HAVE_ISNAN)
|
|
|
|
AC_DEFINE(HAVE_HYPOT)
|
|
|
|
AC_DEFINE(HAVE_ACOSF)
|
|
|
|
AC_DEFINE(HAVE_ASINF)
|
|
|
|
AC_DEFINE(HAVE_ATANF)
|
|
|
|
AC_DEFINE(HAVE_COSF)
|
|
|
|
AC_DEFINE(HAVE_COSHF)
|
|
|
|
AC_DEFINE(HAVE_SINF)
|
|
|
|
AC_DEFINE(HAVE_SINHF)
|
|
|
|
AC_DEFINE(HAVE_TANF)
|
|
|
|
AC_DEFINE(HAVE_TANHF)
|
|
|
|
AC_DEFINE(HAVE_EXPF)
|
|
|
|
AC_DEFINE(HAVE_ATAN2F)
|
2009-01-06 04:50:25 +08:00
|
|
|
AC_DEFINE(HAVE_FABSF)
|
2009-01-13 09:49:30 +08:00
|
|
|
AC_DEFINE(HAVE_FMODF)
|
2003-08-05 10:00:18 +08:00
|
|
|
AC_DEFINE(HAVE_FREXPF)
|
2009-01-13 09:49:30 +08:00
|
|
|
AC_DEFINE(HAVE_LOGF)
|
|
|
|
AC_DEFINE(HAVE_LOG10F)
|
|
|
|
AC_DEFINE(HAVE_MODF)
|
|
|
|
AC_DEFINE(HAVE_POWF)
|
|
|
|
AC_DEFINE(HAVE_SQRTF)
|
|
|
|
|
|
|
|
# GLIBCXX_CHECK_STDLIB_SUPPORT
|
|
|
|
AC_DEFINE(HAVE_STRTOLD)
|
|
|
|
|
|
|
|
GCC_CHECK_TLS
|
2003-08-05 10:00:18 +08:00
|
|
|
case "$target" in
|
|
|
|
*-hpux10*)
|
|
|
|
AC_DEFINE(HAVE_ISINF)
|
|
|
|
AC_DEFINE(HAVE_ISINFF)
|
|
|
|
AC_DEFINE(HAVE_ISNANF)
|
2009-01-13 09:49:30 +08:00
|
|
|
AC_DEFINE(HAVE_FINITE)
|
|
|
|
AC_DEFINE(HAVE_FINITEF)
|
2003-08-05 10:00:18 +08:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
2013-03-28 05:56:57 +08:00
|
|
|
*-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu | *-cygwin*)
|
2006-02-17 07:29:10 +08:00
|
|
|
GLIBCXX_CHECK_COMPILER_FEATURES
|
2003-08-05 10:00:18 +08:00
|
|
|
GLIBCXX_CHECK_LINKER_FEATURES
|
2006-02-17 07:29:10 +08:00
|
|
|
GLIBCXX_CHECK_MATH_SUPPORT
|
|
|
|
GLIBCXX_CHECK_STDLIB_SUPPORT
|
2008-06-07 03:11:26 +08:00
|
|
|
AC_DEFINE(_GLIBCXX_USE_RANDOM_TR1)
|
2009-01-13 09:49:30 +08:00
|
|
|
GCC_CHECK_TLS
|
2008-06-07 03:11:26 +08:00
|
|
|
AM_ICONV
|
2003-08-05 10:00:18 +08:00
|
|
|
;;
|
|
|
|
*-mingw32*)
|
|
|
|
GLIBCXX_CHECK_LINKER_FEATURES
|
2009-01-21 03:30:51 +08:00
|
|
|
GLIBCXX_CHECK_MATH_SUPPORT
|
|
|
|
GLIBCXX_CHECK_STDLIB_SUPPORT
|
2003-08-05 10:00:18 +08:00
|
|
|
;;
|
|
|
|
*-netbsd*)
|
|
|
|
SECTION_FLAGS='-ffunction-sections -fdata-sections'
|
|
|
|
AC_SUBST(SECTION_FLAGS)
|
|
|
|
GLIBCXX_CHECK_LINKER_FEATURES
|
|
|
|
AC_DEFINE(HAVE_FINITEF)
|
|
|
|
AC_DEFINE(HAVE_FINITE)
|
|
|
|
AC_DEFINE(HAVE_FREXPF)
|
|
|
|
AC_DEFINE(HAVE_HYPOTF)
|
|
|
|
AC_DEFINE(HAVE_ISINF)
|
|
|
|
AC_DEFINE(HAVE_ISINFF)
|
|
|
|
AC_DEFINE(HAVE_ISNAN)
|
|
|
|
AC_DEFINE(HAVE_ISNANF)
|
|
|
|
if test x"long_double_math_on_this_cpu" = x"yes"; then
|
|
|
|
AC_DEFINE(HAVE_FINITEL)
|
|
|
|
AC_DEFINE(HAVE_ISINFL)
|
|
|
|
AC_DEFINE(HAVE_ISNANL)
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*-qnx6.1* | *-qnx6.2*)
|
|
|
|
SECTION_FLAGS='-ffunction-sections -fdata-sections'
|
|
|
|
AC_SUBST(SECTION_FLAGS)
|
|
|
|
GLIBCXX_CHECK_LINKER_FEATURES
|
|
|
|
AC_DEFINE(HAVE_COSF)
|
|
|
|
AC_DEFINE(HAVE_COSL)
|
|
|
|
AC_DEFINE(HAVE_COSHF)
|
|
|
|
AC_DEFINE(HAVE_COSHL)
|
|
|
|
AC_DEFINE(HAVE_LOGF)
|
|
|
|
AC_DEFINE(HAVE_LOGL)
|
|
|
|
AC_DEFINE(HAVE_LOG10F)
|
|
|
|
AC_DEFINE(HAVE_LOG10L)
|
|
|
|
AC_DEFINE(HAVE_SINF)
|
|
|
|
AC_DEFINE(HAVE_SINL)
|
|
|
|
AC_DEFINE(HAVE_SINHF)
|
|
|
|
AC_DEFINE(HAVE_SINHL)
|
|
|
|
;;
|
2011-02-04 15:26:57 +08:00
|
|
|
*-rtems*)
|
|
|
|
GLIBCXX_CHECK_COMPILER_FEATURES
|
|
|
|
GLIBCXX_CHECK_LINKER_FEATURES
|
|
|
|
GLIBCXX_CHECK_MATH_SUPPORT
|
|
|
|
GLIBCXX_CHECK_STDLIB_SUPPORT
|
|
|
|
;;
|
2003-08-05 10:00:18 +08:00
|
|
|
*-solaris*)
|
2014-04-22 20:30:59 +08:00
|
|
|
GLIBCXX_CHECK_LINKER_FEATURES
|
|
|
|
AC_DEFINE(HAVE_MBSTATE_T)
|
|
|
|
AC_DEFINE(HAVE_FINITE)
|
|
|
|
AC_DEFINE(HAVE_FPCLASS)
|
|
|
|
# All of the dependencies for wide character support are here, so
|
|
|
|
# turn it on.
|
|
|
|
AC_DEFINE(_GLIBCXX_USE_WCHAR_T)
|
|
|
|
# These two C99 functions are present only in Solaris >= 10
|
|
|
|
AC_DEFINE(HAVE_STRTOF)
|
|
|
|
AC_DEFINE(HAVE_STRTOLD)
|
2003-08-05 10:00:18 +08:00
|
|
|
AC_DEFINE(HAVE_ISNAN)
|
|
|
|
AC_DEFINE(HAVE_ISNANF)
|
|
|
|
AC_DEFINE(HAVE_MODFF)
|
|
|
|
AC_DEFINE(HAVE_HYPOT)
|
|
|
|
;;
|
2004-01-27 23:36:22 +08:00
|
|
|
*-tpf)
|
|
|
|
SECTION_FLAGS='-ffunction-sections -fdata-sections'
|
2012-05-03 03:34:31 +08:00
|
|
|
SECTION_LDFLAGS='-Wl,--gc-sections $SECTION_LDFLAGS'
|
2004-01-27 23:36:22 +08:00
|
|
|
AC_SUBST(SECTION_FLAGS)
|
|
|
|
AC_DEFINE(HAVE_FINITE)
|
|
|
|
AC_DEFINE(HAVE_FINITEF)
|
|
|
|
AC_DEFINE(HAVE_FREXPF)
|
|
|
|
AC_DEFINE(HAVE_HYPOTF)
|
|
|
|
AC_DEFINE(HAVE_ISINF)
|
|
|
|
AC_DEFINE(HAVE_ISINFF)
|
|
|
|
AC_DEFINE(HAVE_ISNAN)
|
|
|
|
AC_DEFINE(HAVE_ISNANF)
|
|
|
|
AC_DEFINE(HAVE_SINCOS)
|
|
|
|
AC_DEFINE(HAVE_SINCOSF)
|
|
|
|
if test x"long_double_math_on_this_cpu" = x"yes"; then
|
|
|
|
AC_DEFINE(HAVE_FINITEL)
|
|
|
|
AC_DEFINE(HAVE_HYPOTL)
|
|
|
|
AC_DEFINE(HAVE_ISINFL)
|
|
|
|
AC_DEFINE(HAVE_ISNANL)
|
|
|
|
fi
|
|
|
|
;;
|
2012-04-02 15:59:27 +08:00
|
|
|
*-*vms*)
|
|
|
|
# Check for available headers.
|
|
|
|
# Don't call GLIBCXX_CHECK_LINKER_FEATURES, VMS doesn't have a GNU ld
|
|
|
|
GLIBCXX_CHECK_MATH_SUPPORT
|
|
|
|
GLIBCXX_CHECK_STDLIB_SUPPORT
|
|
|
|
;;
|
2003-10-21 02:27:17 +08:00
|
|
|
*-vxworks)
|
|
|
|
AC_DEFINE(HAVE_ACOSF)
|
|
|
|
AC_DEFINE(HAVE_ASINF)
|
|
|
|
AC_DEFINE(HAVE_ATAN2F)
|
|
|
|
AC_DEFINE(HAVE_ATANF)
|
|
|
|
AC_DEFINE(HAVE_CEILF)
|
|
|
|
AC_DEFINE(HAVE_COSF)
|
|
|
|
AC_DEFINE(HAVE_COSHF)
|
|
|
|
AC_DEFINE(HAVE_EXPF)
|
|
|
|
AC_DEFINE(HAVE_FABSF)
|
|
|
|
AC_DEFINE(HAVE_FLOORF)
|
|
|
|
AC_DEFINE(HAVE_FMODF)
|
|
|
|
AC_DEFINE(HAVE_HYPOT)
|
|
|
|
AC_DEFINE(HAVE_LOG10F)
|
|
|
|
AC_DEFINE(HAVE_LOGF)
|
|
|
|
AC_DEFINE(HAVE_POWF)
|
|
|
|
AC_DEFINE(HAVE_SINF)
|
|
|
|
AC_DEFINE(HAVE_SINHF)
|
|
|
|
AC_DEFINE(HAVE_SQRTF)
|
|
|
|
AC_DEFINE(HAVE_TANF)
|
|
|
|
AC_DEFINE(HAVE_TANHF)
|
|
|
|
;;
|
2003-08-05 10:00:18 +08:00
|
|
|
*)
|
|
|
|
AC_MSG_ERROR([No support for this host/target combination.])
|
|
|
|
;;
|
|
|
|
esac
|
2005-04-06 08:05:51 +08:00
|
|
|
])
|