* configure.in (enable-newlib-global-atexit): New option.
* configure: Regenerated. * newlib.hin (_REENT_GLOBAL_ATEXIT): Place-holder. * README (enable-newlib-global-atexit): Description for new option.
This commit is contained in:
		| @@ -1,3 +1,11 @@ | |||||||
|  | 2013-10-18  Joey Ye  <joey.ye@arm.com> | ||||||
|  |  | ||||||
|  | 	* configure.in (enable-newlib-global-atexit): New option. | ||||||
|  | 	* configure: Regenerated. | ||||||
|  | 	* newlib.hin (_REENT_GLOBAL_ATEXIT): Place-holder. | ||||||
|  | 	* README (enable-newlib-global-atexit): Description for | ||||||
|  | 	new option. | ||||||
|  |  | ||||||
| 2013-10-18  Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-10-18  Sebastian Huber <sebastian.huber@embedded-brains.de> | ||||||
|  |  | ||||||
| 	* libc/include/sys/unistd.h (MAXPATHLEN): Delete. | 	* libc/include/sys/unistd.h (MAXPATHLEN): Delete. | ||||||
|   | |||||||
| @@ -288,6 +288,12 @@ One feature can be enabled by specifying `--enable-FEATURE=yes' or | |||||||
|      Disable dynamic allocation of atexit entries. |      Disable dynamic allocation of atexit entries. | ||||||
|      Most hosts and targets have it enabled in configure.host. |      Most hosts and targets have it enabled in configure.host. | ||||||
|  |  | ||||||
|  | `--enable-newlib-global-atexit' | ||||||
|  |      Enable atexit data structure as global variable.  By doing so it is | ||||||
|  |      move out of _reent structure, and can be garbage collected if atexit | ||||||
|  |      is not referenced. | ||||||
|  |      Disabled by default. | ||||||
|  |  | ||||||
| `--enable-newlib-reent-small' | `--enable-newlib-reent-small' | ||||||
|      Enable small reentrant struct support. |      Enable small reentrant struct support. | ||||||
|      Disabled by default. |      Disabled by default. | ||||||
|   | |||||||
							
								
								
									
										22
									
								
								newlib/configure
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										22
									
								
								newlib/configure
									
									
									
									
										vendored
									
									
								
							| @@ -788,6 +788,7 @@ enable_newlib_iconv_from_encodings | |||||||
| enable_newlib_iconv_to_encodings | enable_newlib_iconv_to_encodings | ||||||
| enable_newlib_iconv_external_ccs | enable_newlib_iconv_external_ccs | ||||||
| enable_newlib_atexit_dynamic_alloc | enable_newlib_atexit_dynamic_alloc | ||||||
|  | enable_newlib_global_atexit | ||||||
| enable_newlib_reent_small | enable_newlib_reent_small | ||||||
| enable_newlib_fvwrite_in_streamio | enable_newlib_fvwrite_in_streamio | ||||||
| enable_newlib_fseek_optimization | enable_newlib_fseek_optimization | ||||||
| @@ -1457,6 +1458,7 @@ Optional Features: | |||||||
|   --enable-newlib-iconv-to-encodings   enable specific comma-separated list of \"to\" iconv encodings to be built-in |   --enable-newlib-iconv-to-encodings   enable specific comma-separated list of \"to\" iconv encodings to be built-in | ||||||
|   --enable-newlib-iconv-external-ccs     enable capabilities to load external CCS files for iconv |   --enable-newlib-iconv-external-ccs     enable capabilities to load external CCS files for iconv | ||||||
|   --disable-newlib-atexit-dynamic-alloc    disable dynamic allocation of atexit entries |   --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-small   enable small reentrant struct support | ||||||
|   --disable-newlib-fvwrite-in-streamio    disable iov in streamio |   --disable-newlib-fvwrite-in-streamio    disable iov in streamio | ||||||
|   --disable-newlib-fseek-optimization    disable fseek optimization |   --disable-newlib-fseek-optimization    disable fseek optimization | ||||||
| @@ -2352,6 +2354,19 @@ else | |||||||
|   newlib_atexit_dynamic_alloc=${newlib_atexit_dynamic_alloc} |   newlib_atexit_dynamic_alloc=${newlib_atexit_dynamic_alloc} | ||||||
| fi | fi | ||||||
|  |  | ||||||
|  | # Check whether --enable-newlib-global-atexit was given. | ||||||
|  | if test "${enable_newlib_global_atexit+set}" = set; then : | ||||||
|  |   enableval=$enable_newlib_global_atexit; if test "${newlib_global_atexit+set}" != set; then | ||||||
|  |   case "${enableval}" in | ||||||
|  |     yes) newlib_global_atexit=yes ;; | ||||||
|  |     no)  newlib_global_atexit=no  ;; | ||||||
|  |     *)   as_fn_error $? "bad value ${enableval} for newlib-global-atexit option" "$LINENO" 5 ;; | ||||||
|  |   esac | ||||||
|  |  fi | ||||||
|  | else | ||||||
|  |   newlib_global_atexit=no | ||||||
|  | fi | ||||||
|  |  | ||||||
| # Check whether --enable-newlib-reent-small was given. | # Check whether --enable-newlib-reent-small was given. | ||||||
| if test "${enable_newlib_reent_small+set}" = set; then : | if test "${enable_newlib_reent_small+set}" = set; then : | ||||||
|   enableval=$enable_newlib_reent_small; case "${enableval}" in |   enableval=$enable_newlib_reent_small; case "${enableval}" in | ||||||
| @@ -12321,6 +12336,13 @@ _ACEOF | |||||||
|  |  | ||||||
| fi | fi | ||||||
|  |  | ||||||
|  | if test "${newlib_global_atexit}" = "yes"; then | ||||||
|  | cat >>confdefs.h <<_ACEOF | ||||||
|  | #define _REENT_GLOBAL_ATEXIT 1 | ||||||
|  | _ACEOF | ||||||
|  |  | ||||||
|  | fi | ||||||
|  |  | ||||||
| if test "${newlib_fvwrite_in_streamio}" = "yes"; then | if test "${newlib_fvwrite_in_streamio}" = "yes"; then | ||||||
| cat >>confdefs.h <<_ACEOF | cat >>confdefs.h <<_ACEOF | ||||||
| #define _FVWRITE_IN_STREAMIO 1 | #define _FVWRITE_IN_STREAMIO 1 | ||||||
|   | |||||||
| @@ -115,6 +115,19 @@ AC_ARG_ENABLE(newlib-atexit-dynamic-alloc, | |||||||
|   esac |   esac | ||||||
|  fi], [newlib_atexit_dynamic_alloc=${newlib_atexit_dynamic_alloc}])dnl |  fi], [newlib_atexit_dynamic_alloc=${newlib_atexit_dynamic_alloc}])dnl | ||||||
|  |  | ||||||
|  | dnl Support --enable-newlib-global-atexit | ||||||
|  | dnl Enable atexit data structure as global variables to save memory usage in | ||||||
|  | dnl _reent. | ||||||
|  | AC_ARG_ENABLE(newlib-global-atexit, | ||||||
|  | [  --enable-newlib-global-atexit	enable atexit data structure as global], | ||||||
|  | [if test "${newlib_global_atexit+set}" != set; then | ||||||
|  |   case "${enableval}" in | ||||||
|  |     yes) newlib_global_atexit=yes ;; | ||||||
|  |     no)  newlib_global_atexit=no  ;; | ||||||
|  |     *)   AC_MSG_ERROR(bad value ${enableval} for newlib-global-atexit option) ;; | ||||||
|  |   esac | ||||||
|  |  fi], [newlib_global_atexit=no])dnl | ||||||
|  |  | ||||||
| dnl Support --enable-newlib-reent-small | dnl Support --enable-newlib-reent-small | ||||||
| AC_ARG_ENABLE(newlib-reent-small, | AC_ARG_ENABLE(newlib-reent-small, | ||||||
| [  --enable-newlib-reent-small   enable small reentrant struct support], | [  --enable-newlib-reent-small   enable small reentrant struct support], | ||||||
| @@ -383,6 +396,10 @@ if test "${newlib_atexit_dynamic_alloc}" = "yes"; then | |||||||
| AC_DEFINE_UNQUOTED(_ATEXIT_DYNAMIC_ALLOC) | AC_DEFINE_UNQUOTED(_ATEXIT_DYNAMIC_ALLOC) | ||||||
| fi | fi | ||||||
|  |  | ||||||
|  | if test "${newlib_global_atexit}" = "yes"; then | ||||||
|  | AC_DEFINE_UNQUOTED(_REENT_GLOBAL_ATEXIT) | ||||||
|  | fi | ||||||
|  |  | ||||||
| if test "${newlib_fvwrite_in_streamio}" = "yes"; then | if test "${newlib_fvwrite_in_streamio}" = "yes"; then | ||||||
| AC_DEFINE_UNQUOTED(_FVWRITE_IN_STREAMIO) | AC_DEFINE_UNQUOTED(_FVWRITE_IN_STREAMIO) | ||||||
| fi | fi | ||||||
|   | |||||||
| @@ -73,6 +73,9 @@ | |||||||
| /* Define if lite version of exit supported.  */ | /* Define if lite version of exit supported.  */ | ||||||
| #undef _LITE_EXIT | #undef _LITE_EXIT | ||||||
|  |  | ||||||
|  | /* Define if declare atexit data as global.  */ | ||||||
|  | #undef _REENT_GLOBAL_ATEXIT | ||||||
|  |  | ||||||
| /* | /* | ||||||
|  * Iconv encodings enabled ("to" direction) |  * Iconv encodings enabled ("to" direction) | ||||||
|  */ |  */ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user