r965 - branches/2.4-branch/BOOK/chapter05 trunk/BOOK/chapter05

robert at linuxfromscratch.org robert at linuxfromscratch.org
Wed Feb 7 05:28:10 PST 2007


Author: robert
Date: 2007-02-07 06:28:10 -0700 (Wed, 07 Feb 2007)
New Revision: 965

Modified:
   branches/2.4-branch/BOOK/chapter05/gcc-pass2.xml
   trunk/BOOK/chapter05/cocoon-toolchain.xml
Log:
Fixed some of the uClibc support in chapter5's GCC

Modified: branches/2.4-branch/BOOK/chapter05/gcc-pass2.xml
===================================================================
--- branches/2.4-branch/BOOK/chapter05/gcc-pass2.xml	2007-02-07 11:26:26 UTC (rev 964)
+++ branches/2.4-branch/BOOK/chapter05/gcc-pass2.xml	2007-02-07 13:28:10 UTC (rev 965)
@@ -51,6 +51,12 @@
 <screen><userinput>cp -v gcc/Makefile.in{,.orig} &&
 sed 's@\./fixinc\.sh at -c true@' gcc/Makefile.in.orig > gcc/Makefile.in</userinput></screen>
 
+    <para condition="uclibc">Apply these patches for uClibc support:</para>
+
+<screen condition="uclibc"><userinput>patch -Np1 -i ../&gcc-uClibc_conf-patch;
+patch -Np1 -i ../&gcc-uClibc_libstdc-patch;
+patch -Np1 -i ../&gcc-uClibc_locale-patch;</userinput></screen>
+
     <important>
       <para>The following two commands are critical in ensuring a successful
       build. Do not skip them.</para>
@@ -86,16 +92,23 @@
 
     <para>Now prepare GCC for compilation:</para>
 
-<screen><userinput>../gcc-&gcc-version;/configure --prefix=/tools \
+<screen condition="glibc"><userinput>../gcc-&gcc-version;/configure --prefix=/tools \
     --with-local-prefix=/tools --enable-clocale=gnu \
     --enable-shared --enable-threads=posix \
     --enable-__cxa_atexit --enable-languages=c,c++ \
     --disable-libstdcxx-pch</userinput></screen>
 
+<screen condition="uclibc"><userinput>../gcc-&gcc-version;/configure --prefix=/tools \
+    --with-local-prefix=/tools --enable-clocale \
+    --enable-shared --enable-threads=posix \
+    --enable-__cxa_atexit --enable-languages=c,c++ \
+    --disable-libstdcxx-pch --target=$(uname -m)-pc-linux-uclibc
+    --build=$(uname -m)-pc-linux-uclibc --host=$(uname -m)-pc-linux-uclibc</userinput></screen>
+
     <variablelist>
       <title>The meaning of the new configure options:</title>
 
-      <varlistentry>
+      <varlistentry condition="glibc">
         <term><parameter>--enable-clocale=gnu</parameter></term>
         <listitem>
           <para>This option ensures the correct locale model is selected
@@ -109,6 +122,14 @@
         </listitem>
       </varlistentry>
 
+      <varlistentry condition="uclibc">
+        <term><parameter>--enable-clocale</parameter></term>
+        <listitem>
+          <para>This option enabled C locale support for the C++ libraries.
+          The uclibc locale model will be automatically detected.</para>
+        </listitem>
+      </varlistentry>
+
       <varlistentry>
         <term><parameter>--enable-threads=posix</parameter></term>
         <listitem>
@@ -145,6 +166,23 @@
         </listitem>
       </varlistentry>
 
+      <varlistentry condition="uclibc">
+        <term><parameter>--target=$(uname -m)-pc-linux-uclibc</parameter></term>
+        <listitem>
+          <para>This option specifies the target system will be uClibc. Without
+          this option the configure scripts will assume the system is GNU and
+          will use incorrect C locales and other settings.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry condition="uclibc">
+        <term><parameter>--build/host=$(uname -m)-pc-linux-uclibc</parameter></term>
+        <listitem>
+          <para>These options are specified to match the target system type so
+          GCC will not build a cross compiler.</para>
+        </listitem>
+      </varlistentry>
+
     </variablelist>
 
     <para>Compile the package:</para>

Modified: trunk/BOOK/chapter05/cocoon-toolchain.xml
===================================================================
--- trunk/BOOK/chapter05/cocoon-toolchain.xml	2007-02-07 11:26:26 UTC (rev 964)
+++ trunk/BOOK/chapter05/cocoon-toolchain.xml	2007-02-07 13:28:10 UTC (rev 965)
@@ -72,12 +72,14 @@
 
 <screen role="pax"><userinput>patch -Np1 -i ../&binutils-pt_pax-patch;</userinput></screen>
 
-<para condition="uclibc">Apply this patch to add uClibc to the configure script of GCC:</para>
+    <para condition="uclibc">Apply these patches for uClibc support in GCC:</para>
 
-<screen condition="uclibc"><userinput>patch -Np1 -i ../&gcc-uClibc_conf-patch;</userinput></screen>
+<screen condition="uclibc"><userinput>patch -Np1 -i ../&gcc-uClibc_conf-patch;
+patch -Np1 -i ../&gcc-uClibc_libstdc-patch;
+patch -Np1 -i ../&gcc-uClibc_locale-patch;</userinput></screen>
 
-<para condition="uclibc">Apply this patch to add uClibc to the configure script of
-Binutils.</para>
+    <para condition="uclibc">Apply this patch to add uClibc to the configure
+    script of Binutils.</para>
 
 <screen condition="uclibc"><userinput>patch -Np1 -i ../&binutils-uClibc_conf-patch;</userinput></screen>
 
@@ -436,16 +438,47 @@
 
 <para>Prepare the toolchain for compilation:</para>
 
-<screen><userinput>../cocoon-toolchain/configure --prefix=/tools \
-    --with-local-prefix=/tools --enable-shared \
-    --enable-clocale=<literal condition="glibc">gnu</literal><literal condition="uclibc">uclibc</literal> --enable-threads=posix \
+<screen condition="glibc"><userinput>../gcc-&gcc-version;/configure --prefix=/tools \
+    --with-local-prefix=/tools --enable-clocale=gnu \
+    --enable-shared --enable-threads=posix \
     --enable-__cxa_atexit --enable-languages=c,c++ \
     --with-lib-path=/tools/lib --disable-libstdcxx-pch \
     --enable-checking --enable-werror-always</userinput></screen>
 
+<screen condition="uclibc"><userinput>../gcc-&gcc-version;/configure --prefix=/tools \
+    --with-local-prefix=/tools --enable-clocale \
+    --enable-shared --enable-threads=posix \
+    --enable-__cxa_atexit --enable-languages=c,c++ \
+    --with-lib-path=/tools/lib --disable-libstdcxx-pch \
+    --enable-checking --enable-werror-always \
+    --target=$(uname -m)-pc-linux-uclibc --build=$(uname -m)-pc-linux-uclibc \
+    --host=$(uname -m)-pc-linux-uclibc</userinput></screen>
+
 <variablelist>
     <title>The meaning of the configure options:</title>
 
+      <varlistentry condition="glibc">
+        <term><parameter>--enable-clocale=gnu</parameter></term>
+        <listitem>
+          <para>This option ensures the correct locale model is selected
+          for the C++ libraries under all circumstances. If the configure
+          script finds the <emphasis>de_DE</emphasis> locale installed,
+          it will select the correct gnu locale model. However, if the
+          <emphasis>de_DE</emphasis> locale is not installed, there is the
+          risk of building Application Binary Interface (ABI)-incompatible
+          C++ libraries because the incorrect generic locale model may be
+          selected.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry condition="uclibc">
+        <term><parameter>--enable-clocale</parameter></term>
+        <listitem>
+          <para>This option enabled C locale support for the C++ libraries.
+          The uclibc locale model will be automatically detected.</para>
+        </listitem>
+      </varlistentry>
+
       <varlistentry>
         <term><parameter>--enable-shared</parameter></term>
         <listitem>
@@ -460,20 +493,6 @@
       </varlistentry>
 
       <varlistentry>
-        <term><parameter>--enable-clocale=gnu</parameter></term>
-        <listitem>
-          <para>This option ensures the correct locale model is selected
-          for the C++ libraries under all circumstances. If the configure
-          script finds the <emphasis>de_DE</emphasis> locale installed,
-          it will select the correct gnu locale model. However, if the
-          <emphasis>de_DE</emphasis> locale is not installed, there is the
-          risk of building Application Binary Interface (ABI)-incompatible
-          C++ libraries because the incorrect generic locale model may be
-          selected.</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
         <term><parameter>--enable-threads=posix</parameter></term>
         <listitem>
           <para>This enables C++ exception handling for multi-threaded code.</para>
@@ -528,6 +547,23 @@
         </listitem>
       </varlistentry>
 
+      <varlistentry condition="uclibc">
+        <term><parameter>--target=$(uname -m)-pc-linux-uclibc</parameter></term>
+        <listitem>
+          <para>This option specifies the target system will be uClibc. Without
+          this option the configure scripts will assume the system is GNU and
+          will use incorrect C locales and other settings.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry condition="uclibc">
+        <term><parameter>--build/host=$(uname -m)-pc-linux-uclibc</parameter></term>
+        <listitem>
+          <para>These options are specified to match the target system type so
+          GCC will not build a cross compiler.</para>
+        </listitem>
+      </varlistentry>
+
 </variablelist>
 
 <para>Compile the toolchain:</para>




More information about the hlfs-book mailing list