]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
Ich hab mal ueber die Feiertage nen kleinen Rewrite von dem Installersystem gemacht.
authorms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Mon, 25 Dec 2006 20:53:27 +0000 (20:53 +0000)
committerms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Mon, 25 Dec 2006 20:53:27 +0000 (20:53 +0000)
Ich hoffe somit mal das locale-Problem in den Griff zu bekommen.

git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@369 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

32 files changed:
config/rootfiles/common/GeoIP [moved from config/rootfiles/common/Geo-IP-PurePerl with 89% similarity]
config/rootfiles/common/IO-Stringy [new file with mode: 0644]
config/rootfiles/common/bridge-utils [new file with mode: 0644]
config/rootfiles/common/hddtemp [new file with mode: 0644]
config/rootfiles/common/htop [new file with mode: 0644]
config/rootfiles/common/iftop [new file with mode: 0644]
config/rootfiles/common/ipp2p [new file with mode: 0644]
config/rootfiles/common/iptraf [new file with mode: 0644]
config/rootfiles/common/l7-protocols [new file with mode: 0644]
config/rootfiles/common/mbmon [new file with mode: 0644]
config/rootfiles/common/yasuc [new file with mode: 0644]
config/uClibc/buildroot.config-i586
config/uClibc/locales.txt
config/uClibc/uClibc.config-i586
doc/packages-list.txt
lfs/binutils
lfs/gcc
lfs/kudzu
lfs/linux-libc-header
lfs/newt
lfs/pxe
lfs/uClibc
lfs/util-linux
make.sh
src/install+setup/install/Makefile
src/install+setup/libsmooth/Makefile
src/patches/binutils-uclibc-conf.patch [new file with mode: 0644]
src/patches/binutils-uclibc-libtool-conf.patch [new file with mode: 0644]
src/patches/gcc-libstdc++-pic.patch [new file with mode: 0644]
src/patches/gcc-sdk-libstdc++-includes.patch [new file with mode: 0644]
src/patches/gcc-uclibc-conf.patch [new file with mode: 0644]
src/patches/gcc-uclibc-locale.patch [new file with mode: 0644]

similarity index 89%
rename from config/rootfiles/common/Geo-IP-PurePerl
rename to config/rootfiles/common/GeoIP
index 5841f39d51d97606398efa2a3ac9f8f8693d8404..1552d88bd93f653cd2e52b5b88eaf04364e0787e 100644 (file)
@@ -6,7 +6,7 @@ usr/lib/perl5/site_perl/5.8.8/Geo/IP/PurePerl.pm
 #usr/lib/perl5/site_perl/5.8.8/i586-linux/auto/Geo/IP
 #usr/lib/perl5/site_perl/5.8.8/i586-linux/auto/Geo/IP/PurePerl
 #usr/lib/perl5/site_perl/5.8.8/i586-linux/auto/Geo/IP/PurePerl/.packlist
-#usr/local/share/GeoIP
-#usr/local/share/GeoIP/GeoIP.dat
+usr/local/share/GeoIP
+usr/local/share/GeoIP/GeoIP.dat
 #usr/share/man/man1/geoip-lookup.1
 #usr/share/man/man3/Geo::IP::PurePerl.3
diff --git a/config/rootfiles/common/IO-Stringy b/config/rootfiles/common/IO-Stringy
new file mode 100644 (file)
index 0000000..6cc6909
--- /dev/null
@@ -0,0 +1,20 @@
+#usr/lib/perl5/site_perl/5.8.8/IO
+usr/lib/perl5/site_perl/5.8.8/IO/AtomicFile.pm
+usr/lib/perl5/site_perl/5.8.8/IO/InnerFile.pm
+usr/lib/perl5/site_perl/5.8.8/IO/Lines.pm
+usr/lib/perl5/site_perl/5.8.8/IO/Scalar.pm
+usr/lib/perl5/site_perl/5.8.8/IO/ScalarArray.pm
+usr/lib/perl5/site_perl/5.8.8/IO/Stringy.pm
+usr/lib/perl5/site_perl/5.8.8/IO/Wrap.pm
+usr/lib/perl5/site_perl/5.8.8/IO/WrapTie.pm
+#usr/lib/perl5/site_perl/5.8.8/i586-linux/auto/IO
+#usr/lib/perl5/site_perl/5.8.8/i586-linux/auto/IO/Stringy
+#usr/lib/perl5/site_perl/5.8.8/i586-linux/auto/IO/Stringy/.packlist
+#usr/share/man/man3/IO::AtomicFile.3
+#usr/share/man/man3/IO::InnerFile.3
+#usr/share/man/man3/IO::Lines.3
+#usr/share/man/man3/IO::Scalar.3
+#usr/share/man/man3/IO::ScalarArray.3
+#usr/share/man/man3/IO::Stringy.3
+#usr/share/man/man3/IO::Wrap.3
+#usr/share/man/man3/IO::WrapTie.3
diff --git a/config/rootfiles/common/bridge-utils b/config/rootfiles/common/bridge-utils
new file mode 100644 (file)
index 0000000..f5eb131
--- /dev/null
@@ -0,0 +1,4 @@
+#usr/include/libbridge.h
+usr/lib/libbridge.a
+#usr/man/man8/brctl.8
+usr/sbin/brctl
diff --git a/config/rootfiles/common/hddtemp b/config/rootfiles/common/hddtemp
new file mode 100644 (file)
index 0000000..b6407a9
--- /dev/null
@@ -0,0 +1,5 @@
+etc/hddtemp.db
+#usr/man/man8/hddtemp.8
+usr/sbin/hddtemp
+#usr/share/locale/fr/LC_MESSAGES/hddtemp.mo
+#usr/share/locale/ru/LC_MESSAGES/hddtemp.mo
diff --git a/config/rootfiles/common/htop b/config/rootfiles/common/htop
new file mode 100644 (file)
index 0000000..ee1b04a
--- /dev/null
@@ -0,0 +1,6 @@
+usr/bin/htop
+#usr/man/man1/htop.1
+#usr/share/applications
+#usr/share/applications/htop.desktop
+#usr/share/pixmaps
+#usr/share/pixmaps/htop.png
diff --git a/config/rootfiles/common/iftop b/config/rootfiles/common/iftop
new file mode 100644 (file)
index 0000000..03b1118
--- /dev/null
@@ -0,0 +1,2 @@
+#usr/man/man8/iftop.8
+usr/sbin/iftop
diff --git a/config/rootfiles/common/ipp2p b/config/rootfiles/common/ipp2p
new file mode 100644 (file)
index 0000000..887eea8
--- /dev/null
@@ -0,0 +1,3 @@
+lib/modules/2.6.16/kernel/net/ipv4/netfilter/ipt_ipp2p.ko
+lib/iptables/libipt_ipp2p.o
+lib/modules/2.6.16-smp/kernel/net/ipv4/netfilter/ipt_ipp2p.ko
diff --git a/config/rootfiles/common/iptraf b/config/rootfiles/common/iptraf
new file mode 100644 (file)
index 0000000..1ffefa8
--- /dev/null
@@ -0,0 +1,6 @@
+usr/bin/iptraf
+#usr/bin/rvnamed
+#var/local/iptraf
+#var/local/iptraf/version
+var/log/iptraf
+var/run/iptraf
diff --git a/config/rootfiles/common/l7-protocols b/config/rootfiles/common/l7-protocols
new file mode 100644 (file)
index 0000000..835232d
--- /dev/null
@@ -0,0 +1,267 @@
+#etc/l7-protocols
+#etc/l7-protocols/CHANGELOG
+#etc/l7-protocols/HOWTO
+#etc/l7-protocols/LICENSE
+#etc/l7-protocols/Makefile
+#etc/l7-protocols/README
+#etc/l7-protocols/WANTED
+#etc/l7-protocols/extra
+#etc/l7-protocols/extra/README
+#etc/l7-protocols/extra/audiogalaxy.pat
+#etc/l7-protocols/extra/http-dap.pat
+#etc/l7-protocols/extra/http-freshdownload.pat
+#etc/l7-protocols/extra/http-itunes.pat
+#etc/l7-protocols/extra/httpaudio.pat
+#etc/l7-protocols/extra/httpcachehit.pat
+#etc/l7-protocols/extra/httpcachemiss.pat
+#etc/l7-protocols/extra/httpvideo.pat
+#etc/l7-protocols/extra/pressplay.pat
+#etc/l7-protocols/extra/quicktime.pat
+#etc/l7-protocols/extra/snmp-mon.pat
+#etc/l7-protocols/extra/snmp-trap.pat
+#etc/l7-protocols/file_types
+#etc/l7-protocols/file_types/README
+#etc/l7-protocols/file_types/exe.pat
+#etc/l7-protocols/file_types/flash.pat
+#etc/l7-protocols/file_types/gif.pat
+#etc/l7-protocols/file_types/html.pat
+#etc/l7-protocols/file_types/jpeg.pat
+#etc/l7-protocols/file_types/ogg.pat
+#etc/l7-protocols/file_types/pdf.pat
+#etc/l7-protocols/file_types/perl.pat
+#etc/l7-protocols/file_types/postscript.pat
+#etc/l7-protocols/file_types/rar.pat
+#etc/l7-protocols/file_types/rpm.pat
+#etc/l7-protocols/file_types/rtf.pat
+#etc/l7-protocols/file_types/tar.pat
+#etc/l7-protocols/file_types/zip.pat
+#etc/l7-protocols/groups.sh
+#etc/l7-protocols/l7-protocols.spec
+#etc/l7-protocols/malware
+#etc/l7-protocols/malware/README
+#etc/l7-protocols/malware/code_red.pat
+#etc/l7-protocols/malware/nimda.pat
+etc/l7-protocols/protocols
+#etc/l7-protocols/protocols/100bao.pat
+#etc/l7-protocols/protocols/aim.pat
+#etc/l7-protocols/protocols/aimwebcontent.pat
+#etc/l7-protocols/protocols/applejuice.pat
+#etc/l7-protocols/protocols/ares.pat
+#etc/l7-protocols/protocols/battlefield1942.pat
+#etc/l7-protocols/protocols/battlefield2.pat
+#etc/l7-protocols/protocols/bgp.pat
+#etc/l7-protocols/protocols/biff.pat
+#etc/l7-protocols/protocols/bittorrent.pat
+#etc/l7-protocols/protocols/ciscovpn.pat
+#etc/l7-protocols/protocols/citrix.pat
+#etc/l7-protocols/protocols/counterstrike-source.pat
+#etc/l7-protocols/protocols/cvs.pat
+#etc/l7-protocols/protocols/dayofdefeat-source.pat
+#etc/l7-protocols/protocols/dhcp.pat
+#etc/l7-protocols/protocols/directconnect.pat
+#etc/l7-protocols/protocols/dns.pat
+#etc/l7-protocols/protocols/doom3.pat
+#etc/l7-protocols/protocols/edonkey.pat
+#etc/l7-protocols/protocols/fasttrack.pat
+#etc/l7-protocols/protocols/finger.pat
+#etc/l7-protocols/protocols/freenet.pat
+#etc/l7-protocols/protocols/ftp.pat
+#etc/l7-protocols/protocols/gkrellm.pat
+#etc/l7-protocols/protocols/gnucleuslan.pat
+#etc/l7-protocols/protocols/gnutella.pat
+#etc/l7-protocols/protocols/goboogy.pat
+#etc/l7-protocols/protocols/gopher.pat
+#etc/l7-protocols/protocols/h323.pat
+#etc/l7-protocols/protocols/halflife2-deathmatch.pat
+#etc/l7-protocols/protocols/hddtemp.pat
+#etc/l7-protocols/protocols/hotline.pat
+#etc/l7-protocols/protocols/http-rtsp.pat
+#etc/l7-protocols/protocols/http.pat
+#etc/l7-protocols/protocols/ident.pat
+#etc/l7-protocols/protocols/imap.pat
+#etc/l7-protocols/protocols/imesh.pat
+#etc/l7-protocols/protocols/ipp.pat
+#etc/l7-protocols/protocols/irc.pat
+#etc/l7-protocols/protocols/jabber.pat
+#etc/l7-protocols/protocols/kugoo.pat
+#etc/l7-protocols/protocols/live365.pat
+#etc/l7-protocols/protocols/lpd.pat
+#etc/l7-protocols/protocols/mohaa.pat
+#etc/l7-protocols/protocols/msn-filetransfer.pat
+#etc/l7-protocols/protocols/msnmessenger.pat
+#etc/l7-protocols/protocols/mute.pat
+#etc/l7-protocols/protocols/napster.pat
+#etc/l7-protocols/protocols/nbns.pat
+#etc/l7-protocols/protocols/ncp.pat
+#etc/l7-protocols/protocols/netbios.pat
+#etc/l7-protocols/protocols/nntp.pat
+#etc/l7-protocols/protocols/ntp.pat
+#etc/l7-protocols/protocols/openft.pat
+#etc/l7-protocols/protocols/pcanywhere.pat
+#etc/l7-protocols/protocols/poco.pat
+#etc/l7-protocols/protocols/pop3.pat
+#etc/l7-protocols/protocols/qq.pat
+#etc/l7-protocols/protocols/quake-halflife.pat
+#etc/l7-protocols/protocols/quake1.pat
+#etc/l7-protocols/protocols/rdp.pat
+#etc/l7-protocols/protocols/rlogin.pat
+#etc/l7-protocols/protocols/rtsp.pat
+#etc/l7-protocols/protocols/shoutcast.pat
+#etc/l7-protocols/protocols/sip.pat
+#etc/l7-protocols/protocols/skypeout.pat
+#etc/l7-protocols/protocols/skypetoskype.pat
+#etc/l7-protocols/protocols/smb.pat
+#etc/l7-protocols/protocols/smtp.pat
+#etc/l7-protocols/protocols/snmp.pat
+#etc/l7-protocols/protocols/socks.pat
+#etc/l7-protocols/protocols/soribada.pat
+#etc/l7-protocols/protocols/soulseek.pat
+#etc/l7-protocols/protocols/ssdp.pat
+#etc/l7-protocols/protocols/ssh.pat
+#etc/l7-protocols/protocols/ssl.pat
+#etc/l7-protocols/protocols/subspace.pat
+#etc/l7-protocols/protocols/subversion.pat
+#etc/l7-protocols/protocols/teamspeak.pat
+#etc/l7-protocols/protocols/telnet.pat
+#etc/l7-protocols/protocols/tesla.pat
+#etc/l7-protocols/protocols/testing.pat
+#etc/l7-protocols/protocols/tftp.pat
+#etc/l7-protocols/protocols/thecircle.pat
+#etc/l7-protocols/protocols/tls.pat
+#etc/l7-protocols/protocols/tsp.pat
+#etc/l7-protocols/protocols/unknown.pat
+#etc/l7-protocols/protocols/uucp.pat
+#etc/l7-protocols/protocols/validcertssl.pat
+#etc/l7-protocols/protocols/ventrilo.pat
+#etc/l7-protocols/protocols/vnc.pat
+#etc/l7-protocols/protocols/whois.pat
+#etc/l7-protocols/protocols/worldofwarcraft.pat
+#etc/l7-protocols/protocols/x11.pat
+#etc/l7-protocols/protocols/xboxlive.pat
+#etc/l7-protocols/protocols/xunlei.pat
+#etc/l7-protocols/protocols/yahoo.pat
+#etc/l7-protocols/protocols/zmaap.pat
+#etc/l7-protocols/testing
+#etc/l7-protocols/testing/Makefile
+#etc/l7-protocols/testing/README
+#etc/l7-protocols/testing/add.sh
+#etc/l7-protocols/testing/data
+#etc/l7-protocols/testing/data/aim-1
+#etc/l7-protocols/testing/data/aim-2
+#etc/l7-protocols/testing/data/aim-3
+#etc/l7-protocols/testing/data/aim-4
+#etc/l7-protocols/testing/data/aim-5
+#etc/l7-protocols/testing/data/aim-6
+#etc/l7-protocols/testing/data/bittorrent-a-1
+#etc/l7-protocols/testing/data/bittorrent-a-2
+#etc/l7-protocols/testing/data/bittorrent-a-3
+#etc/l7-protocols/testing/data/bittorrent-a-4
+#etc/l7-protocols/testing/data/bittorrent-b-1
+#etc/l7-protocols/testing/data/bittorrent-b-2
+#etc/l7-protocols/testing/data/bittorrent-b-3
+#etc/l7-protocols/testing/data/bittorrent-b-4
+#etc/l7-protocols/testing/data/dce-rpc-spam-a-1
+#etc/l7-protocols/testing/data/dce-rpc-spam-b-1
+#etc/l7-protocols/testing/data/dns-1
+#etc/l7-protocols/testing/data/dns-2
+#etc/l7-protocols/testing/data/edonkey-tcp-a-1
+#etc/l7-protocols/testing/data/edonkey-tcp-a-2
+#etc/l7-protocols/testing/data/edonkey-tcp-b-1
+#etc/l7-protocols/testing/data/edonkey-tcp-b-2
+#etc/l7-protocols/testing/data/edonkey-tcp-b-3
+#etc/l7-protocols/testing/data/edonkey-tcp-b-4
+#etc/l7-protocols/testing/data/edonkey-tcp-b-5
+#etc/l7-protocols/testing/data/edonkey-tcp-b-6
+#etc/l7-protocols/testing/data/edonkey-udp-a-1
+#etc/l7-protocols/testing/data/edonkey-udp-b-1
+#etc/l7-protocols/testing/data/ftp-1
+#etc/l7-protocols/testing/data/ftp-2
+#etc/l7-protocols/testing/data/ftp-3
+#etc/l7-protocols/testing/data/ftp-4
+#etc/l7-protocols/testing/data/ftp-5
+#etc/l7-protocols/testing/data/gnutella-1
+#etc/l7-protocols/testing/data/gnutella-2
+#etc/l7-protocols/testing/data/gnutella-3
+#etc/l7-protocols/testing/data/gnutella-connect-1
+#etc/l7-protocols/testing/data/gnutella-connect-2
+#etc/l7-protocols/testing/data/gnutella-udp-a-1
+#etc/l7-protocols/testing/data/gnutella-udp-b-1
+#etc/l7-protocols/testing/data/gnutella-udp-c-1
+#etc/l7-protocols/testing/data/http-digg-304-1
+#etc/l7-protocols/testing/data/http-digg-304-2
+#etc/l7-protocols/testing/data/http-wunderground-1
+#etc/l7-protocols/testing/data/http-wunderground-2
+#etc/l7-protocols/testing/data/imap-1
+#etc/l7-protocols/testing/data/imap-2
+#etc/l7-protocols/testing/data/imap-3
+#etc/l7-protocols/testing/data/imap-4
+#etc/l7-protocols/testing/data/imap-5
+#etc/l7-protocols/testing/data/imap-6
+#etc/l7-protocols/testing/data/ipp-1
+#etc/l7-protocols/testing/data/jabber-1
+#etc/l7-protocols/testing/data/jabber-2
+#etc/l7-protocols/testing/data/jabber-3
+#etc/l7-protocols/testing/data/jabber-4
+#etc/l7-protocols/testing/data/jabber-5
+#etc/l7-protocols/testing/data/jabber-6
+#etc/l7-protocols/testing/data/skypeout-a-1
+#etc/l7-protocols/testing/data/skypeout-a-2
+#etc/l7-protocols/testing/data/skypeout-a-3
+#etc/l7-protocols/testing/data/skypeout-a-4
+#etc/l7-protocols/testing/data/skypeout-a-5
+#etc/l7-protocols/testing/data/skypeout-a-6
+#etc/l7-protocols/testing/data/skypeout-b-1
+#etc/l7-protocols/testing/data/skypeout-b-2
+#etc/l7-protocols/testing/data/skypeout-b-3
+#etc/l7-protocols/testing/data/skypeout-b-4
+#etc/l7-protocols/testing/data/skypeout-b-5
+#etc/l7-protocols/testing/data/skypeout-b-6
+#etc/l7-protocols/testing/data/skypeout-b-7
+#etc/l7-protocols/testing/data/skypeout-b-8
+#etc/l7-protocols/testing/data/skypeout-b-9
+#etc/l7-protocols/testing/data/skypeout-c-1
+#etc/l7-protocols/testing/data/skypeout-c-2
+#etc/l7-protocols/testing/data/skypeout-c-3
+#etc/l7-protocols/testing/data/skypeout-c-4
+#etc/l7-protocols/testing/data/skypeout-c-5
+#etc/l7-protocols/testing/data/skypeout-c-6
+#etc/l7-protocols/testing/data/skypeout-c-7
+#etc/l7-protocols/testing/data/skypeout-c-8
+#etc/l7-protocols/testing/data/skypeout-c-9
+#etc/l7-protocols/testing/data/ssdp-1
+#etc/l7-protocols/testing/data/ssh-1
+#etc/l7-protocols/testing/data/ssh-2
+#etc/l7-protocols/testing/data/ssh-3
+#etc/l7-protocols/testing/data/ssh-4
+#etc/l7-protocols/testing/data/ssh-5
+#etc/l7-protocols/testing/data/ssh-6
+#etc/l7-protocols/testing/data/validcertssl-1
+#etc/l7-protocols/testing/data/validcertssl-2
+#etc/l7-protocols/testing/data/validcertssl-3
+#etc/l7-protocols/testing/data/validcertssl-4
+#etc/l7-protocols/testing/data/validcertssl-5
+#etc/l7-protocols/testing/data/validcertssl-6
+#etc/l7-protocols/testing/data/winmx-1
+#etc/l7-protocols/testing/data/winmx-2
+#etc/l7-protocols/testing/data/winmx-3
+#etc/l7-protocols/testing/data/x11-1
+#etc/l7-protocols/testing/data/x11-2
+#etc/l7-protocols/testing/data/x11-3
+#etc/l7-protocols/testing/data/x11-4
+#etc/l7-protocols/testing/data/x11-5
+#etc/l7-protocols/testing/data/yahoo-1
+#etc/l7-protocols/testing/data/yahoo-2
+#etc/l7-protocols/testing/data/yahoo-3
+#etc/l7-protocols/testing/data/yahoo-4
+#etc/l7-protocols/testing/match.c
+#etc/l7-protocols/testing/randchars.c
+#etc/l7-protocols/testing/randprintable.c
+#etc/l7-protocols/testing/regexp
+#etc/l7-protocols/testing/regexp/regerror.c
+#etc/l7-protocols/testing/regexp/regexp.c
+#etc/l7-protocols/testing/regexp/regexp.h
+#etc/l7-protocols/testing/regexp/regmagic.h
+#etc/l7-protocols/testing/regexp/regsub.c
+#etc/l7-protocols/testing/test_match.sh
+#etc/l7-protocols/testing/test_speed.c
+#etc/l7-protocols/testing/timeit.sh
diff --git a/config/rootfiles/common/mbmon b/config/rootfiles/common/mbmon
new file mode 100644 (file)
index 0000000..5c5162d
--- /dev/null
@@ -0,0 +1,2 @@
+usr/bin/mbmon
+#usr/man/man1/mbmon.1
diff --git a/config/rootfiles/common/yasuc b/config/rootfiles/common/yasuc
new file mode 100644 (file)
index 0000000..c81bf32
--- /dev/null
@@ -0,0 +1 @@
+usr/bin/yasuc
index 78c095c1969a9f42a3924f9bf9e21c377d1dc39a..dc4a8fef70adac6efeb6a3f6ef5a031e41326a8d 100644 (file)
@@ -60,7 +60,7 @@ BR2_DEFAULT_KERNEL_HEADERS="2.6.12"
 # uClibc Options
 #
 # BR2_UCLIBC_VERSION_SNAPSHOT is not set
-# BR2_ENABLE_LOCALE is not set
+BR2_ENABLE_LOCALE=y
 # BR2_PTHREADS_NONE is not set
 # BR2_PTHREADS is not set
 BR2_PTHREADS_OLD=y
@@ -107,8 +107,7 @@ BR2_GCC_VERSION_4_0_3=y
 BR2_GCC_VERSION="4.0.3"
 # BR2_GCC_USE_SJLJ_EXCEPTIONS is not set
 BR2_EXTRA_GCC_CONFIG_OPTIONS=""
-BR2_INSTALL_LIBSTDCPP=y
-# BR2_INSTALL_LIBGCJ is not set
+# BR2_INSTALL_LIBSTDCPP is not set
 # BR2_INSTALL_OBJC is not set
 BR2_GCC_SHARED_LIBGCC=y
 
index f0f8f4ad5832780b9d511c2f3c72f46149c0e470..a3100ecc79920a152378ac8075393e92246f9195 100644 (file)
@@ -4,4 +4,5 @@
 UTF-8 yes
 8-BIT yes
 #---------------------------------------------------------------------------
+en_US ISO-8859-1
 en_US.UTF-8 UTF-8
index fdf48bc1d72d8afc2f10431d6bb9f616a7403b63..f46b1febf01d491f70585bcc2b7a7139f815965f 100644 (file)
@@ -52,7 +52,7 @@ ARCH_HAS_MMU=y
 UCLIBC_HAS_FLOATS=y
 HAS_FPU=y
 DO_C99_MATH=y
-KERNEL_SOURCE="/usr/src/buildroot/toolchain_build_i586/linux"
+KERNEL_SOURCE="/usr"
 C_SYMBOL_PREFIX=""
 HAVE_DOT_CONFIG=y
 
@@ -112,7 +112,7 @@ UCLIBC_HAS_WCHAR=y
 UCLIBC_HAS_LOCALE=y
 UCLIBC_PREGENERATED_LOCALE_DATA=y
 # UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA is not set
-# UCLIBC_HAS_XLOCALE is not set
+UCLIBC_HAS_XLOCALE=y
 # UCLIBC_HAS_HEXADECIMAL_FLOATS is not set
 # UCLIBC_HAS_GLIBC_DIGIT_GROUPING is not set
 UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y
@@ -165,7 +165,7 @@ DEVEL_PREFIX="/usr/"
 #
 # uClibc development/debugging options
 #
-CROSS_COMPILER_PREFIX="/opt/i586-uClibc/bin/i586-linux-uclibc-"
+CROSS_COMPILER_PREFIX=""
 # DODEBUG is not set
 # DODEBUG_PT is not set
 # DOASSERTS is not set
index 4c071da1ffef1274a9d76a31086d9ecfaf492fe8..d6c2ccf166dbb8be3fe6230721c8d92ef0d93122 100644 (file)
@@ -75,6 +75,8 @@
 * fwhits
 * gawk-3.1.5
 * gcc-4.0.3
+* gcc-4.0.3-install1
+* gcc-4.0.3-install2
 * gd-2.0.33
 * gdbm-1.8.3
 * gettext-0.14.5
 * tftp-hpa-0.42
 * tiff-3.8.2
 * traceroute-1.4a12
-* uClibc-0.9.28
+* uClibc-0.9.28-pass1
+* uClibc-0.9.28-pass2
+* uClibc-0.9.28-pass3
 * udev-096
 * unzip552
 * util-linux-2.12r
index 0f31ce844a965bad2f410ebcca2cc3b4098182c7..d53efa326339e710c785bc15b072e991d6999f98 100644 (file)
@@ -36,10 +36,18 @@ DIR_APP    = $(DIR_SRC)/$(THISAPP)
 # Normal build or /tools build.
 #
 ifeq "$(ROOT)" ""
+ifeq "$(LFS_PASS)" "install"
+  TARGET = $(DIR_INFO)/$(THISAPP)-install
+  EXTRA_CONFIG = --target=$(MACHINE)-linux-uclibc --prefix=/opt/$(MACHINE)-uClibc --disable-nls \
+                       --with-sysroot=/opt/$(MACHINE)-uClibc/$(MACHINE)-linux-uclibc
+  EXTRA_MAKE =
+  EXTRA_INSTALL =
+else
   TARGET = $(DIR_INFO)/$(THISAPP)
   EXTRA_CONFIG = --prefix=/usr --enable-shared --disable-nls
   EXTRA_MAKE = tooldir=/usr
   EXTRA_INSTALL = tooldir=/usr
+endif
 else
 ifeq "$(PASS)" "1"
   TARGET = $(DIR_INFO)/$(THISAPP)-tools1
@@ -93,6 +101,10 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) $(DIR_SRC)/binutils-build && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
        @mkdir $(DIR_SRC)/binutils-build
+ifeq "$(LFS_PASS)" "install"
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/binutils-uclibc-conf.patch
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/binutils-uclibc-libtool-conf.patch
+endif
        cd $(DIR_SRC)/binutils-build && $(DIR_APP)/configure $(EXTRA_CONFIG)
 ifeq "$(PASS)" "1"
        cd $(DIR_SRC)/binutils-build && make configure-host
@@ -100,7 +112,9 @@ endif
        cd $(DIR_SRC)/binutils-build && make $(EXTRA_MAKE) $(MAKETUNING)
        cd $(DIR_SRC)/binutils-build && make $(EXTRA_INSTALL) install
 ifeq "$(ROOT)" ""
+ifneq "$(LFS_PASS)" "install"
        cp -v $(DIR_APP)/include/libiberty.h /usr/include
+endif
 else
 ifeq "$(PASS)" "1"
        cd $(DIR_SRC)/binutils-build && make -C ld clean
diff --git a/lfs/gcc b/lfs/gcc
index 5a742f24f134999f30d1e8bd56da960b382e5f40..868428c6207223b9f57286fac8648076358fde27 100644 (file)
--- a/lfs/gcc
+++ b/lfs/gcc
@@ -38,6 +38,28 @@ CXXFLAGS   =
 # Normal build or /tools build.
 #
 ifeq "$(ROOT)" ""
+ifeq "$(INST)" "1"
+  TARGET = $(DIR_INFO)/$(THISAPP)-install1
+  EXTRA_CONFIG = --target=$(MACHINE)-linux-uclibc --prefix=/opt/$(MACHINE)-uClibc \
+       --with-local-prefix=/opt/$(MACHINE)-uClibc/$(MACHINE)-linux-uclibc --with-newlib \
+       --with-sysroot=/opt/$(MACHINE)-uClibc --disable-nls \
+       --enable-threads=no --enable-symvers=gnu \
+       --disable-__cxa_atexit --enable-languages=c \
+       --disable-shared --with-gnu-as --with-gnu-ld \
+       --without-headers
+else
+ifeq "$(INST)" "2"
+  TARGET = $(DIR_INFO)/$(THISAPP)-install2
+  EXTRA_CONFIG = --target=$(MACHINE)-linux-uclibc --prefix=/opt/$(MACHINE)-uClibc \
+       --with-local-prefix=/opt/$(MACHINE)-uClibc/$(MACHINE)-linux-uclibc \
+       --with-sysroot=/opt/$(MACHINE)-uClibc \
+       --disable-nls \
+       --enable-threads=posix --enable-symvers=gnu \
+       --disable-__cxa_atexit --enable-languages=c,c++ \
+       --enable-c99 --enable-long-long --with-gnu-as \
+       --with-gnu-ld --enable-shared --enable-clocale \
+       --enable-target-optspace
+else
   TARGET = $(DIR_INFO)/$(THISAPP)
   EXTRA_CONFIG = --prefix=/usr \
     --libexecdir=/usr/lib --enable-shared \
@@ -46,6 +68,8 @@ ifeq "$(ROOT)" ""
     --disable-nls
   EXTRA_MAKE =
   EXTRA_INSTALL =
+endif
+endif
 else
 ifeq "$(PASS)" "1"
   TARGET = $(DIR_INFO)/$(THISAPP)-tools1
@@ -105,6 +129,22 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @rm -rf $(DIR_APP) $(DIR_SRC)/gcc-build && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
        @mkdir $(DIR_SRC)/gcc-build
 ifeq "$(ROOT)" ""
+ifeq "$(INST)" "1"
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/gcc-uclibc-conf.patch
+       cd $(DIR_SRC)/gcc-build && $(DIR_APP)/configure $(EXTRA_CONFIG)
+override PATH = /opt/$(MACHINE)-uClibc/bin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin
+       cd $(DIR_SRC)/gcc-build && make all-gcc install-gcc
+else
+ifeq "$(INST)" "2"
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/gcc-uclibc-conf.patch
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/gcc-uclibc-locale.patch
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/gcc-libstdc++-pic.patch
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/gcc-sdk-libstdc++-includes.patch
+       cd $(DIR_SRC)/gcc-build && $(DIR_APP)/configure $(EXTRA_CONFIG)
+       cd $(DIR_SRC)/gcc-build && make all install
+       cp -f /opt/$(MACHINE)-uClibc/lib/libgcc_s.so /lib
+       cd /lib && ln -sf libgcc_s.so libgcc_s.so.1
+else
        cd $(DIR_APP) && sed -i 's/install_to_$$(INSTALL_DEST) //' libiberty/Makefile.in
        cd $(DIR_APP) && sed -i 's/^XCFLAGS =$$/& -fomit-frame-pointer/' gcc/Makefile.in
        cd $(DIR_APP) && sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
@@ -115,6 +155,8 @@ ifeq "$(ROOT)" ""
        cd $(DIR_SRC)/gcc-build && make $(EXTRA_INSTALL) install
        ln -sfv ../usr/bin/cpp /lib
        ln -sfv gcc /usr/bin/cc
+endif
+endif
 else
 ifeq "$(PASS)" "1"
        cd $(DIR_SRC)/gcc-build && $(DIR_APP)/configure $(EXTRA_CONFIG)
index 963a8db985a648de21411fbd988884777d76959a..9d620cb076ce97f021c68a8c9f3fd5d52e87b146 100644 (file)
--- a/lfs/kudzu
+++ b/lfs/kudzu
@@ -78,7 +78,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
 ifeq "$(LFS_PASS)" "install"
        cd $(DIR_APP) && patch -N < $(DIR_SRC)/src/patches/kudzu-link-lintl.diff
-       cd $(DIR_APP) && make RPM_OPT_FLAGS="-Os -fomit-frame-pointer -I/install/include" \
+       cd $(DIR_APP) && make RPM_OPT_FLAGS="-Os -fomit-frame-pointer -I/opt/$(MACHINE)-uClibc/include" \
                ARCH=$(MACHINE)
        cd $(DIR_APP) && install -m 0755 kudzu /install/initrd/bin/kudzu
        cd $(DIR_APP) && install -m 0644 libkudzu.a /install/initrd/lib
index 9c01b1c8ff5e831a57ef8ef66e9db7fc7ef0653e..eeca44b9147cc1ca1808f988f87ac94ade0c70b5 100644 (file)
@@ -34,7 +34,11 @@ DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 
 ifeq "$(ROOT)" ""
+ifeq "$(LFS_PASS)" "install"
+  TARGET = $(DIR_INFO)/$(THISAPP)-install
+else
   TARGET = $(DIR_INFO)/$(THISAPP)
+endif
 else
   TARGET = $(DIR_INFO)/$(THISAPP)-tools1
 endif
@@ -77,6 +81,16 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
 ifeq "$(ROOT)" ""
+ifeq "$(LFS_PASS)" "install"
+       -mkdir -p /opt/$(MACHINE)-uClibc
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-inotify-3.patch
+       cd $(DIR_APP) && install -dv /opt/$(MACHINE)-uClibc/usr/include/asm
+       cd $(DIR_APP) && cp -Rv include/asm-i386/* /opt/$(MACHINE)-uClibc/usr/include/asm
+       cd $(DIR_APP) && cp -Rv include/linux /opt/$(MACHINE)-uClibc/usr/include
+       cd $(DIR_APP) && chown -Rv root:root /opt/$(MACHINE)-uClibc/usr/include/{asm,linux}
+       cd $(DIR_APP) && find /opt/$(MACHINE)-uClibc/usr/include/{asm,linux} -type d -exec chmod -v 755 {} \;
+       cd $(DIR_APP) && find /opt/$(MACHINE)-uClibc/usr/include/{asm,linux} -type f -exec chmod -v 644 {} \;
+else
        cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-inotify-3.patch
        cd $(DIR_APP) && install -dv /usr/include/asm
        cd $(DIR_APP) && cp -Rv include/asm-i386/* /usr/include/asm
@@ -84,6 +98,7 @@ ifeq "$(ROOT)" ""
        cd $(DIR_APP) && chown -Rv root:root /usr/include/{asm,linux}
        cd $(DIR_APP) && find /usr/include/{asm,linux} -type d -exec chmod -v 755 {} \;
        cd $(DIR_APP) && find /usr/include/{asm,linux} -type f -exec chmod -v 644 {} \;
+endif
 else
        cd $(DIR_APP) && cp -Rv include/asm-i386 /tools/include/asm
        cd $(DIR_APP) && cp -Rv include/linux /tools/include
index 598e9896eb98e475e0065361c8f8923d4ca967d1..41e66c71c2f6082ad1005be141517244543984f0 100644 (file)
--- a/lfs/newt
+++ b/lfs/newt
@@ -83,7 +83,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/newt-0.50.17-vaend.patch
 ifeq "$(LFS_PASS)" "install"
        cd $(DIR_APP) && ./configure --without-gpm-support --host $(MACHINE)-uclibc
-       cd $(DIR_APP) && sed -i 's%^CFLAGS.*$$%CFLAGS = -Os -fomit-frame-pointer -Wall -D_GNU_SOURCE -DUTF8 -I/install/include/slang%' Makefile
+       cd $(DIR_APP) && sed -i 's%^CFLAGS.*$$%CFLAGS = -Os -fomit-frame-pointer -Wall -D_GNU_SOURCE -DUTF8 -I/opt/i586-uClibc/include%' Makefile
        cd $(DIR_APP) && make libnewt.a
        -mkdir -p /opt/$(MACHINE)-uClibc/{include,lib}
        cd $(DIR_APP) && install -m 0644 libnewt.a /opt/$(MACHINE)-uClibc/lib/libnewt.a
diff --git a/lfs/pxe b/lfs/pxe
index d82773d3540adf474baa2fe699869923e139923a..2ac56902942e90ced643706e84722269436502f0 100644 (file)
--- a/lfs/pxe
+++ b/lfs/pxe
@@ -57,7 +57,7 @@ $(TARGET) :
        cp $(DIR_SRC)/config/syslinux/options.msg   /tmp/$(VERSION)/options.msg
        cp $(DIR_SRC)/config/syslinux/splash.lss    /tmp/$(VERSION)/splash.lss
        cp /usr/lib/memtest86+/memtest.bin          /tmp/$(VERSION)/memtest
-       sed     -e "a|splash.lss|$(VERSION)/splash.lss|" \
+       sed     -e "s|splash.lss|$(VERSION)/splash.lss|"   \
                        $(DIR_SRC)/config/syslinux/boot.msg \
                        > /tmp/$(VERSION)/boot.msg
        sed     -e "s|vmlinuz|$(VERSION)/vmlinuz|"   \
index 6ec5399c2d46e43ff1ed3490e85e2821d6605393..26bb27f24e2a55b7ec10f7854d0537204d2c2d16 100644 (file)
@@ -32,7 +32,17 @@ THISAPP    = uClibc-$(VER)
 DL_FILE    = $(THISAPP).tar.bz2
 DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
-TARGET     = $(DIR_INFO)/$(THISAPP)
+ifeq "$(PASS)" "1"
+       TARGET     = $(DIR_INFO)/$(THISAPP)-pass1
+else
+ifeq "$(PASS)" "2"
+       TARGET     = $(DIR_INFO)/$(THISAPP)-pass2
+else
+       TARGET     = $(DIR_INFO)/$(THISAPP)-pass3
+endif
+endif
+
+STAGING_DIR=/opt/$(MACHINE)-uClibc
 
 ###############################################################################
 # Top-level Rules
@@ -75,33 +85,36 @@ $(subst %,%_MD5,$(objects)) :
 
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
-       @rm -rf $(DIR_APP) /opt/$(MACHINE)-uClibc $(DIR_SRC)/buildroot
-       @cd $(DIR_SRC) && tar xfj $(DIR_DL)/buildroot-snapshot-20061026.tar.bz2
-       mkdir -p $(DIR_SRC)/buildroot/toolchain_build_$(MACHINE)/$(THISAPP)/extra/locale/
-       cp -f $(DIR_DL)/uClibc-locale-030818.tgz \
-               $(DIR_SRC)/buildroot/toolchain_build_$(MACHINE)/$(THISAPP)/extra/locale/
-       cp -f $(DIR_SRC)/config/uClibc/uClibc.config-$(MACHINE) $(DIR_SRC)/buildroot/toolchain/uClibc/uClibc.config
-       cp -f $(DIR_SRC)/config/uClibc/buildroot.config-$(MACHINE) $(DIR_SRC)/buildroot/.config
-       cp -f $(DIR_SRC)/config/uClibc/buildroot.config.cmd $(DIR_SRC)/buildroot/.config.cmd
-       cd $(DIR_SRC)/buildroot && make
-
-       # Generate locales
-       cp -f $(DIR_SRC)/config/uClibc/{locales,codesets}.txt $(DIR_SRC)/buildroot/toolchain_build_$(MACHINE)/$(THISAPP)/extra/locale
-       cd $(DIR_SRC)/buildroot/toolchain_build_$(MACHINE)/$(THISAPP)/extra/locale && patch -Np3 < $(DIR_SRC)/src/patches/uClibc-gcc4-genwctype.patch
-       cd $(DIR_SRC)/buildroot/toolchain_build_$(MACHINE)/$(THISAPP)/extra/locale && make
-
-#      cd $(DIR_SRC)/buildroot && make # This a second pass to install the locales
-       -mkdir -p /install/initrd/bin
-       cd $(DIR_SRC)/buildroot/toolchain_build_$(MACHINE)/$(THISAPP) && make RUNTIME_PREFIX=/install/initrd/ install_runtime
-
-       chmod 755 /install/initrd/lib/libuClibc-$(VER).so
-       rm -f /install/initrd/lib/{libm*,libcrypt*,libutil*,librt*}
-       cp -f /opt/$(MACHINE)-uClibc/lib/libgcc_s.so /lib
+ifeq "$(PASS)" "1"
+       @rm -rf $(DIR_APP)
+       @mkdir -p /opt/$(MACHINE)-uClibc
+       @cd $(DIR_SRC) && tar xfj $(DIR_DL)/$(DL_FILE)
+       cp -f $(DIR_DL)/uClibc-locale-030818.tgz $(DIR_APP)/extra/locale/
+       cp -f $(DIR_SRC)/config/uClibc/{locales,codesets}.txt $(DIR_APP)/extra/locale
+       cd $(DIR_APP)/extra/locale && patch -Np3 < $(DIR_SRC)/src/patches/uClibc-gcc4-genwctype.patch
+       cp -f $(DIR_SRC)/config/uClibc/uClibc.config-$(MACHINE) $(DIR_APP)/.config
+       cd $(DIR_APP) && make CROSS= PREFIX=$(STAGING_DIR) oldconfig
+       cd $(DIR_APP) && make CROSS= PREFIX=$(STAGING_DIR) pregen headers install_dev
+#      cd $(DIR_APP)/extra/locale && make
+else
+ifeq "$(PASS)" "2"
+       cd $(DIR_APP) && CROSS=$(MACHINE)-linux-uclibc- PREFIX=/opt/$(MACHINE)-uClibc make all install
        cp -f /opt/$(MACHINE)-uClibc/lib/ld-uClibc-$(VER).so /lib
        cp -f /opt/$(MACHINE)-uClibc/lib/libuClibc-$(VER).so /lib
-       cd /lib && ln -sf libgcc_s.so libgcc_s.so.1
        cd /lib && ln -sf ld-uClibc-$(VER).so ld-uClibc.so.0
        cd /lib && ln -sf libuClibc-$(VER).so libc.so.0
        cd /lib && ln -sf libc.so.0 libc.so
-       @rm -rf $(DIR_APP) $(DIR_SRC)/buildroot
+       ln -sf /opt/$(MACHINE)-uClibc/lib/libm-$(VER).so /lib/libm.so.0
+else
+       cd /opt/$(MACHINE)-uClibc/bin && for i in `ls -w1 $(MACHINE)-linux-uclibc-*`; do \
+               ln -sf $$i $(MACHINE)-linux-`echo $$i | cut -c 19-`; \
+       done
+       ln -sf $(MACHINE)-linux-uclibc /opt/$(MACHINE)-uClibc/$(MACHINE)-linux
+       ln -sf gcc /opt/$(MACHINE)-uClibc/$(MACHINE)-linux-uclibc/bin/cc
+       cd $(DIR_APP) && make RUNTIME_PREFIX=/install/initrd/ install_runtime
+       chmod 755 /install/initrd/lib/libuClibc-$(VER).so
+       rm -f /install/initrd/lib/{libm*,libcrypt*,libutil*,librt*}
+       @rm -rf $(DIR_APP)
+endif
+endif
        @$(POSTBUILD)
index 6aeeeebd52da5531a099a86e299ebf85162eb030..f5af77a08d31dfe69316e80cad39e7d861e9771d 100644 (file)
@@ -87,7 +87,7 @@ ifeq "$(ROOT)" ""
 ifeq "$(LFS_PASS)" "install"
        cd $(DIR_APP) && CFLAGS="-Os -fomit-frame-pointer" ./configure
        cd $(DIR_APP) && echo "HAVE_SLANG=yes" >> make_include
-       cd $(DIR_APP) && echo "SLANGFLAGS=-I/opt/$(MACHINE)-uClibc/include/slang" >> make_include
+       cd $(DIR_APP) && echo "SLANGFLAGS=-I/opt/$(MACHINE)-uClibc/include" >> make_include
        cd $(DIR_APP)/fdisk && make cfdisk
        cd $(DIR_APP)/fdisk && make sfdisk
        cd $(DIR_APP)/fdisk && install -m 0755 cfdisk /install/initrd/bin
diff --git a/make.sh b/make.sh
index c0028ab89e1408d0347db41aabe9efed9c99e032..384a225a9b1b52eea08f768aa83ebbf5707f1f94 100644 (file)
--- a/make.sh
+++ b/make.sh
@@ -549,7 +549,13 @@ buildinstaller() {
   export LOGFILE
   ipfiremake syslinux
   ipfiremake memtest
-  ipfiremake uClibc
+  installmake linux-libc-header
+  installmake binutils
+  ipfiremake uClibc                    PASS=1
+  ipfiremake gcc                       INST=1
+  installmake uClibc                   PASS=2
+  installmake gcc                      INST=2
+  installmake uClibc                   PASS=3
   installmake busybox
   installmake udev
   installmake slang
index 4e29f3114b2c3810773f0a52632dee51a079a3f7..7ee88307007a5643c5f0279e8dfaf1f395dafbc5 100644 (file)
@@ -4,7 +4,7 @@
 
 CC      = gcc 
 CFLAGS  = -Os -Wall
-INCLUDE = -I/install/include
+INCLUDE = -I/opt/i586-uClibc/include
 
 LD      = gcc
 LDFLAGS = -L/install/lib
index 234f9b7697bf7272cb06aeb9836f2fb735b2f920..d097d7c4646234edf0018b0f9f1988d42e411431 100644 (file)
@@ -4,7 +4,7 @@
 
 CC      = gcc
 CFLAGS  = -O2 -Wall
-INCLUDE = -I/install/include
+INCLUDE = -I/opt/i586-uClibc/include
 
 LD      = ld
 LDFLAGS = -i
diff --git a/src/patches/binutils-uclibc-conf.patch b/src/patches/binutils-uclibc-conf.patch
new file mode 100644 (file)
index 0000000..7c0a726
--- /dev/null
@@ -0,0 +1,586 @@
+diff -ur binutils-2.15.97.orig/bfd/config.bfd binutils-2.15.97/bfd/config.bfd
+--- binutils-2.15.97.orig/bfd/config.bfd       2005-04-29 20:48:14.000000000 -0400
++++ binutils-2.15.97/bfd/config.bfd    2005-04-29 20:53:50.000000000 -0400
+@@ -140,7 +140,7 @@
+     targ_defvec=ecoffalpha_little_vec
+     targ_selvecs=bfd_elf64_alpha_vec
+     ;;
+-  alpha*-*-linux-gnu* | alpha*-*-elf*)
++  alpha*-*-linux-* | alpha*-*-elf*)
+     targ_defvec=bfd_elf64_alpha_vec
+     targ_selvecs=ecoffalpha_little_vec
+     ;;
+@@ -150,7 +150,7 @@
+   alpha*-*-*)
+     targ_defvec=ecoffalpha_little_vec
+     ;;
+-  ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu)
++  ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu)
+     targ_defvec=bfd_elf64_ia64_little_vec
+     targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec"
+     ;;
+@@ -227,7 +227,7 @@
+     targ_defvec=bfd_elf32_littlearm_vec
+     targ_selvecs=bfd_elf32_bigarm_vec
+     ;;
+-  armeb-*-elf | arm*b-*-linux-gnu*)
++  armeb-*-elf | arm*b-*-linux-*)
+     targ_defvec=bfd_elf32_bigarm_vec
+     targ_selvecs=bfd_elf32_littlearm_vec
+     ;;
+@@ -235,7 +235,7 @@
+     targ_defvec=bfd_elf32_littlearm_vec
+     targ_selvecs=bfd_elf32_bigarm_vec
+     ;;
+-  arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | \
++  arm-*-elf | arm-*-freebsd* | arm*-*-linux-* | arm*-*-conix* | \
+   arm*-*-uclinux* | arm-*-kfreebsd*-gnu | \
+   arm*-*-eabi* )
+     targ_defvec=bfd_elf32_littlearm_vec
+@@ -385,7 +385,7 @@
+     ;;
+ #ifdef BFD64
+-  hppa*64*-*-linux-gnu*)
++  hppa*64*-*-linux-*)
+     targ_defvec=bfd_elf64_hppa_linux_vec
+     targ_selvecs=bfd_elf64_hppa_vec
+     ;;
+@@ -396,7 +396,7 @@
+     ;;
+ #endif
+-  hppa*-*-linux-gnu*)
++  hppa*-*-linux-*)
+     targ_defvec=bfd_elf32_hppa_linux_vec
+     targ_selvecs=bfd_elf32_hppa_vec
+     ;;
+@@ -529,7 +529,7 @@
+     targ_selvecs=bfd_elf32_i386_vec
+     targ_underscore=yes
+     ;;
+-  i[3-7]86-*-linux-gnu*)
++  i[3-7]86-*-linux-*)
+     targ_defvec=bfd_elf32_i386_vec
+     targ_selvecs="i386linux_vec bfd_efi_app_ia32_vec"
+     targ64_selvecs=bfd_elf64_x86_64_vec
+@@ -543,7 +543,7 @@
+     targ_defvec=bfd_elf64_x86_64_vec
+     targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec bfd_efi_app_ia32_vec"
+     ;;
+-  x86_64-*-linux-gnu*)
++  x86_64-*-linux-*)
+     targ_defvec=bfd_elf64_x86_64_vec
+     targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec"
+     ;;
+@@ -719,7 +719,7 @@
+     targ_selvecs=bfd_elf32_m68k_vec
+     targ_underscore=yes
+     ;;
+-  m68*-*-linux-gnu*)
++  m68*-*-linux-*)
+     targ_defvec=bfd_elf32_m68k_vec
+     targ_selvecs=m68klinux_vec
+     ;;
+@@ -1005,7 +1005,7 @@
+     ;;
+ #endif
+   powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \
+-  powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems* | \
++  powerpc-*-solaris2* | powerpc-*-linux-* | powerpc-*-rtems* | \
+   powerpc-*-chorus* | powerpc-*-vxworks* | powerpc-*-windiss*)
+     targ_defvec=bfd_elf32_powerpc_vec
+     targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec ppcboot_vec"
+@@ -1042,7 +1042,7 @@
+     targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
+     ;;
+   powerpcle-*-elf* | powerpcle-*-sysv4* | powerpcle-*-eabi* | \
+-  powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-vxworks* |\
++  powerpcle-*-solaris2* | powerpcle-*-linux-* | powerpcle-*-vxworks* |\
+   powerpcle-*-rtems*)
+     targ_defvec=bfd_elf32_powerpcle_vec
+     targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
+@@ -1213,7 +1213,7 @@
+     targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec"
+     targ_underscore=yes
+     ;;
+-  sparc-*-linux-gnu*)
++  sparc-*-linux-*)
+     targ_defvec=bfd_elf32_sparc_vec
+     targ_selvecs="sparclinux_vec bfd_elf64_sparc_vec sunos_big_vec"
+     ;;
+@@ -1260,7 +1260,7 @@
+     targ_defvec=sunos_big_vec
+     targ_underscore=yes
+     ;;
+-  sparc64-*-linux-gnu*)
++  sparc64-*-linux-*)
+     targ_defvec=bfd_elf64_sparc_vec
+     targ_selvecs="bfd_elf32_sparc_vec sparclinux_vec sunos_big_vec"
+     ;;
+@@ -1329,7 +1329,7 @@
+     targ_underscore=yes
+     ;;
+-  vax-*-linux-gnu*)
++  vax-*-linux-*)
+     targ_defvec=bfd_elf32_vax_vec
+     ;;
+diff -ur binutils-2.15.97.orig/bfd/configure binutils-2.15.97/bfd/configure
+--- binutils-2.15.97.orig/bfd/configure        2005-04-29 20:48:14.000000000 -0400
++++ binutils-2.15.97/bfd/configure     2005-04-29 20:53:50.000000000 -0400
+@@ -9918,7 +9918,7 @@
+   alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
+       COREFILE=''
+       ;;
+-  alpha*-*-linux-gnu*)
++  alpha*-*-linux-*)
+       COREFILE=trad-core.lo
+       TRAD_HEADER='"hosts/alphalinux.h"'
+       ;;
+@@ -9982,7 +9982,7 @@
+       COREFILE=trad-core.lo
+       TRAD_HEADER='"hosts/i386mach3.h"'
+       ;;
+-  i[3-7]86-*-linux-gnu*)
++  i[3-7]86-*-linux-*)
+       COREFILE=trad-core.lo
+       TRAD_HEADER='"hosts/i386linux.h"'
+       ;;
+@@ -10020,7 +10020,7 @@
+       COREFILE=trad-core.lo
+       TRAD_HEADER='"hosts/hp300bsd.h"'
+       ;;
+-  m68*-*-linux-gnu*)
++  m68*-*-linux-*)
+       COREFILE=trad-core.lo
+       TRAD_HEADER='"hosts/m68klinux.h"'
+       ;;
+@@ -10154,7 +10154,7 @@
+       COREFILE=trad-core.lo
+       TRAD_HEADER='"hosts/vaxult2.h"'
+       ;;
+-  vax-*-linux-gnu*)
++  vax-*-linux-*)
+       COREFILE=trad-core.lo
+       TRAD_HEADER='"hosts/vaxlinux.h"'
+       ;;
+diff -ur binutils-2.15.97.orig/bfd/configure.in binutils-2.15.97/bfd/configure.in
+--- binutils-2.15.97.orig/bfd/configure.in     2005-04-29 20:48:14.000000000 -0400
++++ binutils-2.15.97/bfd/configure.in  2005-04-29 20:53:50.000000000 -0400
+@@ -163,7 +163,7 @@
+   alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
+       COREFILE=''
+       ;;
+-  alpha*-*-linux-gnu*)
++  alpha*-*-linux-*)
+       COREFILE=trad-core.lo
+       TRAD_HEADER='"hosts/alphalinux.h"'
+       ;;
+@@ -248,7 +248,7 @@
+       TRAD_HEADER='"hosts/i386mach3.h"'
+       ;;
+ changequote(,)dnl
+-  i[3-7]86-*-linux-gnu*)
++  i[3-7]86-*-linux-*)
+ changequote([,])dnl
+       COREFILE=trad-core.lo
+       TRAD_HEADER='"hosts/i386linux.h"'
+@@ -289,7 +289,7 @@
+       COREFILE=trad-core.lo
+       TRAD_HEADER='"hosts/hp300bsd.h"'
+       ;;
+-  m68*-*-linux-gnu*)
++  m68*-*-linux-*)
+       COREFILE=trad-core.lo
+       TRAD_HEADER='"hosts/m68klinux.h"'
+       ;;
+@@ -375,7 +375,7 @@
+       COREFILE=trad-core.lo
+       TRAD_HEADER='"hosts/vaxult2.h"'
+       ;;
+-  vax-*-linux-gnu*)
++  vax-*-linux-*)
+       COREFILE=trad-core.lo
+       TRAD_HEADER='"hosts/vaxlinux.h"'
+       ;;
+diff -ur binutils-2.15.97.orig/gas/configure binutils-2.15.97/gas/configure
+--- binutils-2.15.97.orig/gas/configure        2005-04-29 20:48:14.000000000 -0400
++++ binutils-2.15.97/gas/configure     2005-04-29 20:53:50.000000000 -0400
+@@ -4462,7 +4462,7 @@
+ _ACEOF
+       ;;
+-      ppc-*-linux-gnu*)
++      ppc-*-linux-*)
+       case "$endian" in
+         big)  ;;
+         *)    { { echo "$as_me:$LINENO: error: GNU/Linux must be configured big endian" >&5
+diff -ur binutils-2.15.97.orig/gas/configure.in binutils-2.15.97/gas/configure.in
+--- binutils-2.15.97.orig/gas/configure.in     2005-04-29 20:48:14.000000000 -0400
++++ binutils-2.15.97/gas/configure.in  2005-04-29 20:53:50.000000000 -0400
+@@ -161,7 +161,7 @@
+       AC_DEFINE(AIX_WEAK_SUPPORT, 1,
+                 [Define if using AIX 5.2 value for C_WEAKEXT.])
+       ;;
+-      ppc-*-linux-gnu*)
++      ppc-*-linux-*)
+       case "$endian" in
+         big)  ;;
+         *)    AC_MSG_ERROR(GNU/Linux must be configured big endian) ;;
+diff -ur binutils-2.15.97.orig/gas/configure.tgt binutils-2.15.97/gas/configure.tgt
+--- binutils-2.15.97.orig/gas/configure.tgt    2005-04-29 20:48:14.000000000 -0400
++++ binutils-2.15.97/gas/configure.tgt 2005-04-29 20:53:50.000000000 -0400
+@@ -100,7 +100,7 @@
+   alpha-*-*vms*)                      fmt=evax ;;
+   alpha-*-osf*)                               fmt=ecoff ;;
+   alpha-*-linuxecoff*)                        fmt=ecoff ;;
+-  alpha-*-linux-gnu*)                 fmt=elf em=linux ;;
++  alpha-*-linux-*)                    fmt=elf em=linux ;;
+   alpha-*-netbsd*)                    fmt=elf em=nbsd ;;
+   alpha-*-openbsd*)                   fmt=elf em=obsd ;;
+@@ -116,7 +116,7 @@
+   arm-*-conix*)                               fmt=elf ;;
+   arm-*-linux*aout*)                  fmt=aout em=linux ;;
+   arm-*-linux-gnueabi*)                       fmt=elf  em=armlinuxeabi ;;      
+-  arm-*-linux-gnu*)                   fmt=elf  em=linux ;;
++  arm-*-linux-*)                      fmt=elf  em=linux ;;
+   arm-*-uclinux*)                     fmt=elf  em=linux ;;
+   arm-*-netbsdelf*)                   fmt=elf  em=nbsd ;;
+   arm-*-*n*bsd*)                      fmt=aout em=nbsd ;;
+@@ -128,7 +128,7 @@
+   avr-*-*)                            fmt=elf ;;
+-  cris-*-linux-gnu* | crisv32-*-linux-gnu*)
++  cris-*-linux-* | crisv32-*-linux-*)
+                                       fmt=multi bfd_gas=yes em=linux ;;
+   cris-*-* | crisv32-*-*)             fmt=multi bfd_gas=yes ;;
+@@ -192,7 +192,7 @@
+   i386-*-linux*aout*)                 fmt=aout em=linux ;;
+   i386-*-linux*oldld)                 fmt=aout em=linux ;;
+   i386-*-linux*coff*)                 fmt=coff em=linux ;;
+-  i386-*-linux-gnu*)                  fmt=elf em=linux ;;
++  i386-*-linux-*)                     fmt=elf em=linux ;;
+   i386-*-lynxos*)                     fmt=elf em=lynx bfd_gas=yes ;;
+   i386-*-sysv[45]*)                   fmt=elf ;;
+   i386-*-solaris*)                    fmt=elf ;;
+@@ -238,7 +238,7 @@
+   ia64-*-elf*)                                fmt=elf ;;
+   ia64-*-aix*)                                fmt=elf em=ia64aix ;;
+-  ia64-*-linux-gnu*)                  fmt=elf em=linux ;;
++  ia64-*-linux-*)                     fmt=elf em=linux ;;
+   ia64-*-hpux*)                               fmt=elf em=hpux ;;
+   ia64-*-netbsd*)                     fmt=elf em=nbsd ;;
+@@ -265,7 +265,7 @@
+   m68k-*-rtems*)                      fmt=elf ;;
+   m68k-*-hpux*)                               fmt=hp300 em=hp300 ;;
+   m68k-*-linux*aout*)                 fmt=aout em=linux ;;
+-  m68k-*-linux-gnu*)                  fmt=elf em=linux ;;
++  m68k-*-linux-*)                     fmt=elf em=linux ;;
+   m68k-*-uclinux*)                    fmt=elf ;;
+   m68k-*-gnu*)                                fmt=elf ;;
+   m68k-*-netbsdelf*)                  fmt=elf em=nbsd ;;
+@@ -332,7 +332,7 @@
+   ppc-*-beos*)                                fmt=coff ;;
+   ppc-*-*n*bsd* | ppc-*-elf*)         fmt=elf ;;
+   ppc-*-eabi* | ppc-*-sysv4*)         fmt=elf ;;
+-  ppc-*-linux-gnu*)                   fmt=elf em=linux ;;
++  ppc-*-linux-*)                      fmt=elf em=linux ;;
+   ppc-*-solaris*)                     fmt=elf ;;
+   ppc-*-rtems*)                               fmt=elf ;;
+   ppc-*-macos*)                               fmt=coff em=macos ;;
+@@ -340,7 +340,7 @@
+   ppc-*-kaos*)                                fmt=elf ;;
+   ppc-*-lynxos*)                      fmt=elf em=lynx bfd_gas=yes ;;
+-  s390-*-linux-gnu*)                  fmt=elf em=linux ;;
++  s390-*-linux-*)                     fmt=elf em=linux ;;
+   s390-*-tpf*)                                fmt=elf ;;
+   sh*-*-linux*)                               fmt=elf em=linux
+@@ -369,7 +369,7 @@
+   sparc-*-aout | sparc*-*-vxworks*)   fmt=aout em=sparcaout ;;
+   sparc-*-coff)                               fmt=coff ;;
+   sparc-*-linux*aout*)                        fmt=aout em=linux ;;
+-  sparc-*-linux-gnu*)                 fmt=elf em=linux ;;
++  sparc-*-linux-*)                    fmt=elf em=linux ;;
+   sparc-fujitsu-none)                 fmt=aout ;;
+   sparc-*-elf)                                fmt=elf ;;
+   sparc-*-sysv4*)                     fmt=elf ;;
+@@ -398,7 +398,7 @@
+   vax-*-netbsdelf*)                   fmt=elf em=nbsd ;;
+   vax-*-netbsd*)                      fmt=aout em=nbsd ;;
+   vax-*-bsd* | vax-*-ultrix*)         fmt=aout ;;
+-  vax-*-linux-gnu*)                   fmt=elf em=linux bfd_gas=yes ;;
++  vax-*-linux-*)                      fmt=elf em=linux bfd_gas=yes ;;
+   w65-*-*)                            fmt=coff ;;
+diff -ur binutils-2.15.97.orig/ld/configure.host binutils-2.15.97/ld/configure.host
+--- binutils-2.15.97.orig/ld/configure.host    2005-04-29 20:48:15.000000000 -0400
++++ binutils-2.15.97/ld/configure.host 2005-04-29 20:53:50.000000000 -0400
+@@ -83,7 +83,7 @@
+   HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,ld\[^ \]\*,ld-linux,g"`
+   ;;
+-arm*-*-linux-gnu*)
++arm*-*-linux-*)
+   HOSTING_CRT0='-p '`echo "$HOSTING_CRT0" | sed -e "s,ld\[^ \]\*,ld-linux,g"`
+   ;;
+@@ -141,7 +141,7 @@
+   HOSTING_LIBS="$HOSTING_LIBS"' -lcygwin -L/usr/lib/w32api -luser32 -lkernel32 -ladvapi32 -lshell32 `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi`'
+   ;;
+-ia64-*-linux-gnu*)
++ia64-*-linux-*)
+   HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,ld\[^ \]*\*,ld-linux-ia64,g"`
+   ;;
+@@ -155,11 +155,11 @@
+   HOSTING_LIBS='-L/usr/lib32 '"$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o ; else ${CC} -print-file-name=crtend.o; fi` /usr/lib32/crtn.o -init __do_global_ctors -fini __do_global_dtors'
+   ;;
+-mips*-*-linux-gnu*)
++mips*-*-linux-*)
+   HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib/ld.so.1,"`
+   ;;
+-m68*-*-linux-gnu*)
++m68*-*-linux-*)
+   HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib/ld.so.1,"`
+   ;;
+@@ -183,19 +183,19 @@
+   HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi`'
+   ;;
+-powerpc64*-*-linux-gnu*)
++powerpc64*-*-linux-*)
+   HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib64/ld64.so.1,"`
+   ;;
+-powerpc*-*-linux-gnu*)
++powerpc*-*-linux-*)
+   HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib/ld.so.1,"`
+   ;;
+-s390x-*-linux-gnu*)
++s390x-*-linux-*)
+   HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib/ld64.so.1,"`
+   ;;
+-s390-*-linux-gnu*)
++s390-*-linux-*)
+   HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib/ld.so.1,"`
+   ;;
+@@ -209,15 +209,15 @@
+   HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` `if [ -f ../gcc/crtn.o ]; then echo ../gcc/crtn.o; else ${CC} -print-file-name=crtn.o; fi`'
+   ;;
+-sparc-*-linux-gnu*)
++sparc-*-linux-*)
+   HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib/ld-linux.so.2,"`
+   ;;
+-sparc64-*-linux-gnu*)
++sparc64-*-linux-*)
+   HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib64/ld-linux.so.2,"`
+   ;;
+-x86_64-*-linux-gnu*)
++x86_64-*-linux-*)
+   HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib64/ld-linux-x86-64.so.2,"`
+   ;;
+diff -ur binutils-2.15.97.orig/ld/configure.tgt binutils-2.15.97/ld/configure.tgt
+--- binutils-2.15.97.orig/ld/configure.tgt     2005-04-29 20:48:15.000000000 -0400
++++ binutils-2.15.97/ld/configure.tgt  2005-04-29 20:53:50.000000000 -0400
+@@ -30,7 +30,7 @@
+ cris-*-*aout*)                targ_emul=crisaout
+                       targ_extra_emuls="criself crislinux"
+                       targ_extra_libpath=$targ_extra_emuls ;;
+-cris-*-linux-gnu* | cris-*-linux-gnu*)
++cris-*-linux-* | crisv32-*-linux-*)
+                       targ_emul=crislinux ;;
+ cris-*-* | crisv32-*-*)       targ_emul=criself
+                       targ_extra_emuls="crisaout crislinux"
+@@ -62,14 +62,14 @@
+                       tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/aout//'`
+                       tdir_sun4=sparc-sun-sunos4
+                       ;;
+-sparc64-*-linux-gnu*) targ_emul=elf64_sparc
++sparc64-*-linux-*)    targ_emul=elf64_sparc
+                       targ_extra_emuls="elf32_sparc sparclinux sun4"
+                       targ_extra_libpath=elf32_sparc
+                       tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'`
+                       tdir_sparclinux=${tdir_elf32_sparc}aout
+                       tdir_sun4=sparc-sun-sunos4
+                       ;;
+-sparc*-*-linux-gnu*)  targ_emul=elf32_sparc
++sparc*-*-linux-*)     targ_emul=elf32_sparc
+                       targ_extra_emuls="sparclinux elf64_sparc sun4"
+                       targ_extra_libpath=elf64_sparc
+                       tdir_sparclinux=${targ_alias}aout
+@@ -119,8 +119,8 @@
+ ia64-*-aix*)          targ_emul=elf64_aix ;;
+ m32r*le-*-elf*)         targ_emul=m32rlelf ;;
+ m32r*-*-elf*)           targ_emul=m32relf ;;
+-m32r*le-*-linux-gnu*)   targ_emul=m32rlelf_linux ;;
+-m32r*-*-linux-gnu*)     targ_emul=m32relf_linux ;;
++m32r*le-*-linux-*)      targ_emul=m32rlelf_linux ;;
++m32r*-*-linux-*)        targ_emul=m32relf_linux ;;
+ m68hc11-*-*|m6811-*-*)        targ_emul=m68hc11elf 
+                       targ_extra_emuls="m68hc11elfb m68hc12elf m68hc12elfb" ;;
+ m68hc12-*-*|m6812-*-*)        targ_emul=m68hc12elf 
+@@ -131,7 +131,7 @@
+ m68*-apple-aux*)      targ_emul=m68kaux ;;
+ maxq-*-coff)            targ_emul=maxqcoff;;
+ *-tandem-none)                targ_emul=st2000 ;;
+-i370-*-elf* | i370-*-linux-gnu*) targ_emul=elf32i370 ;;
++i370-*-elf* | i370-*-linux-*) targ_emul=elf32i370 ;;
+ i[3-7]86-*-nto-qnx*)  targ_emul=i386nto ;;
+ i[3-7]86-*-vsta)      targ_emul=vsta ;;
+ i[3-7]86-go32-rtems*) targ_emul=i386go32 ;;
+@@ -155,14 +155,14 @@
+                       tdir_elf_i386=`echo ${targ_alias} | sed -e 's/aout//'`
+                       ;;
+ i[3-7]86-*-linux*oldld)       targ_emul=i386linux; targ_extra_emuls=elf_i386 ;;
+-i[3-7]86-*-linux-gnu*)        targ_emul=elf_i386
++i[3-7]86-*-linux-*)   targ_emul=elf_i386
+                       targ_extra_emuls=i386linux
+                       if test x${want64} = xtrue; then
+                         targ_extra_emuls="$targ_extra_emuls elf_x86_64"
+                       fi
+                       tdir_i386linux=${targ_alias}aout
+                       ;;
+-x86_64-*-linux-gnu*)  targ_emul=elf_x86_64
++x86_64-*-linux-*)     targ_emul=elf_x86_64
+                       targ_extra_emuls="elf_i386 i386linux"
+                       targ_extra_libpath=elf_i386
+                       tdir_i386linux=`echo ${targ_alias}aout | sed -e 's/x86_64/i386/'`
+@@ -262,13 +262,13 @@
+ arm-*-kaos*)          targ_emul=armelf ;;
+ arm9e-*-elf)          targ_emul=armelf ;;
+ arm*b-*-linux-gnueabi)        targ_emul=armelfb_linux_eabi ;;
+-arm*b-*-linux-gnu*)   targ_emul=armelfb_linux; targ_extra_emuls=armelfb ;;
++arm*b-*-linux-*)      targ_emul=armelfb_linux; targ_extra_emuls=armelfb ;;
+ arm*-*-linux-gnueabi) targ_emul=armelf_linux_eabi ;;
+-arm*-*-linux-gnu*)    targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
++arm*-*-linux-*)               targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
+ arm*-*-uclinux*)      targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
+ arm-*-vxworks)                targ_emul=armelf_vxworks ;;
+ arm*-*-conix*)                targ_emul=armelf ;;
+-thumb-*-linux-gnu* | thumb-*-uclinux*)        targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
++thumb-*-linux-* | thumb-*-uclinux*)   targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
+ strongarm-*-coff)     targ_emul=armcoff ;;
+ strongarm-*-elf)      targ_emul=armelf ;;
+ strongarm-*-kaos*)    targ_emul=armelf ;;
+@@ -372,7 +372,7 @@
+                       targ_extra_emuls=m68kelf
+                       tdir_m68kelf=`echo ${targ_alias} | sed -e 's/aout//'`
+                       ;;
+-m68k-*-linux-gnu*)    targ_emul=m68kelf
++m68k-*-linux-*)       targ_emul=m68kelf
+                       targ_extra_emuls=m68klinux
+                       tdir_m68klinux=`echo ${targ_alias} | sed -e 's/linux/linuxaout/'`
+                       ;;
+@@ -388,9 +388,9 @@
+ m68*-*-psos*)         targ_emul=m68kpsos ;;
+ m68*-*-rtemscoff*)    targ_emul=m68kcoff ;;
+ m68*-*-rtems*)                targ_emul=m68kelf ;;
+-hppa*64*-*-linux-gnu*)        targ_emul=hppa64linux ;;
++hppa*64*-*-linux-*)   targ_emul=hppa64linux ;;
+ hppa*64*-*)           targ_emul=elf64hppa ;;
+-hppa*-*-linux-gnu*)   targ_emul=hppalinux ;;
++hppa*-*-linux-*)      targ_emul=hppalinux ;;
+ hppa*-*-*elf*)                targ_emul=hppaelf ;;
+ hppa*-*-lites*)               targ_emul=hppaelf ;;
+ hppa*-*-netbsd*)      targ_emul=hppanbsd ;;
+@@ -402,7 +402,7 @@
+ vax-*-netbsdaout* | vax-*-netbsd*)
+                       targ_emul=vaxnbsd
+                       targ_extra_emuls=elf32vax ;;
+-vax-*-linux-gnu*)     targ_emul=elf32vax ;;
++vax-*-linux-*)        targ_emul=elf32vax ;;
+ mips*-*-pe)           targ_emul=mipspe ;
+                       targ_extra_ofiles="deffilep.o pe-dll.o" ;;
+ mips*-dec-ultrix*)    targ_emul=mipslit ;;
+@@ -436,18 +436,18 @@
+ mips*-*-vxworks*)     targ_emul=elf32ebmip
+                       targ_extra_emuls="elf32elmip" ;;
+ mips*-*-windiss)      targ_emul=elf32mipswindiss ;;
+-mips64*el-*-linux-gnu*)       targ_emul=elf32ltsmipn32
++mips64*el-*-linux-*)  targ_emul=elf32ltsmipn32
+                       targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
+                       targ_extra_libpath="elf32ltsmip elf64ltsmip"
+                       ;;
+-mips64*-*-linux-gnu*) targ_emul=elf32btsmipn32
++mips64*-*-linux-*)    targ_emul=elf32btsmipn32
+                       targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
+                       targ_extra_libpath="elf32btsmip elf64btsmip"
+                       ;;
+-mips*el-*-linux-gnu*) targ_emul=elf32ltsmip
++mips*el-*-linux-*)    targ_emul=elf32ltsmip
+                       targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
+                       ;;
+-mips*-*-linux-gnu*)   targ_emul=elf32btsmip
++mips*-*-linux-*)      targ_emul=elf32btsmip
+                       targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip"
+                       ;;
+ mips*-*-lnews*)               targ_emul=mipslnews ;;
+@@ -467,7 +467,7 @@
+ alpha*-*-linuxecoff*) targ_emul=alpha targ_extra_emuls=elf64alpha
+                       tdir_elf64alpha=`echo ${targ_alias} | sed -e 's/ecoff//'`
+                       ;;
+-alpha*-*-linux-gnu*)  targ_emul=elf64alpha targ_extra_emuls=alpha
++alpha*-*-linux-*)     targ_emul=elf64alpha targ_extra_emuls=alpha
+                       tdir_alpha=`echo ${targ_alias} | sed -e 's/linux/linuxecoff/'`
+                       ;;
+ alpha*-*-osf*)                targ_emul=alpha ;;
+diff -ur binutils-2.15.97.orig/ld/emultempl/elf32.em binutils-2.15.97/ld/emultempl/elf32.em
+--- binutils-2.15.97.orig/ld/emultempl/elf32.em        2005-04-29 20:48:15.000000000 -0400
++++ binutils-2.15.97/ld/emultempl/elf32.em     2005-04-29 20:53:50.000000000 -0400
+@@ -65,7 +65,7 @@
+ if [ "x${USE_LIBPATH}" = xyes ] ; then
+   case ${target} in
+-    *-*-linux-gnu*)
++    *-*-linux-*)
+   cat >>e${EMULATION_NAME}.c <<EOF
+ #ifdef HAVE_GLOB
+ #include <glob.h>
+@@ -350,7 +350,7 @@
+ EOF
+ case ${target} in
+-  *-*-linux-gnu*)
++  *-*-linux-*)
+     cat >>e${EMULATION_NAME}.c <<EOF
+         {
+           struct bfd_link_needed_list *l;
+@@ -522,7 +522,7 @@
+ EOF
+   case ${target} in
+-    *-*-linux-gnu*)
++    *-*-linux-*)
+       cat >>e${EMULATION_NAME}.c <<EOF
+ /* For a native linker, check the file /etc/ld.so.conf for directories
+    in which we may find shared libraries.  /etc/ld.so.conf is really
+@@ -932,7 +932,7 @@
+ EOF
+ if [ "x${USE_LIBPATH}" = xyes ] ; then
+   case ${target} in
+-    *-*-linux-gnu*)
++    *-*-linux-*)
+       cat >>e${EMULATION_NAME}.c <<EOF
+         if (gld${EMULATION_NAME}_check_ld_so_conf (l->name, force))
+           break;
diff --git a/src/patches/binutils-uclibc-libtool-conf.patch b/src/patches/binutils-uclibc-libtool-conf.patch
new file mode 100644 (file)
index 0000000..ec38caa
--- /dev/null
@@ -0,0 +1,218 @@
+diff -urN binutils-2.16.90.0.2-dist/bfd/configure binutils-2.16.90.0.2/bfd/configure
+--- binutils-2.16.90.0.2-dist/bfd/configure    2005-04-29 12:50:24.000000000 -0500
++++ binutils-2.16.90.0.2/bfd/configure 2005-04-30 11:34:59.246377032 -0500
+@@ -3584,6 +3584,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* | knetbsd*-gnu)
+   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
+diff -urN binutils-2.16.90.0.2-dist/binutils/configure binutils-2.16.90.0.2/binutils/configure
+--- binutils-2.16.90.0.2-dist/binutils/configure       2005-04-29 12:50:26.000000000 -0500
++++ binutils-2.16.90.0.2/binutils/configure    2005-04-30 11:35:28.900868864 -0500
+@@ -1577,6 +1577,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* | knetbsd*-gnu)
+   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
+diff -urN binutils-2.16.90.0.2-dist/configure binutils-2.16.90.0.2/configure
+--- binutils-2.16.90.0.2-dist/configure        2005-04-29 12:50:23.000000000 -0500
++++ binutils-2.16.90.0.2/configure     2005-04-30 11:31:12.525843792 -0500
+@@ -1111,7 +1111,7 @@
+     ;;
+ "")
+     case "${target}" in
+-    *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
++    *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
+         # Enable libmudflap by default in GNU and friends.
+       ;;
+     *-*-freebsd*)
+diff -urN binutils-2.16.90.0.2-dist/configure.in binutils-2.16.90.0.2/configure.in
+--- binutils-2.16.90.0.2-dist/configure.in     2005-04-29 12:50:23.000000000 -0500
++++ binutils-2.16.90.0.2/configure.in  2005-04-30 11:29:51.643139832 -0500
+@@ -328,7 +328,7 @@
+     ;;
+ "")
+     case "${target}" in
+-    *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
++    *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
+         # Enable libmudflap by default in GNU and friends.
+       ;;
+     *-*-freebsd*)
+diff -urN binutils-2.16.90.0.2-dist/gas/configure binutils-2.16.90.0.2/gas/configure
+--- binutils-2.16.90.0.2-dist/gas/configure    2005-04-29 12:50:27.000000000 -0500
++++ binutils-2.16.90.0.2/gas/configure 2005-04-30 11:35:21.097055224 -0500
+@@ -3421,6 +3421,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* | knetbsd*-gnu)
+   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
+diff -urN binutils-2.16.90.0.2-dist/gas/testsuite/gas/sh/basic.exp binutils-2.16.90.0.2/gas/testsuite/gas/sh/basic.exp
+--- binutils-2.16.90.0.2-dist/gas/testsuite/gas/sh/basic.exp   2005-04-09 14:03:14.000000000 -0500
++++ binutils-2.16.90.0.2/gas/testsuite/gas/sh/basic.exp        2005-04-30 11:41:57.301822944 -0500
+@@ -20,7 +20,7 @@
+ # Written by Cygnus Support.
+-if [istarget "sh*-*-linux-gnu"] {
++if {[istarget "sh*-*-linux-gnu"] || [istarget "sh*-*-linux-uclibc"]} {
+     global ASFLAGS
+     set ASFLAGS "$ASFLAGS -big"
+ }
+diff -urN binutils-2.16.90.0.2-dist/gprof/configure binutils-2.16.90.0.2/gprof/configure
+--- binutils-2.16.90.0.2-dist/gprof/configure  2005-04-29 12:50:29.000000000 -0500
++++ binutils-2.16.90.0.2/gprof/configure       2005-04-30 11:35:36.880655752 -0500
+@@ -3419,6 +3419,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* | knetbsd*-gnu)
+   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
+diff -urN binutils-2.16.90.0.2-dist/ld/configure binutils-2.16.90.0.2/ld/configure
+--- binutils-2.16.90.0.2-dist/ld/configure     2005-04-29 12:50:30.000000000 -0500
++++ binutils-2.16.90.0.2/ld/configure  2005-04-30 11:46:15.974498720 -0500
+@@ -1581,6 +1581,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* | knetbsd*-gnu)
+   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
+diff -urN binutils-2.16.90.0.2-dist/ld/testsuite/ld-sh/sh.exp binutils-2.16.90.0.2/ld/testsuite/ld-sh/sh.exp
+--- binutils-2.16.90.0.2-dist/ld/testsuite/ld-sh/sh.exp        2005-04-09 14:03:29.000000000 -0500
++++ binutils-2.16.90.0.2/ld/testsuite/ld-sh/sh.exp     2005-04-30 11:45:07.890849008 -0500
+@@ -62,7 +62,7 @@
+ set testsrec "SH relaxing to S-records"
+-if [istarget sh*-linux-gnu] {
++if {[istarget sh*-linux-gnu] || [istarget sh*-*-linux-uclibc]} {
+     # This target needs the explicit entry address.
+     catch "exec $objdump -x tmpdir/sh1 | grep start\\ address | sed s/start\\ address//" entry_addr
+     set srec_relax_arg "-Ttext $entry_addr -relax --oformat srec tmpdir/sh1.o"
+@@ -117,7 +117,7 @@
+     return
+ }
+-if [istarget sh*-linux-gnu] {
++if {[istarget sh*-linux-gnu] || [istarget sh*-*-linux-uclibc]} {
+     exec sed -e s/_main/main/ -e s/_trap/trap/ -e s/_stack/stack/ \
+           < $srcdir/$subdir/start.s >tmpdir/start.s
+ } else {
+diff -urN binutils-2.16.90.0.2-dist/ld/testsuite/ld-srec/srec.exp binutils-2.16.90.0.2/ld/testsuite/ld-srec/srec.exp
+--- binutils-2.16.90.0.2-dist/ld/testsuite/ld-srec/srec.exp    2005-04-29 12:50:30.000000000 -0500
++++ binutils-2.16.90.0.2/ld/testsuite/ld-srec/srec.exp 2005-04-30 11:44:26.358162936 -0500
+@@ -385,7 +385,7 @@
+ setup_xfail "v850*-*-elf"
+ # The S-record linker doesn't handle Alpha Elf relaxation.
+-setup_xfail "alpha*-*-elf*" "alpha*-*-linux-gnu*" "alpha*-*-gnu*"
++setup_xfail "alpha*-*-elf*" "alpha*-*-linux-gnu*" "alpha*-*-gnu*" "alpha*-*-linux-uclibc*"
+ setup_xfail "alpha*-*-netbsd*"
+ # The S-record linker hasn't any hope of coping with HPPA relocs.
+@@ -424,7 +424,7 @@
+ setup_xfail "thumb-*-*"
+ setup_xfail "powerpc*-*-eabi*"
+ setup_xfail "v850*-*-elf"
+-setup_xfail "alpha*-*-elf*" "alpha*-*-linux-gnu*" "alpha*-*-gnu*"
++setup_xfail "alpha*-*-elf*" "alpha*-*-linux-gnu*" "alpha*-*-gnu*" "alpha*-*-linux-uclibc*"
+ setup_xfail "alpha*-*-netbsd*"
+ setup_xfail "hppa*-*-*"
+ setup_xfail "ia64-*-*"
+diff -urN binutils-2.16.90.0.2-dist/libtool.m4 binutils-2.16.90.0.2/libtool.m4
+--- binutils-2.16.90.0.2-dist/libtool.m4       2004-07-27 23:36:06.000000000 -0500
++++ binutils-2.16.90.0.2/libtool.m4    2005-04-30 11:35:54.062043784 -0500
+@@ -645,6 +645,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* | knetbsd*-gnu)
+   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+     [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
+diff -urN binutils-2.16.90.0.2-dist/ltconfig binutils-2.16.90.0.2/ltconfig
+--- binutils-2.16.90.0.2-dist/ltconfig 2004-11-22 14:33:30.000000000 -0600
++++ binutils-2.16.90.0.2/ltconfig      2005-04-30 11:22:10.594229920 -0500
+@@ -602,6 +602,7 @@
+ # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
+ case $host_os in
++linux-uclibc*) ;;
+ linux-gnu*) ;;
+ linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
+ esac
+@@ -1270,6 +1271,23 @@
+   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.
++  hardcode_into_libs=yes
++  # Assume using the uClibc dynamic linker.
++  dynamic_linker="uClibc ld.so"
++  ;;
++
+ netbsd*)
+   need_lib_prefix=no
+   need_version=no
+diff -urN binutils-2.16.90.0.2-dist/opcodes/configure binutils-2.16.90.0.2/opcodes/configure
+--- binutils-2.16.90.0.2-dist/opcodes/configure        2005-04-29 12:50:31.000000000 -0500
++++ binutils-2.16.90.0.2/opcodes/configure     2005-04-30 11:17:07.168357664 -0500
+@@ -3588,6 +3588,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* | knetbsd*-gnu)
+   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
diff --git a/src/patches/gcc-libstdc++-pic.patch b/src/patches/gcc-libstdc++-pic.patch
new file mode 100644 (file)
index 0000000..a9d6e71
--- /dev/null
@@ -0,0 +1,45 @@
+--- gcc-4.0.0/libstdc++-v3/src/Makefile.am
++++ gcc-4.0.0/libstdc++-v3/src/Makefile.am
+@@ -214,6 +214,10 @@
+         $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
++install-exec-local:
++      $(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
++      $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++
+ # Added bits to build debug library.
+ if GLIBCXX_BUILD_DEBUG
+ all-local: build_debug
+--- gcc-4.0.0/libstdc++-v3/src/Makefile.in
++++ gcc-4.0.0/libstdc++-v3/src/Makefile.in
+@@ -625,7 +625,7 @@
+ install-data-am: install-data-local
+-install-exec-am: install-toolexeclibLTLIBRARIES
++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
+ install-info: install-info-am
+@@ -664,7 +664,7 @@
+       maintainer-clean-generic mostlyclean mostlyclean-compile \
+       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+       tags uninstall uninstall-am uninstall-info-am \
+-      uninstall-toolexeclibLTLIBRARIES
++      uninstall-toolexeclibLTLIBRARIES install-exec-local
+ @GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@libstdc++-symbol.ver:  ${glibcxx_srcdir}/$(SYMVER_MAP)
+ @GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@  cp ${glibcxx_srcdir}/$(SYMVER_MAP) ./libstdc++-symbol.ver
+@@ -743,6 +743,11 @@
+ install_debug:
+       (cd ${debugdir} && $(MAKE) \
+       toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
++
++install-exec-local:
++      $(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
++      $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+ .NOEXPORT:
diff --git a/src/patches/gcc-sdk-libstdc++-includes.patch b/src/patches/gcc-sdk-libstdc++-includes.patch
new file mode 100644 (file)
index 0000000..c7676ae
--- /dev/null
@@ -0,0 +1,22 @@
+diff -urN gcc-4.0.0-100/libstdc++-v3/fragment.am gcc-4.0.0/libstdc++-v3/fragment.am
+--- gcc-4.0.0-100/libstdc++-v3/fragment.am     2004-10-25 15:32:40.000000000 -0500
++++ gcc-4.0.0/libstdc++-v3/fragment.am 2005-04-28 21:48:43.000000000 -0500
+@@ -18,5 +18,5 @@
+       $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
+ # -I/-D flags to pass when compiling.
+-AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
++AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include
+diff -urN gcc-4.0.0-100/libstdc++-v3/libmath/Makefile.am gcc-4.0.0/libstdc++-v3/libmath/Makefile.am
+--- gcc-4.0.0-100/libstdc++-v3/libmath/Makefile.am     2003-08-27 16:29:42.000000000 -0500
++++ gcc-4.0.0/libstdc++-v3/libmath/Makefile.am 2005-04-28 21:48:43.000000000 -0500
+@@ -32,7 +32,7 @@
+ libmath_la_SOURCES = stubs.c
+-AM_CPPFLAGS = $(CANADIAN_INCLUDES)
++AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
+ # Only compiling "C" sources in this directory.
+ LIBTOOL = @LIBTOOL@ --tag CC
diff --git a/src/patches/gcc-uclibc-conf.patch b/src/patches/gcc-uclibc-conf.patch
new file mode 100644 (file)
index 0000000..3be7d09
--- /dev/null
@@ -0,0 +1,553 @@
+--- gcc-4.0.2/gcc/config/t-linux-uclibc
++++ gcc-4.0.2/gcc/config/t-linux-uclibc
+@@ -0,0 +1,5 @@
++# Remove glibc specific files added in t-linux
++SHLIB_MAPFILES := $(filter-out $(srcdir)/config/libgcc-glibc.ver, $(SHLIB_MAPFILES))
++
++# Use unwind-dw2-fde instead of unwind-dw2-fde-glibc
++LIB2ADDEH := $(subst unwind-dw2-fde-glibc.c,unwind-dw2-fde.c,$(LIB2ADDEH))
+--- gcc-4.0.2/gcc/config.gcc
++++ gcc-4.0.2/gcc/config.gcc
+@@ -1778,7 +1778,7 @@
+       ;;
+ sh-*-elf* | sh[12346l]*-*-elf* | sh*-*-kaos* | \
+ sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
+-  sh-*-linux* | sh[346lbe]*-*-linux* | \
++  sh*-*-linux* | sh[346lbe]*-*-linux* | \
+   sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
+    sh64-*-netbsd* | sh64l*-*-netbsd*)
+       tmake_file="${tmake_file} sh/t-sh sh/t-elf"
+@@ -2234,10 +2234,16 @@
+ *)
+       echo "*** Configuration ${target} not supported" 1>&2
+       exit 1
+       ;;
+ esac
++
++# Rather than hook into each target, just do it after all the linux
++# targets have been processed
++case ${target} in
++*-linux-uclibc*) tm_defines="${tm_defines} USE_UCLIBC" ; tmake_file="${tmake_file} t-linux-uclibc"
++esac
+ case ${target} in
+ i[34567]86-*-linux*aout* | i[34567]86-*-linux*libc1)
+       tmake_file="${tmake_file} i386/t-gmm_malloc"
+       ;;
+--- gcc-4.0.2/gcc/config/alpha/linux-elf.h
++++ gcc-4.0.2/gcc/config/alpha/linux-elf.h
+@@ -27,7 +27,11 @@
+ #define SUBTARGET_EXTRA_SPECS \
+ { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
++#ifdef USE_UCLIBC
++#define ELF_DYNAMIC_LINKER    "/lib/ld-uClibc.so.0"
++#else
+ #define ELF_DYNAMIC_LINKER    "/lib/ld-linux.so.2"
++#endif
+ #define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax}                \
+   %{O*:-O3} %{!O*:-O1}                                                \
+--- gcc-4.0.2/gcc/config/arm/linux-elf.h
++++ gcc-4.0.2/gcc/config/arm/linux-elf.h
+@@ -81,14 +81,19 @@
+ #define ENDFILE_SPEC \
+   "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
++#ifdef USE_UCLIBC
++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
++#else
++#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#endif
+ #undef  LINK_SPEC
+ #define LINK_SPEC "%{h*} %{version:-v} \
+    %{b} %{Wl,*:%*} \
+    %{static:-Bstatic} \
+    %{shared:-shared} \
+    %{symbolic:-Bsymbolic} \
+    %{rdynamic:-export-dynamic} \
+-   %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
++   %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "} \
+    -X \
+    %{mbig-endian:-EB}" \
+    SUBTARGET_EXTRA_LINK_SPEC
+--- gcc-4.0.2/gcc/config/cris/linux.h
++++ gcc-4.0.2/gcc/config/cris/linux.h
+@@ -79,6 +79,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"
+@@ -93,6 +112,8 @@
+   %{!shared:%{!static:%{rdynamic:-export-dynamic}}}\
+   %{!r:%{O2|O3: --gc-sections}}"
++#endif  /* USE_UCLIBC */
++
+ /* Node: Run-time Target */
+--- gcc-4.0.2/gcc/config/i386/linux.h
++++ gcc-4.0.2/gcc/config/i386/linux.h
+@@ -107,6 +107,11 @@
+ #define LINK_EMULATION "elf_i386"
+ #define DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#ifdef USE_UCLIBC
++#undef DYNAMIC_LINKER
++#define DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
++#endif
++
+ #undef  SUBTARGET_EXTRA_SPECS
+ #define SUBTARGET_EXTRA_SPECS \
+   { "link_emulation", LINK_EMULATION },\
+--- gcc-4.0.2/gcc/config/i386/linux64.h
++++ gcc-4.0.2/gcc/config/i386/linux64.h
+@@ -54,14 +54,21 @@
+    When the -shared link option is used a final link is not being
+    done.  */
++#ifdef USE_UCLIBC
++#define ELF32_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
++#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
++#else
++#define ELF32_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define ELF64_DYNAMIC_LINKER "/lib64/ld-linux-x86-64.so.2"
++#endif
+ #undef        LINK_SPEC
+ #define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \
+   %{shared:-shared} \
+   %{!shared: \
+     %{!static: \
+       %{rdynamic:-export-dynamic} \
+-      %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
+-      %{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \
++      %{m32:%{!dynamic-linker:-dynamic-linker " ELF32_DYNAMIC_LINKER "}} \
++      %{!m32:%{!dynamic-linker:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}} \
+     %{static:-static}}"
+ #define MULTILIB_DEFAULTS { "m64" }
+--- gcc-4.0.2/gcc/config/ia64/linux.h
++++ gcc-4.0.2/gcc/config/ia64/linux.h
+@@ -37,13 +37,18 @@
+ /* Define this for shared library support because it isn't in the main
+    linux.h file.  */
++#ifdef USE_UCLIBC
++#define ELF_DYNAMIC_LINKER    "/lib/ld-uClibc.so.0"
++#else
++#define ELF_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2"
++#endif
+ #undef LINK_SPEC
+ #define LINK_SPEC "\
+   %{shared:-shared} \
+   %{!shared: \
+     %{!static: \
+       %{rdynamic:-export-dynamic} \
+-      %{!dynamic-linker:-dynamic-linker /lib/ld-linux-ia64.so.2}} \
++      %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
+       %{static:-static}}"
+--- gcc-4.0.2/gcc/config/m68k/linux.h
++++ gcc-4.0.2/gcc/config/m68k/linux.h
+@@ -127,12 +127,17 @@
+ /* If ELF is the default format, we should not use /lib/elf.  */
++#ifdef USE_UCLIBC
++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
++#else
++#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
++#endif
+ #undef        LINK_SPEC
+ #define LINK_SPEC "-m m68kelf %{shared} \
+   %{!shared: \
+     %{!static: \
+       %{rdynamic:-export-dynamic} \
+-      %{!dynamic-linker*:-dynamic-linker /lib/ld.so.1}} \
++      %{!dynamic-linker*:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
+     %{static}}"
+ /* For compatibility with linux/a.out */
+--- gcc-4.0.2/gcc/config/mips/linux.h
++++ gcc-4.0.2/gcc/config/mips/linux.h
+@@ -108,14 +108,19 @@
+ /* Borrowed from sparc/linux.h */
+ #undef LINK_SPEC
++#ifdef USE_UCLIBC
++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
++#else
++#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
++#endif
+ #define LINK_SPEC \
+  "%(endian_spec) \
+   %{shared:-shared} \
+   %{!shared: \
+     %{!ibcs: \
+       %{!static: \
+         %{rdynamic:-export-dynamic} \
+-        %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
++        %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
+         %{static:-static}}}"
+ #undef SUBTARGET_ASM_SPEC
+--- gcc-4.0.2/gcc/config/pa/pa-linux.h
++++ gcc-4.0.2/gcc/config/pa/pa-linux.h
+@@ -82,13 +82,18 @@
+ /* Define this for shared library support because it isn't in the main
+    linux.h file.  */
++#ifdef USE_UCLIBC
++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
++#else
++#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
++#endif
+ #undef LINK_SPEC
+ #define LINK_SPEC "\
+   %{shared:-shared} \
+   %{!shared: \
+     %{!static: \
+       %{rdynamic:-export-dynamic} \
+-      %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
++      %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
+       %{static:-static}}"
+ /* glibc's profiling functions don't need gcc to allocate counters.  */
+--- gcc-4.0.2/gcc/config/rs6000/linux.h
++++ gcc-4.0.2/gcc/config/rs6000/linux.h
+@@ -69,7 +69,11 @@
+ #define LINK_START_DEFAULT_SPEC "%(link_start_linux)"
+ #undef        LINK_OS_DEFAULT_SPEC
++#ifdef USE_UCLIBC
++#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)"
++#else
+ #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
++#endif
+ #define LINK_GCC_C_SEQUENCE_SPEC \
+   "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
+--- gcc-4.0.2/gcc/config/rs6000/sysv4.h
++++ gcc-4.0.2/gcc/config/rs6000/sysv4.h
+@@ -949,6 +949,7 @@
+   mcall-linux  : %(link_os_linux)       ; \
+   mcall-gnu    : %(link_os_gnu)         ; \
+   mcall-netbsd : %(link_os_netbsd)      ; \
++  mcall-linux-uclibc : %(link_os_linux_uclibc); \
+   mcall-openbsd: %(link_os_openbsd)     ; \
+                : %(link_os_default)     }"
+@@ -1127,6 +1128,10 @@
+   %{rdynamic:-export-dynamic} \
+   %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
++#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \
++  %{rdynamic:-export-dynamic} \
++  %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}"
++
+ #if defined(HAVE_LD_EH_FRAME_HDR)
+ # define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
+ #endif
+@@ -1293,6 +1298,7 @@
+   { "link_os_sim",            LINK_OS_SIM_SPEC },                     \
+   { "link_os_freebsd",                LINK_OS_FREEBSD_SPEC },                 \
+   { "link_os_linux",          LINK_OS_LINUX_SPEC },                   \
++  { "link_os_linux_uclibc",   LINK_OS_LINUX_UCLIBC_SPEC },            \
+   { "link_os_gnu",            LINK_OS_GNU_SPEC },                     \
+   { "link_os_netbsd",         LINK_OS_NETBSD_SPEC },                  \
+   { "link_os_openbsd",                LINK_OS_OPENBSD_SPEC },                 \
+--- gcc-4.0.2/gcc/config/s390/linux.h
++++ gcc-4.0.2/gcc/config/s390/linux.h
+@@ -77,6 +77,13 @@
+ #define MULTILIB_DEFAULTS { "m31" }
+ #endif
++#ifdef USE_UCLIBC
++#define ELF31_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
++#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
++#else
++#define ELF31_DYNAMIC_LINKER "/lib/ld.so.1"
++#define ELF64_DYNAMIC_LINKER "/lib/ld64.so.1"
++#endif
+ #undef  LINK_SPEC
+ #define LINK_SPEC \
+   "%{m31:-m elf_s390}%{m64:-m elf64_s390} \
+@@ -86,8 +93,8 @@
+       %{!static: \
+       %{rdynamic:-export-dynamic} \
+       %{!dynamic-linker: \
+-          %{m31:-dynamic-linker /lib/ld.so.1} \
+-          %{m64:-dynamic-linker /lib/ld64.so.1}}}}"
++          %{m31:-dynamic-linker " ELF31_DYNAMIC_LINKER "} \
++          %{m64:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}}}"
+ #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
+--- gcc-4.0.2/gcc/config/sh/linux.h
++++ gcc-4.0.2/gcc/config/sh/linux.h
+@@ -67,11 +67,16 @@
+ #undef SUBTARGET_LINK_EMUL_SUFFIX
+ #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
+ #undef SUBTARGET_LINK_SPEC
++#ifdef USE_UCLIBC
++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
++#else
++#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#endif
+ #define SUBTARGET_LINK_SPEC \
+   "%{shared:-shared} \
+    %{!static: \
+      %{rdynamic:-export-dynamic} \
+-     %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
++     %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
+    %{static:-static}"
+ #undef LIB_SPEC
+--- gcc-4.0.2/gcc/config/sparc/linux.h
++++ gcc-4.0.2/gcc/config/sparc/linux.h
+@@ -130,14 +130,19 @@
+ /* If ELF is the default format, we should not use /lib/elf.  */
++#ifdef USE_UCLIBC
++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
++#else
++#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#endif
+ #undef  LINK_SPEC
+ #define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
+   %{!mno-relax:%{!r:-relax}} \
+   %{!shared: \
+     %{!ibcs: \
+       %{!static: \
+         %{rdynamic:-export-dynamic} \
+-        %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
++        %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
+         %{static:-static}}}"
+ /* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
+--- gcc-4.0.2/gcc/config/sparc/linux64.h
++++ gcc-4.0.2/gcc/config/sparc/linux64.h
+@@ -167,12 +166,17 @@
+   { "link_arch_default", LINK_ARCH_DEFAULT_SPEC },      \
+   { "link_arch",       LINK_ARCH_SPEC },
+     
++#ifdef USE_UCLIBC
++#define ELF_DYNAMIC_LINKER    "/lib/ld-uClibc.so.0"
++#else
++#define ELF_DYNAMIC_LINKER  "/lib/ld-linux.so.2"
++#endif
+ #define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
+   %{!shared: \
+     %{!ibcs: \
+       %{!static: \
+         %{rdynamic:-export-dynamic} \
+-        %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
++        %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
+         %{static:-static}}} \
+ "
+--- gcc-4.0.2/libtool.m4
++++ gcc-4.0.2/libtool.m4
+@@ -682,6 +682,11 @@
+   lt_cv_deplibs_check_method=pass_all
+   ;;
++linux-uclibc*)
++  lt_cv_deplibs_check_method=pass_all
++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
++  ;;
++
+ netbsd* | knetbsd*-gnu)
+   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+     [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
+--- gcc-4.0.2/ltconfig
++++ gcc-4.0.2/ltconfig
+@@ -603,6 +603,7 @@
+ # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
+ case $host_os in
++linux-uclibc*) ;;
+ linux-gnu*) ;;
+ linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
+ esac
+@@ -1274,6 +1275,23 @@
+   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.
++  hardcode_into_libs=yes
++  # Assume using the uClibc dynamic linker.
++  dynamic_linker="uClibc ld.so"
++  ;;
++
+ netbsd*)
+   need_lib_prefix=no
+   need_version=no
+--- gcc-4.0.2/libffi/configure
++++ gcc-4.0.2/libffi/configure
+@@ -3457,6 +3457,11 @@
+   lt_cv_deplibs_check_method=pass_all
+   ;;
++linux-uclibc*)
++  lt_cv_deplibs_check_method=pass_all
++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
++  ;;
++
+ netbsd* | knetbsd*-gnu)
+   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
+--- gcc-4.0.2/libgfortran/configure
++++ gcc-4.0.2/libgfortran/configure
+@@ -3681,6 +3681,11 @@
+   lt_cv_deplibs_check_method=pass_all
+   ;;
++linux-uclibc*)
++  lt_cv_deplibs_check_method=pass_all
++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
++  ;;
++
+ netbsd* | knetbsd*-gnu)
+   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
+--- gcc-4.0.2/libjava/configure
++++ gcc-4.0.2/libjava/configure
+@@ -4351,6 +4351,11 @@
+   lt_cv_deplibs_check_method=pass_all
+   ;;
++linux-uclibc*)
++  lt_cv_deplibs_check_method=pass_all
++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
++  ;;
++
+ netbsd* | knetbsd*-gnu)
+   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
+--- gcc-4.0.2/libmudflap/configure
++++ gcc-4.0.2/libmudflap/configure
+@@ -5380,6 +5380,11 @@
+   lt_cv_deplibs_check_method=pass_all
+   ;;
++linux-uclibc*)
++  lt_cv_deplibs_check_method=pass_all
++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
++  ;;
++
+ netbsd* | knetbsd*-gnu)
+   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
+--- gcc-4.0.2/libobjc/configure
++++ gcc-4.0.2/libobjc/configure
+@@ -3283,6 +3283,11 @@
+   lt_cv_deplibs_check_method=pass_all
+   ;;
++linux-uclibc*)
++  lt_cv_deplibs_check_method=pass_all
++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
++  ;;
++
+ netbsd* | knetbsd*-gnu)
+   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
+--- gcc-4.0.2/boehm-gc/configure
++++ gcc-4.0.2/boehm-gc/configure
+@@ -4320,6 +4320,11 @@
+   lt_cv_deplibs_check_method=pass_all
+   ;;
++linux-uclibc*)
++  lt_cv_deplibs_check_method=pass_all
++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
++  ;;
++
+ netbsd* | knetbsd*-gnu)
+   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
+--- gcc-4.0.2/configure
++++ gcc-4.0.2/configure
+@@ -1141,7 +1141,7 @@
+     ;;
+ "")
+     case "${target}" in
+-    *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
++    *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
+         # Enable libmudflap by default in GNU and friends.
+       ;;
+     *-*-freebsd*)
+--- gcc-4.0.2/configure.in
++++ gcc-4.0.2/configure.in
+@@ -350,7 +350,7 @@
+     ;;
+ "")
+     case "${target}" in
+-    *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
++    *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
+         # Enable libmudflap by default in GNU and friends.
+       ;;
+     *-*-freebsd*)
+--- gcc-4.0.2/contrib/regression/objs-gcc.sh
++++ gcc-4.0.2/contrib/regression/objs-gcc.sh
+@@ -105,6 +105,10 @@
+  then
+   make all-gdb all-dejagnu all-ld || exit 1
+   make install-gdb install-dejagnu install-ld || exit 1
++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
++ then
++  make all-gdb all-dejagnu all-ld || exit 1
++  make install-gdb install-dejagnu install-ld || exit 1
+ elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
+   make bootstrap || exit 1
+   make install || exit 1
+--- gcc-4.0.2/zlib/configure
++++ gcc-4.0.2/zlib/configure
+@@ -3426,6 +3426,11 @@
+   lt_cv_deplibs_check_method=pass_all
+   ;;
++linux-uclibc*)
++  lt_cv_deplibs_check_method=pass_all
++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
++  ;;
++
+ netbsd* | knetbsd*-gnu)
+   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
diff --git a/src/patches/gcc-uclibc-locale.patch b/src/patches/gcc-uclibc-locale.patch
new file mode 100644 (file)
index 0000000..ac4cf97
--- /dev/null
@@ -0,0 +1,3237 @@
+diff -urN gcc-4.0.0-100/libstdc++-v3/acinclude.m4 gcc-4.0.0/libstdc++-v3/acinclude.m4
+--- gcc-4.0.0-100/libstdc++-v3/acinclude.m4    2005-04-30 13:06:53.000000000 -0500
++++ gcc-4.0.0/libstdc++-v3/acinclude.m4        2005-04-28 20:19:01.000000000 -0500
+@@ -1104,7 +1104,7 @@
+   AC_MSG_CHECKING([for C locale to use])
+   GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@],
+     [use MODEL for target locale package],
+-    [permit generic|gnu|ieee_1003.1-2001|yes|no|auto])
++    [permit generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto])
+   
+   # If they didn't use this option switch, or if they specified --enable
+   # with no specific model, we'll have to look for one.  If they
+@@ -1120,6 +1120,9 @@
+   # Default to "generic".
+   if test $enable_clocale_flag = auto; then
+     case ${target_os} in
++      *-uclibc*)
++        enable_clocale_flag=uclibc
++        ;;
+       linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
+         AC_EGREP_CPP([_GLIBCXX_ok], [
+         #include <features.h>
+@@ -1263,6 +1266,40 @@
+       CTIME_CC=config/locale/generic/time_members.cc
+       CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
+       ;;
++    uclibc)
++      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 \
++        glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
++        glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
++      done
++      AC_SUBST(glibcxx_MOFILES)
++      AC_SUBST(glibcxx_POFILES)
++
++      CLOCALE_H=config/locale/uclibc/c_locale.h
++      CLOCALE_CC=config/locale/uclibc/c_locale.cc
++      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
++      ;;
+   esac
+   # This is where the testsuite looks for locale catalogs, using the
+diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/c++locale_internal.h gcc-4.0.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
+--- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/c++locale_internal.h       1969-12-31 18:00:00.000000000 -0600
++++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h   2005-04-28 01:13:15.000000000 -0500
+@@ -0,0 +1,59 @@
++// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*-
++
++// Copyright (C) 2002, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library.  This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING.  If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction.  Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License.  This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++// Written by Jakub Jelinek <jakub@redhat.com>
++
++#include <clocale>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning clean this up
++#endif
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++                                                  
++extern "C" __typeof(iswctype_l) __iswctype_l;
++extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l;
++extern "C" __typeof(strcoll_l) __strcoll_l;
++extern "C" __typeof(strftime_l) __strftime_l;
++extern "C" __typeof(strtod_l) __strtod_l;
++extern "C" __typeof(strtof_l) __strtof_l;
++extern "C" __typeof(strtold_l) __strtold_l;
++extern "C" __typeof(strxfrm_l) __strxfrm_l;
++extern "C" __typeof(towlower_l) __towlower_l;
++extern "C" __typeof(towupper_l) __towupper_l;
++extern "C" __typeof(wcscoll_l) __wcscoll_l;
++extern "C" __typeof(wcsftime_l) __wcsftime_l;
++extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
++extern "C" __typeof(wctype_l) __wctype_l;
++extern "C" __typeof(newlocale) __newlocale;
++extern "C" __typeof(freelocale) __freelocale;
++extern "C" __typeof(duplocale) __duplocale;
++extern "C" __typeof(uselocale) __uselocale;
++
++#endif // GLIBC 2.3 and later
+diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/c_locale.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/c_locale.cc
+--- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/c_locale.cc        1969-12-31 18:00:00.000000000 -0600
++++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/c_locale.cc    2005-04-28 01:13:15.000000000 -0500
+@@ -0,0 +1,160 @@
++// Wrapper for underlying C-language localization -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library.  This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING.  If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction.  Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License.  This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.8  Standard locale categories.
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#include <cerrno>  // For errno
++#include <locale>
++#include <stdexcept>
++#include <langinfo.h>
++#include <bits/c++locale_internal.h>
++
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __strtol_l(S, E, B, L)      strtol((S), (E), (B))
++#define __strtoul_l(S, E, B, L)     strtoul((S), (E), (B))
++#define __strtoll_l(S, E, B, L)     strtoll((S), (E), (B))
++#define __strtoull_l(S, E, B, L)    strtoull((S), (E), (B))
++#define __strtof_l(S, E, L)         strtof((S), (E))
++#define __strtod_l(S, E, L)         strtod((S), (E))
++#define __strtold_l(S, E, L)        strtold((S), (E))
++#warning should dummy __newlocale check for C|POSIX ?
++#define __newlocale(a, b, c)        NULL
++#define __freelocale(a)             ((void)0)
++#define __duplocale(a)              __c_locale()
++#endif
++
++namespace std 
++{
++  template<>
++    void
++    __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err, 
++                 const __c_locale& __cloc)
++    {
++      if (!(__err & ios_base::failbit))
++      {
++        char* __sanity;
++        errno = 0;
++        float __f = __strtof_l(__s, &__sanity, __cloc);
++          if (__sanity != __s && errno != ERANGE)
++          __v = __f;
++        else
++          __err |= ios_base::failbit;
++      }
++    }
++
++  template<>
++    void
++    __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err, 
++                 const __c_locale& __cloc)
++    {
++      if (!(__err & ios_base::failbit))
++      {
++        char* __sanity;
++        errno = 0;
++        double __d = __strtod_l(__s, &__sanity, __cloc);
++          if (__sanity != __s && errno != ERANGE)
++          __v = __d;
++        else
++          __err |= ios_base::failbit;
++      }
++    }
++
++  template<>
++    void
++    __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
++                 const __c_locale& __cloc)
++    {
++      if (!(__err & ios_base::failbit))
++      {
++        char* __sanity;
++        errno = 0;
++        long double __ld = __strtold_l(__s, &__sanity, __cloc);
++          if (__sanity != __s && errno != ERANGE)
++          __v = __ld;
++        else
++          __err |= ios_base::failbit;
++      }
++    }
++
++  void
++  locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s, 
++                                  __c_locale __old)
++  {
++    __cloc = __newlocale(1 << LC_ALL, __s, __old);
++#ifdef __UCLIBC_HAS_XLOCALE__
++    if (!__cloc)
++      {
++      // This named locale is not supported by the underlying OS.
++      __throw_runtime_error(__N("locale::facet::_S_create_c_locale "
++                            "name not valid"));
++      }
++#endif
++  }
++  
++  void
++  locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
++  {
++    if (_S_get_c_locale() != __cloc)
++      __freelocale(__cloc); 
++  }
++
++  __c_locale
++  locale::facet::_S_clone_c_locale(__c_locale& __cloc)
++  { return __duplocale(__cloc); }
++} // namespace std
++
++namespace __gnu_cxx
++{
++  const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
++    {
++      "LC_CTYPE", 
++      "LC_NUMERIC",
++      "LC_TIME", 
++      "LC_COLLATE", 
++      "LC_MONETARY",
++      "LC_MESSAGES", 
++#if _GLIBCXX_NUM_CATEGORIES != 0
++      "LC_PAPER", 
++      "LC_NAME", 
++      "LC_ADDRESS",
++      "LC_TELEPHONE", 
++      "LC_MEASUREMENT", 
++      "LC_IDENTIFICATION" 
++#endif
++    };
++}
++
++namespace std
++{
++  const char* const* const locale::_S_categories = __gnu_cxx::category_names;
++}  // namespace std
+diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/c_locale.h gcc-4.0.0/libstdc++-v3/config/locale/uclibc/c_locale.h
+--- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/c_locale.h 1969-12-31 18:00:00.000000000 -0600
++++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/c_locale.h     2005-04-28 01:13:15.000000000 -0500
+@@ -0,0 +1,115 @@
++// Wrapper for underlying C-language localization -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library.  This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING.  If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction.  Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License.  This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.8  Standard locale categories.
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#ifndef _C_LOCALE_H
++#define _C_LOCALE_H 1
++
++#pragma GCC system_header
++
++#include <cstring>              // get std::strlen
++#include <cstdio>               // get std::snprintf or std::sprintf
++#include <clocale>
++#include <langinfo.h>         // For codecvt
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix this
++#endif
++#ifdef __UCLIBC_HAS_LOCALE__
++#include <iconv.h>            // For codecvt using iconv, iconv_t
++#endif
++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
++#include <libintl.h>          // For messages
++#endif
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning what is _GLIBCXX_C_LOCALE_GNU for
++#endif
++#define _GLIBCXX_C_LOCALE_GNU 1
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix categories
++#endif
++// #define _GLIBCXX_NUM_CATEGORIES 6
++#define _GLIBCXX_NUM_CATEGORIES 0
++ 
++#ifdef __UCLIBC_HAS_XLOCALE__
++namespace __gnu_cxx
++{
++  extern "C" __typeof(uselocale) __uselocale;
++}
++#endif
++
++namespace std
++{
++#ifdef __UCLIBC_HAS_XLOCALE__
++  typedef __locale_t          __c_locale;
++#else
++  typedef int*                        __c_locale;
++#endif
++
++  // Convert numeric value of type _Tv to string and return length of
++  // string.  If snprintf is available use it, otherwise fall back to
++  // the unsafe sprintf which, in general, can be dangerous and should
++  // be avoided.
++  template<typename _Tv>
++    int
++    __convert_from_v(char* __out, const int __size, const char* __fmt,
++#ifdef __UCLIBC_HAS_XLOCALE__
++                   _Tv __v, const __c_locale& __cloc, int __prec)
++    {
++      __c_locale __old = __gnu_cxx::__uselocale(__cloc);
++#else
++                   _Tv __v, const __c_locale&, int __prec)
++    {
++# ifdef __UCLIBC_HAS_LOCALE__
++      char* __old = std::setlocale(LC_ALL, NULL);
++      char* __sav = new char[std::strlen(__old) + 1];
++      std::strcpy(__sav, __old);
++      std::setlocale(LC_ALL, "C");
++# endif
++#endif
++
++      const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++      __gnu_cxx::__uselocale(__old);
++#elif defined __UCLIBC_HAS_LOCALE__
++      std::setlocale(LC_ALL, __sav);
++      delete [] __sav;
++#endif
++      return __ret;
++    }
++}
++
++#endif
+diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/codecvt_members.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
+--- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/codecvt_members.cc 1969-12-31 18:00:00.000000000 -0600
++++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/codecvt_members.cc     2005-04-28 01:13:15.000000000 -0500
+@@ -0,0 +1,306 @@
++// std::codecvt implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library.  This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING.  If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction.  Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License.  This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.1.5 - Template class codecvt
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#include <locale>
++#include <bits/c++locale_internal.h>
++
++namespace std
++{
++  // Specializations.
++#ifdef _GLIBCXX_USE_WCHAR_T
++  codecvt_base::result
++  codecvt<wchar_t, char, mbstate_t>::
++  do_out(state_type& __state, const intern_type* __from, 
++       const intern_type* __from_end, const intern_type*& __from_next,
++       extern_type* __to, extern_type* __to_end,
++       extern_type*& __to_next) const
++  {
++    result __ret = ok;
++    state_type __tmp_state(__state);
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++    __c_locale __old = __uselocale(_M_c_locale_codecvt);
++#endif
++
++    // wcsnrtombs is *very* fast but stops if encounters NUL characters:
++    // in case we fall back to wcrtomb and then continue, in a loop.
++    // NB: wcsnrtombs is a GNU extension
++    for (__from_next = __from, __to_next = __to;
++       __from_next < __from_end && __to_next < __to_end
++       && __ret == ok;)
++      {
++      const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0',
++                                                    __from_end - __from_next);
++      if (!__from_chunk_end)
++        __from_chunk_end = __from_end;
++
++      __from = __from_next;
++      const size_t __conv = wcsnrtombs(__to_next, &__from_next,
++                                       __from_chunk_end - __from_next,
++                                       __to_end - __to_next, &__state);
++      if (__conv == static_cast<size_t>(-1))
++        {
++          // In case of error, in order to stop at the exact place we
++          // have to start again from the beginning with a series of
++          // wcrtomb.
++          for (; __from < __from_next; ++__from)
++            __to_next += wcrtomb(__to_next, *__from, &__tmp_state);
++          __state = __tmp_state;
++          __ret = error;
++        }
++      else if (__from_next && __from_next < __from_chunk_end)
++        {
++          __to_next += __conv;
++          __ret = partial;
++        }
++      else
++        {
++          __from_next = __from_chunk_end;
++          __to_next += __conv;
++        }
++
++      if (__from_next < __from_end && __ret == ok)
++        {
++          extern_type __buf[MB_LEN_MAX];
++          __tmp_state = __state;
++          const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state);
++          if (__conv > static_cast<size_t>(__to_end - __to_next))
++            __ret = partial;
++          else
++            {
++              memcpy(__to_next, __buf, __conv);
++              __state = __tmp_state;
++              __to_next += __conv;
++              ++__from_next;
++            }
++        }
++      }
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++    __uselocale(__old);
++#endif
++
++    return __ret; 
++  }
++  
++  codecvt_base::result
++  codecvt<wchar_t, char, mbstate_t>::
++  do_in(state_type& __state, const extern_type* __from, 
++      const extern_type* __from_end, const extern_type*& __from_next,
++      intern_type* __to, intern_type* __to_end,
++      intern_type*& __to_next) const
++  {
++    result __ret = ok;
++    state_type __tmp_state(__state);
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++    __c_locale __old = __uselocale(_M_c_locale_codecvt);
++#endif
++
++    // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
++    // in case we store a L'\0' and then continue, in a loop.
++    // NB: mbsnrtowcs is a GNU extension
++    for (__from_next = __from, __to_next = __to;
++       __from_next < __from_end && __to_next < __to_end
++       && __ret == ok;)
++      {
++      const extern_type* __from_chunk_end;
++      __from_chunk_end = static_cast<const extern_type*>(memchr(__from_next, '\0',
++                                                                __from_end
++                                                                - __from_next));
++      if (!__from_chunk_end)
++        __from_chunk_end = __from_end;
++
++      __from = __from_next;
++      size_t __conv = mbsnrtowcs(__to_next, &__from_next,
++                                 __from_chunk_end - __from_next,
++                                 __to_end - __to_next, &__state);
++      if (__conv == static_cast<size_t>(-1))
++        {
++          // In case of error, in order to stop at the exact place we
++          // have to start again from the beginning with a series of
++          // mbrtowc.
++          for (;; ++__to_next, __from += __conv)
++            {
++              __conv = mbrtowc(__to_next, __from, __from_end - __from,
++                               &__tmp_state);
++              if (__conv == static_cast<size_t>(-1)
++                  || __conv == static_cast<size_t>(-2))
++                break;
++            }
++          __from_next = __from;
++          __state = __tmp_state;          
++          __ret = error;
++        }
++      else if (__from_next && __from_next < __from_chunk_end)
++        {
++          // It is unclear what to return in this case (see DR 382). 
++          __to_next += __conv;
++          __ret = partial;
++        }
++      else
++        {
++          __from_next = __from_chunk_end;
++          __to_next += __conv;
++        }
++
++      if (__from_next < __from_end && __ret == ok)
++        {
++          if (__to_next < __to_end)
++            {
++              // XXX Probably wrong for stateful encodings
++              __tmp_state = __state;          
++              ++__from_next;
++              *__to_next++ = L'\0';
++            }
++          else
++            __ret = partial;
++        }
++      }
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++    __uselocale(__old);
++#endif
++
++    return __ret; 
++  }
++
++  int 
++  codecvt<wchar_t, char, mbstate_t>::
++  do_encoding() const throw()
++  {
++    // XXX This implementation assumes that the encoding is
++    // stateless and is either single-byte or variable-width.
++    int __ret = 0;
++#ifdef __UCLIBC_HAS_XLOCALE__
++    __c_locale __old = __uselocale(_M_c_locale_codecvt);
++#endif
++    if (MB_CUR_MAX == 1)
++      __ret = 1;
++#ifdef __UCLIBC_HAS_XLOCALE__
++    __uselocale(__old);
++#endif
++    return __ret;
++  }  
++
++  int 
++  codecvt<wchar_t, char, mbstate_t>::
++  do_max_length() const throw()
++  {
++#ifdef __UCLIBC_HAS_XLOCALE__
++    __c_locale __old = __uselocale(_M_c_locale_codecvt);
++#endif
++    // XXX Probably wrong for stateful encodings.
++    int __ret = MB_CUR_MAX;
++#ifdef __UCLIBC_HAS_XLOCALE__
++    __uselocale(__old);
++#endif
++    return __ret;
++  }
++  
++  int 
++  codecvt<wchar_t, char, mbstate_t>::
++  do_length(state_type& __state, const extern_type* __from,
++          const extern_type* __end, size_t __max) const
++  {
++    int __ret = 0;
++    state_type __tmp_state(__state);
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++    __c_locale __old = __uselocale(_M_c_locale_codecvt);
++#endif
++
++    // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
++    // in case we advance past it and then continue, in a loop.
++    // NB: mbsnrtowcs is a GNU extension
++  
++    // A dummy internal buffer is needed in order for mbsnrtocws to consider
++    // its fourth parameter (it wouldn't with NULL as first parameter).
++    wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t) 
++                                                         * __max));
++    while (__from < __end && __max)
++      {
++      const extern_type* __from_chunk_end;
++      __from_chunk_end = static_cast<const extern_type*>(memchr(__from, '\0',
++                                                                __end
++                                                                - __from));
++      if (!__from_chunk_end)
++        __from_chunk_end = __end;
++
++      const extern_type* __tmp_from = __from;
++      size_t __conv = mbsnrtowcs(__to, &__from,
++                                 __from_chunk_end - __from,
++                                 __max, &__state);
++      if (__conv == static_cast<size_t>(-1))
++        {
++          // In case of error, in order to stop at the exact place we
++          // have to start again from the beginning with a series of
++          // mbrtowc.
++          for (__from = __tmp_from;; __from += __conv)
++            {
++              __conv = mbrtowc(NULL, __from, __end - __from,
++                               &__tmp_state);
++              if (__conv == static_cast<size_t>(-1)
++                  || __conv == static_cast<size_t>(-2))
++                break;
++            }
++          __state = __tmp_state;
++          __ret += __from - __tmp_from;
++          break;
++        }
++      if (!__from)
++        __from = __from_chunk_end;
++      
++      __ret += __from - __tmp_from;
++      __max -= __conv;
++
++      if (__from < __end && __max)
++        {
++          // XXX Probably wrong for stateful encodings
++          __tmp_state = __state;
++          ++__from;
++          ++__ret;
++          --__max;
++        }
++      }
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++    __uselocale(__old);
++#endif
++
++    return __ret; 
++  }
++#endif
++}
+diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/collate_members.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/collate_members.cc
+--- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/collate_members.cc 1969-12-31 18:00:00.000000000 -0600
++++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/collate_members.cc     2005-04-28 01:13:15.000000000 -0500
+@@ -0,0 +1,80 @@
++// std::collate implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library.  This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING.  If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction.  Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License.  This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.4.1.2  collate virtual functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#include <locale>
++#include <bits/c++locale_internal.h>
++
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __strcoll_l(S1, S2, L)      strcoll((S1), (S2))
++#define __strxfrm_l(S1, S2, N, L)   strxfrm((S1), (S2), (N))
++#define __wcscoll_l(S1, S2, L)      wcscoll((S1), (S2))
++#define __wcsxfrm_l(S1, S2, N, L)   wcsxfrm((S1), (S2), (N))
++#endif
++
++namespace std
++{
++  // These are basically extensions to char_traits, and perhaps should
++  // be put there instead of here.
++  template<>
++    int 
++    collate<char>::_M_compare(const char* __one, const char* __two) const
++    { 
++      int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate);
++      return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
++    }
++  
++  template<>
++    size_t
++    collate<char>::_M_transform(char* __to, const char* __from, 
++                              size_t __n) const 
++    { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++  template<>
++    int 
++    collate<wchar_t>::_M_compare(const wchar_t* __one, 
++                               const wchar_t* __two) const
++    {
++      int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate);
++      return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
++    }
++  
++  template<>
++    size_t
++    collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from,
++                                 size_t __n) const
++    { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); }
++#endif
++}
+diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/ctype_members.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc
+--- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/ctype_members.cc   1969-12-31 18:00:00.000000000 -0600
++++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc       2005-04-28 01:13:15.000000000 -0500
+@@ -0,0 +1,300 @@
++// std::ctype implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library.  This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING.  If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction.  Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License.  This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.1.1.2  ctype virtual functions.
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#define _LIBC
++#include <locale>
++#undef _LIBC
++#include <bits/c++locale_internal.h>
++
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __wctype_l(S, L)           wctype((S))
++#define __towupper_l(C, L)         towupper((C))
++#define __towlower_l(C, L)         towlower((C))
++#define __iswctype_l(C, M, L)      iswctype((C), (M))
++#endif
++
++namespace std
++{
++  // NB: The other ctype<char> specializations are in src/locale.cc and
++  // various /config/os/* files.
++  template<>
++    ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
++    : ctype<char>(0, false, __refs) 
++    {                 
++      if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
++      {
++        this->_S_destroy_c_locale(this->_M_c_locale_ctype);
++        this->_S_create_c_locale(this->_M_c_locale_ctype, __s); 
++#ifdef __UCLIBC_HAS_XLOCALE__
++        this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper;
++        this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower;
++        this->_M_table = this->_M_c_locale_ctype->__ctype_b;
++#endif
++      }
++    }
++
++#ifdef _GLIBCXX_USE_WCHAR_T  
++  ctype<wchar_t>::__wmask_type
++  ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const
++  {
++    __wmask_type __ret;
++    switch (__m)
++      {
++      case space:
++      __ret = __wctype_l("space", _M_c_locale_ctype);
++      break;
++      case print:
++      __ret = __wctype_l("print", _M_c_locale_ctype);
++      break;
++      case cntrl:
++      __ret = __wctype_l("cntrl", _M_c_locale_ctype);
++      break;
++      case upper:
++      __ret = __wctype_l("upper", _M_c_locale_ctype);
++      break;
++      case lower:
++      __ret = __wctype_l("lower", _M_c_locale_ctype);
++      break;
++      case alpha:
++      __ret = __wctype_l("alpha", _M_c_locale_ctype);
++      break;
++      case digit:
++      __ret = __wctype_l("digit", _M_c_locale_ctype);
++      break;
++      case punct:
++      __ret = __wctype_l("punct", _M_c_locale_ctype);
++      break;
++      case xdigit:
++      __ret = __wctype_l("xdigit", _M_c_locale_ctype);
++      break;
++      case alnum:
++      __ret = __wctype_l("alnum", _M_c_locale_ctype);
++      break;
++      case graph:
++      __ret = __wctype_l("graph", _M_c_locale_ctype);
++      break;
++      default:
++      __ret = __wmask_type();
++      }
++    return __ret;
++  }
++  
++  wchar_t
++  ctype<wchar_t>::do_toupper(wchar_t __c) const
++  { return __towupper_l(__c, _M_c_locale_ctype); }
++
++  const wchar_t*
++  ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const
++  {
++    while (__lo < __hi)
++      {
++        *__lo = __towupper_l(*__lo, _M_c_locale_ctype);
++        ++__lo;
++      }
++    return __hi;
++  }
++  
++  wchar_t
++  ctype<wchar_t>::do_tolower(wchar_t __c) const
++  { return __towlower_l(__c, _M_c_locale_ctype); }
++  
++  const wchar_t*
++  ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const
++  {
++    while (__lo < __hi)
++      {
++        *__lo = __towlower_l(*__lo, _M_c_locale_ctype);
++        ++__lo;
++      }
++    return __hi;
++  }
++
++  bool
++  ctype<wchar_t>::
++  do_is(mask __m, wchar_t __c) const
++  { 
++    // Highest bitmask in ctype_base == 10, but extra in "C"
++    // library for blank.
++    bool __ret = false;
++    const size_t __bitmasksize = 11; 
++    for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
++      if (__m & _M_bit[__bitcur]
++        && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
++      {
++        __ret = true;
++        break;
++      }
++    return __ret;    
++  }
++  
++  const wchar_t* 
++  ctype<wchar_t>::
++  do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
++  {
++    for (; __lo < __hi; ++__vec, ++__lo)
++      {
++      // Highest bitmask in ctype_base == 10, but extra in "C"
++      // library for blank.
++      const size_t __bitmasksize = 11; 
++      mask __m = 0;
++      for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
++        if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype))
++          __m |= _M_bit[__bitcur];
++      *__vec = __m;
++      }
++    return __hi;
++  }
++  
++  const wchar_t* 
++  ctype<wchar_t>::
++  do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
++  {
++    while (__lo < __hi && !this->do_is(__m, *__lo))
++      ++__lo;
++    return __lo;
++  }
++
++  const wchar_t*
++  ctype<wchar_t>::
++  do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
++  {
++    while (__lo < __hi && this->do_is(__m, *__lo) != 0)
++      ++__lo;
++    return __lo;
++  }
++
++  wchar_t
++  ctype<wchar_t>::
++  do_widen(char __c) const
++  { return _M_widen[static_cast<unsigned char>(__c)]; }
++
++  const char* 
++  ctype<wchar_t>::
++  do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
++  {
++    while (__lo < __hi)
++      {
++      *__dest = _M_widen[static_cast<unsigned char>(*__lo)];
++      ++__lo;
++      ++__dest;
++      }
++    return __hi;
++  }
++
++  char
++  ctype<wchar_t>::
++  do_narrow(wchar_t __wc, char __dfault) const
++  {
++    if (__wc >= 0 && __wc < 128 && _M_narrow_ok)
++      return _M_narrow[__wc];
++#ifdef __UCLIBC_HAS_XLOCALE__
++    __c_locale __old = __uselocale(_M_c_locale_ctype);
++#endif
++    const int __c = wctob(__wc);
++#ifdef __UCLIBC_HAS_XLOCALE__
++    __uselocale(__old);
++#endif
++    return (__c == EOF ? __dfault : static_cast<char>(__c)); 
++  }
++
++  const wchar_t*
++  ctype<wchar_t>::
++  do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault, 
++          char* __dest) const
++  {
++#ifdef __UCLIBC_HAS_XLOCALE__
++    __c_locale __old = __uselocale(_M_c_locale_ctype);
++#endif
++    if (_M_narrow_ok)
++      while (__lo < __hi)
++      {
++        if (*__lo >= 0 && *__lo < 128)
++          *__dest = _M_narrow[*__lo];
++        else
++          {
++            const int __c = wctob(*__lo);
++            *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
++          }
++        ++__lo;
++        ++__dest;
++      }
++    else
++      while (__lo < __hi)
++      {
++        const int __c = wctob(*__lo);
++        *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
++        ++__lo;
++        ++__dest;
++      }
++#ifdef __UCLIBC_HAS_XLOCALE__
++    __uselocale(__old);
++#endif
++    return __hi;
++  }
++
++  void
++  ctype<wchar_t>::_M_initialize_ctype()
++  {
++#ifdef __UCLIBC_HAS_XLOCALE__
++    __c_locale __old = __uselocale(_M_c_locale_ctype);
++#endif
++    wint_t __i;
++    for (__i = 0; __i < 128; ++__i)
++      {
++      const int __c = wctob(__i);
++      if (__c == EOF)
++        break;
++      else
++        _M_narrow[__i] = static_cast<char>(__c);
++      }
++    if (__i == 128)
++      _M_narrow_ok = true;
++    else
++      _M_narrow_ok = false;
++    for (size_t __j = 0;
++       __j < sizeof(_M_widen) / sizeof(wint_t); ++__j)
++      _M_widen[__j] = btowc(__j);
++
++    for (size_t __k = 0; __k <= 11; ++__k)
++      { 
++      _M_bit[__k] = static_cast<mask>(_ISbit(__k));
++      _M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]);
++      }
++#ifdef __UCLIBC_HAS_XLOCALE__
++    __uselocale(__old);
++#endif
++  }
++#endif //  _GLIBCXX_USE_WCHAR_T
++}
+diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/messages_members.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/messages_members.cc
+--- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/messages_members.cc        1969-12-31 18:00:00.000000000 -0600
++++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/messages_members.cc    2005-04-28 01:13:15.000000000 -0500
+@@ -0,0 +1,100 @@
++// std::messages implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library.  This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING.  If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction.  Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License.  This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.7.1.2  messages virtual functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#include <locale>
++#include <bits/c++locale_internal.h>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix gettext stuff
++#endif
++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
++extern "C" char *__dcgettext(const char *domainname,
++                           const char *msgid, int category);
++#undef gettext
++#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
++#else
++#undef gettext
++#define gettext(msgid) (msgid)
++#endif
++
++namespace std
++{
++  // Specializations.
++  template<>
++    string
++    messages<char>::do_get(catalog, int, int, const string& __dfault) const
++    {
++#ifdef __UCLIBC_HAS_XLOCALE__
++      __c_locale __old = __uselocale(_M_c_locale_messages);
++      const char* __msg = const_cast<const char*>(gettext(__dfault.c_str()));
++      __uselocale(__old);
++      return string(__msg);
++#elif defined __UCLIBC_HAS_LOCALE__
++      char* __old = strdup(setlocale(LC_ALL, NULL));
++      setlocale(LC_ALL, _M_name_messages);
++      const char* __msg = gettext(__dfault.c_str());
++      setlocale(LC_ALL, __old);
++      free(__old);
++      return string(__msg);
++#else
++      const char* __msg = gettext(__dfault.c_str());
++      return string(__msg);
++#endif
++    }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++  template<>
++    wstring
++    messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const
++    {
++# ifdef __UCLIBC_HAS_XLOCALE__
++      __c_locale __old = __uselocale(_M_c_locale_messages);
++      char* __msg = gettext(_M_convert_to_char(__dfault));
++      __uselocale(__old);
++      return _M_convert_from_char(__msg);
++# elif defined __UCLIBC_HAS_LOCALE__
++      char* __old = strdup(setlocale(LC_ALL, NULL));
++      setlocale(LC_ALL, _M_name_messages);
++      char* __msg = gettext(_M_convert_to_char(__dfault));
++      setlocale(LC_ALL, __old);
++      free(__old);
++      return _M_convert_from_char(__msg);
++# else
++      char* __msg = gettext(_M_convert_to_char(__dfault));
++      return _M_convert_from_char(__msg);
++# endif
++    }
++#endif
++}
+diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.0.0/libstdc++-v3/config/locale/uclibc/messages_members.h
+--- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/messages_members.h 1969-12-31 18:00:00.000000000 -0600
++++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/messages_members.h     2005-04-28 01:13:15.000000000 -0500
+@@ -0,0 +1,118 @@
++// std::messages implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library.  This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING.  If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction.  Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License.  This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.7.1.2  messages functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix prototypes for *textdomain funcs
++#endif
++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
++extern "C" char *__textdomain(const char *domainname);
++extern "C" char *__bindtextdomain(const char *domainname,
++                                const char *dirname);
++#else
++#undef __textdomain
++#undef __bindtextdomain
++#define __textdomain(D)           ((void)0)
++#define __bindtextdomain(D,P)     ((void)0)
++#endif
++
++  // Non-virtual member functions.
++  template<typename _CharT>
++     messages<_CharT>::messages(size_t __refs)
++     : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), 
++     _M_name_messages(_S_get_c_name())
++     { }
++
++  template<typename _CharT>
++     messages<_CharT>::messages(__c_locale __cloc, const char* __s, 
++                              size_t __refs) 
++     : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
++     _M_name_messages(__s)
++     {
++       char* __tmp = new char[std::strlen(__s) + 1];
++       std::strcpy(__tmp, __s);
++       _M_name_messages = __tmp;
++     }
++
++  template<typename _CharT>
++    typename messages<_CharT>::catalog 
++    messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc, 
++                         const char* __dir) const
++    { 
++      __bindtextdomain(__s.c_str(), __dir);
++      return this->do_open(__s, __loc); 
++    }
++
++  // Virtual member functions.
++  template<typename _CharT>
++    messages<_CharT>::~messages()
++    { 
++      if (_M_name_messages != _S_get_c_name())
++      delete [] _M_name_messages;
++      _S_destroy_c_locale(_M_c_locale_messages); 
++    }
++
++  template<typename _CharT>
++    typename messages<_CharT>::catalog 
++    messages<_CharT>::do_open(const basic_string<char>& __s, 
++                            const locale&) const
++    { 
++      // No error checking is done, assume the catalog exists and can
++      // be used.
++      __textdomain(__s.c_str());
++      return 0;
++    }
++
++  template<typename _CharT>
++    void    
++    messages<_CharT>::do_close(catalog) const 
++    { }
++
++   // messages_byname
++   template<typename _CharT>
++     messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
++     : messages<_CharT>(__refs) 
++     { 
++       if (this->_M_name_messages != locale::facet::_S_get_c_name())
++       delete [] this->_M_name_messages;
++       char* __tmp = new char[std::strlen(__s) + 1];
++       std::strcpy(__tmp, __s);
++       this->_M_name_messages = __tmp;
++
++       if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
++       {
++         this->_S_destroy_c_locale(this->_M_c_locale_messages);
++         this->_S_create_c_locale(this->_M_c_locale_messages, __s); 
++       }
++     }
+diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+--- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/monetary_members.cc        1969-12-31 18:00:00.000000000 -0600
++++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc    2005-04-28 01:23:02.000000000 -0500
+@@ -0,0 +1,692 @@
++// std::moneypunct implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library.  This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING.  If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction.  Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License.  This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.6.3.2  moneypunct virtual functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#define _LIBC
++#include <locale>
++#undef _LIBC
++#include <bits/c++locale_internal.h>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning optimize this for uclibc
++#warning tailor for stub locale support
++#endif
++
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __nl_langinfo_l(N, L)         nl_langinfo((N))
++#endif
++
++namespace std
++{
++  // Construct and return valid pattern consisting of some combination of:
++  // space none symbol sign value
++  money_base::pattern
++  money_base::_S_construct_pattern(char __precedes, char __space, char __posn)
++  { 
++    pattern __ret;
++
++    // This insanely complicated routine attempts to construct a valid
++    // pattern for use with monyepunct. A couple of invariants:
++
++    // if (__precedes) symbol -> value
++    // else value -> symbol
++    
++    // if (__space) space
++    // else none
++
++    // none == never first
++    // space never first or last
++
++    // Any elegant implementations of this are welcome.
++    switch (__posn)
++      {
++      case 0:
++      case 1:
++      // 1 The sign precedes the value and symbol.
++      __ret.field[0] = sign;
++      if (__space)
++        {
++          // Pattern starts with sign.
++          if (__precedes)
++            {
++              __ret.field[1] = symbol;
++              __ret.field[3] = value;
++            }
++          else
++            {
++              __ret.field[1] = value;
++              __ret.field[3] = symbol;
++            }
++          __ret.field[2] = space;
++        }
++      else
++        {
++          // Pattern starts with sign and ends with none.
++          if (__precedes)
++            {
++              __ret.field[1] = symbol;
++              __ret.field[2] = value;
++            }
++          else
++            {
++              __ret.field[1] = value;
++              __ret.field[2] = symbol;
++            }
++          __ret.field[3] = none;
++        }
++      break;
++      case 2:
++      // 2 The sign follows the value and symbol.
++      if (__space)
++        {
++          // Pattern either ends with sign.
++          if (__precedes)
++            {
++              __ret.field[0] = symbol;
++              __ret.field[2] = value;
++            }
++          else
++            {
++              __ret.field[0] = value;
++              __ret.field[2] = symbol;
++            }
++          __ret.field[1] = space;
++          __ret.field[3] = sign;
++        }
++      else
++        {
++          // Pattern ends with sign then none.
++          if (__precedes)
++            {
++              __ret.field[0] = symbol;
++              __ret.field[1] = value;
++            }
++          else
++            {
++              __ret.field[0] = value;
++              __ret.field[1] = symbol;
++            }
++          __ret.field[2] = sign;
++          __ret.field[3] = none;
++        }
++      break;
++      case 3:
++      // 3 The sign immediately precedes the symbol.
++      if (__precedes)
++        {
++          __ret.field[0] = sign;
++          __ret.field[1] = symbol;        
++          if (__space)
++            {
++              __ret.field[2] = space;
++              __ret.field[3] = value;
++            }
++          else
++            {
++              __ret.field[2] = value;         
++              __ret.field[3] = none;
++            }
++        }
++      else
++        {
++          __ret.field[0] = value;
++          if (__space)
++            {
++              __ret.field[1] = space;
++              __ret.field[2] = sign;
++              __ret.field[3] = symbol;
++            }
++          else
++            {
++              __ret.field[1] = sign;
++              __ret.field[2] = symbol;
++              __ret.field[3] = none;
++            }
++        }
++      break;
++      case 4:
++      // 4 The sign immediately follows the symbol.
++      if (__precedes)
++        {
++          __ret.field[0] = symbol;
++          __ret.field[1] = sign;
++          if (__space)
++            {
++              __ret.field[2] = space;
++              __ret.field[3] = value;
++            }
++          else
++            {
++              __ret.field[2] = value;
++              __ret.field[3] = none;
++            }
++        }
++      else
++        {
++          __ret.field[0] = value;
++          if (__space)
++            {
++              __ret.field[1] = space;
++              __ret.field[2] = symbol;
++              __ret.field[3] = sign;
++            }
++          else
++            {
++              __ret.field[1] = symbol;
++              __ret.field[2] = sign;
++              __ret.field[3] = none;
++            }
++        }
++      break;
++      default:
++      __ret = pattern();
++      }
++    return __ret;
++  }
++
++  template<> 
++    void
++    moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc, 
++                                                   const char*)
++    {
++      if (!_M_data)
++      _M_data = new __moneypunct_cache<char, true>;
++
++      if (!__cloc)
++      {
++        // "C" locale
++        _M_data->_M_decimal_point = '.';
++        _M_data->_M_thousands_sep = ',';
++        _M_data->_M_grouping = "";
++        _M_data->_M_grouping_size = 0;
++        _M_data->_M_curr_symbol = "";
++        _M_data->_M_curr_symbol_size = 0;
++        _M_data->_M_positive_sign = "";
++        _M_data->_M_positive_sign_size = 0;
++        _M_data->_M_negative_sign = "";
++        _M_data->_M_negative_sign_size = 0;
++        _M_data->_M_frac_digits = 0;
++        _M_data->_M_pos_format = money_base::_S_default_pattern;
++        _M_data->_M_neg_format = money_base::_S_default_pattern;
++
++        for (size_t __i = 0; __i < money_base::_S_end; ++__i)
++          _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
++      }
++      else
++      {
++        // Named locale.
++        _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, 
++                                                      __cloc));
++        _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, 
++                                                      __cloc));
++        _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
++        _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++        _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
++        _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
++
++        char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
++        if (!__nposn)
++          _M_data->_M_negative_sign = "()";
++        else
++          _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, 
++                                                      __cloc);
++        _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
++
++        // _Intl == true
++        _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
++        _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
++        _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, 
++                                                    __cloc));
++        char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
++        char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
++        char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
++        _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, 
++                                                      __pposn);
++        char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
++        char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
++        _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, 
++                                                      __nposn);
++      }
++    }
++
++  template<> 
++    void
++    moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc, 
++                                                    const char*)
++    {
++      if (!_M_data)
++      _M_data = new __moneypunct_cache<char, false>;
++
++      if (!__cloc)
++      {
++        // "C" locale
++        _M_data->_M_decimal_point = '.';
++        _M_data->_M_thousands_sep = ',';
++        _M_data->_M_grouping = "";
++        _M_data->_M_grouping_size = 0;
++        _M_data->_M_curr_symbol = "";
++        _M_data->_M_curr_symbol_size = 0;
++        _M_data->_M_positive_sign = "";
++        _M_data->_M_positive_sign_size = 0;
++        _M_data->_M_negative_sign = "";
++        _M_data->_M_negative_sign_size = 0;
++        _M_data->_M_frac_digits = 0;
++        _M_data->_M_pos_format = money_base::_S_default_pattern;
++        _M_data->_M_neg_format = money_base::_S_default_pattern;
++
++        for (size_t __i = 0; __i < money_base::_S_end; ++__i)
++          _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
++      }
++      else
++      {
++        // Named locale.
++        _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, 
++                                                      __cloc));
++        _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, 
++                                                      __cloc));
++        _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
++        _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++        _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
++        _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
++
++        char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
++        if (!__nposn)
++          _M_data->_M_negative_sign = "()";
++        else
++          _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
++                                                      __cloc);
++        _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
++
++        // _Intl == false
++        _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
++        _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
++        _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
++        char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
++        char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
++        char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
++        _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, 
++                                                      __pposn);
++        char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
++        char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
++        _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, 
++                                                      __nposn);
++      }
++    }
++
++  template<> 
++    moneypunct<char, true>::~moneypunct()
++    { delete _M_data; }
++
++  template<> 
++    moneypunct<char, false>::~moneypunct()
++    { delete _M_data; }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++  template<> 
++    void
++    moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc, 
++#ifdef __UCLIBC_HAS_XLOCALE__
++                                                      const char*)
++#else
++                                                      const char* __name)
++#endif
++    {
++      if (!_M_data)
++      _M_data = new __moneypunct_cache<wchar_t, true>;
++
++      if (!__cloc)
++      {
++        // "C" locale
++        _M_data->_M_decimal_point = L'.';
++        _M_data->_M_thousands_sep = L',';
++        _M_data->_M_grouping = "";
++        _M_data->_M_grouping_size = 0;
++        _M_data->_M_curr_symbol = L"";
++        _M_data->_M_curr_symbol_size = 0;
++        _M_data->_M_positive_sign = L"";
++        _M_data->_M_positive_sign_size = 0;
++        _M_data->_M_negative_sign = L"";
++        _M_data->_M_negative_sign_size = 0;
++        _M_data->_M_frac_digits = 0;
++        _M_data->_M_pos_format = money_base::_S_default_pattern;
++        _M_data->_M_neg_format = money_base::_S_default_pattern;
++
++        // Use ctype::widen code without the facet...
++        for (size_t __i = 0; __i < money_base::_S_end; ++__i)
++          _M_data->_M_atoms[__i] =
++            static_cast<wchar_t>(money_base::_S_atoms[__i]);
++      }
++      else
++      {
++        // Named locale.
++#ifdef __UCLIBC_HAS_XLOCALE__
++        __c_locale __old = __uselocale(__cloc);
++#else
++        // Switch to named locale so that mbsrtowcs will work.
++        char* __old = strdup(setlocale(LC_ALL, NULL));
++        setlocale(LC_ALL, __name);
++#endif
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix this... should be monetary
++#endif
++#ifdef __UCLIBC__
++# ifdef __UCLIBC_HAS_XLOCALE__
++        _M_data->_M_decimal_point = __cloc->decimal_point_wc;
++        _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
++# else
++        _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
++        _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
++# endif
++#else
++        union { char *__s; wchar_t __w; } __u;
++        __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
++        _M_data->_M_decimal_point = __u.__w;
++
++        __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
++        _M_data->_M_thousands_sep = __u.__w;
++#endif
++        _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
++        _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++
++        const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
++        const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
++        const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
++
++        wchar_t* __wcs_ps = 0;
++        wchar_t* __wcs_ns = 0;
++        const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
++        try
++          {
++            mbstate_t __state;
++            size_t __len = strlen(__cpossign);
++            if (__len)
++              {
++                ++__len;
++                memset(&__state, 0, sizeof(mbstate_t));
++                __wcs_ps = new wchar_t[__len];
++                mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
++                _M_data->_M_positive_sign = __wcs_ps;
++              }
++            else
++              _M_data->_M_positive_sign = L"";
++            _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
++            
++            __len = strlen(__cnegsign);
++            if (!__nposn)
++              _M_data->_M_negative_sign = L"()";
++            else if (__len)
++              { 
++                ++__len;
++                memset(&__state, 0, sizeof(mbstate_t));
++                __wcs_ns = new wchar_t[__len];
++                mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
++                _M_data->_M_negative_sign = __wcs_ns;
++              }
++            else
++              _M_data->_M_negative_sign = L"";
++            _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
++            
++            // _Intl == true.
++            __len = strlen(__ccurr);
++            if (__len)
++              {
++                ++__len;
++                memset(&__state, 0, sizeof(mbstate_t));
++                wchar_t* __wcs = new wchar_t[__len];
++                mbsrtowcs(__wcs, &__ccurr, __len, &__state);
++                _M_data->_M_curr_symbol = __wcs;
++              }
++            else
++              _M_data->_M_curr_symbol = L"";
++            _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
++          }
++        catch (...)
++          {
++            delete _M_data;
++            _M_data = 0;
++            delete __wcs_ps;
++            delete __wcs_ns;        
++#ifdef __UCLIBC_HAS_XLOCALE__
++            __uselocale(__old);
++#else
++            setlocale(LC_ALL, __old);
++            free(__old);
++#endif
++            __throw_exception_again;
++          } 
++        
++        _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, 
++                                                    __cloc));
++        char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
++        char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
++        char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
++        _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, 
++                                                      __pposn);
++        char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
++        char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
++        _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, 
++                                                      __nposn);
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++        __uselocale(__old);
++#else
++        setlocale(LC_ALL, __old);
++        free(__old);
++#endif
++      }
++    }
++
++  template<> 
++  void
++  moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc,
++#ifdef __UCLIBC_HAS_XLOCALE__
++                                                     const char*)
++#else
++                                                       const char* __name)
++#endif
++  {
++    if (!_M_data)
++      _M_data = new __moneypunct_cache<wchar_t, false>;
++
++    if (!__cloc)
++      {
++        // "C" locale
++        _M_data->_M_decimal_point = L'.';
++        _M_data->_M_thousands_sep = L',';
++        _M_data->_M_grouping = "";
++          _M_data->_M_grouping_size = 0;
++        _M_data->_M_curr_symbol = L"";
++        _M_data->_M_curr_symbol_size = 0;
++        _M_data->_M_positive_sign = L"";
++        _M_data->_M_positive_sign_size = 0;
++        _M_data->_M_negative_sign = L"";
++        _M_data->_M_negative_sign_size = 0;
++        _M_data->_M_frac_digits = 0;
++        _M_data->_M_pos_format = money_base::_S_default_pattern;
++        _M_data->_M_neg_format = money_base::_S_default_pattern;
++
++        // Use ctype::widen code without the facet...
++        for (size_t __i = 0; __i < money_base::_S_end; ++__i)
++          _M_data->_M_atoms[__i] =
++            static_cast<wchar_t>(money_base::_S_atoms[__i]);
++      }
++      else
++      {
++        // Named locale.
++#ifdef __UCLIBC_HAS_XLOCALE__
++        __c_locale __old = __uselocale(__cloc);
++#else
++        // Switch to named locale so that mbsrtowcs will work.
++        char* __old = strdup(setlocale(LC_ALL, NULL));
++        setlocale(LC_ALL, __name);
++#endif
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix this... should be monetary
++#endif
++#ifdef __UCLIBC__
++# ifdef __UCLIBC_HAS_XLOCALE__
++        _M_data->_M_decimal_point = __cloc->decimal_point_wc;
++        _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
++# else
++        _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
++        _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
++# endif
++#else
++          union { char *__s; wchar_t __w; } __u;
++        __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
++        _M_data->_M_decimal_point = __u.__w;
++
++        __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
++        _M_data->_M_thousands_sep = __u.__w;
++#endif
++        _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
++          _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++
++        const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
++        const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
++        const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
++
++        wchar_t* __wcs_ps = 0;
++        wchar_t* __wcs_ns = 0;
++        const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
++        try
++            {
++              mbstate_t __state;
++              size_t __len;
++              __len = strlen(__cpossign);
++              if (__len)
++                {
++                ++__len;
++                memset(&__state, 0, sizeof(mbstate_t));
++                __wcs_ps = new wchar_t[__len];
++                mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
++                _M_data->_M_positive_sign = __wcs_ps;
++              }
++            else
++              _M_data->_M_positive_sign = L"";
++              _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
++            
++            __len = strlen(__cnegsign);
++            if (!__nposn)
++              _M_data->_M_negative_sign = L"()";
++            else if (__len)
++              { 
++                ++__len;
++                memset(&__state, 0, sizeof(mbstate_t));
++                __wcs_ns = new wchar_t[__len];
++                mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
++                _M_data->_M_negative_sign = __wcs_ns;
++              }
++            else
++              _M_data->_M_negative_sign = L"";
++              _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
++
++            // _Intl == true.
++            __len = strlen(__ccurr);
++            if (__len)
++              {
++                ++__len;
++                memset(&__state, 0, sizeof(mbstate_t));
++                wchar_t* __wcs = new wchar_t[__len];
++                mbsrtowcs(__wcs, &__ccurr, __len, &__state);
++                _M_data->_M_curr_symbol = __wcs;
++              }
++            else
++              _M_data->_M_curr_symbol = L"";
++              _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
++          }
++          catch (...)
++          {
++            delete _M_data;
++              _M_data = 0;
++            delete __wcs_ps;
++            delete __wcs_ns;        
++#ifdef __UCLIBC_HAS_XLOCALE__
++            __uselocale(__old);
++#else
++            setlocale(LC_ALL, __old);
++            free(__old);
++#endif
++              __throw_exception_again;
++          }
++
++        _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
++        char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
++        char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
++        char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
++        _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, 
++                                                      __pposn);
++        char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
++        char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
++        _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, 
++                                                      __nposn);
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++        __uselocale(__old);
++#else
++        setlocale(LC_ALL, __old);
++        free(__old);
++#endif
++      }
++    }
++
++  template<> 
++    moneypunct<wchar_t, true>::~moneypunct()
++    {
++      if (_M_data->_M_positive_sign_size)
++      delete [] _M_data->_M_positive_sign;
++      if (_M_data->_M_negative_sign_size
++          && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
++      delete [] _M_data->_M_negative_sign;
++      if (_M_data->_M_curr_symbol_size)
++      delete [] _M_data->_M_curr_symbol;
++      delete _M_data;
++    }
++
++  template<> 
++    moneypunct<wchar_t, false>::~moneypunct()
++    {
++      if (_M_data->_M_positive_sign_size)
++      delete [] _M_data->_M_positive_sign;
++      if (_M_data->_M_negative_sign_size
++          && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
++      delete [] _M_data->_M_negative_sign;
++      if (_M_data->_M_curr_symbol_size)
++      delete [] _M_data->_M_curr_symbol;
++      delete _M_data;
++    }
++#endif
++}
+diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc
+--- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/numeric_members.cc 1969-12-31 18:00:00.000000000 -0600
++++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc     2005-04-28 01:20:20.000000000 -0500
+@@ -0,0 +1,173 @@
++// std::numpunct implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library.  This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING.  If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction.  Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License.  This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.3.1.2  numpunct virtual functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#define _LIBC
++#include <locale>
++#undef _LIBC
++#include <bits/c++locale_internal.h>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning tailor for stub locale support
++#endif
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __nl_langinfo_l(N, L)         nl_langinfo((N))
++#endif
++
++namespace std
++{
++  template<> 
++    void
++    numpunct<char>::_M_initialize_numpunct(__c_locale __cloc)
++    {
++      if (!_M_data)
++      _M_data = new __numpunct_cache<char>;
++
++      if (!__cloc)
++      {
++        // "C" locale
++        _M_data->_M_grouping = "";
++        _M_data->_M_grouping_size = 0;
++        _M_data->_M_use_grouping = false;
++
++        _M_data->_M_decimal_point = '.';
++        _M_data->_M_thousands_sep = ',';
++
++        for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
++          _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i];
++
++        for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
++          _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j];
++      }
++      else
++      {
++        // Named locale.
++        _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT, 
++                                                      __cloc));
++        _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP, 
++                                                      __cloc));
++
++        // Check for NULL, which implies no grouping.
++        if (_M_data->_M_thousands_sep == '\0')
++          _M_data->_M_grouping = "";
++        else
++          _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
++        _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++      }
++
++      // NB: There is no way to extact this info from posix locales.
++      // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
++      _M_data->_M_truename = "true";
++      _M_data->_M_truename_size = 4;
++      // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
++      _M_data->_M_falsename = "false";
++      _M_data->_M_falsename_size = 5;
++    }
++ 
++  template<> 
++    numpunct<char>::~numpunct()
++    { delete _M_data; }
++   
++#ifdef _GLIBCXX_USE_WCHAR_T
++  template<> 
++    void
++    numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc)
++    {
++      if (!_M_data)
++      _M_data = new __numpunct_cache<wchar_t>;
++
++      if (!__cloc)
++      {
++        // "C" locale
++        _M_data->_M_grouping = "";
++        _M_data->_M_grouping_size = 0;
++        _M_data->_M_use_grouping = false;
++
++        _M_data->_M_decimal_point = L'.';
++        _M_data->_M_thousands_sep = L',';
++
++        // Use ctype::widen code without the facet...
++        for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
++          _M_data->_M_atoms_out[__i] =
++            static_cast<wchar_t>(__num_base::_S_atoms_out[__i]);
++
++        for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
++          _M_data->_M_atoms_in[__j] =
++            static_cast<wchar_t>(__num_base::_S_atoms_in[__j]);
++      }
++      else
++      {
++        // Named locale.
++        // NB: In the GNU model wchar_t is always 32 bit wide.
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix this
++#endif
++#ifdef __UCLIBC__
++# ifdef __UCLIBC_HAS_XLOCALE__
++        _M_data->_M_decimal_point = __cloc->decimal_point_wc;
++        _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
++# else
++        _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
++        _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
++# endif
++#else
++        union { char *__s; wchar_t __w; } __u;
++        __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
++        _M_data->_M_decimal_point = __u.__w;
++
++        __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
++        _M_data->_M_thousands_sep = __u.__w;
++#endif
++
++        if (_M_data->_M_thousands_sep == L'\0')
++          _M_data->_M_grouping = "";
++        else
++          _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
++        _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++      }
++
++      // NB: There is no way to extact this info from posix locales.
++      // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
++      _M_data->_M_truename = L"true";
++      _M_data->_M_truename_size = 4;
++      // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
++      _M_data->_M_falsename = L"false";
++      _M_data->_M_falsename_size = 5;
++    }
++
++  template<> 
++    numpunct<wchar_t>::~numpunct()
++    { delete _M_data; }
++ #endif
++}
+diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/time_members.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/time_members.cc
+--- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/time_members.cc    1969-12-31 18:00:00.000000000 -0600
++++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/time_members.cc        2005-04-28 01:13:15.000000000 -0500
+@@ -0,0 +1,406 @@
++// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library.  This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING.  If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction.  Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License.  This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions
++// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#include <locale>
++#include <bits/c++locale_internal.h>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning tailor for stub locale support
++#endif
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __nl_langinfo_l(N, L)         nl_langinfo((N))
++#endif
++
++namespace std
++{
++  template<>
++    void
++    __timepunct<char>::
++    _M_put(char* __s, size_t __maxlen, const char* __format, 
++         const tm* __tm) const
++    {
++#ifdef __UCLIBC_HAS_XLOCALE__
++      const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
++                                      _M_c_locale_timepunct);
++#else
++      char* __old = strdup(setlocale(LC_ALL, NULL));
++      setlocale(LC_ALL, _M_name_timepunct);
++      const size_t __len = strftime(__s, __maxlen, __format, __tm);
++      setlocale(LC_ALL, __old);
++      free(__old);
++#endif
++      // Make sure __s is null terminated.
++      if (__len == 0)
++      __s[0] = '\0';
++    }
++
++  template<> 
++    void
++    __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc)
++    {
++      if (!_M_data)
++      _M_data = new __timepunct_cache<char>;
++
++      if (!__cloc)
++      {
++        // "C" locale
++        _M_c_locale_timepunct = _S_get_c_locale();
++
++        _M_data->_M_date_format = "%m/%d/%y";
++        _M_data->_M_date_era_format = "%m/%d/%y";
++        _M_data->_M_time_format = "%H:%M:%S";
++        _M_data->_M_time_era_format = "%H:%M:%S";
++        _M_data->_M_date_time_format = "";
++        _M_data->_M_date_time_era_format = "";
++        _M_data->_M_am = "AM";
++        _M_data->_M_pm = "PM";
++        _M_data->_M_am_pm_format = "";
++
++        // Day names, starting with "C"'s Sunday.
++        _M_data->_M_day1 = "Sunday";
++        _M_data->_M_day2 = "Monday";
++        _M_data->_M_day3 = "Tuesday";
++        _M_data->_M_day4 = "Wednesday";
++        _M_data->_M_day5 = "Thursday";
++        _M_data->_M_day6 = "Friday";
++        _M_data->_M_day7 = "Saturday";
++
++        // Abbreviated day names, starting with "C"'s Sun.
++        _M_data->_M_aday1 = "Sun";
++        _M_data->_M_aday2 = "Mon";
++        _M_data->_M_aday3 = "Tue";
++        _M_data->_M_aday4 = "Wed";
++        _M_data->_M_aday5 = "Thu";
++        _M_data->_M_aday6 = "Fri";
++        _M_data->_M_aday7 = "Sat";
++
++        // Month names, starting with "C"'s January.
++        _M_data->_M_month01 = "January";
++        _M_data->_M_month02 = "February";
++        _M_data->_M_month03 = "March";
++        _M_data->_M_month04 = "April";
++        _M_data->_M_month05 = "May";
++        _M_data->_M_month06 = "June";
++        _M_data->_M_month07 = "July";
++        _M_data->_M_month08 = "August";
++        _M_data->_M_month09 = "September";
++        _M_data->_M_month10 = "October";
++        _M_data->_M_month11 = "November";
++        _M_data->_M_month12 = "December";
++
++        // Abbreviated month names, starting with "C"'s Jan.
++        _M_data->_M_amonth01 = "Jan";
++        _M_data->_M_amonth02 = "Feb";
++        _M_data->_M_amonth03 = "Mar";
++        _M_data->_M_amonth04 = "Apr";
++        _M_data->_M_amonth05 = "May";
++        _M_data->_M_amonth06 = "Jun";
++        _M_data->_M_amonth07 = "Jul";
++        _M_data->_M_amonth08 = "Aug";
++        _M_data->_M_amonth09 = "Sep";
++        _M_data->_M_amonth10 = "Oct";
++        _M_data->_M_amonth11 = "Nov";
++        _M_data->_M_amonth12 = "Dec";
++      }
++      else
++      {
++        _M_c_locale_timepunct = _S_clone_c_locale(__cloc); 
++
++        _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc);
++        _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc);
++        _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc);
++        _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc);
++        _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc);
++        _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT,
++                                                           __cloc);
++        _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc);
++        _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc);
++        _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc);
++
++        // Day names, starting with "C"'s Sunday.
++        _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc);
++        _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc);
++        _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc);
++        _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc);
++        _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc);
++        _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc);
++        _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc);
++
++        // Abbreviated day names, starting with "C"'s Sun.
++        _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc);
++        _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc);
++        _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc);
++        _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc);
++        _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc);
++        _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc);
++        _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc);
++
++        // Month names, starting with "C"'s January.
++        _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc);
++        _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc);
++        _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc);
++        _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc);
++        _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc);
++        _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc);
++        _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc);
++        _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc);
++        _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc);
++        _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc);
++        _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc);
++        _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc);
++
++        // Abbreviated month names, starting with "C"'s Jan.
++        _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc);
++        _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc);
++        _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc);
++        _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc);
++        _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc);
++        _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc);
++        _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc);
++        _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc);
++        _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc);
++        _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc);
++        _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc);
++        _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc);
++      }
++    }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++  template<>
++    void
++    __timepunct<wchar_t>::
++    _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format, 
++         const tm* __tm) const
++    {
++#ifdef __UCLIBC_HAS_XLOCALE__
++      __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct);
++      const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
++                                      _M_c_locale_timepunct);
++#else
++      char* __old = strdup(setlocale(LC_ALL, NULL));
++      setlocale(LC_ALL, _M_name_timepunct);
++      const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
++      setlocale(LC_ALL, __old);
++      free(__old);
++#endif
++      // Make sure __s is null terminated.
++      if (__len == 0)
++      __s[0] = L'\0';
++    }
++
++  template<> 
++    void
++    __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc)
++    {
++      if (!_M_data)
++      _M_data = new __timepunct_cache<wchar_t>;
++
++#warning wide time stuff
++//       if (!__cloc)
++      {
++        // "C" locale
++        _M_c_locale_timepunct = _S_get_c_locale();
++
++        _M_data->_M_date_format = L"%m/%d/%y";
++        _M_data->_M_date_era_format = L"%m/%d/%y";
++        _M_data->_M_time_format = L"%H:%M:%S";
++        _M_data->_M_time_era_format = L"%H:%M:%S";
++        _M_data->_M_date_time_format = L"";
++        _M_data->_M_date_time_era_format = L"";
++        _M_data->_M_am = L"AM";
++        _M_data->_M_pm = L"PM";
++        _M_data->_M_am_pm_format = L"";
++
++        // Day names, starting with "C"'s Sunday.
++        _M_data->_M_day1 = L"Sunday";
++        _M_data->_M_day2 = L"Monday";
++        _M_data->_M_day3 = L"Tuesday";
++        _M_data->_M_day4 = L"Wednesday";
++        _M_data->_M_day5 = L"Thursday";
++        _M_data->_M_day6 = L"Friday";
++        _M_data->_M_day7 = L"Saturday";
++
++        // Abbreviated day names, starting with "C"'s Sun.
++        _M_data->_M_aday1 = L"Sun";
++        _M_data->_M_aday2 = L"Mon";
++        _M_data->_M_aday3 = L"Tue";
++        _M_data->_M_aday4 = L"Wed";
++        _M_data->_M_aday5 = L"Thu";
++        _M_data->_M_aday6 = L"Fri";
++        _M_data->_M_aday7 = L"Sat";
++
++        // Month names, starting with "C"'s January.
++        _M_data->_M_month01 = L"January";
++        _M_data->_M_month02 = L"February";
++        _M_data->_M_month03 = L"March";
++        _M_data->_M_month04 = L"April";
++        _M_data->_M_month05 = L"May";
++        _M_data->_M_month06 = L"June";
++        _M_data->_M_month07 = L"July";
++        _M_data->_M_month08 = L"August";
++        _M_data->_M_month09 = L"September";
++        _M_data->_M_month10 = L"October";
++        _M_data->_M_month11 = L"November";
++        _M_data->_M_month12 = L"December";
++
++        // Abbreviated month names, starting with "C"'s Jan.
++        _M_data->_M_amonth01 = L"Jan";
++        _M_data->_M_amonth02 = L"Feb";
++        _M_data->_M_amonth03 = L"Mar";
++        _M_data->_M_amonth04 = L"Apr";
++        _M_data->_M_amonth05 = L"May";
++        _M_data->_M_amonth06 = L"Jun";
++        _M_data->_M_amonth07 = L"Jul";
++        _M_data->_M_amonth08 = L"Aug";
++        _M_data->_M_amonth09 = L"Sep";
++        _M_data->_M_amonth10 = L"Oct";
++        _M_data->_M_amonth11 = L"Nov";
++        _M_data->_M_amonth12 = L"Dec";
++      }
++#if 0
++      else
++      {
++        _M_c_locale_timepunct = _S_clone_c_locale(__cloc); 
++
++        union { char *__s; wchar_t *__w; } __u;
++
++        __u.__s = __nl_langinfo_l(_NL_WD_FMT, __cloc);
++        _M_data->_M_date_format = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WERA_D_FMT, __cloc);
++        _M_data->_M_date_era_format = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WT_FMT, __cloc);
++        _M_data->_M_time_format = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WERA_T_FMT, __cloc);
++        _M_data->_M_time_era_format = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WD_T_FMT, __cloc);
++        _M_data->_M_date_time_format = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc);
++        _M_data->_M_date_time_era_format = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WAM_STR, __cloc);
++        _M_data->_M_am = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WPM_STR, __cloc);
++        _M_data->_M_pm = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc);
++        _M_data->_M_am_pm_format = __u.__w;
++
++        // Day names, starting with "C"'s Sunday.
++        __u.__s = __nl_langinfo_l(_NL_WDAY_1, __cloc);
++        _M_data->_M_day1 = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WDAY_2, __cloc);
++        _M_data->_M_day2 = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WDAY_3, __cloc);
++        _M_data->_M_day3 = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WDAY_4, __cloc);
++        _M_data->_M_day4 = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WDAY_5, __cloc);
++        _M_data->_M_day5 = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WDAY_6, __cloc);
++        _M_data->_M_day6 = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WDAY_7, __cloc);
++        _M_data->_M_day7 = __u.__w;
++
++        // Abbreviated day names, starting with "C"'s Sun.
++        __u.__s = __nl_langinfo_l(_NL_WABDAY_1, __cloc);
++        _M_data->_M_aday1 = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WABDAY_2, __cloc);
++        _M_data->_M_aday2 = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WABDAY_3, __cloc);
++        _M_data->_M_aday3 = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WABDAY_4, __cloc);
++        _M_data->_M_aday4 = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WABDAY_5, __cloc);
++        _M_data->_M_aday5 = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WABDAY_6, __cloc);
++        _M_data->_M_aday6 = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WABDAY_7, __cloc);
++        _M_data->_M_aday7 = __u.__w;
++
++        // Month names, starting with "C"'s January.
++        __u.__s = __nl_langinfo_l(_NL_WMON_1, __cloc);
++        _M_data->_M_month01 = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WMON_2, __cloc);
++        _M_data->_M_month02 = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WMON_3, __cloc);
++        _M_data->_M_month03 = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WMON_4, __cloc);
++        _M_data->_M_month04 = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WMON_5, __cloc);
++        _M_data->_M_month05 = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WMON_6, __cloc);
++        _M_data->_M_month06 = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WMON_7, __cloc);
++        _M_data->_M_month07 = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WMON_8, __cloc);
++        _M_data->_M_month08 = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WMON_9, __cloc);
++        _M_data->_M_month09 = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WMON_10, __cloc);
++        _M_data->_M_month10 = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WMON_11, __cloc);
++        _M_data->_M_month11 = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WMON_12, __cloc);
++        _M_data->_M_month12 = __u.__w;
++
++        // Abbreviated month names, starting with "C"'s Jan.
++        __u.__s = __nl_langinfo_l(_NL_WABMON_1, __cloc);
++        _M_data->_M_amonth01 = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WABMON_2, __cloc);
++        _M_data->_M_amonth02 = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WABMON_3, __cloc);
++        _M_data->_M_amonth03 = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WABMON_4, __cloc);
++        _M_data->_M_amonth04 = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WABMON_5, __cloc);
++        _M_data->_M_amonth05 = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WABMON_6, __cloc);
++        _M_data->_M_amonth06 = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WABMON_7, __cloc);
++        _M_data->_M_amonth07 = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WABMON_8, __cloc);
++        _M_data->_M_amonth08 = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WABMON_9, __cloc);
++        _M_data->_M_amonth09 = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WABMON_10, __cloc);
++        _M_data->_M_amonth10 = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WABMON_11, __cloc);
++        _M_data->_M_amonth11 = __u.__w;
++        __u.__s = __nl_langinfo_l(_NL_WABMON_12, __cloc);
++        _M_data->_M_amonth12 = __u.__w;
++      }
++#endif // 0
++    }
++#endif
++}
+diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/time_members.h gcc-4.0.0/libstdc++-v3/config/locale/uclibc/time_members.h
+--- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/time_members.h     1969-12-31 18:00:00.000000000 -0600
++++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/time_members.h 2004-05-22 18:46:31.000000000 -0500
+@@ -0,0 +1,68 @@
++// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library.  This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING.  If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction.  Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License.  This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.5.1.2 - time_get functions
++// ISO C++ 14882: 22.2.5.3.2 - time_put functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++  template<typename _CharT>
++    __timepunct<_CharT>::__timepunct(size_t __refs) 
++    : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), 
++    _M_name_timepunct(_S_get_c_name())
++    { _M_initialize_timepunct(); }
++
++  template<typename _CharT>
++    __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) 
++    : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL), 
++    _M_name_timepunct(_S_get_c_name())
++    { _M_initialize_timepunct(); }
++
++  template<typename _CharT>
++    __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
++                                   size_t __refs) 
++    : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), 
++    _M_name_timepunct(__s)
++    { 
++      char* __tmp = new char[std::strlen(__s) + 1];
++      std::strcpy(__tmp, __s);
++      _M_name_timepunct = __tmp;
++      _M_initialize_timepunct(__cloc); 
++    }
++
++  template<typename _CharT>
++    __timepunct<_CharT>::~__timepunct()
++    { 
++      if (_M_name_timepunct != _S_get_c_name())
++      delete [] _M_name_timepunct;
++      delete _M_data; 
++      _S_destroy_c_locale(_M_c_locale_timepunct); 
++    }
+diff -urN gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/ctype_base.h gcc-4.0.0/libstdc++-v3/config/os/uclibc/ctype_base.h
+--- gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/ctype_base.h   1969-12-31 18:00:00.000000000 -0600
++++ gcc-4.0.0/libstdc++-v3/config/os/uclibc/ctype_base.h       2005-04-28 01:10:27.000000000 -0500
+@@ -0,0 +1,64 @@
++// Locale support -*- C++ -*-
++
++// Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004
++// Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library.  This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING.  If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction.  Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License.  This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.1  Locales
++//
++  
++/** @file ctype_base.h
++ *  This is an internal header file, included by other library headers.
++ *  You should not attempt to use it directly.
++ */
++
++// Information as gleaned from /usr/include/ctype.h
++  
++  /// @brief  Base class for ctype.
++  struct ctype_base
++  {
++    // Note: In uClibc, the following two types depend on configuration.
++ 
++    // Non-standard typedefs.
++    typedef const __ctype_touplow_t* __to_type;
++
++    // NB: Offsets into ctype<char>::_M_table force a particular size
++    // on the mask type. Because of this, we don't use an enum.
++    typedef __ctype_mask_t    mask;   
++    static const mask upper           = _ISupper;
++    static const mask lower   = _ISlower;
++    static const mask alpha   = _ISalpha;
++    static const mask digit   = _ISdigit;
++    static const mask xdigit  = _ISxdigit;
++    static const mask space   = _ISspace;
++    static const mask print   = _ISprint;
++    static const mask graph   = _ISalpha | _ISdigit | _ISpunct;
++    static const mask cntrl   = _IScntrl;
++    static const mask punct   = _ISpunct;
++    static const mask alnum   = _ISalpha | _ISdigit;
++  };
+diff -urN gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/ctype_inline.h gcc-4.0.0/libstdc++-v3/config/os/uclibc/ctype_inline.h
+--- gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/ctype_inline.h 1969-12-31 18:00:00.000000000 -0600
++++ gcc-4.0.0/libstdc++-v3/config/os/uclibc/ctype_inline.h     2002-06-24 00:49:19.000000000 -0500
+@@ -0,0 +1,69 @@
++// Locale support -*- C++ -*-
++
++// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library.  This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING.  If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction.  Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License.  This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.1  Locales
++//
++  
++// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
++// functions go in ctype.cc
++  
++  bool
++  ctype<char>::
++  is(mask __m, char __c) const
++  { return _M_table[static_cast<unsigned char>(__c)] & __m; }
++
++  const char*
++  ctype<char>::
++  is(const char* __low, const char* __high, mask* __vec) const
++  {
++    while (__low < __high)
++      *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
++    return __high;
++  }
++
++  const char*
++  ctype<char>::
++  scan_is(mask __m, const char* __low, const char* __high) const
++  {
++    while (__low < __high 
++         && !(_M_table[static_cast<unsigned char>(*__low)] & __m))
++      ++__low;
++    return __low;
++  }
++
++  const char*
++  ctype<char>::
++  scan_not(mask __m, const char* __low, const char* __high) const
++  {
++    while (__low < __high 
++         && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
++      ++__low;
++    return __low;
++  }
+diff -urN gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/ctype_noninline.h gcc-4.0.0/libstdc++-v3/config/os/uclibc/ctype_noninline.h
+--- gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/ctype_noninline.h      1969-12-31 18:00:00.000000000 -0600
++++ gcc-4.0.0/libstdc++-v3/config/os/uclibc/ctype_noninline.h  2005-04-28 01:10:27.000000000 -0500
+@@ -0,0 +1,92 @@
++// Locale support -*- C++ -*-
++
++// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004
++// Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library.  This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING.  If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction.  Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License.  This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.1  Locales
++//
++  
++// Information as gleaned from /usr/include/ctype.h
++
++  const ctype_base::mask*
++  ctype<char>::classic_table() throw()
++  { return __C_ctype_b; }
++
++  ctype<char>::ctype(__c_locale, const mask* __table, bool __del, 
++                   size_t __refs) 
++  : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), 
++  _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0)
++  {
++    _M_toupper = __C_ctype_toupper;
++    _M_tolower = __C_ctype_tolower;
++    _M_table = __table ? __table : __C_ctype_b;
++    memset(_M_widen, 0, sizeof(_M_widen));
++    memset(_M_narrow, 0, sizeof(_M_narrow));
++  }
++
++  ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
++  : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), 
++  _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0)
++  {
++    _M_toupper = __C_ctype_toupper;
++    _M_tolower = __C_ctype_tolower;
++    _M_table = __table ? __table : __C_ctype_b;
++    memset(_M_widen, 0, sizeof(_M_widen));
++    memset(_M_narrow, 0, sizeof(_M_narrow));
++  }
++
++  char
++  ctype<char>::do_toupper(char __c) const
++  { return _M_toupper[static_cast<unsigned char>(__c)]; }
++
++  const char*
++  ctype<char>::do_toupper(char* __low, const char* __high) const
++  {
++    while (__low < __high)
++      {
++      *__low = _M_toupper[static_cast<unsigned char>(*__low)];
++      ++__low;
++      }
++    return __high;
++  }
++
++  char
++  ctype<char>::do_tolower(char __c) const
++  { return _M_tolower[static_cast<unsigned char>(__c)]; }
++
++  const char* 
++  ctype<char>::do_tolower(char* __low, const char* __high) const
++  {
++    while (__low < __high)
++      {
++      *__low = _M_tolower[static_cast<unsigned char>(*__low)];
++      ++__low;
++      }
++    return __high;
++  }
+diff -urN gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/os_defines.h gcc-4.0.0/libstdc++-v3/config/os/uclibc/os_defines.h
+--- gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/os_defines.h   1969-12-31 18:00:00.000000000 -0600
++++ gcc-4.0.0/libstdc++-v3/config/os/uclibc/os_defines.h       2005-04-28 01:10:27.000000000 -0500
+@@ -0,0 +1,44 @@
++// Specific definitions for GNU/Linux  -*- C++ -*-
++
++// Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library.  This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING.  If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction.  Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License.  This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++#ifndef _GLIBCXX_OS_DEFINES
++#define _GLIBCXX_OS_DEFINES 1
++
++// System-specific #define, typedefs, corrections, etc, go here.  This
++// file will come before all others.
++
++// This keeps isanum, et al from being propagated as macros.
++#define __NO_CTYPE 1
++
++#include <features.h>
++
++// We must not see the optimized string functions GNU libc defines.
++#define __NO_STRING_INLINES
++
++#endif
+diff -urN gcc-4.0.0-100/libstdc++-v3/configure gcc-4.0.0/libstdc++-v3/configure
+--- gcc-4.0.0-100/libstdc++-v3/configure       2005-04-30 13:06:53.683055232 -0500
++++ gcc-4.0.0/libstdc++-v3/configure   2005-04-30 12:24:24.000000000 -0500
+@@ -3998,6 +3998,11 @@
+   lt_cv_deplibs_check_method=pass_all
+   ;;
++linux-uclibc*)
++  lt_cv_deplibs_check_method=pass_all
++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
++  ;;
++
+ netbsd* | knetbsd*-gnu)
+   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
+@@ -5672,7 +5677,7 @@
+   enableval="$enable_clocale"
+       case "$enableval" in
+-       generic|gnu|ieee_1003.1-2001|yes|no|auto) ;;
++       generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto) ;;
+        *) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable clocale" >&5
+ echo "$as_me: error: Unknown argument to enable/disable clocale" >&2;}
+    { (exit 1); exit 1; }; } ;;
+@@ -5697,6 +5702,9 @@
+   # Default to "generic".
+   if test $enable_clocale_flag = auto; then
+     case ${target_os} in
++      linux-uclibc*)
++      enable_clocale_flag=uclibc
++      ;;
+       linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
+         cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+@@ -5927,6 +5935,76 @@
+       CTIME_CC=config/locale/generic/time_members.cc
+       CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
+       ;;
++    uclibc)
++      echo "$as_me:$LINENO: result: uclibc" >&5
++echo "${ECHO_T}uclibc" >&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 "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++if test "${ac_cv_prog_check_msgfmt+set}" = set; then
++  echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++  if test -n "$check_msgfmt"; then
++  ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++  for ac_exec_ext in '' $ac_executable_extensions; do
++  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++    ac_cv_prog_check_msgfmt="yes"
++    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++done
++
++  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 "$as_me:$LINENO: result: $check_msgfmt" >&5
++echo "${ECHO_T}$check_msgfmt" >&6
++else
++  echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&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 \
++        glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
++        glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
++      done
++
++
++
++      CLOCALE_H=config/locale/uclibc/c_locale.h
++      CLOCALE_CC=config/locale/uclibc/c_locale.cc
++      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
++      ;;
+   esac
+   # This is where the testsuite looks for locale catalogs, using the
+diff -urN gcc-4.0.0-100/libstdc++-v3/configure.host gcc-4.0.0/libstdc++-v3/configure.host
+--- gcc-4.0.0-100/libstdc++-v3/configure.host  2005-04-30 13:06:53.688054472 -0500
++++ gcc-4.0.0/libstdc++-v3/configure.host      2005-04-28 20:20:32.000000000 -0500
+@@ -249,6 +249,12 @@
+     ;;
+ esac
++# Override for uClibc since linux-uclibc gets mishandled above.
++case "${host_os}" in
++  *-uclibc*)
++    os_include_dir="os/uclibc"
++    ;;
++esac
+ # Set any OS-dependent and CPU-dependent bits.
+ # THIS TABLE IS SORTED.  KEEP IT THAT WAY.
+diff -urN gcc-4.0.0-100/libstdc++-v3/crossconfig.m4 gcc-4.0.0/libstdc++-v3/crossconfig.m4
+--- gcc-4.0.0-100/libstdc++-v3/crossconfig.m4  2005-04-30 13:06:53.689054320 -0500
++++ gcc-4.0.0/libstdc++-v3/crossconfig.m4      2005-04-28 20:27:15.000000000 -0500
+@@ -142,6 +142,98 @@
+       ;;
+     esac
+     ;;
++  *-uclibc*)
++# Temporary hack until we implement the float versions of the libm funcs
++    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 float.h endian.h inttypes.h locale.h float.h stdint.h])
++    SECTION_FLAGS='-ffunction-sections -fdata-sections'
++    AC_SUBST(SECTION_FLAGS)
++    GLIBCXX_CHECK_LINKER_FEATURES
++    GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
++    GLIBCXX_CHECK_WCHAR_T_SUPPORT
++
++    # For LFS.
++    AC_DEFINE(HAVE_INT64_T)
++    case "$target" in
++      *-uclinux*)
++        # Don't enable LFS with uClinux
++        ;;
++      *)
++        AC_DEFINE(_GLIBCXX_USE_LFS)
++    esac
++
++    # For showmanyc_helper().
++    AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h)
++    GLIBCXX_CHECK_POLL
++    GLIBCXX_CHECK_S_ISREG_OR_S_IFREG
++
++    # For xsputn_2().
++    AC_CHECK_HEADERS(sys/uio.h)
++    GLIBCXX_CHECK_WRITEV
++
++#     AC_DEFINE(HAVE_ACOSF)
++#     AC_DEFINE(HAVE_ASINF)
++#     AC_DEFINE(HAVE_ATANF)
++#     AC_DEFINE(HAVE_ATAN2F)
++    AC_DEFINE(HAVE_CEILF)
++    AC_DEFINE(HAVE_COPYSIGN)
++#     AC_DEFINE(HAVE_COPYSIGNF)
++#     AC_DEFINE(HAVE_COSF)
++#     AC_DEFINE(HAVE_COSHF)
++#     AC_DEFINE(HAVE_EXPF)
++#     AC_DEFINE(HAVE_FABSF)
++    AC_DEFINE(HAVE_FINITE)
++    AC_DEFINE(HAVE_FINITEF)
++    AC_DEFINE(HAVE_FLOORF)
++#     AC_DEFINE(HAVE_FMODF)
++#     AC_DEFINE(HAVE_FREXPF)
++    AC_DEFINE(HAVE_HYPOT)
++#     AC_DEFINE(HAVE_HYPOTF)
++    AC_DEFINE(HAVE_ISINF)
++    AC_DEFINE(HAVE_ISINFF)
++    AC_DEFINE(HAVE_ISNAN)
++    AC_DEFINE(HAVE_ISNANF)
++#     AC_DEFINE(HAVE_LOGF)
++#     AC_DEFINE(HAVE_LOG10F)
++#     AC_DEFINE(HAVE_MODFF)
++#     AC_DEFINE(HAVE_SINF)
++#     AC_DEFINE(HAVE_SINHF)
++#     AC_DEFINE(HAVE_SINCOS)
++#     AC_DEFINE(HAVE_SINCOSF)
++    AC_DEFINE(HAVE_SQRTF)
++#     AC_DEFINE(HAVE_TANF)
++#     AC_DEFINE(HAVE_TANHF)
++    if test x"long_double_math_on_this_cpu" = x"yes"; then
++#       AC_DEFINE(HAVE_ACOSL)
++#       AC_DEFINE(HAVE_ASINL)
++#       AC_DEFINE(HAVE_ATANL)
++#       AC_DEFINE(HAVE_ATAN2L)
++#       AC_DEFINE(HAVE_CEILL)
++#       AC_DEFINE(HAVE_COPYSIGNL)
++#       AC_DEFINE(HAVE_COSL)
++#       AC_DEFINE(HAVE_COSHL)
++#       AC_DEFINE(HAVE_EXPL)
++#       AC_DEFINE(HAVE_FABSL)
++#       AC_DEFINE(HAVE_FINITEL)
++#       AC_DEFINE(HAVE_FLOORL)
++#       AC_DEFINE(HAVE_FMODL)
++#       AC_DEFINE(HAVE_FREXPL)
++#       AC_DEFINE(HAVE_HYPOTL)
++#       AC_DEFINE(HAVE_ISINFL)
++#       AC_DEFINE(HAVE_ISNANL)
++#       AC_DEFINE(HAVE_LOGL)
++#       AC_DEFINE(HAVE_LOG10L)
++#       AC_DEFINE(HAVE_MODFL)
++#       AC_DEFINE(HAVE_POWL)
++#       AC_DEFINE(HAVE_SINL)
++#       AC_DEFINE(HAVE_SINHL)
++#       AC_DEFINE(HAVE_SINCOSL)
++#       AC_DEFINE(HAVE_SQRTL)
++#       AC_DEFINE(HAVE_TANL)
++#       AC_DEFINE(HAVE_TANHL)
++    fi
++    ;;
+   *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu)
+     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 \
+@@ -156,7 +248,7 @@
+     AC_DEFINE(HAVE_INT64_T)
+     case "$target" in
+       *-uclinux*)
+-        # Don't enable LFS with uClibc
++        # Don't enable LFS with uClinux
+         ;;
+       *)
+         AC_DEFINE(_GLIBCXX_USE_LFS)
+diff -urN gcc-4.0.0-100/libstdc++-v3/include/c_compatibility/wchar.h gcc-4.0.0/libstdc++-v3/include/c_compatibility/wchar.h
+--- gcc-4.0.0-100/libstdc++-v3/include/c_compatibility/wchar.h 2005-04-30 13:06:53.690054168 -0500
++++ gcc-4.0.0/libstdc++-v3/include/c_compatibility/wchar.h     2005-04-28 20:15:56.000000000 -0500
+@@ -101,7 +101,9 @@
+ using std::wmemcpy;
+ using std::wmemmove;
+ using std::wmemset;
++#if _GLIBCXX_HAVE_WCSFTIME
+ using std::wcsftime;
++#endif
+ #if _GLIBCXX_USE_C99
+ using std::wcstold;
+diff -urN gcc-4.0.0-100/libstdc++-v3/include/c_std/std_cwchar.h gcc-4.0.0/libstdc++-v3/include/c_std/std_cwchar.h
+--- gcc-4.0.0-100/libstdc++-v3/include/c_std/std_cwchar.h      2005-04-30 13:06:53.691054016 -0500
++++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cwchar.h  2005-04-28 20:15:56.000000000 -0500
+@@ -179,7 +179,9 @@
+   using ::wcscoll;
+   using ::wcscpy;
+   using ::wcscspn;
++#if _GLIBCXX_HAVE_WCSFTIME
+   using ::wcsftime;
++#endif
+   using ::wcslen;
+   using ::wcsncat;
+   using ::wcsncmp;