From 065d77dd0232efb4a49494ff9d2797da9c537e28 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 13 May 2022 13:55:06 +0200 Subject: Add --enable-newlib-reent-binary-compat Add the --enable-newlib-reent-binary-compat configure option. This option is disabled by default. If enabled, then unused members in struct _reent are preserved to maintain the structure layout. --- newlib/configure.ac | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'newlib/configure.ac') diff --git a/newlib/configure.ac b/newlib/configure.ac index 195d336f2..12d52c262 100644 --- a/newlib/configure.ac +++ b/newlib/configure.ac @@ -162,6 +162,17 @@ AC_ARG_ENABLE(newlib-reent-small, *) AC_MSG_ERROR(bad value ${enableval} for newlib-reent-small option) ;; esac], [newlib_reent_small=])dnl +dnl Support --enable-newlib-reent-binary-compat +AC_ARG_ENABLE(newlib-reent-binary-compat, +[ --enable-newlib-reent-binary-compat enable backward binary compatibility for struct _reent], +[if test "${newlib_reent_binary_compat+set}" != set; then + case "${enableval}" in + yes) newlib_reent_binary_compat=yes ;; + no) newlib_reent_binary_compat=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for newlib-enable-reent-binary-compat option) ;; + esac + fi], [newlib_reent_binary_compat=no])dnl + dnl Support --enable-newlib-global-stdio-streams AC_ARG_ENABLE(newlib-global-stdio-streams, [ --enable-newlib-global-stdio-streams enable global stdio streams], @@ -420,6 +431,10 @@ if test "${newlib_reent_small}" = "yes"; then AC_DEFINE(_WANT_REENT_SMALL, 1, [Optional reentrant struct support. Used mostly on platforms with very restricted storage.]) fi +if test "${newlib_reent_binary_compat}" = "yes"; then + AC_DEFINE(_WANT_REENT_BACKWARD_BINARY_COMPAT, 1, [Define to enable backward binary compatibility for struct _reent.]) +fi + if test "${newlib_global_stdio_streams}" = "yes"; then AC_DEFINE(_WANT_REENT_GLOBAL_STDIO_STREAMS, 1, [Define to move the stdio stream FILE objects out of struct _reent and make them global. -- cgit v1.2.3