Index: BOOK/cross-tools/arm-chapter.xml
===================================================================
--- BOOK/cross-tools/arm-chapter.xml	(revision 56d186f8b3176978055228e5cba0cbb071d5e2d7)
+++ BOOK/cross-tools/arm-chapter.xml	(revision 0194a602a3e3b317adebd81ea1d07e67492f503c)
@@ -18,5 +18,4 @@
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="arm/linux-headers.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/binutils.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="arm/uclibc-headers.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gcc-static.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="arm/uclibc.xml"/>
Index: OK/cross-tools/arm/uclibc-headers.xml
===================================================================
--- BOOK/cross-tools/arm/uclibc-headers.xml	(revision 56d186f8b3176978055228e5cba0cbb071d5e2d7)
+++ 	(revision )
@@ -1,92 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-cross-tools-uclibc-headers" role="wrap">
-  <?dbhtml filename="uclibc-headers.html"?>
-
-  <title>uClibc-&uclibc-version; Headers</title>
-
-  <indexterm zone="ch-cross-tools-uclibc-headers">
-    <primary sortas="a-uClibc">uClibc</primary>
-    <secondary>cross tools, headers</secondary>
-  </indexterm>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@role='package'])"/>
-
-  <sect2 role="installation">
-    <title>Installation of uClibc Headers</title>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@os='c'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@os='d'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@os='e'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@os='f'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@os='g'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@os='h'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../x86/uclibc-headers.xml"
-  xpointer="xpointer(//*[@os='i'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@os='j'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@os='k'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@os='l'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@os='m'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@os='n'])"/>
-
-<screen os="o"><userinput>make headers</userinput></screen>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@os='p'])"/>
-
-  <screen os="1"><userinput>mkdir ${CLFS}/usr/include/bits
-		  make PREFIX=${CLFS} install_headers</userinput></screen>
-
-  </sect2>
-
-  <sect2 role="content" id="contents-uclibc-headers">
-    <title/>
-
-    <para>Details on this package are located in <xref
-    linkend="contents-uclibc" role="."/></para>
-
-  </sect2>
-
-</sect1>
Index: BOOK/cross-tools/common/binutils.xml
===================================================================
--- BOOK/cross-tools/common/binutils.xml	(revision 56d186f8b3176978055228e5cba0cbb071d5e2d7)
+++ BOOK/cross-tools/common/binutils.xml	(revision 0194a602a3e3b317adebd81ea1d07e67492f503c)
@@ -36,9 +36,4 @@
 
 <screen os="p2"><userinput>patch -Np1 -i ../&binutils-posix-patch;</userinput></screen>
-
-    <para os="p3">The following patch is needed for Binutils to build against
-    uClibc:</para>
-
-<screen os="p4"><userinput>patch -Np1 -i ../&binutils-uclibc-patch;</userinput></screen>
 
     <para os="b">The Binutils documentation recommends building Binutils outside of the
Index: BOOK/cross-tools/common/gcc-final.xml
===================================================================
--- BOOK/cross-tools/common/gcc-final.xml	(revision 56d186f8b3176978055228e5cba0cbb071d5e2d7)
+++ BOOK/cross-tools/common/gcc-final.xml	(revision 0194a602a3e3b317adebd81ea1d07e67492f503c)
@@ -30,20 +30,4 @@
     href="gcc-static.xml"
     xpointer="xpointer(//*[@os='p2'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="gcc-static.xml"
-    xpointer="xpointer(//*[@os='p3'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="gcc-static.xml"
-    xpointer="xpointer(//*[@os='p4'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="gcc-static.xml"
-    xpointer="xpointer(//*[@os='p5'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="gcc-static.xml"
-    xpointer="xpointer(//*[@os='p6'])"/>
 
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
Index: BOOK/cross-tools/common/gcc-static.xml
===================================================================
--- BOOK/cross-tools/common/gcc-static.xml	(revision 56d186f8b3176978055228e5cba0cbb071d5e2d7)
+++ BOOK/cross-tools/common/gcc-static.xml	(revision 0194a602a3e3b317adebd81ea1d07e67492f503c)
@@ -33,15 +33,4 @@
 <screen os="p2"><userinput>patch -Np1 -i ../&gcc-posix-patch;</userinput></screen>
 
-    <para os="p3">The following patch is needed for GCC to build against uClibc:</para>
-
-<screen os="p4"><userinput>patch -Np1 -i ../&gcc-uclibc-patch;</userinput></screen>
-
-    <para os="p5">The following patch ensures that <command>gcc</command> does not
-    search the <filename class="directory">/usr</filename> directory for
-    <filename class="libraryfile">libgcc_s.so</filename> when
-    cross-compiling:</para>
-
-<screen os="p6"><userinput>patch -Np1 -i ../&gcc-cross_search-patch;</userinput></screen>
-
     <para os="c">The GCC documentation recommends building GCC outside of the source
     directory in a dedicated build directory:</para>
@@ -55,4 +44,6 @@
     --target=${CLFS_TARGET} --disable-multilib \
     --with-sysroot=${CLFS} --disable-nls --disable-shared \
+    --without-headers --with-newlib --disable-decimal-float \
+    --disable-libgomp --disable-libmudflap --disable-libssp \
     --disable-threads --enable-languages=c</userinput></screen>
 
@@ -88,9 +79,9 @@
     <para os="ag">Continue with compiling the package:</para>
 
-<screen os="ah"><userinput>make all-gcc</userinput></screen>
+<screen os="ah"><userinput>make</userinput></screen>
 
     <para os="ai">Install the package:</para>
 
-<screen os="aj"><userinput>make install-gcc</userinput></screen>
+<screen os="aj"><userinput>make install</userinput></screen>
 
   </sect2>
Index: BOOK/cross-tools/mips-chapter.xml
===================================================================
--- BOOK/cross-tools/mips-chapter.xml	(revision 56d186f8b3176978055228e5cba0cbb071d5e2d7)
+++ BOOK/cross-tools/mips-chapter.xml	(revision 0194a602a3e3b317adebd81ea1d07e67492f503c)
@@ -18,5 +18,4 @@
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="mips/linux-headers.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/binutils.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="mips/uclibc-headers.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gcc-static.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="mips/uclibc.xml"/>
Index: OK/cross-tools/mips/uclibc-headers.xml
===================================================================
--- BOOK/cross-tools/mips/uclibc-headers.xml	(revision 56d186f8b3176978055228e5cba0cbb071d5e2d7)
+++ 	(revision )
@@ -1,92 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-cross-tools-uclibc-headers" role="wrap">
-  <?dbhtml filename="uclibc-headers.html"?>
-
-  <title>uClibc-&uclibc-version; Headers</title>
-
-  <indexterm zone="ch-cross-tools-uclibc-headers">
-    <primary sortas="a-uClibc">uClibc</primary>
-    <secondary>cross tools, headers</secondary>
-  </indexterm>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@role='package'])"/>
-
-  <sect2 role="installation">
-    <title>Installation of uClibc Headers</title>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@os='c'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@os='d'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@os='e'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@os='f'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@os='g'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@os='h'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="../x86/uclibc-headers.xml"
-  xpointer="xpointer(//*[@os='i'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@os='j'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@os='k'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@os='l'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@os='m'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@os='n'])"/>
-
-<screen os="o"><userinput>make headers</userinput></screen>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@os='p'])"/>
-
-  <screen os="1"><userinput>mkdir ${CLFS}/usr/include/bits
-make PREFIX=${CLFS} install_headers</userinput></screen>
-
-  </sect2>
-
-  <sect2 role="content" id="contents-uclibc-headers">
-    <title/>
-
-    <para>Details on this package are located in <xref
-    linkend="contents-uclibc" role="."/></para>
-
-  </sect2>
-
-</sect1>
Index: BOOK/cross-tools/wrt-chapter.xml
===================================================================
--- BOOK/cross-tools/wrt-chapter.xml	(revision 56d186f8b3176978055228e5cba0cbb071d5e2d7)
+++ BOOK/cross-tools/wrt-chapter.xml	(revision 0194a602a3e3b317adebd81ea1d07e67492f503c)
@@ -18,5 +18,4 @@
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="mips/linux-headers.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/binutils.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="mips/uclibc-headers.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gcc-static.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="mips/uclibc.xml"/>
Index: BOOK/cross-tools/x86-chapter.xml
===================================================================
--- BOOK/cross-tools/x86-chapter.xml	(revision 56d186f8b3176978055228e5cba0cbb071d5e2d7)
+++ BOOK/cross-tools/x86-chapter.xml	(revision 0194a602a3e3b317adebd81ea1d07e67492f503c)
@@ -18,5 +18,4 @@
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="x86/linux-headers.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/binutils.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="x86/uclibc-headers.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gcc-static.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="x86/uclibc.xml"/>
Index: OK/cross-tools/x86/uclibc-headers.xml
===================================================================
--- BOOK/cross-tools/x86/uclibc-headers.xml	(revision 56d186f8b3176978055228e5cba0cbb071d5e2d7)
+++ 	(revision )
@@ -1,95 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../../general.ent">
-  %general-entities;
-]>
-
-<sect1 id="ch-cross-tools-uclibc-headers" role="wrap">
-  <?dbhtml filename="uclibc-headers.html"?>
-
-  <title>uClibc-&uclibc-version; Headers</title>
-
-  <indexterm zone="ch-cross-tools-uclibc-headers">
-    <primary sortas="a-uClibc">uClibc</primary>
-    <secondary>cross tools, headers</secondary>
-  </indexterm>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@role='package'])"/>
-
-  <sect2 role="installation">
-    <title>Installation of uClibc Headers</title>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@os='c'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@os='d'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@os='e'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@os='f'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@os='g'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@os='h'])"/>
-
-<screen os="i"><userinput>cp .config{,.orig}
-sed -e "/^KERNEL_HEADERS/s:=.*:=\"${CLFS}/usr/include\":" \
-    -e "/^SHARED_LIB_LOADER_PREFIX/s:=.*:=\"/lib\":" \
-    -e "/^DEVEL_PREFIX/s:=.*:=\"/usr\":" \
-    -e "/^RUNTIME_PREFIX/s:=.*:=\"/\":" \
-    .config.orig > .config</userinput></screen>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@os='j'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@os='k'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@os='l'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@os='m'])"/>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@os='n'])"/>
-
-<screen os="o"><userinput>make headers</userinput></screen>
-
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-  href="uclibc.xml"
-  xpointer="xpointer(//*[@os='p'])"/>
-
-<screen os="1"><userinput>mkdir ${CLFS}/usr/include/bits
-make PREFIX=${CLFS} install_headers</userinput></screen>
-
-  </sect2>
-
-  <sect2 role="content" id="contents-uclibc-headers">
-    <title/>
-
-    <para>Details on this package are located in <xref
-    linkend="contents-uclibc" role="."/></para>
-
-  </sect2>
-
-</sect1>
Index: BOOK/introduction/common/changelog.xml
===================================================================
--- BOOK/introduction/common/changelog.xml	(revision 56d186f8b3176978055228e5cba0cbb071d5e2d7)
+++ BOOK/introduction/common/changelog.xml	(revision 0194a602a3e3b317adebd81ea1d07e67492f503c)
@@ -38,4 +38,19 @@
 
     <listitem>
+      <para>November 8, 2008</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jciccone] - Dropped the uClibc Headers Page.</para>
+        </listitem>
+        <listitem>
+          <para>[jciccone] - Updated GCC to 4.3.2.</para>
+        </listitem>
+        <listitem>
+          <para>[jciccone] - Updated Binutils to 2.19.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
       <para>Janurary 9, 2008</para>
       <itemizedlist>
Index: BOOK/materials/common/patches.xml
===================================================================
--- BOOK/materials/common/patches.xml	(revision 56d186f8b3176978055228e5cba0cbb071d5e2d7)
+++ BOOK/materials/common/patches.xml	(revision 0194a602a3e3b317adebd81ea1d07e67492f503c)
@@ -29,13 +29,4 @@
 
     <varlistentry>
-      <term>Binutils uClibc Patch - <token>&binutils-uclibc-patch-size;</token>:</term>
-      <listitem>
-        <para>Download: <ulink
-        url="&patches-root;&binutils-uclibc-patch;"/></para>
-        <para>MD5 sum: <literal>&binutils-uclibc-patch-md5;</literal></para>
-      </listitem>
-    </varlistentry>
-
-    <varlistentry>
       <term>Busybox Fixes Patch - <token>&busybox-fixes-patch-size;</token>:</term>
       <listitem>
@@ -47,13 +38,4 @@
 
     <varlistentry>
-      <term>GCC Cross Search Paths Patch - <token>&gcc-cross_search-patch-size;</token>:</term>
-      <listitem>
-        <para>Download: <ulink
-        url="&patches-root;&gcc-cross_search-patch;"/></para>
-        <para>MD5 sum: <literal>&gcc-cross_search-patch-md5;</literal></para>
-      </listitem>
-    </varlistentry>
-
-    <varlistentry>
       <term>GCC Posix Patch - <token>&gcc-posix-patch-size;</token>:</term>
       <listitem>
@@ -61,13 +43,4 @@
         url="&patches-root;&gcc-posix-patch;"/></para>
         <para>MD5 sum: <literal>&gcc-posix-patch-md5;</literal></para>
-      </listitem>
-    </varlistentry>
-
-    <varlistentry>
-      <term>GCC uClibc Patch - <token>&gcc-uclibc-patch-size;</token>:</term>
-      <listitem>
-        <para>Download: <ulink
-        url="&patches-root;&gcc-uclibc-patch;"/></para>
-        <para>MD5 sum: <literal>&gcc-uclibc-patch-md5;</literal></para>
       </listitem>
     </varlistentry>
Index: BOOK/packages.ent
===================================================================
--- BOOK/packages.ent	(revision 56d186f8b3176978055228e5cba0cbb071d5e2d7)
+++ BOOK/packages.ent	(revision 0194a602a3e3b317adebd81ea1d07e67492f503c)
@@ -5,8 +5,8 @@
 <!-- Note: For empty *-home entities use " " not "" -->
 
-<!ENTITY binutils-version "2.17">
-<!ENTITY binutils-size "13,496 KB">
+<!ENTITY binutils-version "2.19">
+<!ENTITY binutils-size "15,860 KB">
 <!ENTITY binutils-url "&gnu;binutils/binutils-&binutils-version;.tar.bz2">
-<!ENTITY binutils-md5 "e26e2e06b6e4bf3acf1dc8688a94c0d1">
+<!ENTITY binutils-md5 "17a52219dee5a76c1a9d9b0bfd337d66">
 <!ENTITY binutils-home "http://sources.redhat.com/binutils/">
 
@@ -29,8 +29,8 @@
 <!ENTITY e2fsprogs-home "http://e2fsprogs.sourceforge.net">
 
-<!ENTITY gcc-version "4.1.2">
-<!ENTITY gcc-size "38,931 KB">
+<!ENTITY gcc-version "4.3.2">
+<!ENTITY gcc-size "57,616 KB">
 <!ENTITY gcc-url "&gnu;gcc/gcc-&gcc-version;/gcc-&gcc-version;.tar.bz2">
-<!ENTITY gcc-md5 "a4a3eb15c96030906d8494959eeda23c">
+<!ENTITY gcc-md5 "5dfac5da961ecd5f227c3175859a486d">
 <!ENTITY gcc-home "http://gcc.gnu.org">
 
Index: BOOK/patches.ent
===================================================================
--- BOOK/patches.ent	(revision 56d186f8b3176978055228e5cba0cbb071d5e2d7)
+++ BOOK/patches.ent	(revision 0194a602a3e3b317adebd81ea1d07e67492f503c)
@@ -6,10 +6,6 @@
 
 <!ENTITY binutils-posix-patch "binutils-&binutils-version;-posix-1.patch">
-<!ENTITY binutils-posix-patch-md5 "7e42a8edc0c59246bbc58c428256113c">
-<!ENTITY binutils-posix-patch-size "4.9 KB">
-
-<!ENTITY binutils-uclibc-patch "binutils-&binutils-version;-uclibc-1.patch">
-<!ENTITY binutils-uclibc-patch-md5 "02206a199a78b14de01be6a38eb45de4">
-<!ENTITY binutils-uclibc-patch-size "12 KB">
+<!ENTITY binutils-posix-patch-md5 "f2020cb369c2facbfd8987fa2263f31f">
+<!ENTITY binutils-posix-patch-size "4 KB">
 
 <!ENTITY busybox-fixes-patch "busybox-&busybox-version;-fixes-1.patch">
@@ -17,15 +13,7 @@
 <!ENTITY busybox-fixes-patch-size "20 KB">
 
-<!ENTITY gcc-cross_search-patch "gcc-&gcc-version;-cross_search_paths-1.patch">
-<!ENTITY gcc-cross_search-patch-md5 "8ef51c0c74f0ea8511e59544f719470f">
-<!ENTITY gcc-cross_search-patch-size "4 KB">
-
 <!ENTITY gcc-posix-patch "gcc-&gcc-version;-posix-1.patch">
-<!ENTITY gcc-posix-patch-md5 "9aa1cdcbaedb4e1ed3f65ae25cdc413b">
+<!ENTITY gcc-posix-patch-md5 "ed26ea522e014b2e39adf066bd44053b">
 <!ENTITY gcc-posix-patch-size "12 KB">
-
-<!ENTITY gcc-uclibc-patch "gcc-&gcc-version;-uclibc-1.patch">
-<!ENTITY gcc-uclibc-patch-md5 "77764a4a5e2b71980e3964bbb6a95e35">
-<!ENTITY gcc-uclibc-patch-size "144 KB">
 
 <!ENTITY zlib-destdir-patch "zlib-&zlib-version;-DESTDIR-1.patch">
Index: tches/binutils-2.17-posix-1.patch
===================================================================
--- patches/binutils-2.17-posix-1.patch	(revision 56d186f8b3176978055228e5cba0cbb071d5e2d7)
+++ 	(revision )
@@ -1,98 +1,0 @@
-Submitted By: Jim Gifford (patches at jg555 dot com)
-Date: 2005-05-06
-Initial Package Version: 2.16
-Origin: http://ttervo.vectorstar.net/nptl/posix-patches/binutils-2.14.90.0.7-posix-head-tail.patch
-Upstream Status: Accepted/but Suspended
-Description: Makes Posix Compliant
-	     Rediffed against 2.16 by Jeremy Huntwork
-
-diff -Naur binutils-2.16-ORIG/gas/Makefile.am binutils-2.16/gas/Makefile.am
---- binutils-2.16-ORIG/gas/Makefile.am	2005-03-22 10:31:44.000000000 -0500
-+++ binutils-2.16/gas/Makefile.am	2005-05-06 17:08:11.859876859 -0400
-@@ -762,13 +762,13 @@
- against=stage2
- 
- # This rule is derived from corresponding code in the Makefile.in for gcc.
--# The "tail +16c" is to bypass headers which may include timestamps or
-+# The "tail -c +16" is to bypass headers which may include timestamps or
- # temporary assembly file names.
- comparison:
- 	x=0 ; \
- 	for file in *.o ; do \
--	  tail +16c ./$$file > tmp-foo1; \
--	  if tail +16c ${against}/$$file > tmp-foo2 2>/dev/null ; then \
-+	  tail -c +16 ./$$file > tmp-foo1; \
-+	  if tail -c +16 ${against}/$$file > tmp-foo2 2>/dev/null ; then \
- 	    if cmp tmp-foo1 tmp-foo2 ; then \
- 	      true ; \
- 	    else \
-diff -Naur binutils-2.16-ORIG/gas/Makefile.in binutils-2.16/gas/Makefile.in
---- binutils-2.16-ORIG/gas/Makefile.in	2005-04-29 09:57:16.000000000 -0400
-+++ binutils-2.16/gas/Makefile.in	2005-05-06 17:08:11.868875659 -0400
-@@ -3164,13 +3164,13 @@
- 	if [ -f stage3/as-new$(EXEEXT) -a ! -f stage3/as$(EXEEXT) ] ; then (cd stage3 ; ln -s as-new as$(EXEEXT)) ; fi
- 
- # This rule is derived from corresponding code in the Makefile.in for gcc.
--# The "tail +16c" is to bypass headers which may include timestamps or
-+# The "tail -c +16" is to bypass headers which may include timestamps or
- # temporary assembly file names.
- comparison:
- 	x=0 ; \
- 	for file in *.o ; do \
--	  tail +16c ./$$file > tmp-foo1; \
--	  if tail +16c ${against}/$$file > tmp-foo2 2>/dev/null ; then \
-+	  tail -c +16 ./$$file > tmp-foo1; \
-+	  if tail -c +16 ${against}/$$file > tmp-foo2 2>/dev/null ; then \
- 	    if cmp tmp-foo1 tmp-foo2 ; then \
- 	      true ; \
- 	    else \
-diff -Naur binutils-2.16-ORIG/ld/testsuite/ld-bootstrap/bootstrap.exp binutils-2.16/ld/testsuite/ld-bootstrap/bootstrap.exp
---- binutils-2.16-ORIG/ld/testsuite/ld-bootstrap/bootstrap.exp	2005-03-03 06:52:06.000000000 -0500
-+++ binutils-2.16/ld/testsuite/ld-bootstrap/bootstrap.exp	2005-05-06 17:08:11.870875393 -0400
-@@ -149,8 +149,8 @@
-         # Although this works, a way to set the date would be better.
-         # Removing or zeroing the date stamp in the binary produced by
-         # the linker is not possible as it is required by the target OS.
--        exec tail +140 tmpdir/ld2 >tmpdir/ld2tail
--        exec tail +140 tmpdir/ld3 >tmpdir/ld3tail
-+        exec tail -n +140 tmpdir/ld2 >tmpdir/ld2tail
-+        exec tail -n +140 tmpdir/ld3 >tmpdir/ld3tail
-         catch "exec cmp tmpdir/ld2tail tmpdir/ld3tail" exec_output
-         exec rm tmpdir/ld2tail tmpdir/ld3tail
-     } else {
-diff -Naur binutils-2.16-ORIG/ltcf-c.sh binutils-2.16/ltcf-c.sh
---- binutils-2.16-ORIG/ltcf-c.sh	2004-10-05 09:34:42.000000000 -0400
-+++ binutils-2.16/ltcf-c.sh	2005-05-06 17:08:11.873874993 -0400
-@@ -153,7 +153,7 @@
-     # If the export-symbols file already is a .def file (1st line
-     # is EXPORTS), use it as is.
-     # If DATA tags from a recent dlltool are present, honour them!
--    archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
-+    archive_expsym_cmds='if test "x`head -n 1 $export_symbols`" = xEXPORTS; then
-         cp $export_symbols $output_objdir/$soname-def;
-       else
-         echo EXPORTS > $output_objdir/$soname-def;
-diff -Naur binutils-2.16-ORIG/ltcf-gcj.sh binutils-2.16/ltcf-gcj.sh
---- binutils-2.16-ORIG/ltcf-gcj.sh	2004-07-21 15:21:41.000000000 -0400
-+++ binutils-2.16/ltcf-gcj.sh	2005-05-06 17:08:11.876874593 -0400
-@@ -156,7 +156,7 @@
-     # If the export-symbols file already is a .def file (1st line
-     # is EXPORTS), use it as is.
-     # If DATA tags from a recent dlltool are present, honour them!
--    archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
-+    archive_expsym_cmds='if test "x`head -n 1 $export_symbols`" = xEXPORTS; then
-         cp $export_symbols $output_objdir/$soname-def;
-       else
-         echo EXPORTS > $output_objdir/$soname-def;
-diff -Naur binutils-2.16-ORIG/src-release binutils-2.16/src-release
---- binutils-2.16-ORIG/src-release	2004-12-03 05:30:06.000000000 -0500
-+++ binutils-2.16/src-release	2005-05-06 17:08:11.878874327 -0400
-@@ -69,7 +69,7 @@
- 	elif grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \
- 	  sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \
- 	elif test -f $(TOOL)/version.in; then \
--	  head -1 $(TOOL)/version.in; \
-+	  head -n 1 $(TOOL)/version.in; \
- 	elif grep VERSION $(TOOL)/Makefile.in > /dev/null 2>&1; then \
- 	  sed < $(TOOL)/Makefile.in -n 's/^VERSION *= *//p'; \
- 	else \
Index: tches/binutils-2.17-uclibc-1.patch
===================================================================
--- patches/binutils-2.17-uclibc-1.patch	(revision 56d186f8b3176978055228e5cba0cbb071d5e2d7)
+++ 	(revision )
@@ -1,264 +1,0 @@
-Submitted By: Jim Gifford (patches at jg555 dot com)
-Date: 2006-11-13
-Initial Package Version: 2.17
-Origin: uClibc and Buildroot
-Upstream Status: uClibc Specific
-Description: Makes Binutils uClibc Friendly
-
-diff -Naur binutils-2.17.orig/bfd/configure binutils-2.17/bfd/configure
---- binutils-2.17.orig/bfd/configure	2006-06-23 11:17:03.000000000 -0700
-+++ binutils-2.17/bfd/configure	2006-11-13 20:58:00.353290460 -0800
-@@ -3576,7 +3576,7 @@
-   ;;
- 
- # This must be Linux ELF.
--linux-gnu*)
-+linux-gnu*|linux-uclibc*)
-   lt_cv_deplibs_check_method=pass_all
-   ;;
- 
-diff -Naur binutils-2.17.orig/bfd/elf32-mips.c binutils-2.17/bfd/elf32-mips.c
---- binutils-2.17.orig/bfd/elf32-mips.c	2006-03-22 01:28:13.000000000 -0800
-+++ binutils-2.17/bfd/elf32-mips.c	2006-11-13 20:56:15.528689446 -0800
-@@ -1617,7 +1617,9 @@
- 
- /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
-    page sizes of up to that limit, so we need to respect it.  */
--#define ELF_MAXPAGESIZE			0x10000
-+/*#define ELF_MAXPAGESIZE			0x10000*/
-+/* Use 4K to shrink the elf header.  NOT for general use! */
-+#define ELF_MAXPAGESIZE			0x1000
- #define elf32_bed			elf32_tradbed
- 
- /* Include the target file again for this target.  */
-diff -Naur binutils-2.17.orig/bfd/elfn32-mips.c binutils-2.17/bfd/elfn32-mips.c
---- binutils-2.17.orig/bfd/elfn32-mips.c	2005-11-23 06:04:17.000000000 -0800
-+++ binutils-2.17/bfd/elfn32-mips.c	2006-11-13 20:56:15.528689446 -0800
-@@ -2402,7 +2402,9 @@
- 
- /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
-    page sizes of up to that limit, so we need to respect it.  */
--#define ELF_MAXPAGESIZE			0x10000
-+/*#define ELF_MAXPAGESIZE			0x10000*/
-+/* Use 4K to shrink the elf header.  NOT for general use! */
-+#define ELF_MAXPAGESIZE			0x1000
- #define elf32_bed			elf32_tradbed
- 
- /* Include the target file again for this target.  */
-diff -Naur binutils-2.17.orig/bfd/opncls.c binutils-2.17/bfd/opncls.c
---- binutils-2.17.orig/bfd/opncls.c	2006-03-16 04:20:16.000000000 -0800
-+++ binutils-2.17/bfd/opncls.c	2006-11-13 20:58:19.424670543 -0800
-@@ -158,6 +158,13 @@
- {
-   bfd *nbfd;
-   const bfd_target *target_vec;
-+  struct stat s;
-+
-+  if (stat (filename, &s) == 0)
-+    if (S_ISDIR(s.st_mode)) {
-+      bfd_set_error (bfd_error_file_not_recognized);
-+      return NULL;
-+    }
- 
-   nbfd = _bfd_new_bfd ();
-   if (nbfd == NULL)
-diff -Naur binutils-2.17.orig/binutils/configure binutils-2.17/binutils/configure
---- binutils-2.17.orig/binutils/configure	2006-04-06 14:49:29.000000000 -0700
-+++ binutils-2.17/binutils/configure	2006-11-13 20:58:00.357290330 -0800
-@@ -3411,7 +3411,7 @@
-   ;;
- 
- # This must be Linux ELF.
--linux-gnu*)
-+linux-gnu*|linux-uclibc*)
-   lt_cv_deplibs_check_method=pass_all
-   ;;
- 
-diff -Naur binutils-2.17.orig/configure binutils-2.17/configure
---- binutils-2.17.orig/configure	2006-04-06 14:49:25.000000000 -0700
-+++ binutils-2.17/configure	2006-11-13 20:58:00.361290200 -0800
-@@ -1276,7 +1276,7 @@
-   am33_2.0-*-linux*)
-     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
-     ;;
--  sh-*-linux*)
-+  sh*-*-linux*)
-     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
-     ;;    
-   sh*-*-pe|mips*-*-pe|*arm-wince-pe)
-@@ -1305,7 +1305,7 @@
-   arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
-     noconfigdirs="$noconfigdirs target-libffi target-qthreads"
-     ;;
--  arm*-*-linux-gnueabi)
-+  arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
-     noconfigdirs="$noconfigdirs target-libffi target-qthreads"
-     noconfigdirs="$noconfigdirs target-libjava target-libobjc"
-     ;;
-@@ -1584,7 +1584,7 @@
-   romp-*-*)
-     noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
-     ;;
--  sh-*-* | sh64-*-*)
-+  sh*-*-* | sh64-*-*)
-     case "${host}" in
-       i[3456789]86-*-vsta) ;; # don't add gprof back in
-       i[3456789]86-*-go32*) ;; # don't add gprof back in
-diff -Naur binutils-2.17.orig/configure.in binutils-2.17/configure.in
---- binutils-2.17.orig/configure.in	2006-06-23 11:19:53.000000000 -0700
-+++ binutils-2.17/configure.in	2006-11-13 20:58:00.361290200 -0800
-@@ -468,7 +468,7 @@
-   am33_2.0-*-linux*)
-     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
-     ;;
--  sh-*-linux*)
-+  sh*-*-linux*)
-     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
-     ;;    
-   sh*-*-pe|mips*-*-pe|*arm-wince-pe)
-@@ -497,7 +497,7 @@
-   arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
-     noconfigdirs="$noconfigdirs target-libffi target-qthreads"
-     ;;
--  arm*-*-linux-gnueabi)
-+  arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
-     noconfigdirs="$noconfigdirs target-libffi target-qthreads"
-     noconfigdirs="$noconfigdirs target-libjava target-libobjc"
-     ;;
-@@ -776,7 +776,7 @@
-   romp-*-*)
-     noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
-     ;;
--  sh-*-* | sh64-*-*)
-+  sh*-*-* | sh64-*-*)
-     case "${host}" in
-       i[[3456789]]86-*-vsta) ;; # don't add gprof back in
-       i[[3456789]]86-*-go32*) ;; # don't add gprof back in
-diff -Naur binutils-2.17.orig/gas/configure binutils-2.17/gas/configure
---- binutils-2.17.orig/gas/configure	2006-04-06 14:49:31.000000000 -0700
-+++ binutils-2.17/gas/configure	2006-11-13 20:58:00.365290070 -0800
-@@ -3411,7 +3411,7 @@
-   ;;
- 
- # This must be Linux ELF.
--linux-gnu*)
-+linux-gnu*|linux-uclibc*)
-   lt_cv_deplibs_check_method=pass_all
-   ;;
- 
-diff -Naur binutils-2.17.orig/gprof/configure binutils-2.17/gprof/configure
---- binutils-2.17.orig/gprof/configure	2006-04-06 14:49:33.000000000 -0700
-+++ binutils-2.17/gprof/configure	2006-11-13 20:58:00.369289940 -0800
-@@ -3414,6 +3414,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 -Naur binutils-2.17.orig/ld/Makefile.am binutils-2.17/ld/Makefile.am
---- binutils-2.17.orig/ld/Makefile.am	2006-06-02 21:45:50.000000000 -0700
-+++ binutils-2.17/ld/Makefile.am	2006-11-13 20:57:35.498097688 -0800
-@@ -20,7 +20,7 @@
- # We put the scripts in the directory $(scriptdir)/ldscripts.
- # We can't put the scripts in $(datadir) because the SEARCH_DIR
- # directives need to be different for native and cross linkers.
--scriptdir = $(tooldir)/lib
-+scriptdir = $(libdir)
- 
- EMUL = @EMUL@
- EMULATION_OFILES = @EMULATION_OFILES@
-diff -Naur binutils-2.17.orig/ld/Makefile.in binutils-2.17/ld/Makefile.in
---- binutils-2.17.orig/ld/Makefile.in	2006-06-02 21:45:50.000000000 -0700
-+++ binutils-2.17/ld/Makefile.in	2006-11-13 20:57:35.498097688 -0800
-@@ -269,7 +269,7 @@
- # We put the scripts in the directory $(scriptdir)/ldscripts.
- # We can't put the scripts in $(datadir) because the SEARCH_DIR
- # directives need to be different for native and cross linkers.
--scriptdir = $(tooldir)/lib
-+scriptdir = $(libdir)
- BASEDIR = $(srcdir)/..
- BFDDIR = $(BASEDIR)/bfd
- INCDIR = $(BASEDIR)/include
-diff -Naur binutils-2.17.orig/ld/configure binutils-2.17/ld/configure
---- binutils-2.17.orig/ld/configure	2006-04-11 03:36:26.000000000 -0700
-+++ binutils-2.17/ld/configure	2006-11-13 20:58:00.373289810 -0800
-@@ -3413,7 +3413,7 @@
-   ;;
- 
- # This must be Linux ELF.
--linux-gnu*)
-+linux-gnu*|linux-uclibc*)
-   lt_cv_deplibs_check_method=pass_all
-   ;;
- 
-diff -Naur binutils-2.17.orig/ld/emultempl/elf32.em binutils-2.17/ld/emultempl/elf32.em
---- binutils-2.17.orig/ld/emultempl/elf32.em	2006-06-12 06:05:04.000000000 -0700
-+++ binutils-2.17/ld/emultempl/elf32.em	2006-11-13 20:58:36.268122666 -0800
-@@ -970,6 +970,8 @@
- 	      && command_line.rpath == NULL)
- 	    {
- 	      lib_path = (const char *) getenv ("LD_RUN_PATH");
-+	      if ((lib_path) && (strlen (lib_path) == 0))
-+		  lib_path = NULL;
- 	      if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
- 						      force))
- 		break;
-@@ -1154,6 +1156,8 @@
-   rpath = command_line.rpath;
-   if (rpath == NULL)
-     rpath = (const char *) getenv ("LD_RUN_PATH");
-+  if ((rpath) && (strlen (rpath) == 0))
-+      rpath = NULL;
-   if (! (bfd_elf_size_dynamic_sections
- 	 (output_bfd, command_line.soname, rpath,
- 	  command_line.filter_shlib,
-diff -Naur binutils-2.17.orig/libtool.m4 binutils-2.17/libtool.m4
---- binutils-2.17.orig/libtool.m4	2005-12-27 08:37:57.000000000 -0800
-+++ binutils-2.17/libtool.m4	2006-11-13 20:58:00.373289810 -0800
-@@ -739,7 +739,7 @@
-   ;;
- 
- # This must be Linux ELF.
--linux-gnu*)
-+linux-gnu*|linux-uclibc*)
-   lt_cv_deplibs_check_method=pass_all
-   ;;
- 
-diff -Naur binutils-2.17.orig/ltconfig binutils-2.17/ltconfig
---- binutils-2.17.orig/ltconfig	2005-07-15 19:36:38.000000000 -0700
-+++ binutils-2.17/ltconfig	2006-11-13 20:58:00.373289810 -0800
-@@ -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
-@@ -1247,7 +1248,7 @@
-   ;;
- 
- # This must be Linux ELF.
--linux-gnu*)
-+linux-gnu*|linux-uclibc*)
-   version_type=linux
-   need_lib_prefix=no
-   need_version=no
-diff -Naur binutils-2.17.orig/opcodes/configure binutils-2.17/opcodes/configure
---- binutils-2.17.orig/opcodes/configure	2006-02-17 06:36:28.000000000 -0800
-+++ binutils-2.17/opcodes/configure	2006-11-13 20:58:00.377289680 -0800
-@@ -3579,7 +3579,7 @@
-   ;;
- 
- # This must be Linux ELF.
--linux-gnu*)
-+linux-gnu*|linux-uclibc*)
-   lt_cv_deplibs_check_method=pass_all
-   ;;
- 
Index: patches/binutils-2.19-posix-1.patch
===================================================================
--- patches/binutils-2.19-posix-1.patch	(revision 0194a602a3e3b317adebd81ea1d07e67492f503c)
+++ patches/binutils-2.19-posix-1.patch	(revision 0194a602a3e3b317adebd81ea1d07e67492f503c)
@@ -0,0 +1,73 @@
+Submitted By: Jim Gifford (patches at jg555 dot com)
+Date: 2007-09-01
+Initial Package Version: 2.18
+Origin: http://ttervo.vectorstar.net/nptl/posix-patches/binutils-2.14.90.0.7-posix-head-tail.patch
+Upstream Status: Accepted/but Suspended
+Description: Makes Posix Compliant
+
+diff -Naur binutils-2.18.orig/gas/Makefile.am binutils-2.18/gas/Makefile.am
+--- binutils-2.18.orig/gas/Makefile.am	2007-08-28 10:19:35.000000000 -0700
++++ binutils-2.18/gas/Makefile.am	2007-09-01 11:36:26.000000000 -0700
+@@ -791,13 +791,13 @@
+ against=stage2
+ 
+ # This rule is derived from corresponding code in the Makefile.in for gcc.
+-# The "tail +16c" is to bypass headers which may include timestamps or
++# The "tail -c +16" is to bypass headers which may include timestamps or
+ # temporary assembly file names.
+ comparison:
+ 	x=0 ; \
+ 	for file in *.o ; do \
+-	  tail +16c ./$$file > tmp-foo1; \
+-	  if tail +16c ${against}/$$file > tmp-foo2 2>/dev/null ; then \
++	  tail -c +16 ./$$file > tmp-foo1; \
++	  if tail -c +16 ${against}/$$file > tmp-foo2 2>/dev/null ; then \
+ 	    if cmp tmp-foo1 tmp-foo2 ; then \
+ 	      true ; \
+ 	    else \
+diff -Naur binutils-2.18.orig/gas/Makefile.in binutils-2.18/gas/Makefile.in
+--- binutils-2.18.orig/gas/Makefile.in	2007-08-28 10:19:35.000000000 -0700
++++ binutils-2.18/gas/Makefile.in	2007-09-01 11:36:26.000000000 -0700
+@@ -2763,13 +2763,13 @@
+ 	if [ -f stage3/as-new$(EXEEXT) -a ! -f stage3/as$(EXEEXT) ] ; then (cd stage3 ; ln -s as-new as$(EXEEXT)) ; fi
+ 
+ # This rule is derived from corresponding code in the Makefile.in for gcc.
+-# The "tail +16c" is to bypass headers which may include timestamps or
++# The "tail -c +16" is to bypass headers which may include timestamps or
+ # temporary assembly file names.
+ comparison:
+ 	x=0 ; \
+ 	for file in *.o ; do \
+-	  tail +16c ./$$file > tmp-foo1; \
+-	  if tail +16c ${against}/$$file > tmp-foo2 2>/dev/null ; then \
++	  tail -c +16 ./$$file > tmp-foo1; \
++	  if tail -c +16 ${against}/$$file > tmp-foo2 2>/dev/null ; then \
+ 	    if cmp tmp-foo1 tmp-foo2 ; then \
+ 	      true ; \
+ 	    else \
+diff -Naur binutils-2.18.orig/ld/testsuite/ld-bootstrap/bootstrap.exp binutils-2.18/ld/testsuite/ld-bootstrap/bootstrap.exp
+--- binutils-2.18.orig/ld/testsuite/ld-bootstrap/bootstrap.exp	2007-08-06 13:00:23.000000000 -0700
++++ binutils-2.18/ld/testsuite/ld-bootstrap/bootstrap.exp	2007-09-01 11:36:26.000000000 -0700
+@@ -152,8 +152,8 @@
+         # Although this works, a way to set the date would be better.
+         # Removing or zeroing the date stamp in the binary produced by
+         # the linker is not possible as it is required by the target OS.
+-        exec tail +140 tmpdir/ld2 >tmpdir/ld2tail
+-        exec tail +140 tmpdir/ld3 >tmpdir/ld3tail
++        exec tail -n +140 tmpdir/ld2 >tmpdir/ld2tail
++        exec tail -n +140 tmpdir/ld3 >tmpdir/ld3tail
+         catch "exec cmp tmpdir/ld2tail tmpdir/ld3tail" exec_output
+         exec rm tmpdir/ld2tail tmpdir/ld3tail
+     } else {
+diff -Naur binutils-2.18.orig/src-release binutils-2.18/src-release
+--- binutils-2.18.orig/src-release	2007-08-12 12:04:26.000000000 -0700
++++ binutils-2.18/src-release	2007-09-01 11:36:38.000000000 -0700
+@@ -73,7 +73,7 @@
+ 	elif grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \
+ 	  sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \
+ 	elif test -f $(TOOL)/version.in; then \
+-	  head -1 $(TOOL)/version.in; \
++	  head -n 1 $(TOOL)/version.in; \
+ 	elif grep VERSION $(TOOL)/Makefile.in > /dev/null 2>&1; then \
+ 	  sed < $(TOOL)/Makefile.in -n 's/^VERSION *= *//p'; \
+ 	else \
Index: tches/gcc-4.1.2-cross_search_paths-1.patch
===================================================================
--- patches/gcc-4.1.2-cross_search_paths-1.patch	(revision 56d186f8b3176978055228e5cba0cbb071d5e2d7)
+++ 	(revision )
@@ -1,50 +1,0 @@
-Submitted by: Ryan Oliver <ryan.oliver@pha.com.au>
-Date: 2007-02-14
-Initial Package Version: 4.1.2
-Origin: Ryan Oliver (issue reported by Erik-Jan Post)
-        Rediffed against 4.1.0 by Chris Staub
-	Rediffed against 4.1.2 by Jim Gifford
-Upstream Status: N/A
-Description:
-  Removes standard_exec_prefix_2 from library search path when cross-compiling.
-  Removes both standard_exec_prefix_1 and standard_exec_prefix_2 from the gcc
-  executable search path when cross-compiling.
-
-  ie: if cross_compile = 1 in the specs file, do not
-      - do not add /usr/lib/gcc/${TARGET}/${GCC_VER} to the library search path
-      - do not add /usr/lib/gcc/${TARGET}/${GCC_VER} or
-                   /usr/libexec/gcc/${TARGET}/${GCC_VER}
-        to the executable search path
-
-  This avoids the possibility of linking in libraries from the host if they
-  exist under those directories.
- 
-diff -Naur gcc-4.1.2.orig/gcc/gcc.c gcc-4.1.2/gcc/gcc.c
---- gcc-4.1.2.orig/gcc/gcc.c	2006-11-07 06:26:21.000000000 -0800
-+++ gcc-4.1.2/gcc/gcc.c	2007-02-14 07:48:55.000000000 -0800
-@@ -3821,16 +3821,22 @@
- 	      PREFIX_PRIORITY_LAST, 2, 0);
-   add_prefix (&exec_prefixes, standard_exec_prefix, "BINUTILS",
- 	      PREFIX_PRIORITY_LAST, 2, 0);
--  add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS",
-+  if (*cross_compile == '0')
-+    {
-+      add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS",
- 	      PREFIX_PRIORITY_LAST, 2, 0);
--  add_prefix (&exec_prefixes, standard_exec_prefix_2, "BINUTILS",
-+      add_prefix (&exec_prefixes, standard_exec_prefix_2, "BINUTILS",
- 	      PREFIX_PRIORITY_LAST, 2, 0);
-+    }
- #endif
- 
-   add_prefix (&startfile_prefixes, standard_exec_prefix, "BINUTILS",
- 	      PREFIX_PRIORITY_LAST, 1, 0);
--  add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS",
-+  if (*cross_compile == '0')
-+    {
-+      add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS",
- 	      PREFIX_PRIORITY_LAST, 1, 0);
-+    }
- 
-   tooldir_prefix = concat (tooldir_base_prefix, spec_machine,
- 			   dir_separator_str, NULL);
Index: tches/gcc-4.1.2-posix-1.patch
===================================================================
--- patches/gcc-4.1.2-posix-1.patch	(revision 56d186f8b3176978055228e5cba0cbb071d5e2d7)
+++ 	(revision )
@@ -1,211 +1,0 @@
-Submitted By: Jim Gifford (patches at jg555 dot com)
-Date: 2007-02-14
-Initial Package Version: 4.1.2
-Origin: Jim Gifford
-        Rediffed against 4.1.0 by Chris Staub
-        Rediffed against 4.1.2 by Jim Gifford
-Upstream Status: On Hold
-Description: Makes GCC Posix Compliant
-
-diff -Naur gcc-4.1.2.orig/contrib/test_summary gcc-4.1.2/contrib/test_summary
---- gcc-4.1.2.orig/contrib/test_summary	2004-08-25 22:51:22.000000000 -0700
-+++ gcc-4.1.2/contrib/test_summary	2007-02-14 08:02:33.000000000 -0800
-@@ -106,7 +106,7 @@
-     srcdir = configflags;
-     sub(/\/configure .*/, "", srcdir);
-     printf "LAST_UPDATED: ";
--    system("tail -1 " srcdir "/LAST_UPDATED");
-+    system("tail -n 1 " srcdir "/LAST_UPDATED");
-     print "";
- 
-     sub(/^[^ ]*\/configure */, " ", configflags);
-diff -Naur gcc-4.1.2.orig/gcc/configure gcc-4.1.2/gcc/configure
---- gcc-4.1.2.orig/gcc/configure	2006-11-13 14:09:55.000000000 -0800
-+++ gcc-4.1.2/gcc/configure	2007-02-14 08:02:33.000000000 -0800
-@@ -14318,7 +14318,7 @@
-   # and we got the correct data, then succeed.
-   if test x$gcc_cv_objdump != x \
-   && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
--     | tail -3 > conftest.got \
-+     | tail -n 3 > conftest.got \
-   && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
-     || cmp conftest.big conftest.got > /dev/null 2>&1; }
-   then
-diff -Naur gcc-4.1.2.orig/gcc/configure.ac gcc-4.1.2/gcc/configure.ac
---- gcc-4.1.2.orig/gcc/configure.ac	2006-11-13 14:09:55.000000000 -0800
-+++ gcc-4.1.2/gcc/configure.ac	2007-02-14 08:02:33.000000000 -0800
-@@ -2124,7 +2124,7 @@
-   # and we got the correct data, then succeed.
-   if test x$gcc_cv_objdump != x \
-   && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
--     | tail -3 > conftest.got \
-+     | tail -n 3 > conftest.got \
-   && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
-     || cmp conftest.big conftest.got > /dev/null 2>&1; }
-   then
-diff -Naur gcc-4.1.2.orig/libjava/configure gcc-4.1.2/libjava/configure
---- gcc-4.1.2.orig/libjava/configure	2007-02-13 21:17:22.000000000 -0800
-+++ gcc-4.1.2/libjava/configure	2007-02-14 08:02:33.000000000 -0800
-@@ -6736,8 +6736,8 @@
- echo $ECHO_N "checking whether 'ld' is at least 2.13... $ECHO_C" >&6
- LD_PROG=`$CC --print-prog-name=ld`
- LD_VERSION=`$LD_PROG --version`
--LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
--LD_VERSION_MINOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 2`
-+LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -n 1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
-+LD_VERSION_MINOR=`echo "$LD_VERSION" | head -n 1 | cut -d '.' -f 2`
- if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then
-   LD_OK="ok"
- else
-diff -Naur gcc-4.1.2.orig/libjava/mingwld.m4 gcc-4.1.2/libjava/mingwld.m4
---- gcc-4.1.2.orig/libjava/mingwld.m4	2005-08-22 15:36:35.000000000 -0700
-+++ gcc-4.1.2/libjava/mingwld.m4	2007-02-14 08:02:33.000000000 -0800
-@@ -3,8 +3,8 @@
- AC_MSG_CHECKING(whether 'ld' is at least 2.13)
- LD_PROG=`$CC --print-prog-name=ld`
- LD_VERSION=`$LD_PROG --version`
--LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
--LD_VERSION_MINOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 2`
-+LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -n 1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
-+LD_VERSION_MINOR=`echo "$LD_VERSION" | head -n 1 | cut -d '.' -f 2`
- if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then
-   LD_OK="ok"
- else
-diff -Naur gcc-4.1.2.orig/libstdc++-v3/acinclude.m4 gcc-4.1.2/libstdc++-v3/acinclude.m4
---- gcc-4.1.2.orig/libstdc++-v3/acinclude.m4	2007-01-29 02:51:01.000000000 -0800
-+++ gcc-4.1.2/libstdc++-v3/acinclude.m4	2007-02-14 08:03:05.000000000 -0800
-@@ -224,7 +224,7 @@
-   # does some of this, but throws away the result.
-   if test x"$with_gnu_ld" = x"yes"; then
-     changequote(,)
--    ldver=`$LD --version 2>/dev/null | head -1 | \
-+    ldver=`$LD --version 2>/dev/null | head -n 1 | \
-            sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
-     changequote([,])
-     glibcxx_gnu_ld_version=`echo $ldver | \
-diff -Naur gcc-4.1.2.orig/libstdc++-v3/configure gcc-4.1.2/libstdc++-v3/configure
---- gcc-4.1.2.orig/libstdc++-v3/configure	2007-01-29 02:51:01.000000000 -0800
-+++ gcc-4.1.2/libstdc++-v3/configure	2007-02-14 08:03:51.000000000 -0800
-@@ -8280,7 +8280,7 @@
-   # does some of this, but throws away the result.
-   if test x"$with_gnu_ld" = x"yes"; then
- 
--    ldver=`$LD --version 2>/dev/null | head -1 | \
-+    ldver=`$LD --version 2>/dev/null | head -n 1 | \
-            sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
- 
-     glibcxx_gnu_ld_version=`echo $ldver | \
-@@ -53121,7 +53121,7 @@
-   # does some of this, but throws away the result.
-   if test x"$with_gnu_ld" = x"yes"; then
- 
--    ldver=`$LD --version 2>/dev/null | head -1 | \
-+    ldver=`$LD --version 2>/dev/null | head -n 1 | \
-            sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
- 
-     glibcxx_gnu_ld_version=`echo $ldver | \
-@@ -74455,7 +74455,7 @@
-   # does some of this, but throws away the result.
-   if test x"$with_gnu_ld" = x"yes"; then
- 
--    ldver=`$LD --version 2>/dev/null | head -1 | \
-+    ldver=`$LD --version 2>/dev/null | head -n 1 | \
-            sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
- 
-     glibcxx_gnu_ld_version=`echo $ldver | \
-@@ -75952,7 +75952,7 @@
-   # does some of this, but throws away the result.
-   if test x"$with_gnu_ld" = x"yes"; then
- 
--    ldver=`$LD --version 2>/dev/null | head -1 | \
-+    ldver=`$LD --version 2>/dev/null | head -n 1 | \
-            sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
- 
-     glibcxx_gnu_ld_version=`echo $ldver | \
-@@ -77325,7 +77325,7 @@
-   # does some of this, but throws away the result.
-   if test x"$with_gnu_ld" = x"yes"; then
- 
--    ldver=`$LD --version 2>/dev/null | head -1 | \
-+    ldver=`$LD --version 2>/dev/null | head -n 1 | \
-            sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
- 
-     glibcxx_gnu_ld_version=`echo $ldver | \
-@@ -79485,7 +79485,7 @@
-   # does some of this, but throws away the result.
-   if test x"$with_gnu_ld" = x"yes"; then
- 
--    ldver=`$LD --version 2>/dev/null | head -1 | \
-+    ldver=`$LD --version 2>/dev/null | head -n 1 | \
-            sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
- 
-     glibcxx_gnu_ld_version=`echo $ldver | \
-@@ -80304,7 +80304,7 @@
-   # does some of this, but throws away the result.
-   if test x"$with_gnu_ld" = x"yes"; then
- 
--    ldver=`$LD --version 2>/dev/null | head -1 | \
-+    ldver=`$LD --version 2>/dev/null | head -n 1 | \
-            sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
- 
-     glibcxx_gnu_ld_version=`echo $ldver | \
-@@ -81679,7 +81679,7 @@
-   # does some of this, but throws away the result.
-   if test x"$with_gnu_ld" = x"yes"; then
- 
--    ldver=`$LD --version 2>/dev/null | head -1 | \
-+    ldver=`$LD --version 2>/dev/null | head -n 1 | \
-            sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
- 
-     glibcxx_gnu_ld_version=`echo $ldver | \
-@@ -83446,7 +83446,7 @@
-   # does some of this, but throws away the result.
-   if test x"$with_gnu_ld" = x"yes"; then
- 
--    ldver=`$LD --version 2>/dev/null | head -1 | \
-+    ldver=`$LD --version 2>/dev/null | head -n 1 | \
-            sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
- 
-     glibcxx_gnu_ld_version=`echo $ldver | \
-@@ -84663,7 +84663,7 @@
-   # does some of this, but throws away the result.
-   if test x"$with_gnu_ld" = x"yes"; then
- 
--    ldver=`$LD --version 2>/dev/null | head -1 | \
-+    ldver=`$LD --version 2>/dev/null | head -n 1 | \
-            sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
- 
-     glibcxx_gnu_ld_version=`echo $ldver | \
-@@ -85664,7 +85664,7 @@
-   # does some of this, but throws away the result.
-   if test x"$with_gnu_ld" = x"yes"; then
- 
--    ldver=`$LD --version 2>/dev/null | head -1 | \
-+    ldver=`$LD --version 2>/dev/null | head -n 1 | \
-            sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
- 
-     glibcxx_gnu_ld_version=`echo $ldver | \
-diff -Naur gcc-4.1.2.orig/ltcf-c.sh gcc-4.1.2/ltcf-c.sh
---- gcc-4.1.2.orig/ltcf-c.sh	2005-11-18 14:53:08.000000000 -0800
-+++ gcc-4.1.2/ltcf-c.sh	2007-02-14 08:02:33.000000000 -0800
-@@ -153,7 +153,7 @@
-     # If the export-symbols file already is a .def file (1st line
-     # is EXPORTS), use it as is.
-     # If DATA tags from a recent dlltool are present, honour them!
--    archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
-+    archive_expsym_cmds='if test "x`head -n 1 $export_symbols`" = xEXPORTS; then
-         cp $export_symbols $output_objdir/$soname-def;
-       else
-         echo EXPORTS > $output_objdir/$soname-def;
-diff -Naur gcc-4.1.2.orig/ltcf-gcj.sh gcc-4.1.2/ltcf-gcj.sh
---- gcc-4.1.2.orig/ltcf-gcj.sh	2005-07-15 19:30:53.000000000 -0700
-+++ gcc-4.1.2/ltcf-gcj.sh	2007-02-14 08:02:33.000000000 -0800
-@@ -156,7 +156,7 @@
-     # If the export-symbols file already is a .def file (1st line
-     # is EXPORTS), use it as is.
-     # If DATA tags from a recent dlltool are present, honour them!
--    archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
-+    archive_expsym_cmds='if test "x`head -n 1 $export_symbols`" = xEXPORTS; then
-         cp $export_symbols $output_objdir/$soname-def;
-       else
-         echo EXPORTS > $output_objdir/$soname-def;
Index: tches/gcc-4.1.2-uclibc-1.patch
===================================================================
--- patches/gcc-4.1.2-uclibc-1.patch	(revision 56d186f8b3176978055228e5cba0cbb071d5e2d7)
+++ 	(revision )
@@ -1,4053 +1,0 @@
-Submitted By: Jim Gifford (patches at jg555 dot com)
-Date: 2007-02-13
-Initial Package Version: 4.1.1
-Origin: uClibc and Buildroot
-Upstream Status: uClibc Specific
-Description: Makes GCC uClibc Friendly
-
-diff -Naur gcc-4.1.2.orig/boehm-gc/configure gcc-4.1.2/boehm-gc/configure
---- gcc-4.1.2.orig/boehm-gc/configure	2007-02-13 21:17:22.000000000 -0800
-+++ gcc-4.1.2/boehm-gc/configure	2007-02-14 07:57:37.000000000 -0800
-@@ -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]+$'
-diff -Naur gcc-4.1.2.orig/boehm-gc/include/gc.h gcc-4.1.2/boehm-gc/include/gc.h
---- gcc-4.1.2.orig/boehm-gc/include/gc.h	2005-01-01 19:35:57.000000000 -0800
-+++ gcc-4.1.2/boehm-gc/include/gc.h	2007-02-14 07:57:37.000000000 -0800
-@@ -500,7 +500,7 @@
- #ifdef __linux__
- # include <features.h>
- # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
--     && !defined(__ia64__)
-+     && !defined(__ia64__) && !defined(__UCLIBC__)
- #   ifndef GC_HAVE_BUILTIN_BACKTRACE
- #     define GC_HAVE_BUILTIN_BACKTRACE
- #   endif
-diff -Naur gcc-4.1.2.orig/configure gcc-4.1.2/configure
---- gcc-4.1.2.orig/configure	2006-11-21 09:48:36.000000000 -0800
-+++ gcc-4.1.2/configure	2007-02-14 07:57:37.000000000 -0800
-@@ -1133,7 +1133,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 -Naur gcc-4.1.2.orig/configure.in gcc-4.1.2/configure.in
---- gcc-4.1.2.orig/configure.in	2006-11-21 09:48:36.000000000 -0800
-+++ gcc-4.1.2/configure.in	2007-02-14 07:57:37.000000000 -0800
-@@ -341,7 +341,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 -Naur gcc-4.1.2.orig/contrib/regression/objs-gcc.sh gcc-4.1.2/contrib/regression/objs-gcc.sh
---- gcc-4.1.2.orig/contrib/regression/objs-gcc.sh	2005-08-14 17:41:31.000000000 -0700
-+++ gcc-4.1.2/contrib/regression/objs-gcc.sh	2007-02-14 07:57:37.000000000 -0800
-@@ -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
-diff -Naur gcc-4.1.2.orig/gcc/config/alpha/linux-elf.h gcc-4.1.2/gcc/config/alpha/linux-elf.h
---- gcc-4.1.2.orig/gcc/config/alpha/linux-elf.h	2005-06-24 18:22:41.000000000 -0700
-+++ gcc-4.1.2/gcc/config/alpha/linux-elf.h	2007-02-14 07:57:37.000000000 -0800
-@@ -27,7 +27,11 @@
- #define SUBTARGET_EXTRA_SPECS \
- { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
- 
-+#if defined 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}						\
-diff -Naur gcc-4.1.2.orig/gcc/config/arm/linux-eabi.h gcc-4.1.2/gcc/config/arm/linux-eabi.h
---- gcc-4.1.2.orig/gcc/config/arm/linux-eabi.h	2005-11-15 06:32:13.000000000 -0800
-+++ gcc-4.1.2/gcc/config/arm/linux-eabi.h	2007-02-14 07:57:37.000000000 -0800
-@@ -53,7 +53,11 @@
- /* Use ld-linux.so.3 so that it will be possible to run "classic"
-    GNU/Linux binaries on an EABI system.  */
- #undef LINUX_TARGET_INTERPRETER
-+#ifdef USE_UCLIBC
-+#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0"
-+#else
- #define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.3"
-+#endif
- 
- /* At this point, bpabi.h will have clobbered LINK_SPEC.  We want to
-    use the GNU/Linux version, not the generic BPABI version.  */
-diff -Naur gcc-4.1.2.orig/gcc/config/arm/linux-elf.h gcc-4.1.2/gcc/config/arm/linux-elf.h
---- gcc-4.1.2.orig/gcc/config/arm/linux-elf.h	2005-10-09 18:04:31.000000000 -0700
-+++ gcc-4.1.2/gcc/config/arm/linux-elf.h	2007-02-14 07:57:37.000000000 -0800
-@@ -28,19 +28,33 @@
- #undef  TARGET_VERSION
- #define TARGET_VERSION  fputs (" (ARM GNU/Linux with ELF)", stderr);
- 
-+/*
-+ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
-+ * (big endian) configurations.
-+ */
-+#if TARGET_BIG_ENDIAN_DEFAULT
-+#define TARGET_ENDIAN_DEFAULT MASK_BIG_END
-+#define TARGET_ENDIAN_OPTION "mbig-endian"
-+#define TARGET_LINKER_EMULATION "armelfb_linux"
-+#else
-+#define TARGET_ENDIAN_DEFAULT 0
-+#define TARGET_ENDIAN_OPTION "mlittle-endian"
-+#define TARGET_LINKER_EMULATION "armelf_linux"
-+#endif
-+
- #undef  TARGET_DEFAULT_FLOAT_ABI
- #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
- 
- #undef  TARGET_DEFAULT
--#define TARGET_DEFAULT (0)
-+#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
- 
- #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
- 
--#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
-+#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
- 
- #undef  MULTILIB_DEFAULTS
- #define MULTILIB_DEFAULTS \
--	{ "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
-+	{ "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
- 
- /* Now we define the strings used to build the spec file.  */
- #undef  LIB_SPEC
-@@ -51,7 +65,11 @@
- 
- #define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
- 
-+#ifdef USE_UCLIBC
-+#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0"
-+#else
- #define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.2"
-+#endif
- 
- #define LINUX_TARGET_LINK_SPEC  "%{h*} %{version:-v} \
-    %{b} \
-@@ -61,7 +79,7 @@
-    %{rdynamic:-export-dynamic} \
-    %{!dynamic-linker:-dynamic-linker " LINUX_TARGET_INTERPRETER "} \
-    -X \
--   %{mbig-endian:-EB}" \
-+   %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
-    SUBTARGET_EXTRA_LINK_SPEC
- 
- #undef  LINK_SPEC
-diff -Naur gcc-4.1.2.orig/gcc/config/cris/linux.h gcc-4.1.2/gcc/config/cris/linux.h
---- gcc-4.1.2.orig/gcc/config/cris/linux.h	2005-06-24 18:22:41.000000000 -0700
-+++ gcc-4.1.2/gcc/config/cris/linux.h	2007-02-14 07:57:37.000000000 -0800
-@@ -73,6 +73,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"
- 
-@@ -87,6 +106,8 @@
-   %{!shared:%{!static:%{rdynamic:-export-dynamic}}}\
-   %{!r:%{O2|O3: --gc-sections}}"
- 
-+#endif  /* USE_UCLIBC */
-+
- 
- /* Node: Run-time Target */
- 
-diff -Naur gcc-4.1.2.orig/gcc/config/i386/linux.h gcc-4.1.2/gcc/config/i386/linux.h
---- gcc-4.1.2.orig/gcc/config/i386/linux.h	2005-08-10 10:53:01.000000000 -0700
-+++ gcc-4.1.2/gcc/config/i386/linux.h	2007-02-14 07:57:37.000000000 -0800
-@@ -107,6 +107,11 @@
- #define LINK_EMULATION "elf_i386"
- #define DYNAMIC_LINKER "/lib/ld-linux.so.2"
- 
-+#if defined 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 },\
-diff -Naur gcc-4.1.2.orig/gcc/config/i386/linux64.h gcc-4.1.2/gcc/config/i386/linux64.h
---- gcc-4.1.2.orig/gcc/config/i386/linux64.h	2005-08-10 10:53:01.000000000 -0700
-+++ gcc-4.1.2/gcc/config/i386/linux64.h	2007-02-14 07:57:37.000000000 -0800
-@@ -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}}"
- 
- /* Similar to standard Linux, but adding -ffast-math support.  */
-diff -Naur gcc-4.1.2.orig/gcc/config/ia64/linux.h gcc-4.1.2/gcc/config/ia64/linux.h
---- gcc-4.1.2.orig/gcc/config/ia64/linux.h	2006-12-12 07:24:07.000000000 -0800
-+++ gcc-4.1.2/gcc/config/ia64/linux.h	2007-02-14 07:57:37.000000000 -0800
-@@ -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}}"
- 
- #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
-diff -Naur gcc-4.1.2.orig/gcc/config/m68k/linux.h gcc-4.1.2/gcc/config/m68k/linux.h
---- gcc-4.1.2.orig/gcc/config/m68k/linux.h	2005-06-24 18:22:41.000000000 -0700
-+++ gcc-4.1.2/gcc/config/m68k/linux.h	2007-02-14 07:57:37.000000000 -0800
-@@ -123,12 +123,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 */
-diff -Naur gcc-4.1.2.orig/gcc/config/mips/linux.h gcc-4.1.2/gcc/config/mips/linux.h
---- gcc-4.1.2.orig/gcc/config/mips/linux.h	2006-12-17 05:57:31.000000000 -0800
-+++ gcc-4.1.2/gcc/config/mips/linux.h	2007-02-14 07:57:37.000000000 -0800
-@@ -105,6 +105,11 @@
- 
- /* 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} \
-@@ -112,7 +117,7 @@
-     %{!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
-diff -Naur gcc-4.1.2.orig/gcc/config/pa/pa-linux.h gcc-4.1.2/gcc/config/pa/pa-linux.h
---- gcc-4.1.2.orig/gcc/config/pa/pa-linux.h	2007-01-11 18:23:38.000000000 -0800
-+++ gcc-4.1.2/gcc/config/pa/pa-linux.h	2007-02-14 07:57:37.000000000 -0800
-@@ -49,13 +49,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.  */
-diff -Naur gcc-4.1.2.orig/gcc/config/rs6000/linux.h gcc-4.1.2/gcc/config/rs6000/linux.h
---- gcc-4.1.2.orig/gcc/config/rs6000/linux.h	2006-02-10 12:58:33.000000000 -0800
-+++ gcc-4.1.2/gcc/config/rs6000/linux.h	2007-02-14 07:57:37.000000000 -0800
-@@ -72,7 +72,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}"
-diff -Naur gcc-4.1.2.orig/gcc/config/rs6000/sysv4.h gcc-4.1.2/gcc/config/rs6000/sysv4.h
---- gcc-4.1.2.orig/gcc/config/rs6000/sysv4.h	2006-02-10 12:58:33.000000000 -0800
-+++ gcc-4.1.2/gcc/config/rs6000/sysv4.h	2007-02-14 07:57:37.000000000 -0800
-@@ -866,6 +866,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)     }"
- 
-@@ -1043,6 +1044,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
-@@ -1209,6 +1214,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 },			\
-diff -Naur gcc-4.1.2.orig/gcc/config/s390/linux.h gcc-4.1.2/gcc/config/s390/linux.h
---- gcc-4.1.2.orig/gcc/config/s390/linux.h	2006-12-12 07:24:07.000000000 -0800
-+++ gcc-4.1.2/gcc/config/s390/linux.h	2007-02-14 07:57:37.000000000 -0800
-@@ -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 CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
- 
-diff -Naur gcc-4.1.2.orig/gcc/config/sh/linux.h gcc-4.1.2/gcc/config/sh/linux.h
---- gcc-4.1.2.orig/gcc/config/sh/linux.h	2005-06-24 18:22:41.000000000 -0700
-+++ gcc-4.1.2/gcc/config/sh/linux.h	2007-02-14 07:57:37.000000000 -0800
-@@ -56,12 +56,21 @@
- #undef SUBTARGET_LINK_EMUL_SUFFIX
- #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
- #undef SUBTARGET_LINK_SPEC
-+#ifdef USE_UCLIBC
-+#define SUBTARGET_LINK_SPEC \
-+  "%{shared:-shared} \
-+   %{!static: \
-+     %{rdynamic:-export-dynamic} \
-+     %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
-+   %{static:-static}"
-+#else
- #define SUBTARGET_LINK_SPEC \
-   "%{shared:-shared} \
-    %{!static: \
-      %{rdynamic:-export-dynamic} \
-      %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
-    %{static:-static}"
-+#endif
- 
- /* Output assembler code to STREAM to call the profiler.  */
- 
-diff -Naur gcc-4.1.2.orig/gcc/config/sparc/linux.h gcc-4.1.2/gcc/config/sparc/linux.h
---- gcc-4.1.2.orig/gcc/config/sparc/linux.h	2006-02-11 00:38:51.000000000 -0800
-+++ gcc-4.1.2/gcc/config/sparc/linux.h	2007-02-14 07:57:37.000000000 -0800
-@@ -125,6 +125,11 @@
- 
- /* 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}} \
-@@ -132,7 +137,7 @@
-     %{!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).
-diff -Naur gcc-4.1.2.orig/gcc/config/sparc/linux64.h gcc-4.1.2/gcc/config/sparc/linux64.h
---- gcc-4.1.2.orig/gcc/config/sparc/linux64.h	2006-02-11 00:38:51.000000000 -0800
-+++ gcc-4.1.2/gcc/config/sparc/linux64.h	2007-02-14 07:57:37.000000000 -0800
-@@ -162,12 +162,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}}} \
- "
- 
-diff -Naur gcc-4.1.2.orig/gcc/config/t-linux-uclibc gcc-4.1.2/gcc/config/t-linux-uclibc
---- gcc-4.1.2.orig/gcc/config/t-linux-uclibc	1969-12-31 16:00:00.000000000 -0800
-+++ gcc-4.1.2/gcc/config/t-linux-uclibc	2007-02-14 07:57:37.000000000 -0800
-@@ -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))
-diff -Naur gcc-4.1.2.orig/gcc/config.gcc gcc-4.1.2/gcc/config.gcc
---- gcc-4.1.2.orig/gcc/config.gcc	2006-10-15 16:12:23.000000000 -0700
-+++ gcc-4.1.2/gcc/config.gcc	2007-02-14 07:57:37.000000000 -0800
-@@ -672,9 +672,14 @@
- 	;;
- arm*-*-linux*)			# ARM GNU/Linux with ELF
- 	tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h" 
-+	case $target in
-+	arm*b-*)
-+		tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
-+		;;
-+	esac
- 	tmake_file="${tmake_file} t-linux arm/t-arm"
- 	case ${target} in
--	arm*-*-linux-gnueabi)
-+	arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
- 	    tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
- 	    tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
-   	    # The BPABI long long divmod functions return a 128-bit value in 
-@@ -1884,7 +1889,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"
-@@ -2338,6 +2343,12 @@
- 	;;
- 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"
-diff -Naur gcc-4.1.2.orig/gcc/configure gcc-4.1.2/gcc/configure
---- gcc-4.1.2.orig/gcc/configure	2006-11-13 14:09:55.000000000 -0800
-+++ gcc-4.1.2/gcc/configure	2007-02-14 07:57:37.000000000 -0800
-@@ -14762,7 +14762,7 @@
- 	tls_first_minor=14
- 	tls_as_opt="-m64 -Aesame --fatal-warnings"
- 	;;
--  sh-*-* | sh[34]-*-*)
-+  sh-*-* | sh[34]*-*-*)
-     conftest_s='
- 	.section ".tdata","awT",@progbits
- foo:	.long	25
-diff -Naur gcc-4.1.2.orig/gcc/configure.ac gcc-4.1.2/gcc/configure.ac
---- gcc-4.1.2.orig/gcc/configure.ac	2006-11-13 14:09:55.000000000 -0800
-+++ gcc-4.1.2/gcc/configure.ac	2007-02-14 07:57:37.000000000 -0800
-@@ -2435,7 +2435,7 @@
- 	tls_first_minor=14
- 	tls_as_opt="-m64 -Aesame --fatal-warnings"
- 	;;
--  sh-*-* | sh[34]-*-*)
-+  sh-*-* | sh[34]*-*-*)
-     conftest_s='
- 	.section ".tdata","awT",@progbits
- foo:	.long	25
-diff -Naur gcc-4.1.2.orig/libffi/configure gcc-4.1.2/libffi/configure
---- gcc-4.1.2.orig/libffi/configure	2007-02-13 21:17:22.000000000 -0800
-+++ gcc-4.1.2/libffi/configure	2007-02-14 07:57:37.000000000 -0800
-@@ -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]+$'
-diff -Naur gcc-4.1.2.orig/libgfortran/configure gcc-4.1.2/libgfortran/configure
---- gcc-4.1.2.orig/libgfortran/configure	2006-12-06 02:55:37.000000000 -0800
-+++ gcc-4.1.2/libgfortran/configure	2007-02-14 07:57:37.000000000 -0800
-@@ -3699,6 +3699,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 -Naur gcc-4.1.2.orig/libjava/configure gcc-4.1.2/libjava/configure
---- gcc-4.1.2.orig/libjava/configure	2007-02-13 21:17:22.000000000 -0800
-+++ gcc-4.1.2/libjava/configure	2007-02-14 07:57:37.000000000 -0800
-@@ -5137,6 +5137,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 -Naur gcc-4.1.2.orig/libmudflap/configure gcc-4.1.2/libmudflap/configure
---- gcc-4.1.2.orig/libmudflap/configure	2005-10-04 16:54:38.000000000 -0700
-+++ gcc-4.1.2/libmudflap/configure	2007-02-14 07:57:37.000000000 -0800
-@@ -5382,6 +5382,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 -Naur gcc-4.1.2.orig/libobjc/configure gcc-4.1.2/libobjc/configure
---- gcc-4.1.2.orig/libobjc/configure	2007-02-13 21:17:22.000000000 -0800
-+++ gcc-4.1.2/libobjc/configure	2007-02-14 07:57:37.000000000 -0800
-@@ -3312,6 +3312,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 -Naur gcc-4.1.2.orig/libstdc++-v3/acinclude.m4 gcc-4.1.2/libstdc++-v3/acinclude.m4
---- gcc-4.1.2.orig/libstdc++-v3/acinclude.m4	2007-01-29 02:51:01.000000000 -0800
-+++ gcc-4.1.2/libstdc++-v3/acinclude.m4	2007-02-14 07:57:37.000000000 -0800
-@@ -1003,7 +1003,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
-@@ -1019,6 +1019,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>
-@@ -1162,6 +1165,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 -Naur gcc-4.1.2.orig/libstdc++-v3/config/locale/uclibc/c++locale_internal.h gcc-4.1.2/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
---- gcc-4.1.2.orig/libstdc++-v3/config/locale/uclibc/c++locale_internal.h	1969-12-31 16:00:00.000000000 -0800
-+++ gcc-4.1.2/libstdc++-v3/config/locale/uclibc/c++locale_internal.h	2007-02-14 07:57:37.000000000 -0800
-@@ -0,0 +1,63 @@
-+// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*-
-+
-+// Copyright (C) 2002, 2004, 2005 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-+// 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 <bits/c++config.h>
-+#include <clocale>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning clean this up
-+#endif
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+                                                  
-+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(newlocale) __newlocale;
-+extern "C" __typeof(freelocale) __freelocale;
-+extern "C" __typeof(duplocale) __duplocale;
-+extern "C" __typeof(uselocale) __uselocale;
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+extern "C" __typeof(iswctype_l) __iswctype_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;
-+#endif 
-+
-+#endif // GLIBC 2.3 and later
-diff -Naur gcc-4.1.2.orig/libstdc++-v3/config/locale/uclibc/c_locale.cc gcc-4.1.2/libstdc++-v3/config/locale/uclibc/c_locale.cc
---- gcc-4.1.2.orig/libstdc++-v3/config/locale/uclibc/c_locale.cc	1969-12-31 16:00:00.000000000 -0800
-+++ gcc-4.1.2/libstdc++-v3/config/locale/uclibc/c_locale.cc	2007-02-14 07:57:37.000000000 -0800
-@@ -0,0 +1,152 @@
-+// Wrapper for underlying C-language localization -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004, 2005 
-+// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-+// 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)
-+    {
-+      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)
-+    {
-+      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)
-+    {
-+      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 (__cloc && _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 -Naur gcc-4.1.2.orig/libstdc++-v3/config/locale/uclibc/c_locale.h gcc-4.1.2/libstdc++-v3/config/locale/uclibc/c_locale.h
---- gcc-4.1.2.orig/libstdc++-v3/config/locale/uclibc/c_locale.h	1969-12-31 16:00:00.000000000 -0800
-+++ gcc-4.1.2/libstdc++-v3/config/locale/uclibc/c_locale.h	2007-02-14 07:57:37.000000000 -0800
-@@ -0,0 +1,117 @@
-+// Wrapper for underlying C-language localization -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004, 2005 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-+// 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 __attribute__ ((__unused__)),
-+		     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 -Naur gcc-4.1.2.orig/libstdc++-v3/config/locale/uclibc/codecvt_members.cc gcc-4.1.2/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
---- gcc-4.1.2.orig/libstdc++-v3/config/locale/uclibc/codecvt_members.cc	1969-12-31 16:00:00.000000000 -0800
-+++ gcc-4.1.2/libstdc++-v3/config/locale/uclibc/codecvt_members.cc	2007-02-14 07:57:37.000000000 -0800
-@@ -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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-+// 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 -Naur gcc-4.1.2.orig/libstdc++-v3/config/locale/uclibc/collate_members.cc gcc-4.1.2/libstdc++-v3/config/locale/uclibc/collate_members.cc
---- gcc-4.1.2.orig/libstdc++-v3/config/locale/uclibc/collate_members.cc	1969-12-31 16:00:00.000000000 -0800
-+++ gcc-4.1.2/libstdc++-v3/config/locale/uclibc/collate_members.cc	2007-02-14 07:57:37.000000000 -0800
-@@ -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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-+// 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 -Naur gcc-4.1.2.orig/libstdc++-v3/config/locale/uclibc/ctype_members.cc gcc-4.1.2/libstdc++-v3/config/locale/uclibc/ctype_members.cc
---- gcc-4.1.2.orig/libstdc++-v3/config/locale/uclibc/ctype_members.cc	1969-12-31 16:00:00.000000000 -0800
-+++ gcc-4.1.2/libstdc++-v3/config/locale/uclibc/ctype_members.cc	2007-02-14 07:57:37.000000000 -0800
-@@ -0,0 +1,314 @@
-+// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-+// 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
-+  { 
-+    // The case of __m == ctype_base::space is particularly important,
-+    // due to its use in many istream functions.  Therefore we deal with
-+    // it first, exploiting the knowledge that on GNU systems _M_bit[5]
-+    // is the mask corresponding to ctype_base::space.  NB: an encoding
-+    // change would not affect correctness!
-+    bool __ret = false;
-+    if (__m == _M_bit[5])
-+      __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype);
-+    else
-+      {
-+	// Highest bitmask in ctype_base == 10, but extra in "C"
-+	// library for blank.
-+	const size_t __bitmasksize = 11;
-+	for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
-+	  if (__m & _M_bit[__bitcur])
-+	    {
-+	      if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
-+		{
-+		  __ret = true;
-+		  break;
-+		}
-+	      else if (__m == _M_bit[__bitcur])
-+		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 -Naur gcc-4.1.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.cc gcc-4.1.2/libstdc++-v3/config/locale/uclibc/messages_members.cc
---- gcc-4.1.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.cc	1969-12-31 16:00:00.000000000 -0800
-+++ gcc-4.1.2/libstdc++-v3/config/locale/uclibc/messages_members.cc	2007-02-14 07:57:37.000000000 -0800
-@@ -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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-+// 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 -Naur gcc-4.1.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.1.2/libstdc++-v3/config/locale/uclibc/messages_members.h
---- gcc-4.1.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.h	1969-12-31 16:00:00.000000000 -0800
-+++ gcc-4.1.2/libstdc++-v3/config/locale/uclibc/messages_members.h	2007-02-14 07:57:37.000000000 -0800
-@@ -0,0 +1,121 @@
-+// std::messages implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004, 2005 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-+// 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(NULL), _M_name_messages(NULL)
-+     {
-+       const size_t __len = std::strlen(__s) + 1;
-+       char* __tmp = new char[__len];
-+       std::memcpy(__tmp, __s, __len);
-+       _M_name_messages = __tmp;
-+
-+       // Last to avoid leaking memory if new throws.
-+       _M_c_locale_messages = _S_clone_c_locale(__cloc);
-+     }
-+
-+  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 -Naur gcc-4.1.2.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-4.1.2/libstdc++-v3/config/locale/uclibc/monetary_members.cc
---- gcc-4.1.2.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc	1969-12-31 16:00:00.000000000 -0800
-+++ gcc-4.1.2/libstdc++-v3/config/locale/uclibc/monetary_members.cc	2007-02-14 07:57:37.000000000 -0800
-@@ -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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-+// 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;
-+# elif defined __UCLIBC_HAS_LOCALE__
-+	  _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;
-+# elif defined __UCLIBC_HAS_LOCALE__
-+	  _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 -Naur gcc-4.1.2.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-4.1.2/libstdc++-v3/config/locale/uclibc/numeric_members.cc
---- gcc-4.1.2.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc	1969-12-31 16:00:00.000000000 -0800
-+++ gcc-4.1.2/libstdc++-v3/config/locale/uclibc/numeric_members.cc	2007-02-14 07:57:37.000000000 -0800
-@@ -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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-+// 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;
-+# elif defined __UCLIBC_HAS_LOCALE__
-+	  _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 -Naur gcc-4.1.2.orig/libstdc++-v3/config/locale/uclibc/time_members.cc gcc-4.1.2/libstdc++-v3/config/locale/uclibc/time_members.cc
---- gcc-4.1.2.orig/libstdc++-v3/config/locale/uclibc/time_members.cc	1969-12-31 16:00:00.000000000 -0800
-+++ gcc-4.1.2/libstdc++-v3/config/locale/uclibc/time_members.cc	2007-02-14 07:57:37.000000000 -0800
-@@ -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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-+// 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 -Naur gcc-4.1.2.orig/libstdc++-v3/config/locale/uclibc/time_members.h gcc-4.1.2/libstdc++-v3/config/locale/uclibc/time_members.h
---- gcc-4.1.2.orig/libstdc++-v3/config/locale/uclibc/time_members.h	1969-12-31 16:00:00.000000000 -0800
-+++ gcc-4.1.2/libstdc++-v3/config/locale/uclibc/time_members.h	2007-02-14 07:57:37.000000000 -0800
-@@ -0,0 +1,76 @@
-+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004, 2005 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-+// 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(NULL)
-+    { 
-+      const size_t __len = std::strlen(__s) + 1;
-+      char* __tmp = new char[__len];
-+      std::memcpy(__tmp, __s, __len);
-+      _M_name_timepunct = __tmp;
-+
-+      try
-+	{ _M_initialize_timepunct(__cloc); }
-+      catch(...)
-+	{
-+	  delete [] _M_name_timepunct;
-+	  __throw_exception_again;
-+	}
-+    }
-+
-+  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 -Naur gcc-4.1.2.orig/libstdc++-v3/config/os/uclibc/ctype_base.h gcc-4.1.2/libstdc++-v3/config/os/uclibc/ctype_base.h
---- gcc-4.1.2.orig/libstdc++-v3/config/os/uclibc/ctype_base.h	1969-12-31 16:00:00.000000000 -0800
-+++ gcc-4.1.2/libstdc++-v3/config/os/uclibc/ctype_base.h	2007-02-14 07:57:37.000000000 -0800
-@@ -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 -Naur gcc-4.1.2.orig/libstdc++-v3/config/os/uclibc/ctype_inline.h gcc-4.1.2/libstdc++-v3/config/os/uclibc/ctype_inline.h
---- gcc-4.1.2.orig/libstdc++-v3/config/os/uclibc/ctype_inline.h	1969-12-31 16:00:00.000000000 -0800
-+++ gcc-4.1.2/libstdc++-v3/config/os/uclibc/ctype_inline.h	2007-02-14 07:57:37.000000000 -0800
-@@ -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 -Naur gcc-4.1.2.orig/libstdc++-v3/config/os/uclibc/ctype_noninline.h gcc-4.1.2/libstdc++-v3/config/os/uclibc/ctype_noninline.h
---- gcc-4.1.2.orig/libstdc++-v3/config/os/uclibc/ctype_noninline.h	1969-12-31 16:00:00.000000000 -0800
-+++ gcc-4.1.2/libstdc++-v3/config/os/uclibc/ctype_noninline.h	2007-02-14 07:57:37.000000000 -0800
-@@ -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 -Naur gcc-4.1.2.orig/libstdc++-v3/config/os/uclibc/os_defines.h gcc-4.1.2/libstdc++-v3/config/os/uclibc/os_defines.h
---- gcc-4.1.2.orig/libstdc++-v3/config/os/uclibc/os_defines.h	1969-12-31 16:00:00.000000000 -0800
-+++ gcc-4.1.2/libstdc++-v3/config/os/uclibc/os_defines.h	2007-02-14 07:57:37.000000000 -0800
-@@ -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 -Naur gcc-4.1.2.orig/libstdc++-v3/configure gcc-4.1.2/libstdc++-v3/configure
---- gcc-4.1.2.orig/libstdc++-v3/configure	2007-01-29 02:51:01.000000000 -0800
-+++ gcc-4.1.2/libstdc++-v3/configure	2007-02-14 07:57:37.000000000 -0800
-@@ -4005,6 +4005,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]+$'
-@@ -5740,7 +5745,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; }; } ;;
-@@ -5765,6 +5770,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.  */
-@@ -5995,6 +6003,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
-@@ -7246,6 +7324,9 @@
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- #include <complex.h>
-+#ifdef __UCLIBC__
-+#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs
-+#endif
- int
- main ()
- {
-diff -Naur gcc-4.1.2.orig/libstdc++-v3/configure.host gcc-4.1.2/libstdc++-v3/configure.host
---- gcc-4.1.2.orig/libstdc++-v3/configure.host	2007-01-28 12:12:40.000000000 -0800
-+++ gcc-4.1.2/libstdc++-v3/configure.host	2007-02-14 07:57:37.000000000 -0800
-@@ -270,6 +270,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 -Naur gcc-4.1.2.orig/libstdc++-v3/crossconfig.m4 gcc-4.1.2/libstdc++-v3/crossconfig.m4
---- gcc-4.1.2.orig/libstdc++-v3/crossconfig.m4	2006-12-12 06:18:36.000000000 -0800
-+++ gcc-4.1.2/libstdc++-v3/crossconfig.m4	2007-02-14 07:57:37.000000000 -0800
-@@ -143,6 +143,99 @@
- 	;;
-     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_MSG_ERROR([long_double_math_on_this_cpu is yes!])
-+#       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 \
-@@ -157,7 +250,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 -Naur gcc-4.1.2.orig/libstdc++-v3/include/c_compatibility/wchar.h gcc-4.1.2/libstdc++-v3/include/c_compatibility/wchar.h
---- gcc-4.1.2.orig/libstdc++-v3/include/c_compatibility/wchar.h	2005-08-16 19:28:44.000000000 -0700
-+++ gcc-4.1.2/libstdc++-v3/include/c_compatibility/wchar.h	2007-02-14 07:57:37.000000000 -0800
-@@ -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 -Naur gcc-4.1.2.orig/libstdc++-v3/include/c_std/std_cstdio.h gcc-4.1.2/libstdc++-v3/include/c_std/std_cstdio.h
---- gcc-4.1.2.orig/libstdc++-v3/include/c_std/std_cstdio.h	2005-10-30 14:21:50.000000000 -0800
-+++ gcc-4.1.2/libstdc++-v3/include/c_std/std_cstdio.h	2007-02-14 07:57:37.000000000 -0800
-@@ -143,7 +143,7 @@
-   using ::vsprintf;
- }
- 
--#if _GLIBCXX_USE_C99
-+#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
- 
- #undef snprintf
- #undef vfscanf
-diff -Naur gcc-4.1.2.orig/libstdc++-v3/include/c_std/std_cwchar.h gcc-4.1.2/libstdc++-v3/include/c_std/std_cwchar.h
---- gcc-4.1.2.orig/libstdc++-v3/include/c_std/std_cwchar.h	2005-10-30 14:21:50.000000000 -0800
-+++ gcc-4.1.2/libstdc++-v3/include/c_std/std_cwchar.h	2007-02-14 07:57:37.000000000 -0800
-@@ -180,7 +180,9 @@
-   using ::wcscoll;
-   using ::wcscpy;
-   using ::wcscspn;
-+#if _GLIBCXX_HAVE_WCSFTIME
-   using ::wcsftime;
-+#endif
-   using ::wcslen;
-   using ::wcsncat;
-   using ::wcsncmp;
-diff -Naur gcc-4.1.2.orig/libstdc++-v3/include/ext/rope gcc-4.1.2/libstdc++-v3/include/ext/rope
---- gcc-4.1.2.orig/libstdc++-v3/include/ext/rope	2005-08-16 19:28:44.000000000 -0700
-+++ gcc-4.1.2/libstdc++-v3/include/ext/rope	2007-02-14 07:57:37.000000000 -0800
-@@ -57,6 +57,9 @@
- #include <bits/allocator.h>
- #include <ext/hash_fun.h>
- 
-+/* cope w/ index defined as macro, SuSv3 proposal */
-+#undef index
-+
- # ifdef __GC
- #   define __GC_CONST const
- # else
-diff -Naur gcc-4.1.2.orig/libstdc++-v3/include/ext/ropeimpl.h gcc-4.1.2/libstdc++-v3/include/ext/ropeimpl.h
---- gcc-4.1.2.orig/libstdc++-v3/include/ext/ropeimpl.h	2005-08-16 19:28:44.000000000 -0700
-+++ gcc-4.1.2/libstdc++-v3/include/ext/ropeimpl.h	2007-02-14 07:57:37.000000000 -0800
-@@ -53,6 +53,9 @@
- #include <ext/memory> // For uninitialized_copy_n
- #include <ext/numeric> // For power
- 
-+/* cope w/ index defined as macro, SuSv3 proposal */
-+#undef index
-+
- namespace __gnu_cxx
- {
-   using std::size_t;
-diff -Naur gcc-4.1.2.orig/libstdc++-v3/src/Makefile.am gcc-4.1.2/libstdc++-v3/src/Makefile.am
---- gcc-4.1.2.orig/libstdc++-v3/src/Makefile.am	2006-01-09 20:01:00.000000000 -0800
-+++ gcc-4.1.2/libstdc++-v3/src/Makefile.am	2007-02-14 07:57:37.000000000 -0800
-@@ -234,6 +234,12 @@
- 	  $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
- 
- 
-+install-exec-local:
-+ifeq ($(enable_shared),yes)
-+	$(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
-+	$(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
-+endif
-+
- # Added bits to build debug library.
- if GLIBCXX_BUILD_DEBUG
- all-local: build_debug
-diff -Naur gcc-4.1.2.orig/libstdc++-v3/src/Makefile.in gcc-4.1.2/libstdc++-v3/src/Makefile.in
---- gcc-4.1.2.orig/libstdc++-v3/src/Makefile.in	2006-01-10 09:14:00.000000000 -0800
-+++ gcc-4.1.2/libstdc++-v3/src/Makefile.in	2007-02-14 07:57:37.000000000 -0800
-@@ -627,7 +627,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
- 
-@@ -660,6 +660,7 @@
- 	distclean-libtool distclean-tags distdir dvi dvi-am html \
- 	html-am info info-am install install-am install-data \
- 	install-data-am install-data-local install-exec \
-+	install-exec-local \
- 	install-exec-am install-info install-info-am install-man \
- 	install-strip install-toolexeclibLTLIBRARIES installcheck \
- 	installcheck-am installdirs maintainer-clean \
-@@ -760,6 +761,13 @@
- install_debug:
- 	(cd ${debugdir} && $(MAKE) \
- 	toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
-+
-+install-exec-local:
-+ifeq ($(enable_shared),yes)
-+	$(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
-+	$(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
-+endif
-+
- # 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 -Naur gcc-4.1.2.orig/libtool.m4 gcc-4.1.2/libtool.m4
---- gcc-4.1.2.orig/libtool.m4	2005-07-15 19:30:53.000000000 -0700
-+++ gcc-4.1.2/libtool.m4	2007-02-14 07:57:37.000000000 -0800
-@@ -743,6 +743,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 -Naur gcc-4.1.2.orig/ltconfig gcc-4.1.2/ltconfig
---- gcc-4.1.2.orig/ltconfig	2006-07-04 13:30:34.000000000 -0700
-+++ gcc-4.1.2/ltconfig	2007-02-14 07:57:37.000000000 -0800
-@@ -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
-diff -Naur gcc-4.1.2.orig/zlib/configure gcc-4.1.2/zlib/configure
---- gcc-4.1.2.orig/zlib/configure	2005-09-12 10:02:07.000000000 -0700
-+++ gcc-4.1.2/zlib/configure	2007-02-14 07:57:37.000000000 -0800
-@@ -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]+$'
-
Index: patches/gcc-4.3.2-posix-1.patch
===================================================================
--- patches/gcc-4.3.2-posix-1.patch	(revision 0194a602a3e3b317adebd81ea1d07e67492f503c)
+++ patches/gcc-4.3.2-posix-1.patch	(revision 0194a602a3e3b317adebd81ea1d07e67492f503c)
@@ -0,0 +1,327 @@
+Submitted By: Joe Ciccone <jciccone@gmail.com>
+Date: 2008-08-24
+Initial Package Version: 4.1.2
+Origin: Jim Gifford
+        Rediffed against 4.1.0 by Chris Staub
+        Rediffed against 4.1.2 by Jim Gifford
+	Rediffed and additions against 4.2.0 by Joe Ciccone
+	Rediffed against 4.3.0 by Joe Ciccone
+Upstream Status: On Hold
+Description: Makes GCC Posix Compliant
+
+diff -Naur gcc-4.3.1.orig/contrib/patch_tester.sh gcc-4.3.1/contrib/patch_tester.sh
+--- gcc-4.3.1.orig/contrib/patch_tester.sh	2007-12-26 16:01:38.000000000 -0500
++++ gcc-4.3.1/contrib/patch_tester.sh	2008-08-24 13:37:11.000000000 -0400
+@@ -287,7 +287,7 @@
+ 
+     if ! make $dashj `grep "^make:" $PATCH | sed -e "s/^make://g"` bootstrap &> $1/bootstrap ; then
+ 	report "bootstrap failed with last lines:"
+-	tail -30 $1/bootstrap > $1/last_bootstrap
++	tail -n 30 $1/bootstrap > $1/last_bootstrap
+ 	freport $1/last_bootstrap
+ 	report "grep --context=20 Error bootstrap:"
+ 	grep --context=20 Error $1/bootstrap > $1/bootstrap_error
+@@ -420,7 +420,7 @@
+ # After selfexec, $TESTING is already set up.  
+ if [ -d $TESTING ]; then
+     # The only file in $TESTING is the patch.
+-    PATCH=`ls -rt -1 $TESTING | head -1`
++    PATCH=`ls -rt -1 $TESTING | head -n 1`
+     PATCH=$TESTING/$PATCH
+     if [ -f $PATCH ]; then
+ 	bootntest_patched && bootntest_pristine && compare_passes
+@@ -429,7 +429,7 @@
+ fi
+ 
+ while true; do
+-    PATCH=`ls -rt -1 $PATCHES | head -1`
++    PATCH=`ls -rt -1 $PATCHES | head -n 1`
+     if [ x$PATCH = x ]; then
+ 	sleep ${standby}m
+     else
+diff -Naur gcc-4.3.1.orig/contrib/test_summary gcc-4.3.1/contrib/test_summary
+--- gcc-4.3.1.orig/contrib/test_summary	2007-02-09 19:30:46.000000000 -0500
++++ gcc-4.3.1/contrib/test_summary	2008-08-24 13:37:11.000000000 -0400
+@@ -107,7 +107,7 @@
+     srcdir = configflags;
+     sub(/\/configure .*/, "", srcdir);
+     printf "LAST_UPDATED: ";
+-    system("tail -1 " srcdir "/LAST_UPDATED");
++    system("tail -n 1 " srcdir "/LAST_UPDATED");
+     print "";
+ 
+     sub(/^[^ ]*\/configure */, " ", configflags);
+diff -Naur gcc-4.3.1.orig/gcc/configure gcc-4.3.1/gcc/configure
+--- gcc-4.3.1.orig/gcc/configure	2008-05-21 04:54:15.000000000 -0400
++++ gcc-4.3.1/gcc/configure	2008-08-24 13:37:38.000000000 -0400
+@@ -14265,7 +14265,7 @@
+   # Therefore, use diff -b for the comparisons.
+   if test x$gcc_cv_objdump != x \
+   && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
+-     | tail -3 > conftest.got \
++     | tail -n 3 > conftest.got \
+   && { diff -b conftest.lit conftest.got > /dev/null 2>&1 \
+     || diff -b conftest.big conftest.got > /dev/null 2>&1; }
+   then
+diff -Naur gcc-4.3.1.orig/gcc/configure.ac gcc-4.3.1/gcc/configure.ac
+--- gcc-4.3.1.orig/gcc/configure.ac	2008-05-21 04:54:15.000000000 -0400
++++ gcc-4.3.1/gcc/configure.ac	2008-08-24 13:37:25.000000000 -0400
+@@ -2226,7 +2226,7 @@
+   # Therefore, use diff -b for the comparisons.
+   if test x$gcc_cv_objdump != x \
+   && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
+-     | tail -3 > conftest.got \
++     | tail -n 3 > conftest.got \
+   && { diff -b conftest.lit conftest.got > /dev/null 2>&1 \
+     || diff -b conftest.big conftest.got > /dev/null 2>&1; }
+   then
+diff -Naur gcc-4.3.1.orig/gcc/gccbug.in gcc-4.3.1/gcc/gccbug.in
+--- gcc-4.3.1.orig/gcc/gccbug.in	2007-07-26 04:37:01.000000000 -0400
++++ gcc-4.3.1/gcc/gccbug.in	2008-08-24 13:37:38.000000000 -0400
+@@ -31,7 +31,7 @@
+ 
+ # The default release for this host.
+ # We have to guess at what program_transform_name might have done.
+-# "sed 1q" because neither "head -1" nor "head -n 1" is universal, argh.
++# "sed 1q" because neither "head -n 1" nor "head -n n 1" is universal, argh.
+ 
+ DEFAULT_GCC="`echo $0 | sed -e 's/bug//'`"
+ DEFAULT_RELEASE="`$DEFAULT_GCC --version | sed 1q`"
+diff -Naur gcc-4.3.1.orig/gcc/testsuite/ada/acats/run_all.sh gcc-4.3.1/gcc/testsuite/ada/acats/run_all.sh
+--- gcc-4.3.1.orig/gcc/testsuite/ada/acats/run_all.sh	2006-09-14 06:12:03.000000000 -0400
++++ gcc-4.3.1/gcc/testsuite/ada/acats/run_all.sh	2008-08-24 13:37:18.000000000 -0400
+@@ -68,7 +68,7 @@
+   ls ${i}?.adb > ${i}.lst 2> /dev/null
+   ls ${i}*m.adb >> ${i}.lst 2> /dev/null
+   ls ${i}.adb >> ${i}.lst 2> /dev/null
+-  main=`tail -1 ${i}.lst`
++  main=`tail -n 1 ${i}.lst`
+ }
+ 
+ EXTERNAL_OBJECTS=""
+diff -Naur gcc-4.3.1.orig/libgomp/acinclude.m4 gcc-4.3.1/libgomp/acinclude.m4
+--- gcc-4.3.1.orig/libgomp/acinclude.m4	2007-03-18 07:17:44.000000000 -0400
++++ gcc-4.3.1/libgomp/acinclude.m4	2008-08-24 13:37:09.000000000 -0400
+@@ -147,7 +147,7 @@
+   # Start by getting the version number.  I think the libtool test already
+   # does some of this, but throws away the result.
+   changequote(,)
+-  ldver=`$LD --version 2>/dev/null | head -1 | \
++  ldver=`$LD --version 2>/dev/null | head -n 1 | \
+          sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
+   changequote([,])
+   libgomp_gnu_ld_version=`echo $ldver | \
+diff -Naur gcc-4.3.1.orig/libgomp/configure gcc-4.3.1/libgomp/configure
+--- gcc-4.3.1.orig/libgomp/configure	2008-01-24 11:23:13.000000000 -0500
++++ gcc-4.3.1/libgomp/configure	2008-08-24 13:37:09.000000000 -0400
+@@ -17600,7 +17600,7 @@
+   # Start by getting the version number.  I think the libtool test already
+   # does some of this, but throws away the result.
+ 
+-  ldver=`$LD --version 2>/dev/null | head -1 | \
++  ldver=`$LD --version 2>/dev/null | head -n 1 | \
+          sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
+ 
+   libgomp_gnu_ld_version=`echo $ldver | \
+diff -Naur gcc-4.3.1.orig/libjava/classpath/ChangeLog-2004 gcc-4.3.1/libjava/classpath/ChangeLog-2004
+--- gcc-4.3.1.orig/libjava/classpath/ChangeLog-2004	2007-01-09 14:58:05.000000000 -0500
++++ gcc-4.3.1/libjava/classpath/ChangeLog-2004	2008-08-24 13:37:00.000000000 -0400
+@@ -8256,7 +8256,7 @@
+ 
+ 2004-08-17  Casey Marshall <csm@gnu.org>
+ 
+-	* autogen.sh: use `head -n 1' instead of `head -1'.
++	* autogen.sh: use `head -n n 1' instead of `head -n 1'.
+ 
+ 2004-08-16  Andrew John Hughes  <gnu_andrew@member.fsf.org>
+ 
+diff -Naur gcc-4.3.1.orig/libjava/classpath/configure gcc-4.3.1/libjava/classpath/configure
+--- gcc-4.3.1.orig/libjava/classpath/configure	2008-02-29 18:47:54.000000000 -0500
++++ gcc-4.3.1/libjava/classpath/configure	2008-08-24 13:37:00.000000000 -0400
+@@ -29126,7 +29126,7 @@
+ fi # shortcircut to system "stdint.h"
+ # ------------------ PREPARE VARIABLES ------------------------------
+ if test "$GCC" = "yes" ; then
+-ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1`
++ac_cv_stdint_message="using gnu compiler "`$CC --version | head -n 1`
+ else
+ ac_cv_stdint_message="using $CC"
+ fi
+diff -Naur gcc-4.3.1.orig/libjava/classpath/ltcf-c.sh gcc-4.3.1/libjava/classpath/ltcf-c.sh
+--- gcc-4.3.1.orig/libjava/classpath/ltcf-c.sh	2006-01-17 13:09:40.000000000 -0500
++++ gcc-4.3.1/libjava/classpath/ltcf-c.sh	2008-08-24 13:36:57.000000000 -0400
+@@ -153,7 +153,7 @@
+     # If the export-symbols file already is a .def file (1st line
+     # is EXPORTS), use it as is.
+     # If DATA tags from a recent dlltool are present, honour them!
+-    archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
++    archive_expsym_cmds='if test "x`head -n 1 $export_symbols`" = xEXPORTS; then
+         cp $export_symbols $output_objdir/$soname-def;
+       else
+         echo EXPORTS > $output_objdir/$soname-def;
+diff -Naur gcc-4.3.1.orig/libjava/classpath/ltcf-gcj.sh gcc-4.3.1/libjava/classpath/ltcf-gcj.sh
+--- gcc-4.3.1.orig/libjava/classpath/ltcf-gcj.sh	2005-09-23 17:31:04.000000000 -0400
++++ gcc-4.3.1/libjava/classpath/ltcf-gcj.sh	2008-08-24 13:36:55.000000000 -0400
+@@ -156,7 +156,7 @@
+     # If the export-symbols file already is a .def file (1st line
+     # is EXPORTS), use it as is.
+     # If DATA tags from a recent dlltool are present, honour them!
+-    archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
++    archive_expsym_cmds='if test "x`head -n 1 $export_symbols`" = xEXPORTS; then
+         cp $export_symbols $output_objdir/$soname-def;
+       else
+         echo EXPORTS > $output_objdir/$soname-def;
+diff -Naur gcc-4.3.1.orig/libjava/classpath/m4/ax_create_stdint_h.m4 gcc-4.3.1/libjava/classpath/m4/ax_create_stdint_h.m4
+--- gcc-4.3.1.orig/libjava/classpath/m4/ax_create_stdint_h.m4	2007-05-19 16:44:43.000000000 -0400
++++ gcc-4.3.1/libjava/classpath/m4/ax_create_stdint_h.m4	2008-08-24 13:36:57.000000000 -0400
+@@ -217,7 +217,7 @@
+ fi # shortcircut to system "stdint.h"
+ # ------------------ PREPARE VARIABLES ------------------------------
+ if test "$GCC" = "yes" ; then
+-ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1`
++ac_cv_stdint_message="using gnu compiler "`$CC --version | head -n 1`
+ else
+ ac_cv_stdint_message="using $CC"
+ fi
+diff -Naur gcc-4.3.1.orig/libjava/configure gcc-4.3.1/libjava/configure
+--- gcc-4.3.1.orig/libjava/configure	2008-06-06 10:49:11.000000000 -0400
++++ gcc-4.3.1/libjava/configure	2008-08-24 13:37:03.000000000 -0400
+@@ -18673,8 +18673,8 @@
+ echo $ECHO_N "checking whether 'ld' is at least 2.13... $ECHO_C" >&6
+ LD_PROG=`$CC --print-prog-name=ld`
+ LD_VERSION=`$LD_PROG --version`
+-LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
+-LD_VERSION_MINOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 2`
++LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -n 1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
++LD_VERSION_MINOR=`echo "$LD_VERSION" | head -n 1 | cut -d '.' -f 2`
+ if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then
+   LD_OK="ok"
+ else
+diff -Naur gcc-4.3.1.orig/libjava/mingwld.m4 gcc-4.3.1/libjava/mingwld.m4
+--- gcc-4.3.1.orig/libjava/mingwld.m4	2005-08-22 18:36:35.000000000 -0400
++++ gcc-4.3.1/libjava/mingwld.m4	2008-08-24 13:36:52.000000000 -0400
+@@ -3,8 +3,8 @@
+ AC_MSG_CHECKING(whether 'ld' is at least 2.13)
+ LD_PROG=`$CC --print-prog-name=ld`
+ LD_VERSION=`$LD_PROG --version`
+-LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
+-LD_VERSION_MINOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 2`
++LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -n 1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
++LD_VERSION_MINOR=`echo "$LD_VERSION" | head -n 1 | cut -d '.' -f 2`
+ if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then
+   LD_OK="ok"
+ else
+diff -Naur gcc-4.3.1.orig/libstdc++-v3/acinclude.m4 gcc-4.3.1/libstdc++-v3/acinclude.m4
+--- gcc-4.3.1.orig/libstdc++-v3/acinclude.m4	2008-04-25 12:52:57.000000000 -0400
++++ gcc-4.3.1/libstdc++-v3/acinclude.m4	2008-08-24 13:37:07.000000000 -0400
+@@ -234,7 +234,7 @@
+   if test x"$with_gnu_ld" = x"yes"; then
+     AC_MSG_CHECKING([for ld version])
+     changequote(,)
+-    ldver=`$LD --version 2>/dev/null | head -1 | \
++    ldver=`$LD --version 2>/dev/null | head -n 1 | \
+            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
+     changequote([,])
+     glibcxx_gnu_ld_version=`echo $ldver | \
+diff -Naur gcc-4.3.1.orig/libstdc++-v3/configure gcc-4.3.1/libstdc++-v3/configure
+--- gcc-4.3.1.orig/libstdc++-v3/configure	2008-04-25 12:52:57.000000000 -0400
++++ gcc-4.3.1/libstdc++-v3/configure	2008-08-24 13:37:09.000000000 -0400
+@@ -17488,7 +17488,7 @@
+     echo "$as_me:$LINENO: checking for ld version" >&5
+ echo $ECHO_N "checking for ld version... $ECHO_C" >&6
+ 
+-    ldver=`$LD --version 2>/dev/null | head -1 | \
++    ldver=`$LD --version 2>/dev/null | head -n 1 | \
+            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
+ 
+     glibcxx_gnu_ld_version=`echo $ldver | \
+@@ -42213,7 +42213,7 @@
+     echo "$as_me:$LINENO: checking for ld version" >&5
+ echo $ECHO_N "checking for ld version... $ECHO_C" >&6
+ 
+-    ldver=`$LD --version 2>/dev/null | head -1 | \
++    ldver=`$LD --version 2>/dev/null | head -n 1 | \
+            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
+ 
+     glibcxx_gnu_ld_version=`echo $ldver | \
+@@ -84604,7 +84604,7 @@
+     echo "$as_me:$LINENO: checking for ld version" >&5
+ echo $ECHO_N "checking for ld version... $ECHO_C" >&6
+ 
+-    ldver=`$LD --version 2>/dev/null | head -1 | \
++    ldver=`$LD --version 2>/dev/null | head -n 1 | \
+            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
+ 
+     glibcxx_gnu_ld_version=`echo $ldver | \
+@@ -85620,7 +85620,7 @@
+     echo "$as_me:$LINENO: checking for ld version" >&5
+ echo $ECHO_N "checking for ld version... $ECHO_C" >&6
+ 
+-    ldver=`$LD --version 2>/dev/null | head -1 | \
++    ldver=`$LD --version 2>/dev/null | head -n 1 | \
+            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
+ 
+     glibcxx_gnu_ld_version=`echo $ldver | \
+@@ -86608,7 +86608,7 @@
+     echo "$as_me:$LINENO: checking for ld version" >&5
+ echo $ECHO_N "checking for ld version... $ECHO_C" >&6
+ 
+-    ldver=`$LD --version 2>/dev/null | head -1 | \
++    ldver=`$LD --version 2>/dev/null | head -n 1 | \
+            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
+ 
+     glibcxx_gnu_ld_version=`echo $ldver | \
+@@ -109087,7 +109087,7 @@
+     echo "$as_me:$LINENO: checking for ld version" >&5
+ echo $ECHO_N "checking for ld version... $ECHO_C" >&6
+ 
+-    ldver=`$LD --version 2>/dev/null | head -1 | \
++    ldver=`$LD --version 2>/dev/null | head -n 1 | \
+            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
+ 
+     glibcxx_gnu_ld_version=`echo $ldver | \
+@@ -109932,7 +109932,7 @@
+     echo "$as_me:$LINENO: checking for ld version" >&5
+ echo $ECHO_N "checking for ld version... $ECHO_C" >&6
+ 
+-    ldver=`$LD --version 2>/dev/null | head -1 | \
++    ldver=`$LD --version 2>/dev/null | head -n 1 | \
+            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
+ 
+     glibcxx_gnu_ld_version=`echo $ldver | \
+@@ -110826,7 +110826,7 @@
+     echo "$as_me:$LINENO: checking for ld version" >&5
+ echo $ECHO_N "checking for ld version... $ECHO_C" >&6
+ 
+-    ldver=`$LD --version 2>/dev/null | head -1 | \
++    ldver=`$LD --version 2>/dev/null | head -n 1 | \
+            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
+ 
+     glibcxx_gnu_ld_version=`echo $ldver | \
+@@ -112112,7 +112112,7 @@
+     echo "$as_me:$LINENO: checking for ld version" >&5
+ echo $ECHO_N "checking for ld version... $ECHO_C" >&6
+ 
+-    ldver=`$LD --version 2>/dev/null | head -1 | \
++    ldver=`$LD --version 2>/dev/null | head -n 1 | \
+            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
+ 
+     glibcxx_gnu_ld_version=`echo $ldver | \
+@@ -112848,7 +112848,7 @@
+     echo "$as_me:$LINENO: checking for ld version" >&5
+ echo $ECHO_N "checking for ld version... $ECHO_C" >&6
+ 
+-    ldver=`$LD --version 2>/dev/null | head -1 | \
++    ldver=`$LD --version 2>/dev/null | head -n 1 | \
+            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
+ 
+     glibcxx_gnu_ld_version=`echo $ldver | \
+@@ -113349,7 +113349,7 @@
+     echo "$as_me:$LINENO: checking for ld version" >&5
+ echo $ECHO_N "checking for ld version... $ECHO_C" >&6
+ 
+-    ldver=`$LD --version 2>/dev/null | head -1 | \
++    ldver=`$LD --version 2>/dev/null | head -n 1 | \
+            sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
+ 
+     glibcxx_gnu_ld_version=`echo $ldver | \
