Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Yano <takashi.yano@nifty.ne.jp>2021-12-01 00:11:32 +0300
committerTakashi Yano <takashi.yano@nifty.ne.jp>2021-12-03 13:20:17 +0300
commita4705d387f7874f9a5de3ee67861773a17691643 (patch)
tree31d03557be1b010bf3511edef48321fb2c7341d6 /newlib/configure.ac
parent34876c05a527a7295920979fce69cec6b4cb613c (diff)
ldtoa: Import gdtoa from OpenBSD.
- This patch uses gdtoa imported from OpenBSD if newlib configure option "--enable-newlib-use-gdtoa=no" is NOT specified. gdtoa provides more accurate output and faster conversion than legacy ldtoa, while it requires more heap memory.
Diffstat (limited to 'newlib/configure.ac')
-rw-r--r--newlib/configure.ac15
1 files changed, 15 insertions, 0 deletions
diff --git a/newlib/configure.ac b/newlib/configure.ac
index 49a1b5fdd..25f6d07ed 100644
--- a/newlib/configure.ac
+++ b/newlib/configure.ac
@@ -259,6 +259,17 @@ AC_ARG_ENABLE(newlib-long-time_t,
esac
fi], [newlib_long_time_t=no])dnl
+dnl Support --enable-newlib-use-gdtoa
+AC_ARG_ENABLE(newlib-use-gdtoa,
+[ --enable-newlib-use-gdtoa Use gdtoa rather than legacy ldtoa],
+[if test "${newlib_use_gdtoa+set}" != set; then
+ case "${enableval}" in
+ yes) newlib_use_gdtoa=yes ;;
+ no) newlib_use_gdtoa=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for newlib-use-gdtoa option) ;;
+ esac
+ fi], [newlib_use_gdtoa=yes])dnl
+
NEWLIB_CONFIGURE(.)
dnl We have to enable libtool after NEWLIB_CONFIGURE because if we try and
@@ -537,6 +548,10 @@ if test "${newlib_long_time_t}" = "yes"; then
AC_DEFINE_UNQUOTED(_WANT_USE_LONG_TIME_T)
fi
+if test "${newlib_use_gdtoa}" = "yes"; then
+AC_DEFINE_UNQUOTED(_WANT_USE_GDTOA)
+fi
+
dnl
dnl Parse --enable-newlib-iconv-encodings option argument
dnl