* configure.in (--enable-newlib-nano-malloc): New option.

* configure: Regenerated.
	* libc/configure.in (--enable-newlib-nano-malloc): New option.
	* libc/configure: Regenerated.
	* libc/stdlib/Makefile.am (NEWLIB_NANO_MALLOC): Use.
	* libc/stdlib/Makefile.in: Regenerated.
	* libc/stdlib/nano-mallocr.c: New file, implementing nano
	version malloc family functions.
This commit is contained in:
Corinna Vinschen
2013-05-29 12:37:59 +00:00
parent 6b6cafe933
commit a83263b981
8 changed files with 799 additions and 73 deletions

22
newlib/configure vendored
View File

@@ -792,6 +792,7 @@ enable_newlib_reent_small
enable_newlib_fvwrite_in_streamio
enable_newlib_fseek_optimization
enable_newlib_wide_orient
enable_newlib_nano_malloc
enable_multilib
enable_target_optspace
enable_malloc_debugging
@@ -1458,6 +1459,7 @@ Optional Features:
--disable-newlib-fvwrite-in-streamio disable iov in streamio
--disable-newlib-fseek-optimization disable fseek optimization
--disable-newlib-wide-orient Turn off wide orientation in streamio
--enable-newlib-nano-malloc use small-footprint nano-malloc implementation
--enable-multilib build many library versions (default)
--enable-target-optspace optimize for space
--enable-malloc-debugging indicate malloc debugging requested
@@ -2395,6 +2397,19 @@ else
fi
# Check whether --enable-newlib-nano-malloc was given.
if test "${enable_newlib_nano_malloc+set}" = set; then :
enableval=$enable_newlib_nano_malloc; if test "${newlib_nano_malloc+set}" != set; then
case "${enableval}" in
yes) newlib_nano_malloc=yes ;;
no) newlib_nano_malloc=no ;;
*) as_fn_error $? "bad value ${enableval} for newlib-nano-malloc option" "$LINENO" 5 ;;
esac
fi
else
newlib_nano_malloc=no
fi
# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
@@ -12297,6 +12312,13 @@ _ACEOF
fi
if test "${newlib_nano_malloc}" = "yes"; then
cat >>confdefs.h <<_ACEOF
#define NEWLIB_NANO_MALLOC 1
_ACEOF
fi
if test "x${iconv_encodings}" != "x" \
|| test "x${iconv_to_encodings}" != "x" \