2004-05-25 Artem B. Bityuckiy <abitytsky@softminecorp.com>

* newlib.hin: (_WANT_IO_POS_ARGS): New define.
        (_WANT_IO_LONG_LONG): Ditto.
        (_WANT_IO_LONG_DOUBLE): Ditto.
        * configure.in: Add new configuration options
        --enable-newlib-io-long-long and --enable-newlib-io-long-double
        which tie to new defines in newlib.hin.
        * configure: Regenerated.
        * configure.host: Add checks for new configuration options.  Also
        fix up check for --enable-newlib-io-pos-args so configuration
        option will override any default for a given platform.
        Remove defining compiler flags for the _WANT_IO* options.
        * libc/stdio/vfprintf.c: Change to use new newlib.hin defines
        instead of looking for old compiler flags.
        * libc/stdio/vfscanf.c: Ditto.
        * libc/stdio/vfieeefp.h: Ditto.
        * libc/machine/powerpc/vfprintf.c: Ditto.
        * libc/machine/powerpc/vfscanf.c: Ditto.
This commit is contained in:
Jeff Johnston 2004-05-26 00:19:14 +00:00
parent 9178da9597
commit 227e6ef6c3
10 changed files with 255 additions and 115 deletions

View File

@ -1,3 +1,23 @@
2004-05-25 Artem B. Bityuckiy <abitytsky@softminecorp.com>
* newlib.hin: (_WANT_IO_POS_ARGS): New define.
(_WANT_IO_LONG_LONG): Ditto.
(_WANT_IO_LONG_DOUBLE): Ditto.
* configure.in: Add new configuration options
--enable-newlib-io-long-long and --enable-newlib-io-long-double
which tie to new defines in newlib.hin.
* configure: Regenerated.
* configure.host: Add checks for new configuration options. Also
fix up check for --enable-newlib-io-pos-args so configuration
option will override any default for a given platform.
Remove defining compiler flags for the _WANT_IO* options.
* libc/stdio/vfprintf.c: Change to use new newlib.hin defines
instead of looking for old compiler flags.
* libc/stdio/vfscanf.c: Ditto.
* libc/stdio/vfieeefp.h: Ditto.
* libc/machine/powerpc/vfprintf.c: Ditto.
* libc/machine/powerpc/vfscanf.c: Ditto.
2004-05-25 Jeff Johnston <jjohnstn@redhat.com>
* testsuite/include/check.h: Add include of <stdio.h>.

200
newlib/configure vendored
View File

@ -13,6 +13,10 @@ ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
--enable-newlib-io-pos-args enable printf-family positional arg support"
ac_help="$ac_help
--enable-newlib-io-long-long enable long long type support in IO functions like printf/scanf"
ac_help="$ac_help
--enable-newlib-io-long-double enable long double type support in IO functions printf/scanf"
ac_help="$ac_help
--enable-multilib build many library versions (default)"
ac_help="$ac_help
@ -593,9 +597,32 @@ if test "${enable_newlib_io_pos_args+set}" = set; then
*) { echo "configure: error: bad value ${enableval} for newlib-io-pos-args option" 1>&2; exit 1; } ;;
esac
else
newlib_io_pos_args=no
newlib_io_pos_args=
fi
# Check whether --enable-newlib-io-long-long or --disable-newlib-io-long-long was given.
if test "${enable_newlib_io_long_long+set}" = set; then
enableval="$enable_newlib_io_long_long"
case "${enableval}" in
yes) newlib_io_long_long=yes;;
no) newlib_io_long_long=no ;;
*) { echo "configure: error: bad value ${enableval} for newlib-io-long-long option" 1>&2; exit 1; } ;;
esac
else
newlib_io_long_long=
fi
# Check whether --enable-newlib-io-long-double or --disable-newlib-io-long-double was given.
if test "${enable_newlib_io_long_double+set}" = set; then
enableval="$enable_newlib_io_long_double"
case "${enableval}" in
yes) newlib_io_long_double=yes;;
no) newlib_io_long_double=no ;;
*) { echo "configure: error: bad value ${enableval} for newlib-io-long-double option" 1>&2; exit 1; } ;;
esac
else
newlib_io_long_double=
fi
am__api_version="1.4"
# Find a good install program. We prefer a C program (faster),
@ -610,7 +637,7 @@ am__api_version="1.4"
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:614: checking for a BSD compatible install" >&5
echo "configure:641: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -663,7 +690,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
echo "configure:667: checking whether build environment is sane" >&5
echo "configure:694: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
@ -720,7 +747,7 @@ test "$program_suffix" != NONE &&
test "$program_transform_name" = "" && program_transform_name="s,x,x,"
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:724: checking whether ${MAKE-make} sets \${MAKE}" >&5
echo "configure:751: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -753,12 +780,12 @@ else
fi
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
echo "configure:757: checking for Cygwin environment" >&5
echo "configure:784: checking for Cygwin environment" >&5
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 762 "configure"
#line 789 "configure"
#include "confdefs.h"
int main() {
@ -769,7 +796,7 @@ int main() {
return __CYGWIN__;
; return 0; }
EOF
if { (eval echo configure:773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
@ -786,19 +813,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
echo "configure:790: checking for mingw32 environment" >&5
echo "configure:817: checking for mingw32 environment" >&5
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 795 "configure"
#line 822 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
if { (eval echo configure:802: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
@ -990,7 +1017,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:994: checking host system type" >&5
echo "configure:1021: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@ -1011,7 +1038,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
echo "configure:1015: checking target system type" >&5
echo "configure:1042: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@ -1029,7 +1056,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
echo "configure:1033: checking build system type" >&5
echo "configure:1060: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@ -1072,7 +1099,7 @@ EOF
missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
echo "configure:1076: checking for working aclocal-${am__api_version}" >&5
echo "configure:1103: checking for working aclocal-${am__api_version}" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@ -1085,7 +1112,7 @@ else
fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
echo "configure:1089: checking for working autoconf" >&5
echo "configure:1116: checking for working autoconf" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@ -1098,7 +1125,7 @@ else
fi
echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
echo "configure:1102: checking for working automake-${am__api_version}" >&5
echo "configure:1129: checking for working automake-${am__api_version}" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@ -1111,7 +1138,7 @@ else
fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
echo "configure:1115: checking for working autoheader" >&5
echo "configure:1142: checking for working autoheader" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@ -1124,7 +1151,7 @@ else
fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
echo "configure:1128: checking for working makeinfo" >&5
echo "configure:1155: checking for working makeinfo" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@ -1149,7 +1176,7 @@ fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1153: checking for $ac_word" >&5
echo "configure:1180: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1179,7 +1206,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1183: checking for $ac_word" >&5
echo "configure:1210: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1228,7 +1255,7 @@ fi
fi
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:1232: checking whether we are using GNU C" >&5
echo "configure:1259: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1237,7 +1264,7 @@ else
yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@ -1252,7 +1279,7 @@ if test $ac_cv_prog_gcc = yes; then
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:1256: checking whether ${CC-cc} accepts -g" >&5
echo "configure:1283: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1283,7 +1310,7 @@ fi
# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
set dummy ${ac_tool_prefix}as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1287: checking for $ac_word" >&5
echo "configure:1314: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1315,7 +1342,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1319: checking for $ac_word" >&5
echo "configure:1346: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1347,7 +1374,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1351: checking for $ac_word" >&5
echo "configure:1378: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1379,7 +1406,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1383: checking for $ac_word" >&5
echo "configure:1410: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1424,7 +1451,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:1428: checking for a BSD compatible install" >&5
echo "configure:1455: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -1478,7 +1505,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
echo "configure:1482: checking whether to enable maintainer-specific portions of Makefiles" >&5
echo "configure:1509: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
@ -1512,7 +1539,7 @@ if false; then
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
echo "configure:1516: checking for executable suffix" >&5
echo "configure:1543: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1522,7 +1549,7 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
if { (eval echo configure:1526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
if { (eval echo configure:1553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj) ;;
@ -1697,7 +1724,7 @@ fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1701: checking for $ac_word" >&5
echo "configure:1728: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1727,7 +1754,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1731: checking for $ac_word" >&5
echo "configure:1758: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1778,7 +1805,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1782: checking for $ac_word" >&5
echo "configure:1809: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1810,7 +1837,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:1814: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
echo "configure:1841: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@ -1821,12 +1848,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
#line 1825 "configure"
#line 1852 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
if { (eval echo configure:1830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@ -1852,12 +1879,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:1856: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "configure:1883: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:1861: checking whether we are using GNU C" >&5
echo "configure:1888: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1866,7 +1893,7 @@ else
yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@ -1885,7 +1912,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:1889: checking whether ${CC-cc} accepts -g" >&5
echo "configure:1916: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1928,7 +1955,7 @@ ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
echo "configure:1932: checking for ld used by GCC" >&5
echo "configure:1959: checking for ld used by GCC" >&5
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@ -1958,10 +1985,10 @@ echo "configure:1932: checking for ld used by GCC" >&5
esac
elif test "$with_gnu_ld" = yes; then
echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
echo "configure:1962: checking for GNU ld" >&5
echo "configure:1989: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
echo "configure:1965: checking for non-GNU ld" >&5
echo "configure:1992: checking for non-GNU ld" >&5
fi
if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -1996,7 +2023,7 @@ else
fi
test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
echo "configure:2000: checking if the linker ($LD) is GNU ld" >&5
echo "configure:2027: checking if the linker ($LD) is GNU ld" >&5
if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2013,7 +2040,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
echo "configure:2017: checking for $LD option to reload object files" >&5
echo "configure:2044: checking for $LD option to reload object files" >&5
if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2025,7 +2052,7 @@ reload_flag=$lt_cv_ld_reload_flag
test -n "$reload_flag" && reload_flag=" $reload_flag"
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
echo "configure:2029: checking for BSD-compatible nm" >&5
echo "configure:2056: checking for BSD-compatible nm" >&5
if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2063,7 +2090,7 @@ NM="$lt_cv_path_NM"
echo "$ac_t""$NM" 1>&6
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
echo "configure:2067: checking whether ln -s works" >&5
echo "configure:2094: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2084,7 +2111,7 @@ else
fi
echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
echo "configure:2088: checking how to recognise dependant libraries" >&5
echo "configure:2115: checking how to recognise dependant libraries" >&5
if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2257,13 +2284,13 @@ file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
echo $ac_n "checking for object suffix""... $ac_c" 1>&6
echo "configure:2261: checking for object suffix" >&5
echo "configure:2288: checking for object suffix" >&5
if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftest*
echo 'int i = 1;' > conftest.$ac_ext
if { (eval echo configure:2267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
for ac_file in conftest.*; do
case $ac_file in
*.c) ;;
@ -2287,7 +2314,7 @@ case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
echo "configure:2291: checking for ${ac_tool_prefix}file" >&5
echo "configure:2318: checking for ${ac_tool_prefix}file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2349,7 +2376,7 @@ fi
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
echo $ac_n "checking for file""... $ac_c" 1>&6
echo "configure:2353: checking for file" >&5
echo "configure:2380: checking for file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2420,7 +2447,7 @@ esac
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2424: checking for $ac_word" >&5
echo "configure:2451: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2452,7 +2479,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2456: checking for $ac_word" >&5
echo "configure:2483: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2487,7 +2514,7 @@ fi
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2491: checking for $ac_word" >&5
echo "configure:2518: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2519,7 +2546,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2523: checking for $ac_word" >&5
echo "configure:2550: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2586,8 +2613,8 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
case $host in
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 2590 "configure"' > conftest.$ac_ext
if { (eval echo configure:2591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
echo '#line 2617 "configure"' > conftest.$ac_ext
if { (eval echo configure:2618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -32"
@ -2606,7 +2633,7 @@ case $host in
ia64-*-hpux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
if { (eval echo configure:2610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case "`/usr/bin/file conftest.o`" in
*ELF-32*)
HPUX_IA64_MODE="32"
@ -2624,7 +2651,7 @@ ia64-*-hpux*)
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
echo "configure:2628: checking whether the C compiler needs -belf" >&5
echo "configure:2655: checking whether the C compiler needs -belf" >&5
if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2637,14 +2664,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
#line 2641 "configure"
#line 2668 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if { (eval echo configure:2648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
lt_cv_cc_needs_belf=yes
else
@ -2674,7 +2701,7 @@ echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
set dummy ${ac_tool_prefix}dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2678: checking for $ac_word" >&5
echo "configure:2705: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2706,7 +2733,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "dlltool", so it can be a program name with args.
set dummy dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2710: checking for $ac_word" >&5
echo "configure:2737: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2741,7 +2768,7 @@ fi
# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
set dummy ${ac_tool_prefix}as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2745: checking for $ac_word" >&5
echo "configure:2772: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2773,7 +2800,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "as", so it can be a program name with args.
set dummy as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2777: checking for $ac_word" >&5
echo "configure:2804: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2808,7 +2835,7 @@ fi
# Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
set dummy ${ac_tool_prefix}objdump; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2812: checking for $ac_word" >&5
echo "configure:2839: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2840,7 +2867,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "objdump", so it can be a program name with args.
set dummy objdump; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2844: checking for $ac_word" >&5
echo "configure:2871: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2876,12 +2903,12 @@ fi
# recent cygwin and mingw systems supply a stub DllMain which the user
# can override, but on older systems we have to supply one
echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
echo "configure:2880: checking if libtool should supply DllMain function" >&5
echo "configure:2907: checking if libtool should supply DllMain function" >&5
if eval "test \"`echo '$''{'lt_cv_need_dllmain'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2885 "configure"
#line 2912 "configure"
#include "confdefs.h"
int main() {
@ -2889,7 +2916,7 @@ extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
DllMain (0, 0, 0);
; return 0; }
EOF
if { (eval echo configure:2893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
lt_cv_need_dllmain=no
else
@ -2910,19 +2937,19 @@ echo "$ac_t""$lt_cv_need_dllmain" 1>&6
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -mdll"
echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
echo "configure:2914: checking how to link DLLs" >&5
echo "configure:2941: checking how to link DLLs" >&5
if eval "test \"`echo '$''{'lt_cv_cc_dll_switch'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2919 "configure"
#line 2946 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if { (eval echo configure:2926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
lt_cv_cc_dll_switch=-mdll
else
@ -3036,7 +3063,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3040: checking for $ac_word" >&5
echo "configure:3067: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3205,6 +3232,27 @@ EOF
fi
if test "${newlib_io_long_long}" = "yes"; then
cat >> confdefs.h <<EOF
#define _WANT_IO_LONG_LONG 1
EOF
fi
if test "${newlib_io_long_double}" = "yes"; then
cat >> confdefs.h <<EOF
#define _WANT_IO_LONG_DOUBLE 1
EOF
fi
if test "${newlib_io_pos_args}" = "yes"; then
cat >> confdefs.h <<EOF
#define _WANT_IO_POS_ARGS 1
EOF
fi
if test "${newlib_mb}" = "yes"; then
cat >> confdefs.h <<EOF
#define _MB_CAPABLE 1

View File

@ -24,6 +24,8 @@
# 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_long_long --enable-newlib-io-long-long ("yes", "no", "")
# newlib_io_long_double --enable-newlib-io-long-double ("yes", "no", "")
# It sets the following shell variables:
# newlib_cflags Special CFLAGS to use when building
@ -55,6 +57,9 @@ crt1=
crt1_dir=
use_libtool=no
have_sys_mach_dir=no
default_newlib_io_long_long=no
default_newlib_io_long_double=no
default_newlib_io_pos_args=no
aext=a
oext=o
@ -256,12 +261,6 @@ if [ "${newlib_io_float}" = "no" ] ; then
newlib_cflags="${newlib_cflags} -DNO_FLOATING_POINT"
fi
# Enable printf positional argument support if requested.
if [ "${newlib_io_pos_args}" = "yes" ] ; then
newlib_cflags="${newlib_cflags} -DWANT_IO_POS_ARGS"
fi
# Verify if shared newlib support is allowed and set appropriate variables
# We don't want to use libtool for platforms that we are not going to
# support shared libraries. This is because it adds executable tests which
@ -343,11 +342,13 @@ 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_long_double="yes"
default_newlib_io_long_long="yes"
default_newlib_io_pos_args="yes"
#newlib_cflags="${newlib_cflags} -Werror" # DEBUGGING ONLY;BREAKS BUILD
newlib_cflags="${newlib_cflags} -Wall"
newlib_cflags="${newlib_cflags} -D_I386MACH_ALLOW_HW_INTERRUPTS"
newlib_cflags="${newlib_cflags} -DHAVE_FCNTL"
newlib_cflags="${newlib_cflags} -DWANT_IO_POS_ARGS -DWANT_IO_LONG_DBL"
# --- Required when building a shared library ------------------------
newlib_cflags="${newlib_cflags} -fPIC -D_I386MACH_NEED_SOTYPE_FUNCTION"
# --- The three lines below are optional ------------------------------
@ -431,7 +432,10 @@ case "${host}" in
*-*-cygwin*)
test -z "$cygwin_srcdir" && cygwin_srcdir=`cd ${srcdir}/../winsup/cygwin; pwd`
export cygwin_srcdir
newlib_cflags="${newlib_cflags} -DHAVE_OPENDIR -DHAVE_RENAME -DSIGNAL_PROVIDED -DWANT_IO_POS_ARGS -DWANT_IO_LONG_DBL -DWANT_PRINTF_LONG_LONG -D_COMPILING_NEWLIB -DHAVE_FCNTL -DMALLOC_PROVIDED -I${cygwin_srcdir}/include"
default_newlib_io_long_long="yes"
default_newlib_io_long_double="yes"
default_newlib_io_pos_args="yes"
newlib_cflags="${newlib_cflags} -DHAVE_OPENDIR -DHAVE_RENAME -DSIGNAL_PROVIDED -D_COMPILING_NEWLIB -DHAVE_FCNTL -DMALLOC_PROVIDED -I${cygwin_srcdir}/include"
syscall_dir=syscalls
;;
# RTEMS supplies its own versions of some routines:
@ -442,7 +446,8 @@ case "${host}" in
#
# NOTE: When newlib malloc uses a semaphore, RTEMS will switch to that.
*-*-rtems*)
newlib_cflags="${newlib_cflags} -DHAVE_GETTIMEOFDAY -DMALLOC_PROVIDED -DEXIT_PROVIDED -DMISSING_SYSCALL_NAMES -DSIGNAL_PROVIDED -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_OPENDIR -DNO_EXEC -DWANT_PRINTF_LONG_LONG -DHAVE_FCNTL"
default_newlib_io_long_long="yes"
newlib_cflags="${newlib_cflags} -DHAVE_GETTIMEOFDAY -DMALLOC_PROVIDED -DEXIT_PROVIDED -DMISSING_SYSCALL_NAMES -DSIGNAL_PROVIDED -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_OPENDIR -DNO_EXEC -DHAVE_FCNTL"
;;
# VxWorks supplies its own version of malloc, and the newlib one
# doesn't work because VxWorks does not have sbrk.
@ -491,12 +496,11 @@ case "${host}" in
newlib_cflags="${newlib_cflags} -DARM_RDI_MONITOR"
;;
fr30-*-*)
newlib_cflags="${newlib_cflags}"
syscall_dir=syscalls
;;
frv-*-*)
syscall_dir=syscalls
newlib_cflags="${newlib_cflags} -DWANT_PRINTF_LONG_LONG"
default_newlib_io_long_long="yes"
;;
h8300*-*-*)
syscall_dir=syscalls
@ -517,7 +521,7 @@ case "${host}" in
;;
iq2000*)
syscall_dir=syscalls
newlib_cflags="${newlib_cflags} -DWANT_PRINTF_LONG_LONG"
default_newlib_io_long_long="yes"
;;
m32r-*-*)
# Pass -msdata=sdata so _impure_ptr goes in .sdata.
@ -531,11 +535,11 @@ case "${host}" in
newlib_cflags="${newlib_cflags} -DNO_EXEC -DABORT_PROVIDED -DSMALL_MEMORY -DMISSING_SYSCALL_NAMES"
;;
mcore-*-*)
newlib_cflags="${newlib_cflags}"
syscall_dir=syscalls
;;
mips64vr*-*-*)
newlib_cflags="${newlib_cflags} -DWANT_PRINTF_LONG_LONG -DMISSING_SYSCALL_NAMES"
default_newlib_io_long_long="yes"
newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
;;
mmix-*)
syscall_dir=syscalls
@ -547,10 +551,12 @@ case "${host}" in
syscall_dir=syscalls
;;
powerpc*-*-eabialtivec*)
newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES -DWANT_PRINTF_LONG_LONG"
default_newlib_io_long_long="yes"
newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
;;
powerpc*-*-eabispe*)
newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES -DWANT_PRINTF_LONG_LONG"
default_newlib_io_long_long="yes"
newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
;;
powerpc*-*-eabi* | \
powerpc*-*-elf* | \
@ -558,14 +564,16 @@ case "${host}" in
powerpc*-*-rtem* | \
powerpc*-*-sysv* | \
powerpc*-*-solaris*)
newlib_cflags="${newlib_cflags} -mrelocatable-lib -mno-eabi -mstrict-align -DMISSING_SYSCALL_NAMES -DWANT_PRINTF_LONG_LONG"
default_newlib_io_long_long="yes"
newlib_cflags="${newlib_cflags} -mrelocatable-lib -mno-eabi -mstrict-align -DMISSING_SYSCALL_NAMES"
;;
powerpcle-*-pe)
newlib_cflags="${newlib_cflags} -DHAVE_OPENDIR -DHAVE_RENAME -DHAVE_FCNTL"
syscall_dir=syscalls
;;
sh*-*-*)
newlib_cflags="${newlib_cflags} -DHAVE_GETTIMEOFDAY -DWANT_PRINTF_LONG_LONG"
default_newlib_io_long_long="yes"
newlib_cflags="${newlib_cflags} -DHAVE_GETTIMEOFDAY"
syscall_dir=syscalls
;;
sparc-sun-sunos*)
@ -638,3 +646,26 @@ case "${host}" in
syscall_dir=
;;
esac
# Use defaults for certain settings if not specified by user
# 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
newlib_io_long_long="yes";
fi
fi
# Enable long double support in I/O routines if requested.
if [ "x${newlib_io_long_double}" = "x" ]; then
if [ ${default_newlib_io_long_double} = "yes" ]; then
newlib_io_long_double="yes";
fi
fi
# Enable printf positional argument support if requested.
if [ "x${newlib_io_pos_args}" = "x" ]; then
if [ ${default_newlib_io_pos_args} = "yes" ]; then
newlib_io_pos_args="yes";
fi
fi

View File

@ -17,8 +17,25 @@ AC_ARG_ENABLE(newlib-io-pos-args,
yes) newlib_io_pos_args=yes ;;
no) newlib_io_pos_args=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for newlib-io-pos-args option) ;;
esac], [newlib_io_pos_args=no])dnl
esac], [newlib_io_pos_args=])dnl
dnl Support --enable-newlib-io-long-long
AC_ARG_ENABLE(newlib-io-long-long,
[ --enable-newlib-io-long-long enable long long type support in IO functions like printf/scanf],
[case "${enableval}" in
yes) newlib_io_long_long=yes;;
no) newlib_io_long_long=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for newlib-io-long-long option) ;;
esac], [newlib_io_long_long=])dnl
dnl Support --enable-newlib-io-long-double
AC_ARG_ENABLE(newlib-io-long-double,
[ --enable-newlib-io-long-double enable long double type support in IO functions printf/scanf],
[case "${enableval}" in
yes) newlib_io_long_double=yes;;
no) newlib_io_long_double=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for newlib-io-long-double option) ;;
esac], [newlib_io_long_double=])dnl
NEWLIB_CONFIGURE(.)
@ -144,6 +161,18 @@ if test "${newlib_elix_level}" -gt "0"; then
AC_DEFINE_UNQUOTED(_ELIX_LEVEL,${newlib_elix_level})
fi
if test "${newlib_io_long_long}" = "yes"; then
AC_DEFINE_UNQUOTED(_WANT_IO_LONG_LONG)
fi
if test "${newlib_io_long_double}" = "yes"; then
AC_DEFINE_UNQUOTED(_WANT_IO_LONG_DOUBLE)
fi
if test "${newlib_io_pos_args}" = "yes"; then
AC_DEFINE_UNQUOTED(_WANT_IO_POS_ARGS)
fi
if test "${newlib_mb}" = "yes"; then
AC_DEFINE_UNQUOTED(_MB_CAPABLE)
AC_DEFINE_UNQUOTED(_MB_LEN_MAX,8)

View File

@ -155,11 +155,6 @@ static char *rcsid = "$Id$";
#endif
#endif
#define _NO_LONGLONG
#if defined WANT_PRINTF_LONG_LONG && defined __GNUC__
# undef _NO_LONGLONG
#endif
#include <_ansi.h>
#include <limits.h>
#include <stdio.h>
@ -186,10 +181,15 @@ static char *rcsid = "$Id$";
This could be changed in the future should the _ldtoa_r code be
preferred over _dtoa_r. */
#define _NO_LONGDBL
#if defined WANT_IO_LONG_DBL && (LDBL_MANT_DIG > DBL_MANT_DIG)
#if defined _WANT_IO_LONG_DOUBLE && (LDBL_MANT_DIG > DBL_MANT_DIG)
#undef _NO_LONGDBL
#endif
#define _NO_LONGLONG
#if defined _WANT_IO_LONG_LONG && defined __GNUC__
# undef _NO_LONGLONG
#endif
#ifdef __ALTIVEC__
typedef union
{

View File

@ -103,6 +103,7 @@ Supporting OS subroutines required:
*/
#include <_ansi.h>
#include <reent.h>
#include <newlib.h>
#include <ctype.h>
#include <stdio.h>
@ -128,13 +129,13 @@ Supporting OS subroutines required:
This could be changed in the future should the _ldtoa_r code be
preferred over _dtoa_r. */
#define _NO_LONGDBL
#if defined WANT_IO_LONG_DBL && (LDBL_MANT_DIG > DBL_MANT_DIG)
#if defined _WANT_IO_LONG_DOUBLE && (LDBL_MANT_DIG > DBL_MANT_DIG)
#undef _NO_LONGDBL
extern _LONG_DOUBLE _strtold _PARAMS((char *s, char **sptr));
#endif
#define _NO_LONGLONG
#if defined WANT_PRINTF_LONG_LONG && defined __GNUC__
#if defined _WANT_IO_LONG_LONG && defined __GNUC__
# undef _NO_LONGLONG
#endif

View File

@ -29,6 +29,7 @@
/* This header file is a modification of mprec.h that only contains floating
point union code. */
#include <newlib.h>
#include <ieeefp.h>
#include <math.h>
#include <float.h>
@ -57,7 +58,7 @@
Exactly one of IEEE_8087, IEEE_MC68k, VAX, or IBM should be defined.
#endif
#ifdef WANT_IO_LONG_DBL
#ifdef _WANT_IO_LONG_DOUBLE
/* If we are going to examine or modify specific bits in a long double using
the lword0 or lwordx macros, then we must wrap the long double inside
a union. This is necessary to avoid undefined behavior according to
@ -134,7 +135,7 @@ struct ldieee
};
#endif /* LDBL_MANT_DIG */
#endif /* !IEEE_8087 */
#endif /* WANT_IO_LONG_DBL */
#endif /* _WANT_IO_LONG_DOUBLE */
/* If we are going to examine or modify specific bits in a double using
the word0 and/or word1 macros, then we must wrap the double inside

View File

@ -169,17 +169,13 @@ static char *rcsid = "$Id$";
#endif
#endif
#define _NO_LONGLONG
#if defined WANT_PRINTF_LONG_LONG && defined __GNUC__
# undef _NO_LONGLONG
#endif
#define _NO_POS_ARGS
#if defined WANT_IO_POS_ARGS
#if defined _WANT_IO_POS_ARGS
# undef _NO_POS_ARGS
#endif
#include <_ansi.h>
#include <reent.h>
#include <newlib.h>
#include <reent.h>
#include <stdio.h>
@ -202,10 +198,15 @@ static char *rcsid = "$Id$";
This could be changed in the future should the _ldtoa_r code be
preferred over _dtoa_r. */
#define _NO_LONGDBL
#if defined WANT_IO_LONG_DBL && (LDBL_MANT_DIG > DBL_MANT_DIG)
#if defined _WANT_IO_LONG_DOUBLE && (LDBL_MANT_DIG > DBL_MANT_DIG)
#undef _NO_LONGDBL
#endif
#define _NO_LONGLONG
#if defined _WANT_IO_LONG_LONG && defined __GNUC__
# undef _NO_LONGLONG
#endif
/*
* Flush out all the vectors defined by the given uio,
* then reset it so that it can be reused.

View File

@ -103,8 +103,8 @@ Supporting OS subroutines required:
*/
#include <_ansi.h>
#include <newlib.h>
#include <reent.h>
#include <newlib.h>
#include <ctype.h>
#include <wctype.h>
#include <stdio.h>
@ -130,13 +130,13 @@ Supporting OS subroutines required:
This could be changed in the future should the _ldtoa_r code be
preferred over _dtoa_r. */
#define _NO_LONGDBL
#if defined WANT_IO_LONG_DBL && (LDBL_MANT_DIG > DBL_MANT_DIG)
#if defined _WANT_IO_LONG_DOUBLE && (LDBL_MANT_DIG > DBL_MANT_DIG)
#undef _NO_LONGDBL
extern _LONG_DOUBLE _strtold _PARAMS((char *s, char **sptr));
#endif
#define _NO_LONGLONG
#if defined WANT_PRINTF_LONG_LONG && defined __GNUC__
#if defined _WANT_IO_LONG_LONG && defined __GNUC__
# undef _NO_LONGLONG
#endif

View File

@ -8,6 +8,15 @@
/* Newlib version */
#undef _NEWLIB_VERSION
/* long long type support in IO functions like printf/scanf enabled */
#undef _WANT_IO_LONG_LONG
/* long double type support in IO functions like printf/scanf enabled */
#undef _WANT_IO_LONG_DOUBLE
/* Positional argument support in printf functions enabled. */
#undef _WANT_IO_POS_ARGS
/* Multibyte supported */
#undef _MB_CAPABLE