diff options
author | Eric Blake <eblake@redhat.com> | 2007-05-11 20:09:00 +0000 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2007-05-11 20:09:00 +0000 |
commit | 0962fe9178a40c8410d5f1497bb1966f0db66d6d (patch) | |
tree | 96b95530f13f58319534a60386c6c523d97a9e6a /newlib/configure.host | |
parent | b8a37af936acca73d6f6814d89d422b34e342790 (diff) | |
download | cygnal-0962fe9178a40c8410d5f1497bb1966f0db66d6d.tar.gz cygnal-0962fe9178a40c8410d5f1497bb1966f0db66d6d.tar.bz2 cygnal-0962fe9178a40c8410d5f1497bb1966f0db66d6d.zip |
Minimize printf/scanf size on platforms that don't need C99.
* acconfig.h (_WANT_IO_C99_FORMATS): New macro.
* newlib.hin (_WANT_IO_C99_FORMATS): Likewise.
* configure.in (newlib-io-c99-formats): New configure option.
(_WANT_IO_C99_FORMATS): Define appropriately.
* configure.host (*-linux*, cygwin): Default c99-formats to yes.
* libc/stdio/vfprintf.c (_VFPRINTF_R) [!_WANT_IO_C99_FORMATS]:
Cripple ' flag; hh, z, j, t sizes; a, A, F, C, S specifiers.
* libc/stdio/vfscanf.c (_VFSCANF_R) [!_WANT_IO_C99_FORMATS]:
Likewise.
* configure: Regenerate.
Diffstat (limited to 'newlib/configure.host')
-rw-r--r-- | newlib/configure.host | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/newlib/configure.host b/newlib/configure.host index 3b6d996a7..67f7824ef 100644 --- a/newlib/configure.host +++ b/newlib/configure.host @@ -24,6 +24,7 @@ # target_optspace --enable-target-optspace ("yes", "no", "") # newlib_multithread --enable-newlib-multithread ("yes", "no", "yes") # newlib_elix_level --enable-newlib-elix-level ("1","2","3","4") ("4") +# newlib_io_c99_formats --enable-newlib-io-c99-formats ("yes", "no", "") # newlib_io_long_long --enable-newlib-io-long-long ("yes", "no", "") # newlib_io_long_double --enable-newlib-io-long-double ("yes", "no", "") @@ -62,6 +63,7 @@ crt1_dir= have_crt0= use_libtool=no have_sys_mach_dir=no +default_newlib_io_c99_formats=no default_newlib_io_long_long=no default_newlib_io_long_double=no default_newlib_io_pos_args=no @@ -398,6 +400,7 @@ case "${host}" in crt1=crt1.o crt1_dir=libc/sys/${sys_dir} gcc_dir=`gcc -print-search-dirs | awk '/^install:/{print $2}'` + default_newlib_io_c99_formats="yes" default_newlib_io_long_double="yes" default_newlib_io_long_long="yes" default_newlib_io_pos_args="yes" @@ -498,6 +501,7 @@ case "${host}" in *-*-cygwin*) test -z "$cygwin_srcdir" && cygwin_srcdir=`cd ${srcdir}/../winsup/cygwin; pwd` export cygwin_srcdir + default_newlib_io_c99_formats="yes" default_newlib_io_long_long="yes" default_newlib_io_long_double="yes" default_newlib_io_pos_args="yes" @@ -744,6 +748,13 @@ esac # Use defaults for certain settings if not specified by user +# Enable C99 format support in I/O routines if requested. +if [ "x${newlib_io_c99_formats}" = "x" ]; then + if [ ${default_newlib_io_c99_formats} = "yes" ]; then + newlib_io_c99_formats="yes"; + fi +fi + # Enable long long support in I/O routines if requested. if [ "x${newlib_io_long_long}" = "x" ]; then if [ ${default_newlib_io_long_long} = "yes" ]; then |