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 | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'newlib/configure') diff --git a/newlib/configure b/newlib/configure index c83511da6..60cbc1fa8 100755 --- a/newlib/configure +++ b/newlib/configure @@ -972,6 +972,7 @@ enable_newlib_iconv_external_ccs enable_newlib_atexit_dynamic_alloc enable_newlib_global_atexit enable_newlib_reent_small +enable_newlib_reent_binary_compat enable_newlib_global_stdio_streams enable_newlib_fvwrite_in_streamio enable_newlib_fseek_optimization @@ -1639,6 +1640,7 @@ Optional Features: --disable-newlib-atexit-dynamic-alloc disable dynamic allocation of atexit entries --enable-newlib-global-atexit enable atexit data structure as global --enable-newlib-reent-small enable small reentrant struct support + --enable-newlib-reent-binary-compat enable backward binary compatibility for struct _reent --enable-newlib-global-stdio-streams enable global stdio streams --disable-newlib-fvwrite-in-streamio disable iov in streamio --disable-newlib-fseek-optimization disable fseek optimization @@ -2390,6 +2392,19 @@ else newlib_reent_small= fi +# Check whether --enable-newlib-reent-binary-compat was given. +if test "${enable_newlib_reent_binary_compat+set}" = set; then : + enableval=$enable_newlib_reent_binary_compat; if test "${newlib_reent_binary_compat+set}" != set; then + case "${enableval}" in + yes) newlib_reent_binary_compat=yes ;; + no) newlib_reent_binary_compat=no ;; + *) as_fn_error $? "bad value ${enableval} for newlib-enable-reent-binary-compat option" "$LINENO" 5 ;; + esac + fi +else + newlib_reent_binary_compat=no +fi + # Check whether --enable-newlib-global-stdio-streams was given. if test "${enable_newlib_global_stdio_streams+set}" = set; then : enableval=$enable_newlib_global_stdio_streams; case "${enableval}" in @@ -6418,6 +6433,12 @@ $as_echo "#define _WANT_REENT_SMALL 1" >>confdefs.h fi +if test "${newlib_reent_binary_compat}" = "yes"; then + +$as_echo "#define _WANT_REENT_BACKWARD_BINARY_COMPAT 1" >>confdefs.h + +fi + if test "${newlib_global_stdio_streams}" = "yes"; then $as_echo "#define _WANT_REENT_GLOBAL_STDIO_STREAMS 1" >>confdefs.h -- cgit v1.2.3