2003-08-05 04:00:18 +02:00
|
|
|
dnl
|
2006-09-21 14:07:36 +02:00
|
|
|
dnl This file contains details for non-native builds.
|
2003-08-05 04:00:18 +02:00
|
|
|
dnl
|
|
|
|
|
2005-04-06 02:05:51 +02:00
|
|
|
AC_DEFUN([GLIBCXX_CROSSCONFIG],[
|
2003-08-05 04:00:18 +02:00
|
|
|
# Base decisions on target environment.
|
|
|
|
case "${host}" in
|
2004-08-02 22:28:22 +02:00
|
|
|
arm*-*-symbianelf*)
|
|
|
|
# This is a freestanding configuration; there is nothing to do here.
|
|
|
|
;;
|
|
|
|
|
2016-12-06 18:58:05 +01:00
|
|
|
avr*-*-*)
|
|
|
|
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_SQRTF)
|
|
|
|
AC_DEFINE(HAVE_HYPOTF)
|
|
|
|
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_TANF)
|
|
|
|
AC_DEFINE(HAVE_TANHF)
|
|
|
|
;;
|
|
|
|
|
2007-09-14 16:50:26 +02: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)
|
|
|
|
;;
|
|
|
|
|
2009-06-02 21:15:03 +02:00
|
|
|
*-aix*)
|
|
|
|
GLIBCXX_CHECK_LINKER_FEATURES
|
|
|
|
GLIBCXX_CHECK_MATH_SUPPORT
|
|
|
|
GLIBCXX_CHECK_STDLIB_SUPPORT
|
2018-10-16 16:49:29 +02:00
|
|
|
AC_DEFINE(_GLIBCXX_USE_DEV_RANDOM)
|
2009-06-02 21:15:03 +02:00
|
|
|
AC_DEFINE(_GLIBCXX_USE_RANDOM_TR1)
|
|
|
|
# We don't yet support AIX's TLS ABI.
|
|
|
|
#GCC_CHECK_TLS
|
|
|
|
AM_ICONV
|
|
|
|
;;
|
|
|
|
|
2003-08-20 05:32:00 +02: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 03:07:05 +02:00
|
|
|
*djgpp)
|
2007-03-03 11:52:24 +01:00
|
|
|
# GLIBCXX_CHECK_MATH_SUPPORT
|
2007-02-26 22:37:05 +01:00
|
|
|
AC_DEFINE(HAVE_ISINF)
|
|
|
|
AC_DEFINE(HAVE_ISNAN)
|
|
|
|
AC_DEFINE(HAVE_FINITE)
|
|
|
|
AC_DEFINE(HAVE_SINCOS)
|
|
|
|
AC_DEFINE(HAVE_HYPOT)
|
2004-07-07 03:07:05 +02:00
|
|
|
;;
|
|
|
|
|
2003-08-05 04:00:18 +02: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
|
2017-01-06 18:06:24 +01:00
|
|
|
AC_CHECK_FUNCS(__cxa_thread_atexit)
|
2018-03-12 23:52:16 +01:00
|
|
|
AC_CHECK_FUNCS(aligned_alloc posix_memalign memalign _aligned_malloc)
|
2019-02-14 15:10:25 +01:00
|
|
|
AC_CHECK_FUNCS(timespec_get)
|
2019-03-11 17:28:11 +01:00
|
|
|
AC_CHECK_FUNCS(sockatmark)
|
2003-08-05 04:00:18 +02:00
|
|
|
;;
|
2017-01-18 00:36:12 +01:00
|
|
|
|
|
|
|
*-fuchsia*)
|
|
|
|
SECTION_FLAGS='-ffunction-sections -fdata-sections'
|
|
|
|
AC_SUBST(SECTION_FLAGS)
|
|
|
|
;;
|
|
|
|
|
2003-08-05 04:00:18 +02:00
|
|
|
*-hpux*)
|
|
|
|
SECTION_FLAGS='-ffunction-sections -fdata-sections'
|
|
|
|
AC_SUBST(SECTION_FLAGS)
|
|
|
|
GLIBCXX_CHECK_LINKER_FEATURES
|
2009-01-13 02:49:30 +01: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-05 21:50:25 +01:00
|
|
|
AC_DEFINE(HAVE_FABSF)
|
2009-01-13 02:49:30 +01:00
|
|
|
AC_DEFINE(HAVE_FMODF)
|
2003-08-05 04:00:18 +02:00
|
|
|
AC_DEFINE(HAVE_FREXPF)
|
2009-01-13 02:49:30 +01: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 04:00:18 +02:00
|
|
|
case "$target" in
|
|
|
|
*-hpux10*)
|
|
|
|
AC_DEFINE(HAVE_ISINF)
|
|
|
|
AC_DEFINE(HAVE_ISINFF)
|
|
|
|
AC_DEFINE(HAVE_ISNANF)
|
2009-01-13 02:49:30 +01:00
|
|
|
AC_DEFINE(HAVE_FINITE)
|
|
|
|
AC_DEFINE(HAVE_FINITEF)
|
2003-08-05 04:00:18 +02:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
2017-06-01 15:50:03 +02:00
|
|
|
*-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-cygwin* | *-solaris*)
|
2006-02-17 00:29:10 +01:00
|
|
|
GLIBCXX_CHECK_COMPILER_FEATURES
|
2003-08-05 04:00:18 +02:00
|
|
|
GLIBCXX_CHECK_LINKER_FEATURES
|
2006-02-17 00:29:10 +01:00
|
|
|
GLIBCXX_CHECK_MATH_SUPPORT
|
|
|
|
GLIBCXX_CHECK_STDLIB_SUPPORT
|
2018-10-16 16:49:29 +02:00
|
|
|
AC_DEFINE(_GLIBCXX_USE_DEV_RANDOM)
|
2008-06-06 21:11:26 +02:00
|
|
|
AC_DEFINE(_GLIBCXX_USE_RANDOM_TR1)
|
2009-01-13 02:49:30 +01:00
|
|
|
GCC_CHECK_TLS
|
2015-10-12 00:34:28 +02:00
|
|
|
AC_CHECK_FUNCS(__cxa_thread_atexit_impl)
|
2016-12-01 07:06:04 +01:00
|
|
|
AC_CHECK_FUNCS(aligned_alloc posix_memalign memalign _aligned_malloc)
|
2019-02-14 15:10:25 +01:00
|
|
|
AC_CHECK_FUNCS(timespec_get)
|
2019-03-11 17:28:11 +01:00
|
|
|
AC_CHECK_FUNCS(sockatmark)
|
2008-06-06 21:11:26 +02:00
|
|
|
AM_ICONV
|
2003-08-05 04:00:18 +02:00
|
|
|
;;
|
|
|
|
*-mingw32*)
|
|
|
|
GLIBCXX_CHECK_LINKER_FEATURES
|
2009-01-20 20:30:51 +01:00
|
|
|
GLIBCXX_CHECK_MATH_SUPPORT
|
|
|
|
GLIBCXX_CHECK_STDLIB_SUPPORT
|
2018-03-12 23:52:16 +01:00
|
|
|
AC_CHECK_FUNCS(aligned_alloc posix_memalign memalign _aligned_malloc)
|
Add support for opening file streams from wide character strings
C++17 added new overloads to <fstream> class templates to support
opening files from wide character strings "on systems where
filesystem::path::value_type is not char". This patch adds those
overloads conditional on _wfopen being available, and enables them for
pre-C++17 modes as well.
Add support for opening file streams from wide character strings.
* config/io/basic_file_stdio.cc [_GLIBCXX_HAVE__WFOPEN]
(__basic_file<char>::open(const wchar_t*, ios_base::openmode)):
Define new overload.
* config/io/basic_file_stdio.h [_GLIBCXX_HAVE__WFOPEN]
(__basic_file<char>::open(const wchar_t*, ios_base::openmode)):
Declare new overload.
* configure.ac: Check for _wfopen.
* crossconfig.m4: Likewise.
* configure: Regenerate.
* config.h.in: Regenerate.
* include/bits/fstream.tcc [_GLIBCXX_HAVE__WFOPEN]
(basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)):
Define new overload.
* include/std/fstream [_GLIBCXX_HAVE__WFOPEN]
(basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)):
Declare new overload.
[_GLIBCXX_HAVE__WFOPEN]
(basic_ifstream<C,T>::basic_ifstream(const wchar_t*, openmode))
(basic_ifstream<C,T>::basic_open(const wchar_t*, openmode))
(basic_ofstream<C,T>::basic_ifstream(const wchar_t*, openmode))
(basic_ofstream<C,T>::basic_open(const wchar_t*, openmode))
(basic_fstream<C,T>::basic_ifstream(const wchar_t*, openmode))
(basic_fstream<C,T>::basic_open(const wchar_t*, openmode)): Define
new overloads.
* testsuite/27_io/basic_filebuf/open/wchar_t/1.cc: New.
* testsuite/27_io/basic_ifstream/cons/wchar_t/1.cc: New.
* testsuite/27_io/basic_ifstream/open/wchar_t/1.cc: New.
* testsuite/27_io/basic_ofstream/cons/wchar_t/1.cc: New.
* testsuite/27_io/basic_ofstream/open/wchar_t/1.cc: New.
* testsuite/27_io/basic_fstream/cons/wchar_t/1.cc: New.
* testsuite/27_io/basic_fstream/open/wchar_t/1.cc: New.
From-SVN: r260479
2018-05-21 19:18:35 +02:00
|
|
|
AC_CHECK_FUNCS(_wfopen)
|
2003-08-05 04:00:18 +02:00
|
|
|
;;
|
2018-06-18 19:28:53 +02:00
|
|
|
*-netbsd* | *-openbsd*)
|
2003-08-05 04:00:18 +02:00
|
|
|
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
|
2018-05-24 19:31:13 +02:00
|
|
|
AC_CHECK_FUNCS(aligned_alloc posix_memalign memalign _aligned_malloc)
|
2019-02-14 15:10:25 +01:00
|
|
|
AC_CHECK_FUNCS(timespec_get)
|
2019-03-11 17:28:11 +01:00
|
|
|
AC_CHECK_FUNCS(sockatmark)
|
2003-08-05 04:00:18 +02:00
|
|
|
;;
|
|
|
|
*-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 08:26:57 +01:00
|
|
|
*-rtems*)
|
|
|
|
GLIBCXX_CHECK_COMPILER_FEATURES
|
|
|
|
GLIBCXX_CHECK_LINKER_FEATURES
|
|
|
|
GLIBCXX_CHECK_MATH_SUPPORT
|
|
|
|
GLIBCXX_CHECK_STDLIB_SUPPORT
|
|
|
|
;;
|
2004-01-27 16:36:22 +01:00
|
|
|
*-tpf)
|
|
|
|
SECTION_FLAGS='-ffunction-sections -fdata-sections'
|
2012-05-02 21:34:31 +02:00
|
|
|
SECTION_LDFLAGS='-Wl,--gc-sections $SECTION_LDFLAGS'
|
2004-01-27 16:36:22 +01: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 09:59:27 +02: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-20 20:27:17 +02: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 04:00:18 +02:00
|
|
|
*)
|
|
|
|
AC_MSG_ERROR([No support for this host/target combination.])
|
|
|
|
;;
|
|
|
|
esac
|
2005-04-06 02:05:51 +02:00
|
|
|
])
|