kumquat-buildroot/sources/gcc-uclibc-3.3-100-conf.patch
Manuel Novoa III 9168e83809 Enable building <arch>-linux-uclibc toolchains. Note that, due to config
issues for applications, we also create staging_dir/bin/<arch>-linux-*
symlinks which allows us to configure most apps with target=<arch>-linux.

gcc 3.3.2 libstdc++ now correctly identifies uclibc locale support.
There are still some issues (mainly related to wide char time strings
and wcsftime) to be addressed, but those are on hold until the uClibc
locale internals are reworked once again.

With the new stuff, we can also build gcc 2.95 and STLport again, although
the native gcc build for the target is failing.

Archs supported (some archs not yet tested):
 2.95 - i386, arm, mips*, powerpc.
 3.3.2 - Hopefull all for which uClibc has shared lib support.
2004-01-14 10:03:44 +00:00

1851 lines
58 KiB
Diff

diff -urN gcc-3.3.2/boehm-gc/config.sub gcc-3.3.2-uClibc/boehm-gc/config.sub
--- gcc-3.3.2/boehm-gc/config.sub 2002-02-11 22:37:53.000000000 -0600
+++ gcc-3.3.2-uClibc/boehm-gc/config.sub 2004-01-06 22:54:57.000000000 -0600
@@ -118,7 +118,7 @@
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
- nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*)
+ nto-qnx* | linux-gnu* | linux-uclibc* | storm-chaos* | os2-emx* | windows32-*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -1089,7 +1089,8 @@
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -mingw32* | -linux-gnu* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
diff -urN gcc-3.3.2/config.sub gcc-3.3.2-uClibc/config.sub
--- gcc-3.3.2/config.sub 2003-01-30 17:25:36.000000000 -0600
+++ gcc-3.3.2-uClibc/config.sub 2004-01-06 22:51:57.000000000 -0600
@@ -118,7 +118,7 @@
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
- nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+ nto-qnx* | linux-gnu* | linux-uclibc* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -1112,7 +1112,8 @@
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -mingw32* | -linux-gnu* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
diff -urN gcc-3.3.2/gcc/config/arm/linux-elf.h gcc-3.3.2-uClibc/gcc/config/arm/linux-elf.h
--- gcc-3.3.2/gcc/config/arm/linux-elf.h 2003-09-16 10:39:23.000000000 -0500
+++ gcc-3.3.2-uClibc/gcc/config/arm/linux-elf.h 2004-01-07 02:40:15.000000000 -0600
@@ -78,6 +78,18 @@
"%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
#undef LINK_SPEC
+#ifdef USE_UCLIBC
+#define LINK_SPEC "%{h*} %{version:-v} \
+ %{b} %{Wl,*:%*} \
+ %{static:-Bstatic} \
+ %{shared:-shared} \
+ %{symbolic:-Bsymbolic} \
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0} \
+ -X \
+ %{mbig-endian:-EB}" \
+ SUBTARGET_EXTRA_LINK_SPEC
+#else
#define LINK_SPEC "%{h*} %{version:-v} \
%{b} %{Wl,*:%*} \
%{static:-Bstatic} \
@@ -88,6 +100,7 @@
-X \
%{mbig-endian:-EB}" \
SUBTARGET_EXTRA_LINK_SPEC
+#endif
#define TARGET_OS_CPP_BUILTINS() \
do { \
diff -urN gcc-3.3.2/gcc/config/cris/linux.h gcc-3.3.2-uClibc/gcc/config/cris/linux.h
--- gcc-3.3.2/gcc/config/cris/linux.h 2003-03-10 21:01:35.000000000 -0600
+++ gcc-3.3.2-uClibc/gcc/config/cris/linux.h 2004-01-08 08:46:08.000000000 -0600
@@ -81,6 +81,25 @@
#undef CRIS_DEFAULT_CPU_VERSION
#define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
+#ifdef USE_UCLIBC
+
+#undef CRIS_SUBTARGET_VERSION
+#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
+
+#undef CRIS_LINK_SUBTARGET_SPEC
+#define CRIS_LINK_SUBTARGET_SPEC \
+ "-mcrislinux\
+ -rpath-link include/asm/../..%s\
+ %{shared} %{static}\
+ %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
+ %{!shared: \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \
+ %{!r:%{O2|O3: --gc-sections}}"
+
+#else /* USE_UCLIBC */
+
#undef CRIS_SUBTARGET_VERSION
#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
@@ -95,6 +114,8 @@
%{!shared:%{!static:%{rdynamic:-export-dynamic}}}\
%{!r:%{O2|O3: --gc-sections}}"
+#endif /* USE_UCLIBC */
+
/* Node: Run-time Target */
diff -urN gcc-3.3.2/gcc/config/cris/t-linux-uclibc gcc-3.3.2-uClibc/gcc/config/cris/t-linux-uclibc
--- gcc-3.3.2/gcc/config/cris/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
+++ gcc-3.3.2-uClibc/gcc/config/cris/t-linux-uclibc 2004-01-08 09:56:59.000000000 -0600
@@ -0,0 +1,3 @@
+T_CFLAGS = -DUSE_UCLIBC
+TARGET_LIBGCC2_CFLAGS += -fPIC
+CRTSTUFF_T_CFLAGS_S = $(TARGET_LIBGCC2_CFLAGS)
diff -urN gcc-3.3.2/gcc/config/i386/linux.h gcc-3.3.2-uClibc/gcc/config/i386/linux.h
--- gcc-3.3.2/gcc/config/i386/linux.h 2002-11-15 08:57:12.000000000 -0600
+++ gcc-3.3.2-uClibc/gcc/config/i386/linux.h 2004-01-06 22:30:58.000000000 -0600
@@ -136,6 +136,15 @@
%{static:-static}}}"
#endif
#else
+#if defined USE_UCLIBC
+#define LINK_SPEC "-m elf_i386 %{shared:-shared} \
+ %{!shared: \
+ %{!ibcs: \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
+ %{static:-static}}}"
+#else
#define LINK_SPEC "-m elf_i386 %{shared:-shared} \
%{!shared: \
%{!ibcs: \
@@ -144,6 +153,7 @@
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
%{static:-static}}}"
#endif
+#endif
/* A C statement (sans semicolon) to output to the stdio stream
FILE the assembler definition of uninitialized global DECL named
diff -urN gcc-3.3.2/gcc/config/mips/linux.h gcc-3.3.2-uClibc/gcc/config/mips/linux.h
--- gcc-3.3.2/gcc/config/mips/linux.h 2003-05-08 12:31:34.000000000 -0500
+++ gcc-3.3.2-uClibc/gcc/config/mips/linux.h 2004-01-08 01:59:52.000000000 -0600
@@ -175,6 +175,17 @@
/* Borrowed from sparc/linux.h */
#undef LINK_SPEC
+#ifdef USE_UCLIBC
+#define LINK_SPEC \
+ "%(endian_spec) \
+ %{shared:-shared} \
+ %{!shared: \
+ %{!ibcs: \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
+ %{static:-static}}}"
+#else
#define LINK_SPEC \
"%(endian_spec) \
%{shared:-shared} \
@@ -184,6 +195,7 @@
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
%{static:-static}}}"
+#endif
#undef SUBTARGET_ASM_SPEC
#define SUBTARGET_ASM_SPEC "\
diff -urN gcc-3.3.2/gcc/config/sh/linux.h gcc-3.3.2-uClibc/gcc/config/sh/linux.h
--- gcc-3.3.2/gcc/config/sh/linux.h 2003-09-16 10:39:23.000000000 -0500
+++ gcc-3.3.2-uClibc/gcc/config/sh/linux.h 2004-01-08 04:56:28.000000000 -0600
@@ -44,12 +44,21 @@
#undef SUBTARGET_LINK_EMUL_SUFFIX
#define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
#undef SUBTARGET_LINK_SPEC
+#ifdef USE_UCLIBC
+#define SUBTARGET_LINK_SPEC \
+ "%{shared:-shared} \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
+ %{static:-static}"
+#else
#define SUBTARGET_LINK_SPEC \
"%{shared:-shared} \
%{!static: \
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
%{static:-static}"
+#endif
/* The GNU C++ standard library requires that these macros be defined. */
#undef CPLUSPLUS_CPP_SPEC
diff -urN gcc-3.3.2/gcc/config/sh/t-linux-uclibc gcc-3.3.2-uClibc/gcc/config/sh/t-linux-uclibc
--- gcc-3.3.2/gcc/config/sh/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
+++ gcc-3.3.2-uClibc/gcc/config/sh/t-linux-uclibc 2004-01-08 06:05:54.000000000 -0600
@@ -0,0 +1,16 @@
+T_CFLAGS = -DUSE_UCLIBC
+
+# Don't run fixproto
+STMP_FIXPROTO =
+
+TARGET_LIBGCC2_CFLAGS = -fpic
+LIB1ASMFUNCS_CACHE = _ic_invalidate
+
+LIB2FUNCS_EXTRA=
+
+MULTILIB_OPTIONS= $(MULTILIB_ENDIAN) m3e/m4
+MULTILIB_DIRNAMES=
+MULTILIB_MATCHES =
+MULTILIB_EXCEPTIONS=
+
+EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o
diff -urN gcc-3.3.2/gcc/config/sh/t-sh64-uclibc gcc-3.3.2-uClibc/gcc/config/sh/t-sh64-uclibc
--- gcc-3.3.2/gcc/config/sh/t-sh64-uclibc 1969-12-31 18:00:00.000000000 -0600
+++ gcc-3.3.2-uClibc/gcc/config/sh/t-sh64-uclibc 2004-01-08 07:39:41.000000000 -0600
@@ -0,0 +1,13 @@
+EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o
+
+LIB1ASMFUNCS = \
+ _sdivsi3 _sdivsi3_i4 _udivsi3 _udivsi3_i4 _set_fpscr \
+ _shcompact_call_trampoline _shcompact_return_trampoline \
+ _shcompact_incoming_args _ic_invalidate _nested_trampoline \
+ _push_pop_shmedia_regs \
+ _udivdi3 _divdi3 _umoddi3 _moddi3
+
+MULTILIB_OPTIONS = $(MULTILIB_ENDIAN) m5-32media-nofpu/m5-compact/m5-compact-nofpu/m5-64media/m5-64media-nofpu
+MULTILIB_DIRNAMES= $(MULTILIB_ENDIAN) nofpu compact nofpu/compact media64 nofpu/media64
+MULTILIB_MATCHES=
+MULTILIB_EXCEPTIONS=
diff -urN gcc-3.3.2/gcc/config/t-linux-uclibc gcc-3.3.2-uClibc/gcc/config/t-linux-uclibc
--- gcc-3.3.2/gcc/config/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
+++ gcc-3.3.2-uClibc/gcc/config/t-linux-uclibc 2004-01-06 22:25:27.000000000 -0600
@@ -0,0 +1,23 @@
+T_CFLAGS = -DUSE_UCLIBC
+
+# Don't run fixproto
+STMP_FIXPROTO =
+
+# Compile crtbeginS.o and crtendS.o with pic.
+CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) -fPIC
+# Compile libgcc2.a with pic.
+TARGET_LIBGCC2_CFLAGS = -fPIC
+
+# Override t-slibgcc-elf-ver to export some libgcc symbols with
+# the symbol versions that glibc used.
+SHLIB_MAPFILES += $(srcdir)/config/libgcc-glibc.ver
+
+# Use unwind-dw2-fde-glibc
+#LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-glibc.c \
+# $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
+#LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c
+
+# Use unwind-dw2-fde
+LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \
+ $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
+LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h
diff -urN gcc-3.3.2/gcc/config.gcc gcc-3.3.2-uClibc/gcc/config.gcc
--- gcc-3.3.2/gcc/config.gcc 2003-10-01 14:07:01.000000000 -0500
+++ gcc-3.3.2-uClibc/gcc/config.gcc 2004-01-08 08:12:01.000000000 -0600
@@ -697,6 +697,17 @@
extra_parts=""
use_collect2=yes
;;
+arm*-*-linux-uclibc*) # ARM GNU/Linux with ELF - uClibc
+ tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/linux-gas.h arm/linux-elf.h"
+ tmake_file="t-slibgcc-elf-ver t-linux-uclibc arm/t-linux"
+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
+ gnu_ld=yes
+ case x${enable_threads} in
+ x | xyes | xpthreads | xposix)
+ thread_file='posix'
+ ;;
+ esac
+ ;;
arm*-*-linux*) # ARM GNU/Linux with ELF
tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/linux-gas.h arm/linux-elf.h"
tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
@@ -772,6 +783,10 @@
tmake_file="cris/t-cris cris/t-elfmulti"
gas=yes
;;
+cris-*-linux-uclibc*)
+ tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h"
+ tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux-uclibc"
+ ;;
cris-*-linux*)
tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h"
tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux"
@@ -1173,6 +1188,11 @@
thread_file='single'
fi
;;
+i[34567]86-*-linux*uclibc*) # Intel 80386's running GNU/Linux
+ # with ELF format using uClibc
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h"
+ tmake_file="t-slibgcc-elf-ver t-linux-uclibc i386/t-crtstuff"
+ ;;
i[34567]86-*-linux*) # Intel 80386's running GNU/Linux
# with ELF format using glibc 2
# aka GNU/Linux C library 6
@@ -1883,6 +1903,16 @@
tm_file="elfos.h ${tm_file} mips/netbsd.h"
tmake_file="${tmake_file} mips/t-netbsd"
;;
+mips*-*-linux-uclibc*) # Linux MIPS, either endian. uClibc
+ tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h"
+ case $machine in
+ mipsisa32*-*)
+ target_cpu_default="MASK_SOFT_FLOAT"
+ tm_defines="MIPS_ISA_DEFAULT=32"
+ ;;
+ esac
+ tmake_file="t-slibgcc-elf-ver t-linux-uclibc mips/t-linux"
+ ;;
mips*-*-linux*) # Linux MIPS, either endian.
tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h"
case $machine in
@@ -2129,6 +2159,11 @@
out_file=rs6000/rs6000.c
tmake_file="rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
;;
+powerpc-*-linux-uclibc*)
+ tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h"
+ out_file=rs6000/rs6000.c
+ tmake_file="rs6000/t-ppcos t-slibgcc-elf-ver t-linux-uclibc rs6000/t-ppccomm"
+ ;;
powerpc-*-linux*)
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h"
out_file=rs6000/rs6000.c
@@ -2313,10 +2348,18 @@
tmake_file="${tmake_file} sh/t-le"
;;
esac
- tmake_file="${tmake_file} sh/t-linux"
+ case $machine in
+ *-*-linux-uclibc*) tmake_file="${tmake_file} sh/t-linux-uclibc" ;;
+ *) tmake_file="${tmake_file} sh/t-linux" ;;
+ esac
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/elf.h sh/linux.h"
gas=yes gnu_ld=yes
case $machine in
+ sh64*-*-linux-uclibc*)
+ tmake_file="${tmake_file} sh/t-sh64-uclibc"
+ tm_file="${tm_file} sh/sh64.h"
+ extra_headers="shmedia.h ushmedia.h sshmedia.h"
+ ;;
sh64*)
tmake_file="${tmake_file} sh/t-sh64"
tm_file="${tm_file} sh/sh64.h"
diff -urN gcc-3.3.2/libstdc++-v3/aclocal.m4 gcc-3.3.2-uClibc/libstdc++-v3/aclocal.m4
--- gcc-3.3.2/libstdc++-v3/aclocal.m4 2003-09-10 22:08:35.000000000 -0500
+++ gcc-3.3.2-uClibc/libstdc++-v3/aclocal.m4 2004-01-09 01:53:14.000000000 -0600
@@ -1216,6 +1216,9 @@
dnl Default to "generic"
if test x$enable_clocale_flag = xno; then
case x${target_os} in
+ xlinux-uclibc*)
+ enable_clocale_flag=uclibc
+ ;;
xlinux* | xgnu*)
AC_EGREP_CPP([_GLIBCPP_ok], [
#include <features.h>
@@ -1339,6 +1342,41 @@
CTIME_CC=config/locale/generic/time_members.cc
CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
;;
+ xuclibc)
+ AC_MSG_RESULT(uclibc)
+
+ # Declare intention to use gettext, and add support for specific
+ # languages.
+ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
+ ALL_LINGUAS="de fr"
+
+ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
+ AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
+ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
+ USE_NLS=yes
+ fi
+ # Export the build objects.
+ for ling in $ALL_LINGUAS; do \
+ glibcpp_MOFILES="$glibcpp_MOFILES $ling.mo"; \
+ glibcpp_POFILES="$glibcpp_POFILES $ling.po"; \
+ done
+ AC_SUBST(glibcpp_MOFILES)
+ AC_SUBST(glibcpp_POFILES)
+
+ CLOCALE_H=config/locale/uclibc/c_locale.h
+ CLOCALE_CC=config/locale/uclibc/c_locale.cc
+ CCODECVT_H=config/locale/uclibc/codecvt_specializations.h
+ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
+ CCOLLATE_CC=config/locale/uclibc/collate_members.cc
+ CCTYPE_CC=config/locale/uclibc/ctype_members.cc
+ CMESSAGES_H=config/locale/uclibc/messages_members.h
+ CMESSAGES_CC=config/locale/uclibc/messages_members.cc
+ CMONEY_CC=config/locale/uclibc/monetary_members.cc
+ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
+ CTIME_H=config/locale/uclibc/time_members.h
+ CTIME_CC=config/locale/uclibc/time_members.cc
+ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
+ ;;
*)
echo "$enable_clocale is an unknown locale package" 1>&2
exit 1
diff -urN gcc-3.3.2/libstdc++-v3/configure gcc-3.3.2-uClibc/libstdc++-v3/configure
--- gcc-3.3.2/libstdc++-v3/configure 2003-09-10 22:08:35.000000000 -0500
+++ gcc-3.3.2-uClibc/libstdc++-v3/configure 2004-01-09 01:52:45.000000000 -0600
@@ -2011,6 +2011,11 @@
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
netbsd*)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
@@ -2997,6 +3002,9 @@
if test x$enable_clocale_flag = xno; then
case x${target_os} in
+ xlinux-uclibc*)
+ enable_clocale_flag=uclibc
+ ;;
xlinux* | xgnu*)
cat > conftest.$ac_ext <<EOF
#line 3003 "configure"
@@ -3183,6 +3191,70 @@
CTIME_CC=config/locale/generic/time_members.cc
CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
;;
+ xuclibc)
+ echo "$ac_t""uclibc" 1>&6
+
+ # Declare intention to use gettext, and add support for specific
+ # languages.
+ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
+ ALL_LINGUAS="de fr"
+
+ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
+ # Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3118: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_check_msgfmt'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$check_msgfmt"; then
+ ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_check_msgfmt="yes"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no"
+fi
+fi
+check_msgfmt="$ac_cv_prog_check_msgfmt"
+if test -n "$check_msgfmt"; then
+ echo "$ac_t""$check_msgfmt" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
+ USE_NLS=yes
+ fi
+ # Export the build objects.
+ for ling in $ALL_LINGUAS; do \
+ glibcpp_MOFILES="$glibcpp_MOFILES $ling.mo"; \
+ glibcpp_POFILES="$glibcpp_POFILES $ling.po"; \
+ done
+
+
+
+ CLOCALE_H=config/locale/uclibc/c_locale.h
+ CLOCALE_CC=config/locale/uclibc/c_locale.cc
+ CCODECVT_H=config/locale/uclibc/codecvt_specializations.h
+ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
+ CCOLLATE_CC=config/locale/uclibc/collate_members.cc
+ CCTYPE_CC=config/locale/uclibc/ctype_members.cc
+ CMESSAGES_H=config/locale/uclibc/messages_members.h
+ CMESSAGES_CC=config/locale/uclibc/messages_members.cc
+ CMONEY_CC=config/locale/uclibc/monetary_members.cc
+ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
+ CTIME_H=config/locale/uclibc/time_members.h
+ CTIME_CC=config/locale/uclibc/time_members.cc
+ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
+ ;;
*)
echo "$enable_clocale is an unknown locale package" 1>&2
exit 1
@@ -4125,94 +4197,1055 @@
echo "$ac_t""$DEBUG_FLAGS" 1>&6
-# Check for headers necessary for libsupc++ using dyn-string.c/cxa_demangle.c
-for ac_hdr in string.h stdlib.h
+# Check for headers necessary for libsupc++ using dyn-string.c/cxa_demangle.c
+for ac_hdr in string.h stdlib.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:4134: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4139 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+
+# No surprises, no surprises...
+if test $ATOMICITYH = cpu/generic ; then
+ echo "configure: warning: No native atomic operations are provided yet for this platform." 1>&2
+ if test $target_thread_file = single; then
+ echo "configure: warning: They cannot be faked when thread support is disabled." 1>&2
+ echo "configure: warning: Thread-safety of certain classes is not guaranteed." 1>&2
+ else
+ echo "configure: warning: They will be faked using a mutex." 1>&2
+ echo "configure: warning: Performance of certain classes will degrade as a result." 1>&2
+ fi
+fi
+
+
+if test -n "$with_cross_host" || test x"$build" != x"$host"; then
+
+ # We are being configured with some form of cross compiler.
+ GLIBCPP_IS_CROSS_COMPILING=true
+
+ # This lets us hard-code the functionality we know we'll have in the cross
+ # target environment. "Let" is a sugar-coated word placed on an especially
+ # dull and tedious hack, actually.
+ #
+ # Here's why GLIBCPP_CHECK_MATH_SUPPORT, and other autoconf macros
+ # that involve linking, can't be used:
+ # "cannot open sim-crt0.o"
+ # "cannot open crt0.o"
+ # etc. All this is because there currently exists no unified, consistent
+ # way for top level CC information to be passed down to target directories:
+ # newlib includes, newlib linking info, libgloss versus newlib crt0.o, etc.
+ # When all of that is done, all of this hokey, excessive AC_DEFINE junk for
+ # crosses can be removed.
+
+ # If Canadian cross, then don't pick up tools from the build directory.
+ # Used in GLIBCPP_EXPORT_INCLUDES (and nowhere else?).
+ if test -n "$with_cross_host" && test x"$build" != x"$with_cross_host"; then
+ CANADIAN=yes
+ else
+ CANADIAN=no
+ fi
+
+ # Construct crosses by hand, eliminating bits that need ld...
+ # GLIBCPP_CHECK_COMPILER_FEATURES
+ # GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT
+ # GLIBCPP_CHECK_MATH_SUPPORT
+
+ case "$target" in
+ *-uclibc*)
+ os_include_dir="os/uclibc"
+ for ac_hdr in nan.h ieeefp.h endian.h sys/isa_defs.h \
+ machine/endian.h machine/param.h sys/machine.h sys/types.h \
+ fp.h locale.h float.h inttypes.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:4225: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4230 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ SECTION_FLAGS='-ffunction-sections -fdata-sections'
+
+
+ # If we're not using GNU ld, then there's no point in even trying these
+ # tests. Check for that first. We should have already tested for gld
+ # by now (in libtool), but require it now just to be safe...
+ test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
+ test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
+
+
+ # The name set by libtool depends on the version of libtool. Shame on us
+ # for depending on an impl detail, but c'est la vie. Older versions used
+ # ac_cv_prog_gnu_ld, but now it's lt_cv_prog_gnu_ld, and is copied back on
+ # top of with_gnu_ld (which is also set by --with-gnu-ld, so that actually
+ # makes sense). We'll test with_gnu_ld everywhere else, so if that isn't
+ # set (hence we're using an older libtool), then set it.
+ if test x${with_gnu_ld+set} != xset; then
+ if test x${ac_cv_prog_gnu_ld+set} != xset; then
+ # We got through "ac_require(ac_prog_ld)" and still not set? Huh?
+ with_gnu_ld=no
+ else
+ with_gnu_ld=$ac_cv_prog_gnu_ld
+ fi
+ fi
+
+ # Start by getting the version number. I think the libtool test already
+ # does some of this, but throws away the result.
+
+ ldver=`$LD --version 2>/dev/null | head -1 | \
+ sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
+
+ glibcpp_gnu_ld_version=`echo $ldver | \
+ $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
+
+ # Set --gc-sections.
+ if test "$with_gnu_ld" = "notbroken"; then
+ # GNU ld it is! Joy and bunny rabbits!
+
+ # All these tests are for C++; save the language and the compiler flags.
+ # Need to do this so that g++ won't try to link in libstdc++
+ ac_test_CFLAGS="${CFLAGS+set}"
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS='-x c++ -Wl,--gc-sections'
+
+ # Check for -Wl,--gc-sections
+ # XXX This test is broken at the moment, as symbols required for
+ # linking are now in libsupc++ (not built yet.....). In addition,
+ # this test has cored on solaris in the past. In addition,
+ # --gc-sections doesn't really work at the moment (keeps on discarding
+ # used sections, first .eh_frame and now some of the glibc sections for
+ # iconv). Bzzzzt. Thanks for playing, maybe next time.
+ echo $ac_n "checking for ld that supports -Wl,--gc-sections""... $ac_c" 1>&6
+echo "configure:4313: checking for ld that supports -Wl,--gc-sections" >&5
+ if test "$cross_compiling" = yes; then
+ ac_sectionLDflags=yes
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4318 "configure"
+#include "confdefs.h"
+
+ int main(void)
+ {
+ try { throw 1; }
+ catch (...) { };
+ return 0;
+ }
+
+EOF
+if { (eval echo configure:4329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ ac_sectionLDflags=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_sectionLDflags=no
+fi
+rm -fr conftest*
+fi
+
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+ else
+ # this is the suspicious part
+ CFLAGS=''
+ fi
+ if test "$ac_sectionLDflags" = "yes"; then
+ SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
+ fi
+ echo "$ac_t""$ac_sectionLDflags" 1>&6
+ fi
+
+ # Set linker optimization flags.
+ if test x"$with_gnu_ld" = x"yes"; then
+ OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
+ fi
+
+
+
+
+
+ echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
+echo "configure:4363: checking for main in -lm" >&5
+ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lm $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4371 "configure"
+#include "confdefs.h"
+
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:4378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+ LIBS="-lm $LIBS"
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ for ac_func in nan copysignf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:4408: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4413 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:4436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"
+fi
+done
+
+
+ for ac_func in __signbit
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:4465: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4470 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:4493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+LIBMATHOBJS="$LIBMATHOBJS signbit.lo"
+fi
+done
+
+ for ac_func in __signbitf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:4521: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4526 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:4549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+LIBMATHOBJS="$LIBMATHOBJS signbitf.lo"
+fi
+done
+
+
+ if test x$ac_cv_func_copysignl = x"yes"; then
+ for ac_func in __signbitl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:4579: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4584 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:4607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+LIBMATHOBJS="$LIBMATHOBJS signbitl.lo"
+fi
+done
+
+ fi
+
+ if test -n "$LIBMATHOBJS"; then
+ need_libmath=yes
+ fi
+
+
+
+if test "$need_libmath" = yes; then
+ GLIBCPP_BUILD_LIBMATH_TRUE=
+ GLIBCPP_BUILD_LIBMATH_FALSE='#'
+else
+ GLIBCPP_BUILD_LIBMATH_TRUE='#'
+ GLIBCPP_BUILD_LIBMATH_FALSE=
+fi
+
+
+ enable_wchar_t=no
+
+ echo $ac_n "checking for mbstate_t""... $ac_c" 1>&6
+echo "configure:4652: checking for mbstate_t" >&5
+ cat > conftest.$ac_ext <<EOF
+#line 4654 "configure"
+#include "confdefs.h"
+#include <wchar.h>
+int main() {
+mbstate_t teststate;
+; return 0; }
+EOF
+if { (eval echo configure:4661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ have_mbstate_t=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ have_mbstate_t=no
+fi
+rm -f conftest*
+ echo "$ac_t""$have_mbstate_t" 1>&6
+ if test x"$have_mbstate_t" = xyes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_MBSTATE_T 1
+EOF
+
+ fi
+
+ for ac_hdr in wchar.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:4683: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4688 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4693: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+ ac_has_wchar_h=yes
+else
+ echo "$ac_t""no" 1>&6
+ac_has_wchar_h=no
+fi
+done
+
+ for ac_hdr in wctype.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:4724: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4729 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+ ac_has_wctype_h=yes
+else
+ echo "$ac_t""no" 1>&6
+ac_has_wctype_h=no
+fi
+done
+
+
+ if test x"$ac_has_wchar_h" = xyes &&
+ test x"$ac_has_wctype_h" = xyes &&
+ test x"$enable_c_mbchar" != xno; then
+
+ echo $ac_n "checking for WCHAR_MIN and WCHAR_MAX""... $ac_c" 1>&6
+echo "configure:4767: checking for WCHAR_MIN and WCHAR_MAX" >&5
+ cat > conftest.$ac_ext <<EOF
+#line 4769 "configure"
+#include "confdefs.h"
+#include <wchar.h>
+int main() {
+int i = WCHAR_MIN; int j = WCHAR_MAX;
+; return 0; }
+EOF
+if { (eval echo configure:4776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ has_wchar_minmax=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ has_wchar_minmax=no
+fi
+rm -f conftest*
+ echo "$ac_t""$has_wchar_minmax" 1>&6
+
+ echo $ac_n "checking for WEOF""... $ac_c" 1>&6
+echo "configure:4789: checking for WEOF" >&5
+ cat > conftest.$ac_ext <<EOF
+#line 4791 "configure"
+#include "confdefs.h"
+
+ #include <wchar.h>
+ #include <stddef.h>
+int main() {
+wint_t i = WEOF;
+; return 0; }
+EOF
+if { (eval echo configure:4800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ has_weof=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ has_weof=no
+fi
+rm -f conftest*
+ echo "$ac_t""$has_weof" 1>&6
+
+ ac_wfuncs=yes
+ for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:4816: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4821 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:4844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+\
+ ac_wfuncs=no
+fi
+done
+
+
+ for ac_func in btowc wctob fgetwc fgetws fputwc fputws fwide \
+ fwprintf fwscanf swprintf swscanf vfwprintf vfwscanf vswprintf vswscanf \
+ vwprintf vwscanf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
+ mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstof wcstol \
+ wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
+ wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:4879: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4884 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:4907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+\
+ ac_wfuncs=no
+fi
+done
+
+
+ echo $ac_n "checking for ISO C99 wchar_t support""... $ac_c" 1>&6
+echo "configure:4935: checking for ISO C99 wchar_t support" >&5
+ if test x"$has_weof" = xyes &&
+ test x"$has_wchar_minmax" = xyes &&
+ test x"$ac_wfuncs" = xyes; then
+ ac_isoC99_wchar_t=yes
+ else
+ ac_isoC99_wchar_t=no
+ fi
+ echo "$ac_t""$ac_isoC99_wchar_t" 1>&6
+
+ ac_safe=`echo "iconv.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for iconv.h""... $ac_c" 1>&6
+echo "configure:4947: checking for iconv.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4952 "configure"
+#include "confdefs.h"
+#include <iconv.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4957: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_has_iconv_h=yes
+else
+ echo "$ac_t""no" 1>&6
+ac_has_iconv_h=no
+fi
+
+ ac_safe=`echo "langinfo.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for langinfo.h""... $ac_c" 1>&6
+echo "configure:4981: checking for langinfo.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4986 "configure"
+#include "confdefs.h"
+#include <langinfo.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_has_langinfo_h=yes
+else
+ echo "$ac_t""no" 1>&6
+ac_has_langinfo_h=no
+fi
+
+
+ echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6
+echo "configure:5015: checking for iconv in -liconv" >&5
+ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-liconv $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 5023 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char iconv();
+
+int main() {
+iconv()
+; return 0; }
+EOF
+if { (eval echo configure:5034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ libiconv="-liconv"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS $libiconv"
+
+ for ac_func in iconv_open iconv_close iconv nl_langinfo
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4134: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:5060: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4139 "configure"
+#line 5065 "configure"
#include "confdefs.h"
-#include <$ac_hdr>
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
+if { (eval echo configure:5088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
+ eval "ac_cv_func_$ac_func=yes"
else
- echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
+#define $ac_tr_func 1
EOF
-
+ \
+ ac_XPG2funcs=yes
else
echo "$ac_t""no" 1>&6
+ac_XPG2funcs=no
fi
done
+
+ LIBS="$ac_save_LIBS"
+
+ echo $ac_n "checking for XPG2 wchar_t support""... $ac_c" 1>&6
+echo "configure:5118: checking for XPG2 wchar_t support" >&5
+ if test x"$ac_has_iconv_h" = xyes &&
+ test x"$ac_has_langinfo_h" = xyes &&
+ test x"$ac_XPG2funcs" = xyes; then
+ ac_XPG2_wchar_t=yes
+ else
+ ac_XPG2_wchar_t=no
+ fi
+ echo "$ac_t""$ac_XPG2_wchar_t" 1>&6
+
+ if test x"$ac_isoC99_wchar_t" = xyes &&
+ test x"$ac_XPG2_wchar_t" = xyes; then
+ cat >> confdefs.h <<\EOF
+#define _GLIBCPP_USE_WCHAR_T 1
+EOF
-# No surprises, no surprises...
-if test $ATOMICITYH = cpu/generic ; then
- echo "configure: warning: No native atomic operations are provided yet for this platform." 1>&2
- if test $target_thread_file = single; then
- echo "configure: warning: They cannot be faked when thread support is disabled." 1>&2
- echo "configure: warning: Thread-safety of certain classes is not guaranteed." 1>&2
- else
- echo "configure: warning: They will be faked using a mutex." 1>&2
- echo "configure: warning: Performance of certain classes will degrade as a result." 1>&2
+ enable_wchar_t=yes
+ fi
fi
-fi
+ echo $ac_n "checking for enabled wchar_t specializations""... $ac_c" 1>&6
+echo "configure:5138: checking for enabled wchar_t specializations" >&5
+ echo "$ac_t""$enable_wchar_t" 1>&6
+
+if test "$enable_wchar_t" = yes; then
+ GLIBCPP_TEST_WCHAR_T_TRUE=
+ GLIBCPP_TEST_WCHAR_T_FALSE='#'
+else
+ GLIBCPP_TEST_WCHAR_T_TRUE='#'
+ GLIBCPP_TEST_WCHAR_T_FALSE=
+fi
-if test -n "$with_cross_host" || test x"$build" != x"$host"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_COPYSIGN 1
+EOF
- # We are being configured with some form of cross compiler.
- GLIBCPP_IS_CROSS_COMPILING=true
+ cat >> confdefs.h <<\EOF
+#define HAVE_FINITE 1
+EOF
- # This lets us hard-code the functionality we know we'll have in the cross
- # target environment. "Let" is a sugar-coated word placed on an especially
- # dull and tedious hack, actually.
- #
- # Here's why GLIBCPP_CHECK_MATH_SUPPORT, and other autoconf macros
- # that involve linking, can't be used:
- # "cannot open sim-crt0.o"
- # "cannot open crt0.o"
- # etc. All this is because there currently exists no unified, consistent
- # way for top level CC information to be passed down to target directories:
- # newlib includes, newlib linking info, libgloss versus newlib crt0.o, etc.
- # When all of that is done, all of this hokey, excessive AC_DEFINE junk for
- # crosses can be removed.
+ cat >> confdefs.h <<\EOF
+#define HAVE_FINITEF 1
+EOF
- # If Canadian cross, then don't pick up tools from the build directory.
- # Used in GLIBCPP_EXPORT_INCLUDES (and nowhere else?).
- if test -n "$with_cross_host" && test x"$build" != x"$with_cross_host"; then
- CANADIAN=yes
- else
- CANADIAN=no
- fi
+ cat >> confdefs.h <<\EOF
+#define HAVE_ISINF 1
+EOF
- # Construct crosses by hand, eliminating bits that need ld...
- # GLIBCPP_CHECK_COMPILER_FEATURES
- # GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT
- # GLIBCPP_CHECK_MATH_SUPPORT
+ cat >> confdefs.h <<\EOF
+#define HAVE_ISINFF 1
+EOF
- case "$target" in
+ cat >> confdefs.h <<\EOF
+#define HAVE_ISNAN 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_ISNANF 1
+EOF
+ ;;
*-linux*)
os_include_dir="os/gnu-linux"
for ac_hdr in nan.h ieeefp.h endian.h sys/isa_defs.h \
@@ -5163,10 +6196,6 @@
EOF
cat >> confdefs.h <<\EOF
-#define HAVE_FREXPF 1
-EOF
-
- cat >> confdefs.h <<\EOF
#define HAVE_HYPOTF 1
EOF
@@ -10293,103 +11322,6 @@
#define HAVE_MMAP 1
EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_ACOSF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_ASINF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_ATAN2F 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_ATANF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_CEILF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_COPYSIGN 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_COPYSIGNF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_COSF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_COSHF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_EXPF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_FABSF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_FLOORF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_FMODF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_FREXPF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_LDEXPF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_LOG10F 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_LOGF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_MODFF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_POWF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_SINF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_SINHF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_SQRTF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_TANF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_TANHF 1
-EOF
-
;;
esac
diff -urN gcc-3.3.2/libstdc++-v3/configure.in gcc-3.3.2-uClibc/libstdc++-v3/configure.in
--- gcc-3.3.2/libstdc++-v3/configure.in 2003-07-17 13:32:00.000000000 -0500
+++ gcc-3.3.2-uClibc/libstdc++-v3/configure.in 2004-01-08 21:36:43.000000000 -0600
@@ -117,6 +117,35 @@
# GLIBCPP_CHECK_MATH_SUPPORT
case "$target" in
+ *-uclibc*)
+ os_include_dir="os/uclibc"
+ AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
+ machine/endian.h machine/param.h sys/machine.h sys/types.h \
+ fp.h locale.h float.h inttypes.h])
+ SECTION_FLAGS='-ffunction-sections -fdata-sections'
+ AC_SUBST(SECTION_FLAGS)
+ GLIBCPP_CHECK_LINKER_FEATURES
+ GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
+ GLIBCPP_CHECK_WCHAR_T_SUPPORT
+ AC_DEFINE(HAVE_COPYSIGN)
+ #AC_DEFINE(HAVE_COPYSIGNF)
+ AC_DEFINE(HAVE_FINITE)
+ AC_DEFINE(HAVE_FINITEF)
+ #AC_DEFINE(HAVE_FREXPF)
+ #AC_DEFINE(HAVE_HYPOTF)
+ AC_DEFINE(HAVE_ISINF)
+ AC_DEFINE(HAVE_ISINFF)
+ AC_DEFINE(HAVE_ISNAN)
+ AC_DEFINE(HAVE_ISNANF)
+ #AC_DEFINE(HAVE_SINCOS)
+ #AC_DEFINE(HAVE_SINCOSF)
+ #if test x"long_double_math_on_this_cpu" = x"yes"; then
+ #AC_DEFINE(HAVE_FINITEL)
+ #AC_DEFINE(HAVE_HYPOTL)
+ #AC_DEFINE(HAVE_ISINFL)
+ #AC_DEFINE(HAVE_ISNANL)
+ #fi
+ ;;
*-linux*)
os_include_dir="os/gnu-linux"
AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
diff -urN gcc-3.3.2/libstdc++-v3/include/c_std/std_cstdlib.h gcc-3.3.2-uClibc/libstdc++-v3/include/c_std/std_cstdlib.h
--- gcc-3.3.2/libstdc++-v3/include/c_std/std_cstdlib.h 2003-04-18 05:08:05.000000000 -0500
+++ gcc-3.3.2-uClibc/libstdc++-v3/include/c_std/std_cstdlib.h 2004-01-06 18:22:00.000000000 -0600
@@ -101,9 +101,11 @@
using ::labs;
using ::ldiv;
using ::malloc;
+#if _GLIBCPP_USE_WCHAR_T
using ::mblen;
using ::mbstowcs;
using ::mbtowc;
+#endif
using ::qsort;
using ::rand;
using ::realloc;
@@ -112,8 +114,10 @@
using ::strtol;
using ::strtoul;
using ::system;
+#if _GLIBCPP_USE_WCHAR_T
using ::wcstombs;
using ::wctomb;
+#endif
inline long
abs(long __i) { return labs(__i); }
diff -urN gcc-3.3.2/libstdc++-v3/include/c_std/std_cwchar.h gcc-3.3.2-uClibc/libstdc++-v3/include/c_std/std_cwchar.h
--- gcc-3.3.2/libstdc++-v3/include/c_std/std_cwchar.h 2003-04-18 05:08:05.000000000 -0500
+++ gcc-3.3.2-uClibc/libstdc++-v3/include/c_std/std_cwchar.h 2004-01-06 18:22:00.000000000 -0600
@@ -165,7 +165,9 @@
using ::wcscoll;
using ::wcscpy;
using ::wcscspn;
+#ifdef HAVE_WCSFTIME
using ::wcsftime;
+#endif
using ::wcslen;
using ::wcsncat;
using ::wcsncmp;
diff -urN gcc-3.3.2/ltconfig gcc-3.3.2-uClibc/ltconfig
--- gcc-3.3.2/ltconfig 2003-02-19 20:10:02.000000000 -0600
+++ gcc-3.3.2-uClibc/ltconfig 2004-01-06 22:16:18.000000000 -0600
@@ -603,6 +603,7 @@
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
case $host_os in
linux-gnu*) ;;
+linux-uclibc*) ;;
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
esac
@@ -1247,6 +1248,24 @@
dynamic_linker='GNU/Linux ld.so'
;;
+linux-uclibc*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ # Note: copied from linux-gnu, and may not be appropriate.
+ hardcode_into_libs=yes
+ # Assume using the uClibc dynamic linker.
+ dynamic_linker="uClibc ld.so"
+ ;;
+
netbsd*)
need_lib_prefix=no
need_version=no